@deepdesk/deepdesk-sdk 17.0.0-rc.9 → 17.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,49 +1,49 @@
1
- "use strict";var Deepdesk=(()=>{var KA=Object.create;var qa=Object.defineProperty,WA=Object.defineProperties,qA=Object.getOwnPropertyDescriptor,GA=Object.getOwnPropertyDescriptors,YA=Object.getOwnPropertyNames,mu=Object.getOwnPropertySymbols,XA=Object.getPrototypeOf,xm=Object.prototype.hasOwnProperty,nx=Object.prototype.propertyIsEnumerable;var wm=Math.pow,vm=(e,t,n)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))xm.call(t,n)&&vm(e,n,t[n]);if(mu)for(var n of mu(t))nx.call(t,n)&&vm(e,n,t[n]);return e},P=(e,t)=>WA(e,GA(t));var Sm=e=>typeof e=="symbol"?e:e+"",oe=(e,t)=>{var n={};for(var r in e)xm.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&mu)for(var r of mu(e))t.indexOf(r)<0&&nx.call(e,r)&&(n[r]=e[r]);return n};var en=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rt=(e,t)=>{for(var n in t)qa(e,n,{get:t[n],enumerable:!0})},rx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of YA(t))!xm.call(e,o)&&o!==n&&qa(e,o,{get:()=>t[o],enumerable:!(r=qA(t,o))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?KA(XA(e)):{},rx(t||!e||!e.__esModule?qa(n,"default",{value:e,enumerable:!0}):n,e)),QA=e=>rx(qa({},"__esModule",{value:!0}),e);var be=(e,t,n)=>vm(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{a(n.next(l))}catch(c){o(c)}},s=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,s);a((n=n.apply(e,t)).next())});var Ne=en((QF,gu)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(o=r(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var s in o)e.call(o,s)&&o[s]&&(i=r(i,s));return i}function r(o,i){return i?o?o+" "+i:o+i:o}typeof gu!="undefined"&&gu.exports?(t.default=t,gu.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var gx=en(he=>{"use strict";var Ga=Symbol.for("react.element"),ZA=Symbol.for("react.portal"),JA=Symbol.for("react.fragment"),eI=Symbol.for("react.strict_mode"),tI=Symbol.for("react.profiler"),nI=Symbol.for("react.provider"),rI=Symbol.for("react.context"),oI=Symbol.for("react.forward_ref"),iI=Symbol.for("react.suspense"),sI=Symbol.for("react.memo"),aI=Symbol.for("react.lazy"),ox=Symbol.iterator;function lI(e){return e===null||typeof e!="object"?null:(e=ox&&e[ox]||e["@@iterator"],typeof e=="function"?e:null)}var ax={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lx=Object.assign,cx={};function Ss(e,t,n){this.props=e,this.context=t,this.refs=cx,this.updater=n||ax}Ss.prototype.isReactComponent={};Ss.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ss.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ux(){}ux.prototype=Ss.prototype;function Em(e,t,n){this.props=e,this.context=t,this.refs=cx,this.updater=n||ax}var Tm=Em.prototype=new ux;Tm.constructor=Em;lx(Tm,Ss.prototype);Tm.isPureReactComponent=!0;var ix=Array.isArray,dx=Object.prototype.hasOwnProperty,Cm={current:null},fx={key:!0,ref:!0,__self:!0,__source:!0};function px(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)dx.call(t,r)&&!fx.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:Ga,type:e,key:i,ref:s,props:o,_owner:Cm.current}}function cI(e,t){return{$$typeof:Ga,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function km(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ga}function uI(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var sx=/\/+/g;function bm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?uI(""+e.key):t.toString(36)}function yu(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Ga:case ZA:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+bm(s,0):r,ix(o)?(n="",e!=null&&(n=e.replace(sx,"$&/")+"/"),yu(o,t,n,"",function(c){return c})):o!=null&&(km(o)&&(o=cI(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(sx,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",ix(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+bm(i,a);s+=yu(i,t,n,l,o)}else if(l=lI(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+bm(i,a++),s+=yu(i,t,n,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function hu(e,t,n){if(e==null)return e;var r=[],o=0;return yu(e,r,"","",function(i){return t.call(n,i,o++)}),r}function dI(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ft={current:null},vu={transition:null},fI={ReactCurrentDispatcher:Ft,ReactCurrentBatchConfig:vu,ReactCurrentOwner:Cm};function mx(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:hu,forEach:function(e,t,n){hu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return hu(e,function(){t++}),t},toArray:function(e){return hu(e,function(t){return t})||[]},only:function(e){if(!km(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=Ss;he.Fragment=JA;he.Profiler=tI;he.PureComponent=Em;he.StrictMode=eI;he.Suspense=iI;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fI;he.act=mx;he.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=lx({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Cm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)dx.call(t,l)&&!fx.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:Ga,type:e.type,key:o,ref:i,props:r,_owner:s}};he.createContext=function(e){return e={$$typeof:rI,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:nI,_context:e},e.Consumer=e};he.createElement=px;he.createFactory=function(e){var t=px.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:oI,render:e}};he.isValidElement=km;he.lazy=function(e){return{$$typeof:aI,_payload:{_status:-1,_result:e},_init:dI}};he.memo=function(e,t){return{$$typeof:sI,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=vu.transition;vu.transition={};try{e()}finally{vu.transition=t}};he.unstable_act=mx;he.useCallback=function(e,t){return Ft.current.useCallback(e,t)};he.useContext=function(e){return Ft.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return Ft.current.useDeferredValue(e)};he.useEffect=function(e,t){return Ft.current.useEffect(e,t)};he.useId=function(){return Ft.current.useId()};he.useImperativeHandle=function(e,t,n){return Ft.current.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Ft.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Ft.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Ft.current.useMemo(e,t)};he.useReducer=function(e,t,n){return Ft.current.useReducer(e,t,n)};he.useRef=function(e){return Ft.current.useRef(e)};he.useState=function(e){return Ft.current.useState(e)};he.useSyncExternalStore=function(e,t,n){return Ft.current.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Ft.current.useTransition()};he.version="18.3.1"});var Z=en((JF,hx)=>{"use strict";hx.exports=gx()});var wx=en(wu=>{"use strict";var pI=Z(),mI=Symbol.for("react.element"),gI=Symbol.for("react.fragment"),hI=Object.prototype.hasOwnProperty,yI=pI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vI={key:!0,ref:!0,__self:!0,__source:!0};function xx(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)hI.call(t,r)&&!vI.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:mI,type:e,key:i,ref:s,props:o,_owner:yI.current}}wu.Fragment=gI;wu.jsx=xx;wu.jsxs=xx});var R=en((a5,Sx)=>{"use strict";Sx.exports=wx()});var ew=en(Me=>{"use strict";function Nm(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<Pu(o,t))e[r]=t,e[n]=o,n=r;else break e}}function jn(e){return e.length===0?null:e[0]}function Iu(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,a=e[s],l=s+1,c=e[l];if(0>Pu(a,n))l<o&&0>Pu(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[s]=n,r=s);else if(l<o&&0>Pu(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function Pu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Kx=performance,Me.unstable_now=function(){return Kx.now()}):(Lm=Date,Wx=Lm.now(),Me.unstable_now=function(){return Lm.now()-Wx});var Kx,Lm,Wx,br=[],Ro=[],DI=1,An=null,Pt=3,Lu=!1,yi=!1,Qa=!1,Yx=typeof setTimeout=="function"?setTimeout:null,Xx=typeof clearTimeout=="function"?clearTimeout:null,qx=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Mm(e){for(var t=jn(Ro);t!==null;){if(t.callback===null)Iu(Ro);else if(t.startTime<=e)Iu(Ro),t.sortIndex=t.expirationTime,Nm(br,t);else break;t=jn(Ro)}}function Dm(e){if(Qa=!1,Mm(e),!yi)if(jn(br)!==null)yi=!0,zm(Fm);else{var t=jn(Ro);t!==null&&Hm(Dm,t.startTime-e)}}function Fm(e,t){yi=!1,Qa&&(Qa=!1,Xx(Za),Za=-1),Lu=!0;var n=Pt;try{for(Mm(t),An=jn(br);An!==null&&(!(An.expirationTime>t)||e&&!Jx());){var r=An.callback;if(typeof r=="function"){An.callback=null,Pt=An.priorityLevel;var o=r(An.expirationTime<=t);t=Me.unstable_now(),typeof o=="function"?An.callback=o:An===jn(br)&&Iu(br),Mm(t)}else Iu(br);An=jn(br)}if(An!==null)var i=!0;else{var s=jn(Ro);s!==null&&Hm(Dm,s.startTime-t),i=!1}return i}finally{An=null,Pt=n,Lu=!1}}var _u=!1,Au=null,Za=-1,Qx=5,Zx=-1;function Jx(){return!(Me.unstable_now()-Zx<Qx)}function _m(){if(Au!==null){var e=Me.unstable_now();Zx=e;var t=!0;try{t=Au(!0,e)}finally{t?Xa():(_u=!1,Au=null)}}else _u=!1}var Xa;typeof qx=="function"?Xa=function(){qx(_m)}:typeof MessageChannel!="undefined"?(Om=new MessageChannel,Gx=Om.port2,Om.port1.onmessage=_m,Xa=function(){Gx.postMessage(null)}):Xa=function(){Yx(_m,0)};var Om,Gx;function zm(e){Au=e,_u||(_u=!0,Xa())}function Hm(e,t){Za=Yx(function(){e(Me.unstable_now())},t)}Me.unstable_IdlePriority=5;Me.unstable_ImmediatePriority=1;Me.unstable_LowPriority=4;Me.unstable_NormalPriority=3;Me.unstable_Profiling=null;Me.unstable_UserBlockingPriority=2;Me.unstable_cancelCallback=function(e){e.callback=null};Me.unstable_continueExecution=function(){yi||Lu||(yi=!0,zm(Fm))};Me.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Qx=0<e?Math.floor(1e3/e):5};Me.unstable_getCurrentPriorityLevel=function(){return Pt};Me.unstable_getFirstCallbackNode=function(){return jn(br)};Me.unstable_next=function(e){switch(Pt){case 1:case 2:case 3:var t=3;break;default:t=Pt}var n=Pt;Pt=t;try{return e()}finally{Pt=n}};Me.unstable_pauseExecution=function(){};Me.unstable_requestPaint=function(){};Me.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Pt;Pt=e;try{return t()}finally{Pt=n}};Me.unstable_scheduleCallback=function(e,t,n){var r=Me.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:DI++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Nm(Ro,e),jn(br)===null&&e===jn(Ro)&&(Qa?(Xx(Za),Za=-1):Qa=!0,Hm(Dm,n-r))):(e.sortIndex=o,Nm(br,e),yi||Lu||(yi=!0,zm(Fm))),e};Me.unstable_shouldYield=Jx;Me.unstable_wrapCallback=function(e){var t=Pt;return function(){var n=Pt;Pt=t;try{return e.apply(this,arguments)}finally{Pt=n}}}});var nw=en((O6,tw)=>{"use strict";tw.exports=ew()});var sE=en(wn=>{"use strict";var FI=Z(),vn=nw();function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var cS=new Set,wl={};function Ii(e,t){Ws(e,t),Ws(e+"Capture",t)}function Ws(e,t){for(wl[e]=t,e=0;e<t.length;e++)cS.add(t[e])}var Yr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),lg=Object.prototype.hasOwnProperty,zI=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rw={},ow={};function HI(e){return lg.call(ow,e)?!0:lg.call(rw,e)?!1:zI.test(e)?ow[e]=!0:(rw[e]=!0,!1)}function BI(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function UI(e,t,n,r){if(t===null||typeof t=="undefined"||BI(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new Bt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new Bt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new Bt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new Bt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){bt[e]=new Bt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new Bt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new Bt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new Bt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new Bt(e,5,!1,e.toLowerCase(),null,!1,!1)});var eh=/[\-:]([a-z])/g;function th(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(eh,th);bt[t]=new Bt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(eh,th);bt[t]=new Bt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(eh,th);bt[t]=new Bt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new Bt(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Bt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new Bt(e,1,!1,e.toLowerCase(),null,!0,!0)});function nh(e,t,n,r){var o=bt.hasOwnProperty(t)?bt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(UI(t,n,o,r)&&(n=null),r||o===null?HI(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Jr=FI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ou=Symbol.for("react.element"),Ps=Symbol.for("react.portal"),As=Symbol.for("react.fragment"),rh=Symbol.for("react.strict_mode"),cg=Symbol.for("react.profiler"),uS=Symbol.for("react.provider"),dS=Symbol.for("react.context"),oh=Symbol.for("react.forward_ref"),ug=Symbol.for("react.suspense"),dg=Symbol.for("react.suspense_list"),ih=Symbol.for("react.memo"),Ao=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var fS=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var iw=Symbol.iterator;function Ja(e){return e===null||typeof e!="object"?null:(e=iw&&e[iw]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Object.assign,Bm;function al(e){if(Bm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bm=t&&t[1]||""}return`
2
- `+Bm+e}var Um=!1;function Vm(e,t){if(!e||Um)return"";Um=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
1
+ "use strict";var Deepdesk=(()=>{var VA=Object.create;var Ga=Object.defineProperty,$A=Object.defineProperties,jA=Object.getOwnPropertyDescriptor,WA=Object.getOwnPropertyDescriptors,KA=Object.getOwnPropertyNames,hu=Object.getOwnPropertySymbols,GA=Object.getPrototypeOf,Sm=Object.prototype.hasOwnProperty,tx=Object.prototype.propertyIsEnumerable;var bm=Math.pow,wm=(e,t,n)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))Sm.call(t,n)&&wm(e,n,t[n]);if(hu)for(var n of hu(t))tx.call(t,n)&&wm(e,n,t[n]);return e},P=(e,t)=>$A(e,WA(t));var Em=e=>typeof e=="symbol"?e:e+"",oe=(e,t)=>{var n={};for(var r in e)Sm.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hu)for(var r of hu(e))t.indexOf(r)<0&&tx.call(e,r)&&(n[r]=e[r]);return n};var tn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),kt=(e,t)=>{for(var n in t)Ga(e,n,{get:t[n],enumerable:!0})},nx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of KA(t))!Sm.call(e,o)&&o!==n&&Ga(e,o,{get:()=>t[o],enumerable:!(r=jA(t,o))||r.enumerable});return e};var b=(e,t,n)=>(n=e!=null?VA(GA(e)):{},nx(t||!e||!e.__esModule?Ga(n,"default",{value:e,enumerable:!0}):n,e)),qA=e=>nx(Ga({},"__esModule",{value:!0}),e);var Ee=(e,t,n)=>wm(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{a(n.next(l))}catch(c){o(c)}},s=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,s);a((n=n.apply(e,t)).next())});var Me=tn((YF,yu)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(o=r(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var s in o)e.call(o,s)&&o[s]&&(i=r(i,s));return i}function r(o,i){return i?o?o+" "+i:o+i:o}typeof yu!="undefined"&&yu.exports?(t.default=t,yu.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var mx=tn(he=>{"use strict";var qa=Symbol.for("react.element"),YA=Symbol.for("react.portal"),XA=Symbol.for("react.fragment"),QA=Symbol.for("react.strict_mode"),ZA=Symbol.for("react.profiler"),JA=Symbol.for("react.provider"),eI=Symbol.for("react.context"),tI=Symbol.for("react.forward_ref"),nI=Symbol.for("react.suspense"),rI=Symbol.for("react.memo"),oI=Symbol.for("react.lazy"),rx=Symbol.iterator;function iI(e){return e===null||typeof e!="object"?null:(e=rx&&e[rx]||e["@@iterator"],typeof e=="function"?e:null)}var sx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ax=Object.assign,lx={};function bs(e,t,n){this.props=e,this.context=t,this.refs=lx,this.updater=n||sx}bs.prototype.isReactComponent={};bs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};bs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cx(){}cx.prototype=bs.prototype;function Cm(e,t,n){this.props=e,this.context=t,this.refs=lx,this.updater=n||sx}var km=Cm.prototype=new cx;km.constructor=Cm;ax(km,bs.prototype);km.isPureReactComponent=!0;var ox=Array.isArray,ux=Object.prototype.hasOwnProperty,Rm={current:null},dx={key:!0,ref:!0,__self:!0,__source:!0};function fx(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)ux.call(t,r)&&!dx.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:qa,type:e,key:i,ref:s,props:o,_owner:Rm.current}}function sI(e,t){return{$$typeof:qa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pm(e){return typeof e=="object"&&e!==null&&e.$$typeof===qa}function aI(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ix=/\/+/g;function Tm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?aI(""+e.key):t.toString(36)}function xu(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case qa:case YA:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Tm(s,0):r,ox(o)?(n="",e!=null&&(n=e.replace(ix,"$&/")+"/"),xu(o,t,n,"",function(c){return c})):o!=null&&(Pm(o)&&(o=sI(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(ix,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",ox(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Tm(i,a);s+=xu(i,t,n,l,o)}else if(l=iI(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Tm(i,a++),s+=xu(i,t,n,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function vu(e,t,n){if(e==null)return e;var r=[],o=0;return xu(e,r,"","",function(i){return t.call(n,i,o++)}),r}function lI(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ft={current:null},wu={transition:null},cI={ReactCurrentDispatcher:Ft,ReactCurrentBatchConfig:wu,ReactCurrentOwner:Rm};function px(){throw Error("act(...) is not supported in production builds of React.")}he.Children={map:vu,forEach:function(e,t,n){vu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return vu(e,function(){t++}),t},toArray:function(e){return vu(e,function(t){return t})||[]},only:function(e){if(!Pm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=bs;he.Fragment=XA;he.Profiler=ZA;he.PureComponent=Cm;he.StrictMode=QA;he.Suspense=nI;he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cI;he.act=px;he.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=ax({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Rm.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ux.call(t,l)&&!dx.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:qa,type:e.type,key:o,ref:i,props:r,_owner:s}};he.createContext=function(e){return e={$$typeof:eI,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:JA,_context:e},e.Consumer=e};he.createElement=fx;he.createFactory=function(e){var t=fx.bind(null,e);return t.type=e,t};he.createRef=function(){return{current:null}};he.forwardRef=function(e){return{$$typeof:tI,render:e}};he.isValidElement=Pm;he.lazy=function(e){return{$$typeof:oI,_payload:{_status:-1,_result:e},_init:lI}};he.memo=function(e,t){return{$$typeof:rI,type:e,compare:t===void 0?null:t}};he.startTransition=function(e){var t=wu.transition;wu.transition={};try{e()}finally{wu.transition=t}};he.unstable_act=px;he.useCallback=function(e,t){return Ft.current.useCallback(e,t)};he.useContext=function(e){return Ft.current.useContext(e)};he.useDebugValue=function(){};he.useDeferredValue=function(e){return Ft.current.useDeferredValue(e)};he.useEffect=function(e,t){return Ft.current.useEffect(e,t)};he.useId=function(){return Ft.current.useId()};he.useImperativeHandle=function(e,t,n){return Ft.current.useImperativeHandle(e,t,n)};he.useInsertionEffect=function(e,t){return Ft.current.useInsertionEffect(e,t)};he.useLayoutEffect=function(e,t){return Ft.current.useLayoutEffect(e,t)};he.useMemo=function(e,t){return Ft.current.useMemo(e,t)};he.useReducer=function(e,t,n){return Ft.current.useReducer(e,t,n)};he.useRef=function(e){return Ft.current.useRef(e)};he.useState=function(e){return Ft.current.useState(e)};he.useSyncExternalStore=function(e,t,n){return Ft.current.useSyncExternalStore(e,t,n)};he.useTransition=function(){return Ft.current.useTransition()};he.version="18.3.1"});var Q=tn((QF,gx)=>{"use strict";gx.exports=mx()});var xx=tn(bu=>{"use strict";var uI=Q(),dI=Symbol.for("react.element"),fI=Symbol.for("react.fragment"),pI=Object.prototype.hasOwnProperty,mI=uI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gI={key:!0,ref:!0,__self:!0,__source:!0};function vx(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)pI.call(t,r)&&!gI.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:dI,type:e,key:i,ref:s,props:o,_owner:mI.current}}bu.Fragment=fI;bu.jsx=vx;bu.jsxs=vx});var R=tn((i5,wx)=>{"use strict";wx.exports=xx()});var Jx=tn(_e=>{"use strict";function Dm(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<Iu(o,t))e[r]=t,e[n]=o,n=r;else break e}}function jn(e){return e.length===0?null:e[0]}function Ou(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,a=e[s],l=s+1,c=e[l];if(0>Iu(a,n))l<o&&0>Iu(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[s]=n,r=s);else if(l<o&&0>Iu(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function Iu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(jx=performance,_e.unstable_now=function(){return jx.now()}):(Nm=Date,Wx=Nm.now(),_e.unstable_now=function(){return Nm.now()-Wx});var jx,Nm,Wx,Sr=[],Ro=[],NI=1,An=null,Rt=3,Nu=!1,vi=!1,Qa=!1,qx=typeof setTimeout=="function"?setTimeout:null,Yx=typeof clearTimeout=="function"?clearTimeout:null,Kx=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Fm(e){for(var t=jn(Ro);t!==null;){if(t.callback===null)Ou(Ro);else if(t.startTime<=e)Ou(Ro),t.sortIndex=t.expirationTime,Dm(Sr,t);else break;t=jn(Ro)}}function zm(e){if(Qa=!1,Fm(e),!vi)if(jn(Sr)!==null)vi=!0,Bm(Hm);else{var t=jn(Ro);t!==null&&Um(zm,t.startTime-e)}}function Hm(e,t){vi=!1,Qa&&(Qa=!1,Yx(Za),Za=-1),Nu=!0;var n=Rt;try{for(Fm(t),An=jn(Sr);An!==null&&(!(An.expirationTime>t)||e&&!Zx());){var r=An.callback;if(typeof r=="function"){An.callback=null,Rt=An.priorityLevel;var o=r(An.expirationTime<=t);t=_e.unstable_now(),typeof o=="function"?An.callback=o:An===jn(Sr)&&Ou(Sr),Fm(t)}else Ou(Sr);An=jn(Sr)}if(An!==null)var i=!0;else{var s=jn(Ro);s!==null&&Um(zm,s.startTime-t),i=!1}return i}finally{An=null,Rt=n,Nu=!1}}var Mu=!1,Lu=null,Za=-1,Xx=5,Qx=-1;function Zx(){return!(_e.unstable_now()-Qx<Xx)}function Mm(){if(Lu!==null){var e=_e.unstable_now();Qx=e;var t=!0;try{t=Lu(!0,e)}finally{t?Xa():(Mu=!1,Lu=null)}}else Mu=!1}var Xa;typeof Kx=="function"?Xa=function(){Kx(Mm)}:typeof MessageChannel!="undefined"?(_m=new MessageChannel,Gx=_m.port2,_m.port1.onmessage=Mm,Xa=function(){Gx.postMessage(null)}):Xa=function(){qx(Mm,0)};var _m,Gx;function Bm(e){Lu=e,Mu||(Mu=!0,Xa())}function Um(e,t){Za=qx(function(){e(_e.unstable_now())},t)}_e.unstable_IdlePriority=5;_e.unstable_ImmediatePriority=1;_e.unstable_LowPriority=4;_e.unstable_NormalPriority=3;_e.unstable_Profiling=null;_e.unstable_UserBlockingPriority=2;_e.unstable_cancelCallback=function(e){e.callback=null};_e.unstable_continueExecution=function(){vi||Nu||(vi=!0,Bm(Hm))};_e.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Xx=0<e?Math.floor(1e3/e):5};_e.unstable_getCurrentPriorityLevel=function(){return Rt};_e.unstable_getFirstCallbackNode=function(){return jn(Sr)};_e.unstable_next=function(e){switch(Rt){case 1:case 2:case 3:var t=3;break;default:t=Rt}var n=Rt;Rt=t;try{return e()}finally{Rt=n}};_e.unstable_pauseExecution=function(){};_e.unstable_requestPaint=function(){};_e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Rt;Rt=e;try{return t()}finally{Rt=n}};_e.unstable_scheduleCallback=function(e,t,n){var r=_e.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:NI++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Dm(Ro,e),jn(Sr)===null&&e===jn(Ro)&&(Qa?(Yx(Za),Za=-1):Qa=!0,Um(zm,n-r))):(e.sortIndex=o,Dm(Sr,e),vi||Nu||(vi=!0,Bm(Hm))),e};_e.unstable_shouldYield=Zx;_e.unstable_wrapCallback=function(e){var t=Rt;return function(){var n=Rt;Rt=t;try{return e.apply(this,arguments)}finally{Rt=n}}}});var tw=tn((L6,ew)=>{"use strict";ew.exports=Jx()});var iE=tn(xn=>{"use strict";var MI=Q(),yn=tw();function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var lS=new Set,wl={};function Li(e,t){Gs(e,t),Gs(e+"Capture",t)}function Gs(e,t){for(wl[e]=t,e=0;e<t.length;e++)lS.add(t[e])}var Gr=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),ug=Object.prototype.hasOwnProperty,_I=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,nw={},rw={};function DI(e){return ug.call(rw,e)?!0:ug.call(nw,e)?!1:_I.test(e)?rw[e]=!0:(nw[e]=!0,!1)}function FI(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zI(e,t,n,r){if(t===null||typeof t=="undefined"||FI(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Vt(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var bt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){bt[e]=new Vt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];bt[t]=new Vt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){bt[e]=new Vt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){bt[e]=new Vt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){bt[e]=new Vt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){bt[e]=new Vt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){bt[e]=new Vt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){bt[e]=new Vt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){bt[e]=new Vt(e,5,!1,e.toLowerCase(),null,!1,!1)});var nh=/[\-:]([a-z])/g;function rh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(nh,rh);bt[t]=new Vt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(nh,rh);bt[t]=new Vt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(nh,rh);bt[t]=new Vt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){bt[e]=new Vt(e,1,!1,e.toLowerCase(),null,!1,!1)});bt.xlinkHref=new Vt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){bt[e]=new Vt(e,1,!1,e.toLowerCase(),null,!0,!0)});function oh(e,t,n,r){var o=bt.hasOwnProperty(t)?bt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(zI(t,n,o,r)&&(n=null),r||o===null?DI(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Qr=MI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_u=Symbol.for("react.element"),As=Symbol.for("react.portal"),Is=Symbol.for("react.fragment"),ih=Symbol.for("react.strict_mode"),dg=Symbol.for("react.profiler"),cS=Symbol.for("react.provider"),uS=Symbol.for("react.context"),sh=Symbol.for("react.forward_ref"),fg=Symbol.for("react.suspense"),pg=Symbol.for("react.suspense_list"),ah=Symbol.for("react.memo"),Ao=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var dS=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var ow=Symbol.iterator;function Ja(e){return e===null||typeof e!="object"?null:(e=ow&&e[ow]||e["@@iterator"],typeof e=="function"?e:null)}var Ge=Object.assign,Vm;function al(e){if(Vm===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Vm=t&&t[1]||""}return`
2
+ `+Vm+e}var $m=!1;function jm(e,t){if(!e||$m)return"";$m=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var o=c.stack.split(`
3
3
  `),i=r.stack.split(`
4
4
  `),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var l=`
5
- `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Um=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?al(e):""}function VI(e){switch(e.tag){case 5:return al(e.type);case 16:return al("Lazy");case 13:return al("Suspense");case 19:return al("SuspenseList");case 0:case 2:case 15:return e=Vm(e.type,!1),e;case 11:return e=Vm(e.type.render,!1),e;case 1:return e=Vm(e.type,!0),e;default:return""}}function fg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case As:return"Fragment";case Ps:return"Portal";case cg:return"Profiler";case rh:return"StrictMode";case ug:return"Suspense";case dg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dS:return(e.displayName||"Context")+".Consumer";case uS:return(e._context.displayName||"Context")+".Provider";case oh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ih:return t=e.displayName||null,t!==null?t:fg(e.type)||"Memo";case Ao:t=e._payload,e=e._init;try{return fg(e(t))}catch(n){}}return null}function $I(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fg(t);case 8:return t===rh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $o(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jI(e){var t=pS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nu(e){e._valueTracker||(e._valueTracker=jI(e))}function mS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=pS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ld(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function pg(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function sw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$o(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function gS(e,t){t=t.checked,t!=null&&nh(e,"checked",t,!1)}function mg(e,t){gS(e,t);var n=$o(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gg(e,t.type,n):t.hasOwnProperty("defaultValue")&&gg(e,t.type,$o(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function aw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gg(e,t,n){(t!=="number"||ld(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ll=Array.isArray;function Bs(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$o(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function hg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return qe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(ll(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$o(n)}}function hS(e,t){var n=$o(t.value),r=$o(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function cw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function yS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function yg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?yS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Mu,vS=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Mu=Mu||document.createElement("div"),Mu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Mu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Sl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dl={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},KI=["Webkit","ms","Moz","O"];Object.keys(dl).forEach(function(e){KI.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dl[t]=dl[e]})});function xS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dl.hasOwnProperty(e)&&dl[e]?(""+t).trim():t+"px"}function wS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=xS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var WI=qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vg(e,t){if(t){if(WI[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function xg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wg=null;function sh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sg=null,Us=null,Vs=null;function uw(e){if(e=Hl(e)){if(typeof Sg!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Dd(t),Sg(e.stateNode,e.type,t))}}function SS(e){Us?Vs?Vs.push(e):Vs=[e]:Us=e}function bS(){if(Us){var e=Us,t=Vs;if(Vs=Us=null,uw(e),t)for(e=0;e<t.length;e++)uw(t[e])}}function ES(e,t){return e(t)}function TS(){}var $m=!1;function CS(e,t,n){if($m)return e(t,n);$m=!0;try{return ES(e,t,n)}finally{$m=!1,(Us!==null||Vs!==null)&&(TS(),bS())}}function bl(e,t){var n=e.stateNode;if(n===null)return null;var r=Dd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(D(231,t,typeof n));return n}var bg=!1;if(Yr)try{ks={},Object.defineProperty(ks,"passive",{get:function(){bg=!0}}),window.addEventListener("test",ks,ks),window.removeEventListener("test",ks,ks)}catch(e){bg=!1}var ks;function qI(e,t,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var fl=!1,cd=null,ud=!1,Eg=null,GI={onError:function(e){fl=!0,cd=e}};function YI(e,t,n,r,o,i,s,a,l){fl=!1,cd=null,qI.apply(GI,arguments)}function XI(e,t,n,r,o,i,s,a,l){if(YI.apply(this,arguments),fl){if(fl){var c=cd;fl=!1,cd=null}else throw Error(D(198));ud||(ud=!0,Eg=c)}}function Li(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function kS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function dw(e){if(Li(e)!==e)throw Error(D(188))}function QI(e){var t=e.alternate;if(!t){if(t=Li(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return dw(o),e;if(i===r)return dw(o),t;i=i.sibling}throw Error(D(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function RS(e){return e=QI(e),e!==null?PS(e):null}function PS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=PS(e);if(t!==null)return t;e=e.sibling}return null}var AS=vn.unstable_scheduleCallback,fw=vn.unstable_cancelCallback,ZI=vn.unstable_shouldYield,JI=vn.unstable_requestPaint,Je=vn.unstable_now,eL=vn.unstable_getCurrentPriorityLevel,ah=vn.unstable_ImmediatePriority,IS=vn.unstable_UserBlockingPriority,dd=vn.unstable_NormalPriority,tL=vn.unstable_LowPriority,LS=vn.unstable_IdlePriority,_d=null,kr=null;function nL(e){if(kr&&typeof kr.onCommitFiberRoot=="function")try{kr.onCommitFiberRoot(_d,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Yn=Math.clz32?Math.clz32:iL,rL=Math.log,oL=Math.LN2;function iL(e){return e>>>=0,e===0?32:31-(rL(e)/oL|0)|0}var Du=64,Fu=4194304;function cl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=cl(a):(i&=s,i!==0&&(r=cl(i)))}else s=n&~o,s!==0?r=cl(s):i!==0&&(r=cl(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Yn(t),o=1<<n,r|=e[n],t&=~o;return r}function sL(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function aL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Yn(i),a=1<<s,l=o[s];l===-1?((a&n)===0||(a&r)!==0)&&(o[s]=sL(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Tg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _S(){var e=Du;return Du<<=1,(Du&4194240)===0&&(Du=64),e}function jm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yn(t),e[t]=n}function lL(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Yn(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function lh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ae=0;function OS(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var NS,ch,MS,DS,FS,Cg=!1,zu=[],Mo=null,Do=null,Fo=null,El=new Map,Tl=new Map,Lo=[],cL="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".split(" ");function pw(e,t){switch(e){case"focusin":case"focusout":Mo=null;break;case"dragenter":case"dragleave":Do=null;break;case"mouseover":case"mouseout":Fo=null;break;case"pointerover":case"pointerout":El.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tl.delete(t.pointerId)}}function el(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Hl(t),t!==null&&ch(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function uL(e,t,n,r,o){switch(t){case"focusin":return Mo=el(Mo,e,t,n,r,o),!0;case"dragenter":return Do=el(Do,e,t,n,r,o),!0;case"mouseover":return Fo=el(Fo,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return El.set(i,el(El.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Tl.set(i,el(Tl.get(i)||null,e,t,n,r,o)),!0}return!1}function zS(e){var t=wi(e.target);if(t!==null){var n=Li(t);if(n!==null){if(t=n.tag,t===13){if(t=kS(n),t!==null){e.blockedOn=t,FS(e.priority,function(){MS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Zu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=kg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);wg=r,n.target.dispatchEvent(r),wg=null}else return t=Hl(n),t!==null&&ch(t),e.blockedOn=n,!1;t.shift()}return!0}function mw(e,t,n){Zu(e)&&n.delete(t)}function dL(){Cg=!1,Mo!==null&&Zu(Mo)&&(Mo=null),Do!==null&&Zu(Do)&&(Do=null),Fo!==null&&Zu(Fo)&&(Fo=null),El.forEach(mw),Tl.forEach(mw)}function tl(e,t){e.blockedOn===t&&(e.blockedOn=null,Cg||(Cg=!0,vn.unstable_scheduleCallback(vn.unstable_NormalPriority,dL)))}function Cl(e){function t(o){return tl(o,e)}if(0<zu.length){tl(zu[0],e);for(var n=1;n<zu.length;n++){var r=zu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Mo!==null&&tl(Mo,e),Do!==null&&tl(Do,e),Fo!==null&&tl(Fo,e),El.forEach(t),Tl.forEach(t),n=0;n<Lo.length;n++)r=Lo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lo.length&&(n=Lo[0],n.blockedOn===null);)zS(n),n.blockedOn===null&&Lo.shift()}var $s=Jr.ReactCurrentBatchConfig,pd=!0;function fL(e,t,n,r){var o=Ae,i=$s.transition;$s.transition=null;try{Ae=1,uh(e,t,n,r)}finally{Ae=o,$s.transition=i}}function pL(e,t,n,r){var o=Ae,i=$s.transition;$s.transition=null;try{Ae=4,uh(e,t,n,r)}finally{Ae=o,$s.transition=i}}function uh(e,t,n,r){if(pd){var o=kg(e,t,n,r);if(o===null)Qm(e,t,r,md,n),pw(e,r);else if(uL(o,e,t,n,r))r.stopPropagation();else if(pw(e,r),t&4&&-1<cL.indexOf(e)){for(;o!==null;){var i=Hl(o);if(i!==null&&NS(i),i=kg(e,t,n,r),i===null&&Qm(e,t,r,md,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Qm(e,t,r,null,n)}}var md=null;function kg(e,t,n,r){if(md=null,e=sh(r),e=wi(e),e!==null)if(t=Li(e),t===null)e=null;else if(n=t.tag,n===13){if(e=kS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return md=e,null}function HS(e){switch(e){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 1;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 4;case"message":switch(eL()){case ah:return 1;case IS:return 4;case dd:case tL:return 16;case LS:return 536870912;default:return 16}default:return 16}}var Oo=null,dh=null,Ju=null;function BS(){if(Ju)return Ju;var e,t=dh,n=t.length,r,o="value"in Oo?Oo.value:Oo.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Ju=o.slice(e,1<r?1-r:void 0)}function ed(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hu(){return!0}function gw(){return!1}function xn(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Hu:gw,this.isPropagationStopped=gw,this}return qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Hu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Hu)},persist:function(){},isPersistent:Hu}),t}var Js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fh=xn(Js),zl=qe({},Js,{view:0,detail:0}),mL=xn(zl),Km,Wm,nl,Od=qe({},zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ph,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nl&&(nl&&e.type==="mousemove"?(Km=e.screenX-nl.screenX,Wm=e.screenY-nl.screenY):Wm=Km=0,nl=e),Km)},movementY:function(e){return"movementY"in e?e.movementY:Wm}}),hw=xn(Od),gL=qe({},Od,{dataTransfer:0}),hL=xn(gL),yL=qe({},zl,{relatedTarget:0}),qm=xn(yL),vL=qe({},Js,{animationName:0,elapsedTime:0,pseudoElement:0}),xL=xn(vL),wL=qe({},Js,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),SL=xn(wL),bL=qe({},Js,{data:0}),yw=xn(bL),EL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TL={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"},CL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function kL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=CL[e])?!!t[e]:!1}function ph(){return kL}var RL=qe({},zl,{key:function(e){if(e.key){var t=EL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ed(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?TL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ph,charCode:function(e){return e.type==="keypress"?ed(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ed(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),PL=xn(RL),AL=qe({},Od,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vw=xn(AL),IL=qe({},zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ph}),LL=xn(IL),_L=qe({},Js,{propertyName:0,elapsedTime:0,pseudoElement:0}),OL=xn(_L),NL=qe({},Od,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ML=xn(NL),DL=[9,13,27,32],mh=Yr&&"CompositionEvent"in window,pl=null;Yr&&"documentMode"in document&&(pl=document.documentMode);var FL=Yr&&"TextEvent"in window&&!pl,US=Yr&&(!mh||pl&&8<pl&&11>=pl),xw=" ",ww=!1;function VS(e,t){switch(e){case"keyup":return DL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $S(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Is=!1;function zL(e,t){switch(e){case"compositionend":return $S(t);case"keypress":return t.which!==32?null:(ww=!0,xw);case"textInput":return e=t.data,e===xw&&ww?null:e;default:return null}}function HL(e,t){if(Is)return e==="compositionend"||!mh&&VS(e,t)?(e=BS(),Ju=dh=Oo=null,Is=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return US&&t.locale!=="ko"?null:t.data;default:return null}}var BL={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 Sw(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!BL[e.type]:t==="textarea"}function jS(e,t,n,r){SS(r),t=gd(t,"onChange"),0<t.length&&(n=new fh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ml=null,kl=null;function UL(e){tb(e,0)}function Nd(e){var t=Os(e);if(mS(t))return e}function VL(e,t){if(e==="change")return t}var KS=!1;Yr&&(Yr?(Uu="oninput"in document,Uu||(Gm=document.createElement("div"),Gm.setAttribute("oninput","return;"),Uu=typeof Gm.oninput=="function"),Bu=Uu):Bu=!1,KS=Bu&&(!document.documentMode||9<document.documentMode));var Bu,Uu,Gm;function bw(){ml&&(ml.detachEvent("onpropertychange",WS),kl=ml=null)}function WS(e){if(e.propertyName==="value"&&Nd(kl)){var t=[];jS(t,kl,e,sh(e)),CS(UL,t)}}function $L(e,t,n){e==="focusin"?(bw(),ml=t,kl=n,ml.attachEvent("onpropertychange",WS)):e==="focusout"&&bw()}function jL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nd(kl)}function KL(e,t){if(e==="click")return Nd(t)}function WL(e,t){if(e==="input"||e==="change")return Nd(t)}function qL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qn=typeof Object.is=="function"?Object.is:qL;function Rl(e,t){if(Qn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!lg.call(t,o)||!Qn(e[o],t[o]))return!1}return!0}function Ew(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tw(e,t){var n=Ew(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ew(n)}}function qS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function GS(){for(var e=window,t=ld();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=ld(e.document)}return t}function gh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function GL(e){var t=GS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&qS(n.ownerDocument.documentElement,n)){if(r!==null&&gh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Tw(n,i);var s=Tw(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var YL=Yr&&"documentMode"in document&&11>=document.documentMode,Ls=null,Rg=null,gl=null,Pg=!1;function Cw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pg||Ls==null||Ls!==ld(r)||(r=Ls,"selectionStart"in r&&gh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gl&&Rl(gl,r)||(gl=r,r=gd(Rg,"onSelect"),0<r.length&&(t=new fh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ls)))}function Vu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _s={animationend:Vu("Animation","AnimationEnd"),animationiteration:Vu("Animation","AnimationIteration"),animationstart:Vu("Animation","AnimationStart"),transitionend:Vu("Transition","TransitionEnd")},Ym={},YS={};Yr&&(YS=document.createElement("div").style,"AnimationEvent"in window||(delete _s.animationend.animation,delete _s.animationiteration.animation,delete _s.animationstart.animation),"TransitionEvent"in window||delete _s.transitionend.transition);function Md(e){if(Ym[e])return Ym[e];if(!_s[e])return e;var t=_s[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in YS)return Ym[e]=t[n];return e}var XS=Md("animationend"),QS=Md("animationiteration"),ZS=Md("animationstart"),JS=Md("transitionend"),eb=new Map,kw="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".split(" ");function Ko(e,t){eb.set(e,t),Ii(t,[e])}for($u=0;$u<kw.length;$u++)ju=kw[$u],Rw=ju.toLowerCase(),Pw=ju[0].toUpperCase()+ju.slice(1),Ko(Rw,"on"+Pw);var ju,Rw,Pw,$u;Ko(XS,"onAnimationEnd");Ko(QS,"onAnimationIteration");Ko(ZS,"onAnimationStart");Ko("dblclick","onDoubleClick");Ko("focusin","onFocus");Ko("focusout","onBlur");Ko(JS,"onTransitionEnd");Ws("onMouseEnter",["mouseout","mouseover"]);Ws("onMouseLeave",["mouseout","mouseover"]);Ws("onPointerEnter",["pointerout","pointerover"]);Ws("onPointerLeave",["pointerout","pointerover"]);Ii("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ii("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ii("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ii("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ii("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ii("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),XL=new Set("cancel close invalid load scroll toggle".split(" ").concat(ul));function Aw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,XI(r,t,void 0,e),e.currentTarget=null}function tb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Aw(o,a,c),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Aw(o,a,c),i=l}}}if(ud)throw e=Eg,ud=!1,Eg=null,e}function Fe(e,t){var n=t[Og];n===void 0&&(n=t[Og]=new Set);var r=e+"__bubble";n.has(r)||(nb(t,e,2,!1),n.add(r))}function Xm(e,t,n){var r=0;t&&(r|=4),nb(n,e,r,t)}var Ku="_reactListening"+Math.random().toString(36).slice(2);function Pl(e){if(!e[Ku]){e[Ku]=!0,cS.forEach(function(n){n!=="selectionchange"&&(XL.has(n)||Xm(n,!1,e),Xm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ku]||(t[Ku]=!0,Xm("selectionchange",!1,t))}}function nb(e,t,n,r){switch(HS(t)){case 1:var o=fL;break;case 4:o=pL;break;default:o=uh}n=o.bind(null,t,n,e),o=void 0,!bg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Qm(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=wi(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}CS(function(){var c=i,u=sh(n),d=[];e:{var f=eb.get(e);if(f!==void 0){var p=fh,v=e;switch(e){case"keypress":if(ed(n)===0)break e;case"keydown":case"keyup":p=PL;break;case"focusin":v="focus",p=qm;break;case"focusout":v="blur",p=qm;break;case"beforeblur":case"afterblur":p=qm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=hw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=hL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=LL;break;case XS:case QS:case ZS:p=xL;break;case JS:p=OL;break;case"scroll":p=mL;break;case"wheel":p=ML;break;case"copy":case"cut":case"paste":p=SL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=vw}var m=(t&4)!==0,x=!m&&e==="scroll",y=m?f!==null?f+"Capture":null:f;m=[];for(var g=c,h;g!==null;){h=g;var w=h.stateNode;if(h.tag===5&&w!==null&&(h=w,y!==null&&(w=bl(g,y),w!=null&&m.push(Al(g,w,h)))),x)break;g=g.return}0<m.length&&(f=new p(f,v,null,n,u),d.push({event:f,listeners:m}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==wg&&(v=n.relatedTarget||n.fromElement)&&(wi(v)||v[Xr]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=c,v=v?wi(v):null,v!==null&&(x=Li(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=c),p!==v)){if(m=hw,w="onMouseLeave",y="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=vw,w="onPointerLeave",y="onPointerEnter",g="pointer"),x=p==null?f:Os(p),h=v==null?f:Os(v),f=new m(w,g+"leave",p,n,u),f.target=x,f.relatedTarget=h,w=null,wi(u)===c&&(m=new m(y,g+"enter",v,n,u),m.target=h,m.relatedTarget=x,w=m),x=w,p&&v)t:{for(m=p,y=v,g=0,h=m;h;h=Rs(h))g++;for(h=0,w=y;w;w=Rs(w))h++;for(;0<g-h;)m=Rs(m),g--;for(;0<h-g;)y=Rs(y),h--;for(;g--;){if(m===y||y!==null&&m===y.alternate)break t;m=Rs(m),y=Rs(y)}m=null}else m=null;p!==null&&Iw(d,f,p,m,!1),v!==null&&x!==null&&Iw(d,x,v,m,!0)}}e:{if(f=c?Os(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=VL;else if(Sw(f))if(KS)E=WL;else{E=jL;var C=$L}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=KL);if(E&&(E=E(e,c))){jS(d,E,n,u);break e}C&&C(e,f,c),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&gg(f,"number",f.value)}switch(C=c?Os(c):window,e){case"focusin":(Sw(C)||C.contentEditable==="true")&&(Ls=C,Rg=c,gl=null);break;case"focusout":gl=Rg=Ls=null;break;case"mousedown":Pg=!0;break;case"contextmenu":case"mouseup":case"dragend":Pg=!1,Cw(d,n,u);break;case"selectionchange":if(YL)break;case"keydown":case"keyup":Cw(d,n,u)}var k;if(mh)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Is?VS(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(US&&n.locale!=="ko"&&(Is||A!=="onCompositionStart"?A==="onCompositionEnd"&&Is&&(k=BS()):(Oo=u,dh="value"in Oo?Oo.value:Oo.textContent,Is=!0)),C=gd(c,A),0<C.length&&(A=new yw(A,e,null,n,u),d.push({event:A,listeners:C}),k?A.data=k:(k=$S(n),k!==null&&(A.data=k)))),(k=FL?zL(e,n):HL(e,n))&&(c=gd(c,"onBeforeInput"),0<c.length&&(u=new yw("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=k))}tb(d,t)})}function Al(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gd(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=bl(e,n),i!=null&&r.unshift(Al(e,i,o)),i=bl(e,t),i!=null&&r.push(Al(e,i,o))),e=e.return}return r}function Rs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Iw(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=bl(n,i),l!=null&&s.unshift(Al(n,l,a))):o||(l=bl(n,i),l!=null&&s.push(Al(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var QL=/\r\n?/g,ZL=/\u0000|\uFFFD/g;function Lw(e){return(typeof e=="string"?e:""+e).replace(QL,`
6
- `).replace(ZL,"")}function Wu(e,t,n){if(t=Lw(t),Lw(e)!==t&&n)throw Error(D(425))}function hd(){}var Ag=null,Ig=null;function Lg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _g=typeof setTimeout=="function"?setTimeout:void 0,JL=typeof clearTimeout=="function"?clearTimeout:void 0,_w=typeof Promise=="function"?Promise:void 0,e_=typeof queueMicrotask=="function"?queueMicrotask:typeof _w!="undefined"?function(e){return _w.resolve(null).then(e).catch(t_)}:_g;function t_(e){setTimeout(function(){throw e})}function Zm(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Cl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Cl(t)}function zo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ow(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ea=Math.random().toString(36).slice(2),Cr="__reactFiber$"+ea,Il="__reactProps$"+ea,Xr="__reactContainer$"+ea,Og="__reactEvents$"+ea,n_="__reactListeners$"+ea,r_="__reactHandles$"+ea;function wi(e){var t=e[Cr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Xr]||n[Cr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ow(e);e!==null;){if(n=e[Cr])return n;e=Ow(e)}return t}e=n,n=e.parentNode}return null}function Hl(e){return e=e[Cr]||e[Xr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Os(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function Dd(e){return e[Il]||null}var Ng=[],Ns=-1;function Wo(e){return{current:e}}function ze(e){0>Ns||(e.current=Ng[Ns],Ng[Ns]=null,Ns--)}function De(e,t){Ns++,Ng[Ns]=e.current,e.current=t}var jo={},_t=Wo(jo),an=Wo(!1),Ci=jo;function qs(e,t){var n=e.type.contextTypes;if(!n)return jo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ln(e){return e=e.childContextTypes,e!=null}function yd(){ze(an),ze(_t)}function Nw(e,t,n){if(_t.current!==jo)throw Error(D(168));De(_t,t),De(an,n)}function rb(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,$I(e)||"Unknown",o));return qe({},n,r)}function vd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jo,Ci=_t.current,De(_t,e),De(an,an.current),!0}function Mw(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=rb(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,ze(an),ze(_t),De(_t,e)):ze(an),De(an,n)}var Kr=null,Fd=!1,Jm=!1;function ob(e){Kr===null?Kr=[e]:Kr.push(e)}function o_(e){Fd=!0,ob(e)}function qo(){if(!Jm&&Kr!==null){Jm=!0;var e=0,t=Ae;try{var n=Kr;for(Ae=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Kr=null,Fd=!1}catch(o){throw Kr!==null&&(Kr=Kr.slice(e+1)),AS(ah,qo),o}finally{Ae=t,Jm=!1}}return null}var Ms=[],Ds=0,xd=null,wd=0,In=[],Ln=0,ki=null,Wr=1,qr="";function vi(e,t){Ms[Ds++]=wd,Ms[Ds++]=xd,xd=e,wd=t}function ib(e,t,n){In[Ln++]=Wr,In[Ln++]=qr,In[Ln++]=ki,ki=e;var r=Wr;e=qr;var o=32-Yn(r)-1;r&=~(1<<o),n+=1;var i=32-Yn(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Wr=1<<32-Yn(t)+o|n<<o|r,qr=i+e}else Wr=1<<i|n<<o|r,qr=e}function hh(e){e.return!==null&&(vi(e,1),ib(e,1,0))}function yh(e){for(;e===xd;)xd=Ms[--Ds],Ms[Ds]=null,wd=Ms[--Ds],Ms[Ds]=null;for(;e===ki;)ki=In[--Ln],In[Ln]=null,qr=In[--Ln],In[Ln]=null,Wr=In[--Ln],In[Ln]=null}var yn=null,hn=null,Ue=!1,Gn=null;function sb(e,t){var n=_n(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Dw(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,yn=e,hn=zo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,yn=e,hn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ki!==null?{id:Wr,overflow:qr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=_n(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,yn=e,hn=null,!0):!1;default:return!1}}function Mg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Dg(e){if(Ue){var t=hn;if(t){var n=t;if(!Dw(e,t)){if(Mg(e))throw Error(D(418));t=zo(n.nextSibling);var r=yn;t&&Dw(e,t)?sb(r,n):(e.flags=e.flags&-4097|2,Ue=!1,yn=e)}}else{if(Mg(e))throw Error(D(418));e.flags=e.flags&-4097|2,Ue=!1,yn=e}}}function Fw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;yn=e}function qu(e){if(e!==yn)return!1;if(!Ue)return Fw(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Lg(e.type,e.memoizedProps)),t&&(t=hn)){if(Mg(e))throw ab(),Error(D(418));for(;t;)sb(e,t),t=zo(t.nextSibling)}if(Fw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){hn=zo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}hn=null}}else hn=yn?zo(e.stateNode.nextSibling):null;return!0}function ab(){for(var e=hn;e;)e=zo(e.nextSibling)}function Gs(){hn=yn=null,Ue=!1}function vh(e){Gn===null?Gn=[e]:Gn.push(e)}var i_=Jr.ReactCurrentBatchConfig;function rl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function Gu(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function zw(e){var t=e._init;return t(e._payload)}function lb(e){function t(y,g){if(e){var h=y.deletions;h===null?(y.deletions=[g],y.flags|=16):h.push(g)}}function n(y,g){if(!e)return null;for(;g!==null;)t(y,g),g=g.sibling;return null}function r(y,g){for(y=new Map;g!==null;)g.key!==null?y.set(g.key,g):y.set(g.index,g),g=g.sibling;return y}function o(y,g){return y=Vo(y,g),y.index=0,y.sibling=null,y}function i(y,g,h){return y.index=h,e?(h=y.alternate,h!==null?(h=h.index,h<g?(y.flags|=2,g):h):(y.flags|=2,g)):(y.flags|=1048576,g)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,g,h,w){return g===null||g.tag!==6?(g=sg(h,y.mode,w),g.return=y,g):(g=o(g,h),g.return=y,g)}function l(y,g,h,w){var E=h.type;return E===As?u(y,g,h.props.children,w,h.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ao&&zw(E)===g.type)?(w=o(g,h.props),w.ref=rl(y,g,h),w.return=y,w):(w=ad(h.type,h.key,h.props,null,y.mode,w),w.ref=rl(y,g,h),w.return=y,w)}function c(y,g,h,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==h.containerInfo||g.stateNode.implementation!==h.implementation?(g=ag(h,y.mode,w),g.return=y,g):(g=o(g,h.children||[]),g.return=y,g)}function u(y,g,h,w,E){return g===null||g.tag!==7?(g=Ti(h,y.mode,w,E),g.return=y,g):(g=o(g,h),g.return=y,g)}function d(y,g,h){if(typeof g=="string"&&g!==""||typeof g=="number")return g=sg(""+g,y.mode,h),g.return=y,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ou:return h=ad(g.type,g.key,g.props,null,y.mode,h),h.ref=rl(y,null,g),h.return=y,h;case Ps:return g=ag(g,y.mode,h),g.return=y,g;case Ao:var w=g._init;return d(y,w(g._payload),h)}if(ll(g)||Ja(g))return g=Ti(g,y.mode,h,null),g.return=y,g;Gu(y,g)}return null}function f(y,g,h,w){var E=g!==null?g.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return E!==null?null:a(y,g,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Ou:return h.key===E?l(y,g,h,w):null;case Ps:return h.key===E?c(y,g,h,w):null;case Ao:return E=h._init,f(y,g,E(h._payload),w)}if(ll(h)||Ja(h))return E!==null?null:u(y,g,h,w,null);Gu(y,h)}return null}function p(y,g,h,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(h)||null,a(g,y,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ou:return y=y.get(w.key===null?h:w.key)||null,l(g,y,w,E);case Ps:return y=y.get(w.key===null?h:w.key)||null,c(g,y,w,E);case Ao:var C=w._init;return p(y,g,h,C(w._payload),E)}if(ll(w)||Ja(w))return y=y.get(h)||null,u(g,y,w,E,null);Gu(g,w)}return null}function v(y,g,h,w){for(var E=null,C=null,k=g,A=g=0,F=null;k!==null&&A<h.length;A++){k.index>A?(F=k,k=null):F=k.sibling;var N=f(y,k,h[A],w);if(N===null){k===null&&(k=F);break}e&&k&&N.alternate===null&&t(y,k),g=i(N,g,A),C===null?E=N:C.sibling=N,C=N,k=F}if(A===h.length)return n(y,k),Ue&&vi(y,A),E;if(k===null){for(;A<h.length;A++)k=d(y,h[A],w),k!==null&&(g=i(k,g,A),C===null?E=k:C.sibling=k,C=k);return Ue&&vi(y,A),E}for(k=r(y,k);A<h.length;A++)F=p(k,y,A,h[A],w),F!==null&&(e&&F.alternate!==null&&k.delete(F.key===null?A:F.key),g=i(F,g,A),C===null?E=F:C.sibling=F,C=F);return e&&k.forEach(function(O){return t(y,O)}),Ue&&vi(y,A),E}function m(y,g,h,w){var E=Ja(h);if(typeof E!="function")throw Error(D(150));if(h=E.call(h),h==null)throw Error(D(151));for(var C=E=null,k=g,A=g=0,F=null,N=h.next();k!==null&&!N.done;A++,N=h.next()){k.index>A?(F=k,k=null):F=k.sibling;var O=f(y,k,N.value,w);if(O===null){k===null&&(k=F);break}e&&k&&O.alternate===null&&t(y,k),g=i(O,g,A),C===null?E=O:C.sibling=O,C=O,k=F}if(N.done)return n(y,k),Ue&&vi(y,A),E;if(k===null){for(;!N.done;A++,N=h.next())N=d(y,N.value,w),N!==null&&(g=i(N,g,A),C===null?E=N:C.sibling=N,C=N);return Ue&&vi(y,A),E}for(k=r(y,k);!N.done;A++,N=h.next())N=p(k,y,A,N.value,w),N!==null&&(e&&N.alternate!==null&&k.delete(N.key===null?A:N.key),g=i(N,g,A),C===null?E=N:C.sibling=N,C=N);return e&&k.forEach(function(G){return t(y,G)}),Ue&&vi(y,A),E}function x(y,g,h,w){if(typeof h=="object"&&h!==null&&h.type===As&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Ou:e:{for(var E=h.key,C=g;C!==null;){if(C.key===E){if(E=h.type,E===As){if(C.tag===7){n(y,C.sibling),g=o(C,h.props.children),g.return=y,y=g;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ao&&zw(E)===C.type){n(y,C.sibling),g=o(C,h.props),g.ref=rl(y,C,h),g.return=y,y=g;break e}n(y,C);break}else t(y,C);C=C.sibling}h.type===As?(g=Ti(h.props.children,y.mode,w,h.key),g.return=y,y=g):(w=ad(h.type,h.key,h.props,null,y.mode,w),w.ref=rl(y,g,h),w.return=y,y=w)}return s(y);case Ps:e:{for(C=h.key;g!==null;){if(g.key===C)if(g.tag===4&&g.stateNode.containerInfo===h.containerInfo&&g.stateNode.implementation===h.implementation){n(y,g.sibling),g=o(g,h.children||[]),g.return=y,y=g;break e}else{n(y,g);break}else t(y,g);g=g.sibling}g=ag(h,y.mode,w),g.return=y,y=g}return s(y);case Ao:return C=h._init,x(y,g,C(h._payload),w)}if(ll(h))return v(y,g,h,w);if(Ja(h))return m(y,g,h,w);Gu(y,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,g!==null&&g.tag===6?(n(y,g.sibling),g=o(g,h),g.return=y,y=g):(n(y,g),g=sg(h,y.mode,w),g.return=y,y=g),s(y)):n(y,g)}return x}var Ys=lb(!0),cb=lb(!1),Sd=Wo(null),bd=null,Fs=null,xh=null;function wh(){xh=Fs=bd=null}function Sh(e){var t=Sd.current;ze(Sd),e._currentValue=t}function Fg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function js(e,t){bd=e,xh=Fs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(sn=!0),e.firstContext=null)}function Nn(e){var t=e._currentValue;if(xh!==e)if(e={context:e,memoizedValue:t,next:null},Fs===null){if(bd===null)throw Error(D(308));Fs=e,bd.dependencies={lanes:0,firstContext:e}}else Fs=Fs.next=e;return t}var Si=null;function bh(e){Si===null?Si=[e]:Si.push(e)}function ub(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,bh(t)):(n.next=o.next,o.next=n),t.interleaved=n,Qr(e,r)}function Qr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Io=!1;function Eh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function db(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Gr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(we&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Qr(e,n)}return o=r.interleaved,o===null?(t.next=t,bh(r)):(t.next=o.next,o.next=t),r.interleaved=t,Qr(e,n)}function td(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lh(e,n)}}function Hw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ed(e,t,n,r){var o=e.updateQueue;Io=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,u=c=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,m=a;switch(f=t,p=n,m.tag){case 1:if(v=m.payload,typeof v=="function"){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,f=typeof v=="function"?v.call(p,d,f):v,f==null)break e;d=qe({},d,f);break e;case 2:Io=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Pi|=s,e.lanes=s,e.memoizedState=d}}function Bw(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(D(191,o));o.call(r)}}}var Bl={},Rr=Wo(Bl),Ll=Wo(Bl),_l=Wo(Bl);function bi(e){if(e===Bl)throw Error(D(174));return e}function Th(e,t){switch(De(_l,t),De(Ll,e),De(Rr,Bl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yg(t,e)}ze(Rr),De(Rr,t)}function Xs(){ze(Rr),ze(Ll),ze(_l)}function fb(e){bi(_l.current);var t=bi(Rr.current),n=yg(t,e.type);t!==n&&(De(Ll,e),De(Rr,n))}function Ch(e){Ll.current===e&&(ze(Rr),ze(Ll))}var Ke=Wo(0);function Td(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var eg=[];function kh(){for(var e=0;e<eg.length;e++)eg[e]._workInProgressVersionPrimary=null;eg.length=0}var nd=Jr.ReactCurrentDispatcher,tg=Jr.ReactCurrentBatchConfig,Ri=0,We=null,ot=null,pt=null,Cd=!1,hl=!1,Ol=0,s_=0;function At(){throw Error(D(321))}function Rh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function Ph(e,t,n,r,o,i){if(Ri=i,We=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,nd.current=e===null||e.memoizedState===null?u_:d_,e=n(r,o),hl){i=0;do{if(hl=!1,Ol=0,25<=i)throw Error(D(301));i+=1,pt=ot=null,t.updateQueue=null,nd.current=f_,e=n(r,o)}while(hl)}if(nd.current=kd,t=ot!==null&&ot.next!==null,Ri=0,pt=ot=We=null,Cd=!1,t)throw Error(D(300));return e}function Ah(){var e=Ol!==0;return Ol=0,e}function Tr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?We.memoizedState=pt=e:pt=pt.next=e,pt}function Mn(){if(ot===null){var e=We.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=pt===null?We.memoizedState:pt.next;if(t!==null)pt=t,ot=e;else{if(e===null)throw Error(D(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},pt===null?We.memoizedState=pt=e:pt=pt.next=e}return pt}function Nl(e,t){return typeof t=="function"?t(e):t}function ng(e){var t=Mn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=ot,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((Ri&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,We.lanes|=u,Pi|=u}c=c.next}while(c!==null&&c!==i);l===null?s=r:l.next=a,Qn(r,t.memoizedState)||(sn=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,We.lanes|=i,Pi|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function rg(e){var t=Mn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Qn(i,t.memoizedState)||(sn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function pb(){}function mb(e,t){var n=We,r=Mn(),o=t(),i=!Qn(r.memoizedState,o);if(i&&(r.memoizedState=o,sn=!0),r=r.queue,Ih(yb.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||pt!==null&&pt.memoizedState.tag&1){if(n.flags|=2048,Ml(9,hb.bind(null,n,r,o,t),void 0,null),mt===null)throw Error(D(349));(Ri&30)!==0||gb(n,t,o)}return o}function gb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hb(e,t,n,r){t.value=n,t.getSnapshot=r,vb(t)&&xb(e)}function yb(e,t,n){return n(function(){vb(t)&&xb(e)})}function vb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(r){return!0}}function xb(e){var t=Qr(e,1);t!==null&&Xn(t,e,1,-1)}function Uw(e){var t=Tr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Nl,lastRenderedState:e},t.queue=e,e=e.dispatch=c_.bind(null,We,e),[t.memoizedState,e]}function Ml(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=We.updateQueue,t===null?(t={lastEffect:null,stores:null},We.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function wb(){return Mn().memoizedState}function rd(e,t,n,r){var o=Tr();We.flags|=e,o.memoizedState=Ml(1|t,n,void 0,r===void 0?null:r)}function zd(e,t,n,r){var o=Mn();r=r===void 0?null:r;var i=void 0;if(ot!==null){var s=ot.memoizedState;if(i=s.destroy,r!==null&&Rh(r,s.deps)){o.memoizedState=Ml(t,n,i,r);return}}We.flags|=e,o.memoizedState=Ml(1|t,n,i,r)}function Vw(e,t){return rd(8390656,8,e,t)}function Ih(e,t){return zd(2048,8,e,t)}function Sb(e,t){return zd(4,2,e,t)}function bb(e,t){return zd(4,4,e,t)}function Eb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tb(e,t,n){return n=n!=null?n.concat([e]):null,zd(4,4,Eb.bind(null,t,e),n)}function Lh(){}function Cb(e,t){var n=Mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rh(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function kb(e,t){var n=Mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Rh(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Rb(e,t,n){return(Ri&21)===0?(e.baseState&&(e.baseState=!1,sn=!0),e.memoizedState=n):(Qn(n,t)||(n=_S(),We.lanes|=n,Pi|=n,e.baseState=!0),t)}function a_(e,t){var n=Ae;Ae=n!==0&&4>n?n:4,e(!0);var r=tg.transition;tg.transition={};try{e(!1),t()}finally{Ae=n,tg.transition=r}}function Pb(){return Mn().memoizedState}function l_(e,t,n){var r=Uo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ab(e))Ib(t,n);else if(n=ub(e,t,n,r),n!==null){var o=Ht();Xn(n,e,r,o),Lb(n,t,r)}}function c_(e,t,n){var r=Uo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ab(e))Ib(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Qn(a,s)){var l=t.interleaved;l===null?(o.next=o,bh(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch(c){}finally{}n=ub(e,t,o,r),n!==null&&(o=Ht(),Xn(n,e,r,o),Lb(n,t,r))}}function Ab(e){var t=e.alternate;return e===We||t!==null&&t===We}function Ib(e,t){hl=Cd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Lb(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lh(e,n)}}var kd={readContext:Nn,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useInsertionEffect:At,useLayoutEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useMutableSource:At,useSyncExternalStore:At,useId:At,unstable_isNewReconciler:!1},u_={readContext:Nn,useCallback:function(e,t){return Tr().memoizedState=[e,t===void 0?null:t],e},useContext:Nn,useEffect:Vw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rd(4194308,4,Eb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rd(4194308,4,e,t)},useInsertionEffect:function(e,t){return rd(4,2,e,t)},useMemo:function(e,t){var n=Tr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Tr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=l_.bind(null,We,e),[r.memoizedState,e]},useRef:function(e){var t=Tr();return e={current:e},t.memoizedState=e},useState:Uw,useDebugValue:Lh,useDeferredValue:function(e){return Tr().memoizedState=e},useTransition:function(){var e=Uw(!1),t=e[0];return e=a_.bind(null,e[1]),Tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=We,o=Tr();if(Ue){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),mt===null)throw Error(D(349));(Ri&30)!==0||gb(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Vw(yb.bind(null,r,i,e),[e]),r.flags|=2048,Ml(9,hb.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Tr(),t=mt.identifierPrefix;if(Ue){var n=qr,r=Wr;n=(r&~(1<<32-Yn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ol++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=s_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},d_={readContext:Nn,useCallback:Cb,useContext:Nn,useEffect:Ih,useImperativeHandle:Tb,useInsertionEffect:Sb,useLayoutEffect:bb,useMemo:kb,useReducer:ng,useRef:wb,useState:function(){return ng(Nl)},useDebugValue:Lh,useDeferredValue:function(e){var t=Mn();return Rb(t,ot.memoizedState,e)},useTransition:function(){var e=ng(Nl)[0],t=Mn().memoizedState;return[e,t]},useMutableSource:pb,useSyncExternalStore:mb,useId:Pb,unstable_isNewReconciler:!1},f_={readContext:Nn,useCallback:Cb,useContext:Nn,useEffect:Ih,useImperativeHandle:Tb,useInsertionEffect:Sb,useLayoutEffect:bb,useMemo:kb,useReducer:rg,useRef:wb,useState:function(){return rg(Nl)},useDebugValue:Lh,useDeferredValue:function(e){var t=Mn();return ot===null?t.memoizedState=e:Rb(t,ot.memoizedState,e)},useTransition:function(){var e=rg(Nl)[0],t=Mn().memoizedState;return[e,t]},useMutableSource:pb,useSyncExternalStore:mb,useId:Pb,unstable_isNewReconciler:!1};function Wn(e,t){if(e&&e.defaultProps){t=qe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function zg(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hd={isMounted:function(e){return(e=e._reactInternals)?Li(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ht(),o=Uo(e),i=Gr(r,o);i.payload=t,n!=null&&(i.callback=n),t=Ho(e,i,o),t!==null&&(Xn(t,e,o,r),td(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ht(),o=Uo(e),i=Gr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ho(e,i,o),t!==null&&(Xn(t,e,o,r),td(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ht(),r=Uo(e),o=Gr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Ho(e,o,r),t!==null&&(Xn(t,e,r,n),td(t,e,r))}};function $w(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Rl(n,r)||!Rl(o,i):!0}function _b(e,t,n){var r=!1,o=jo,i=t.contextType;return typeof i=="object"&&i!==null?i=Nn(i):(o=ln(t)?Ci:_t.current,r=t.contextTypes,i=(r=r!=null)?qs(e,o):jo),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Hd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function jw(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Hd.enqueueReplaceState(t,t.state,null)}function Hg(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Eh(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Nn(i):(i=ln(t)?Ci:_t.current,o.context=qs(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(zg(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Hd.enqueueReplaceState(o,o.state,null),Ed(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Qs(e,t){try{var n="",r=t;do n+=VI(r),r=r.return;while(r);var o=n}catch(i){o=`
5
+ `+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{$m=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?al(e):""}function HI(e){switch(e.tag){case 5:return al(e.type);case 16:return al("Lazy");case 13:return al("Suspense");case 19:return al("SuspenseList");case 0:case 2:case 15:return e=jm(e.type,!1),e;case 11:return e=jm(e.type.render,!1),e;case 1:return e=jm(e.type,!0),e;default:return""}}function mg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Is:return"Fragment";case As:return"Portal";case dg:return"Profiler";case ih:return"StrictMode";case fg:return"Suspense";case pg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case uS:return(e.displayName||"Context")+".Consumer";case cS:return(e._context.displayName||"Context")+".Provider";case sh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ah:return t=e.displayName||null,t!==null?t:mg(e.type)||"Memo";case Ao:t=e._payload,e=e._init;try{return mg(e(t))}catch(n){}}return null}function BI(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mg(t);case 8:return t===ih?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $o(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function UI(e){var t=fS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Du(e){e._valueTracker||(e._valueTracker=UI(e))}function pS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=fS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ud(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function gg(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function iw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=$o(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function mS(e,t){t=t.checked,t!=null&&oh(e,"checked",t,!1)}function hg(e,t){mS(e,t);var n=$o(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?yg(e,t.type,n):t.hasOwnProperty("defaultValue")&&yg(e,t.type,$o(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sw(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function yg(e,t,n){(t!=="number"||ud(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ll=Array.isArray;function Us(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+$o(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function vg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function aw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(D(92));if(ll(n)){if(1<n.length)throw Error(D(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:$o(n)}}function gS(e,t){var n=$o(t.value),r=$o(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function lw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function hS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?hS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Fu,yS=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Fu=Fu||document.createElement("div"),Fu.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Fu.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Sl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var dl={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},VI=["Webkit","ms","Moz","O"];Object.keys(dl).forEach(function(e){VI.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),dl[t]=dl[e]})});function vS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||dl.hasOwnProperty(e)&&dl[e]?(""+t).trim():t+"px"}function xS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=vS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var $I=Ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wg(e,t){if(t){if($I[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function Sg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bg=null;function lh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Eg=null,Vs=null,$s=null;function cw(e){if(e=Hl(e)){if(typeof Eg!="function")throw Error(D(280));var t=e.stateNode;t&&(t=zd(t),Eg(e.stateNode,e.type,t))}}function wS(e){Vs?$s?$s.push(e):$s=[e]:Vs=e}function SS(){if(Vs){var e=Vs,t=$s;if($s=Vs=null,cw(e),t)for(e=0;e<t.length;e++)cw(t[e])}}function bS(e,t){return e(t)}function ES(){}var Wm=!1;function TS(e,t,n){if(Wm)return e(t,n);Wm=!0;try{return bS(e,t,n)}finally{Wm=!1,(Vs!==null||$s!==null)&&(ES(),SS())}}function bl(e,t){var n=e.stateNode;if(n===null)return null;var r=zd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(D(231,t,typeof n));return n}var Tg=!1;if(Gr)try{Rs={},Object.defineProperty(Rs,"passive",{get:function(){Tg=!0}}),window.addEventListener("test",Rs,Rs),window.removeEventListener("test",Rs,Rs)}catch(e){Tg=!1}var Rs;function jI(e,t,n,r,o,i,s,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var fl=!1,dd=null,fd=!1,Cg=null,WI={onError:function(e){fl=!0,dd=e}};function KI(e,t,n,r,o,i,s,a,l){fl=!1,dd=null,jI.apply(WI,arguments)}function GI(e,t,n,r,o,i,s,a,l){if(KI.apply(this,arguments),fl){if(fl){var c=dd;fl=!1,dd=null}else throw Error(D(198));fd||(fd=!0,Cg=c)}}function Oi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function CS(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function uw(e){if(Oi(e)!==e)throw Error(D(188))}function qI(e){var t=e.alternate;if(!t){if(t=Oi(e),t===null)throw Error(D(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return uw(o),e;if(i===r)return uw(o),t;i=i.sibling}throw Error(D(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(D(189))}}if(n.alternate!==r)throw Error(D(190))}if(n.tag!==3)throw Error(D(188));return n.stateNode.current===n?e:t}function kS(e){return e=qI(e),e!==null?RS(e):null}function RS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=RS(e);if(t!==null)return t;e=e.sibling}return null}var PS=yn.unstable_scheduleCallback,dw=yn.unstable_cancelCallback,YI=yn.unstable_shouldYield,XI=yn.unstable_requestPaint,Je=yn.unstable_now,QI=yn.unstable_getCurrentPriorityLevel,ch=yn.unstable_ImmediatePriority,AS=yn.unstable_UserBlockingPriority,pd=yn.unstable_NormalPriority,ZI=yn.unstable_LowPriority,IS=yn.unstable_IdlePriority,Md=null,Cr=null;function JI(e){if(Cr&&typeof Cr.onCommitFiberRoot=="function")try{Cr.onCommitFiberRoot(Md,e,void 0,(e.current.flags&128)===128)}catch(t){}}var Yn=Math.clz32?Math.clz32:nL,eL=Math.log,tL=Math.LN2;function nL(e){return e>>>=0,e===0?32:31-(eL(e)/tL|0)|0}var zu=64,Hu=4194304;function cl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function md(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=cl(a):(i&=s,i!==0&&(r=cl(i)))}else s=n&~o,s!==0?r=cl(s):i!==0&&(r=cl(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Yn(t),o=1<<n,r|=e[n],t&=~o;return r}function rL(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function oL(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Yn(i),a=1<<s,l=o[s];l===-1?((a&n)===0||(a&r)!==0)&&(o[s]=rL(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function kg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function LS(){var e=zu;return zu<<=1,(zu&4194240)===0&&(zu=64),e}function Km(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yn(t),e[t]=n}function iL(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Yn(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function uh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Ie=0;function OS(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var NS,dh,MS,_S,DS,Rg=!1,Bu=[],_o=null,Do=null,Fo=null,El=new Map,Tl=new Map,Lo=[],sL="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".split(" ");function fw(e,t){switch(e){case"focusin":case"focusout":_o=null;break;case"dragenter":case"dragleave":Do=null;break;case"mouseover":case"mouseout":Fo=null;break;case"pointerover":case"pointerout":El.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tl.delete(t.pointerId)}}function el(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Hl(t),t!==null&&dh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function aL(e,t,n,r,o){switch(t){case"focusin":return _o=el(_o,e,t,n,r,o),!0;case"dragenter":return Do=el(Do,e,t,n,r,o),!0;case"mouseover":return Fo=el(Fo,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return El.set(i,el(El.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Tl.set(i,el(Tl.get(i)||null,e,t,n,r,o)),!0}return!1}function FS(e){var t=Si(e.target);if(t!==null){var n=Oi(t);if(n!==null){if(t=n.tag,t===13){if(t=CS(n),t!==null){e.blockedOn=t,DS(e.priority,function(){MS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ed(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Pg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);bg=r,n.target.dispatchEvent(r),bg=null}else return t=Hl(n),t!==null&&dh(t),e.blockedOn=n,!1;t.shift()}return!0}function pw(e,t,n){ed(e)&&n.delete(t)}function lL(){Rg=!1,_o!==null&&ed(_o)&&(_o=null),Do!==null&&ed(Do)&&(Do=null),Fo!==null&&ed(Fo)&&(Fo=null),El.forEach(pw),Tl.forEach(pw)}function tl(e,t){e.blockedOn===t&&(e.blockedOn=null,Rg||(Rg=!0,yn.unstable_scheduleCallback(yn.unstable_NormalPriority,lL)))}function Cl(e){function t(o){return tl(o,e)}if(0<Bu.length){tl(Bu[0],e);for(var n=1;n<Bu.length;n++){var r=Bu[n];r.blockedOn===e&&(r.blockedOn=null)}}for(_o!==null&&tl(_o,e),Do!==null&&tl(Do,e),Fo!==null&&tl(Fo,e),El.forEach(t),Tl.forEach(t),n=0;n<Lo.length;n++)r=Lo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lo.length&&(n=Lo[0],n.blockedOn===null);)FS(n),n.blockedOn===null&&Lo.shift()}var js=Qr.ReactCurrentBatchConfig,gd=!0;function cL(e,t,n,r){var o=Ie,i=js.transition;js.transition=null;try{Ie=1,fh(e,t,n,r)}finally{Ie=o,js.transition=i}}function uL(e,t,n,r){var o=Ie,i=js.transition;js.transition=null;try{Ie=4,fh(e,t,n,r)}finally{Ie=o,js.transition=i}}function fh(e,t,n,r){if(gd){var o=Pg(e,t,n,r);if(o===null)Jm(e,t,r,hd,n),fw(e,r);else if(aL(o,e,t,n,r))r.stopPropagation();else if(fw(e,r),t&4&&-1<sL.indexOf(e)){for(;o!==null;){var i=Hl(o);if(i!==null&&NS(i),i=Pg(e,t,n,r),i===null&&Jm(e,t,r,hd,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Jm(e,t,r,null,n)}}var hd=null;function Pg(e,t,n,r){if(hd=null,e=lh(r),e=Si(e),e!==null)if(t=Oi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=CS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return hd=e,null}function zS(e){switch(e){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 1;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 4;case"message":switch(QI()){case ch:return 1;case AS:return 4;case pd:case ZI:return 16;case IS:return 536870912;default:return 16}default:return 16}}var No=null,ph=null,td=null;function HS(){if(td)return td;var e,t=ph,n=t.length,r,o="value"in No?No.value:No.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return td=o.slice(e,1<r?1-r:void 0)}function nd(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Uu(){return!0}function mw(){return!1}function vn(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Uu:mw,this.isPropagationStopped=mw,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Uu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Uu)},persist:function(){},isPersistent:Uu}),t}var ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mh=vn(ea),zl=Ge({},ea,{view:0,detail:0}),dL=vn(zl),Gm,qm,nl,_d=Ge({},zl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gh,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==nl&&(nl&&e.type==="mousemove"?(Gm=e.screenX-nl.screenX,qm=e.screenY-nl.screenY):qm=Gm=0,nl=e),Gm)},movementY:function(e){return"movementY"in e?e.movementY:qm}}),gw=vn(_d),fL=Ge({},_d,{dataTransfer:0}),pL=vn(fL),mL=Ge({},zl,{relatedTarget:0}),Ym=vn(mL),gL=Ge({},ea,{animationName:0,elapsedTime:0,pseudoElement:0}),hL=vn(gL),yL=Ge({},ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vL=vn(yL),xL=Ge({},ea,{data:0}),hw=vn(xL),wL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SL={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"},bL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function EL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=bL[e])?!!t[e]:!1}function gh(){return EL}var TL=Ge({},zl,{key:function(e){if(e.key){var t=wL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=nd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?SL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gh,charCode:function(e){return e.type==="keypress"?nd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?nd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),CL=vn(TL),kL=Ge({},_d,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yw=vn(kL),RL=Ge({},zl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gh}),PL=vn(RL),AL=Ge({},ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),IL=vn(AL),LL=Ge({},_d,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),OL=vn(LL),NL=[9,13,27,32],hh=Gr&&"CompositionEvent"in window,pl=null;Gr&&"documentMode"in document&&(pl=document.documentMode);var ML=Gr&&"TextEvent"in window&&!pl,BS=Gr&&(!hh||pl&&8<pl&&11>=pl),vw=" ",xw=!1;function US(e,t){switch(e){case"keyup":return NL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ls=!1;function _L(e,t){switch(e){case"compositionend":return VS(t);case"keypress":return t.which!==32?null:(xw=!0,vw);case"textInput":return e=t.data,e===vw&&xw?null:e;default:return null}}function DL(e,t){if(Ls)return e==="compositionend"||!hh&&US(e,t)?(e=HS(),td=ph=No=null,Ls=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return BS&&t.locale!=="ko"?null:t.data;default:return null}}var FL={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 ww(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!FL[e.type]:t==="textarea"}function $S(e,t,n,r){wS(r),t=yd(t,"onChange"),0<t.length&&(n=new mh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ml=null,kl=null;function zL(e){eb(e,0)}function Dd(e){var t=Ms(e);if(pS(t))return e}function HL(e,t){if(e==="change")return t}var jS=!1;Gr&&(Gr?($u="oninput"in document,$u||(Xm=document.createElement("div"),Xm.setAttribute("oninput","return;"),$u=typeof Xm.oninput=="function"),Vu=$u):Vu=!1,jS=Vu&&(!document.documentMode||9<document.documentMode));var Vu,$u,Xm;function Sw(){ml&&(ml.detachEvent("onpropertychange",WS),kl=ml=null)}function WS(e){if(e.propertyName==="value"&&Dd(kl)){var t=[];$S(t,kl,e,lh(e)),TS(zL,t)}}function BL(e,t,n){e==="focusin"?(Sw(),ml=t,kl=n,ml.attachEvent("onpropertychange",WS)):e==="focusout"&&Sw()}function UL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Dd(kl)}function VL(e,t){if(e==="click")return Dd(t)}function $L(e,t){if(e==="input"||e==="change")return Dd(t)}function jL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qn=typeof Object.is=="function"?Object.is:jL;function Rl(e,t){if(Qn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!ug.call(t,o)||!Qn(e[o],t[o]))return!1}return!0}function bw(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ew(e,t){var n=bw(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=bw(n)}}function KS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?KS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function GS(){for(var e=window,t=ud();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=ud(e.document)}return t}function yh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function WL(e){var t=GS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&KS(n.ownerDocument.documentElement,n)){if(r!==null&&yh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Ew(n,i);var s=Ew(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var KL=Gr&&"documentMode"in document&&11>=document.documentMode,Os=null,Ag=null,gl=null,Ig=!1;function Tw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ig||Os==null||Os!==ud(r)||(r=Os,"selectionStart"in r&&yh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gl&&Rl(gl,r)||(gl=r,r=yd(Ag,"onSelect"),0<r.length&&(t=new mh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Os)))}function ju(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ns={animationend:ju("Animation","AnimationEnd"),animationiteration:ju("Animation","AnimationIteration"),animationstart:ju("Animation","AnimationStart"),transitionend:ju("Transition","TransitionEnd")},Qm={},qS={};Gr&&(qS=document.createElement("div").style,"AnimationEvent"in window||(delete Ns.animationend.animation,delete Ns.animationiteration.animation,delete Ns.animationstart.animation),"TransitionEvent"in window||delete Ns.transitionend.transition);function Fd(e){if(Qm[e])return Qm[e];if(!Ns[e])return e;var t=Ns[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in qS)return Qm[e]=t[n];return e}var YS=Fd("animationend"),XS=Fd("animationiteration"),QS=Fd("animationstart"),ZS=Fd("transitionend"),JS=new Map,Cw="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".split(" ");function Wo(e,t){JS.set(e,t),Li(t,[e])}for(Wu=0;Wu<Cw.length;Wu++)Ku=Cw[Wu],kw=Ku.toLowerCase(),Rw=Ku[0].toUpperCase()+Ku.slice(1),Wo(kw,"on"+Rw);var Ku,kw,Rw,Wu;Wo(YS,"onAnimationEnd");Wo(XS,"onAnimationIteration");Wo(QS,"onAnimationStart");Wo("dblclick","onDoubleClick");Wo("focusin","onFocus");Wo("focusout","onBlur");Wo(ZS,"onTransitionEnd");Gs("onMouseEnter",["mouseout","mouseover"]);Gs("onMouseLeave",["mouseout","mouseover"]);Gs("onPointerEnter",["pointerout","pointerover"]);Gs("onPointerLeave",["pointerout","pointerover"]);Li("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Li("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Li("onBeforeInput",["compositionend","keypress","textInput","paste"]);Li("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Li("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Li("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ul="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),GL=new Set("cancel close invalid load scroll toggle".split(" ").concat(ul));function Pw(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,GI(r,t,void 0,e),e.currentTarget=null}function eb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Pw(o,a,c),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Pw(o,a,c),i=l}}}if(fd)throw e=Cg,fd=!1,Cg=null,e}function Fe(e,t){var n=t[_g];n===void 0&&(n=t[_g]=new Set);var r=e+"__bubble";n.has(r)||(tb(t,e,2,!1),n.add(r))}function Zm(e,t,n){var r=0;t&&(r|=4),tb(n,e,r,t)}var Gu="_reactListening"+Math.random().toString(36).slice(2);function Pl(e){if(!e[Gu]){e[Gu]=!0,lS.forEach(function(n){n!=="selectionchange"&&(GL.has(n)||Zm(n,!1,e),Zm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gu]||(t[Gu]=!0,Zm("selectionchange",!1,t))}}function tb(e,t,n,r){switch(zS(t)){case 1:var o=cL;break;case 4:o=uL;break;default:o=fh}n=o.bind(null,t,n,e),o=void 0,!Tg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Jm(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Si(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}TS(function(){var c=i,u=lh(n),d=[];e:{var f=JS.get(e);if(f!==void 0){var p=mh,v=e;switch(e){case"keypress":if(nd(n)===0)break e;case"keydown":case"keyup":p=CL;break;case"focusin":v="focus",p=Ym;break;case"focusout":v="blur",p=Ym;break;case"beforeblur":case"afterblur":p=Ym;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=gw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=pL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=PL;break;case YS:case XS:case QS:p=hL;break;case ZS:p=IL;break;case"scroll":p=dL;break;case"wheel":p=OL;break;case"copy":case"cut":case"paste":p=vL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=yw}var g=(t&4)!==0,x=!g&&e==="scroll",y=g?f!==null?f+"Capture":null:f;g=[];for(var m=c,h;m!==null;){h=m;var w=h.stateNode;if(h.tag===5&&w!==null&&(h=w,y!==null&&(w=bl(m,y),w!=null&&g.push(Al(m,w,h)))),x)break;m=m.return}0<g.length&&(f=new p(f,v,null,n,u),d.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==bg&&(v=n.relatedTarget||n.fromElement)&&(Si(v)||v[qr]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=c,v=v?Si(v):null,v!==null&&(x=Oi(v),v!==x||v.tag!==5&&v.tag!==6)&&(v=null)):(p=null,v=c),p!==v)){if(g=gw,w="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(g=yw,w="onPointerLeave",y="onPointerEnter",m="pointer"),x=p==null?f:Ms(p),h=v==null?f:Ms(v),f=new g(w,m+"leave",p,n,u),f.target=x,f.relatedTarget=h,w=null,Si(u)===c&&(g=new g(y,m+"enter",v,n,u),g.target=h,g.relatedTarget=x,w=g),x=w,p&&v)t:{for(g=p,y=v,m=0,h=g;h;h=Ps(h))m++;for(h=0,w=y;w;w=Ps(w))h++;for(;0<m-h;)g=Ps(g),m--;for(;0<h-m;)y=Ps(y),h--;for(;m--;){if(g===y||y!==null&&g===y.alternate)break t;g=Ps(g),y=Ps(y)}g=null}else g=null;p!==null&&Aw(d,f,p,g,!1),v!==null&&x!==null&&Aw(d,x,v,g,!0)}}e:{if(f=c?Ms(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=HL;else if(ww(f))if(jS)E=$L;else{E=UL;var C=BL}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=VL);if(E&&(E=E(e,c))){$S(d,E,n,u);break e}C&&C(e,f,c),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&yg(f,"number",f.value)}switch(C=c?Ms(c):window,e){case"focusin":(ww(C)||C.contentEditable==="true")&&(Os=C,Ag=c,gl=null);break;case"focusout":gl=Ag=Os=null;break;case"mousedown":Ig=!0;break;case"contextmenu":case"mouseup":case"dragend":Ig=!1,Tw(d,n,u);break;case"selectionchange":if(KL)break;case"keydown":case"keyup":Tw(d,n,u)}var k;if(hh)e:{switch(e){case"compositionstart":var A="onCompositionStart";break e;case"compositionend":A="onCompositionEnd";break e;case"compositionupdate":A="onCompositionUpdate";break e}A=void 0}else Ls?US(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(BS&&n.locale!=="ko"&&(Ls||A!=="onCompositionStart"?A==="onCompositionEnd"&&Ls&&(k=HS()):(No=u,ph="value"in No?No.value:No.textContent,Ls=!0)),C=yd(c,A),0<C.length&&(A=new hw(A,e,null,n,u),d.push({event:A,listeners:C}),k?A.data=k:(k=VS(n),k!==null&&(A.data=k)))),(k=ML?_L(e,n):DL(e,n))&&(c=yd(c,"onBeforeInput"),0<c.length&&(u=new hw("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=k))}eb(d,t)})}function Al(e,t,n){return{instance:e,listener:t,currentTarget:n}}function yd(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=bl(e,n),i!=null&&r.unshift(Al(e,i,o)),i=bl(e,t),i!=null&&r.push(Al(e,i,o))),e=e.return}return r}function Ps(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Aw(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,o?(l=bl(n,i),l!=null&&s.unshift(Al(n,l,a))):o||(l=bl(n,i),l!=null&&s.push(Al(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var qL=/\r\n?/g,YL=/\u0000|\uFFFD/g;function Iw(e){return(typeof e=="string"?e:""+e).replace(qL,`
6
+ `).replace(YL,"")}function qu(e,t,n){if(t=Iw(t),Iw(e)!==t&&n)throw Error(D(425))}function vd(){}var Lg=null,Og=null;function Ng(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Mg=typeof setTimeout=="function"?setTimeout:void 0,XL=typeof clearTimeout=="function"?clearTimeout:void 0,Lw=typeof Promise=="function"?Promise:void 0,QL=typeof queueMicrotask=="function"?queueMicrotask:typeof Lw!="undefined"?function(e){return Lw.resolve(null).then(e).catch(ZL)}:Mg;function ZL(e){setTimeout(function(){throw e})}function eg(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Cl(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Cl(t)}function zo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ow(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var ta=Math.random().toString(36).slice(2),Tr="__reactFiber$"+ta,Il="__reactProps$"+ta,qr="__reactContainer$"+ta,_g="__reactEvents$"+ta,JL="__reactListeners$"+ta,eO="__reactHandles$"+ta;function Si(e){var t=e[Tr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qr]||n[Tr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ow(e);e!==null;){if(n=e[Tr])return n;e=Ow(e)}return t}e=n,n=e.parentNode}return null}function Hl(e){return e=e[Tr]||e[qr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ms(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function zd(e){return e[Il]||null}var Dg=[],_s=-1;function Ko(e){return{current:e}}function ze(e){0>_s||(e.current=Dg[_s],Dg[_s]=null,_s--)}function De(e,t){_s++,Dg[_s]=e.current,e.current=t}var jo={},Lt=Ko(jo),sn=Ko(!1),ki=jo;function qs(e,t){var n=e.type.contextTypes;if(!n)return jo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function an(e){return e=e.childContextTypes,e!=null}function xd(){ze(sn),ze(Lt)}function Nw(e,t,n){if(Lt.current!==jo)throw Error(D(168));De(Lt,t),De(sn,n)}function nb(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(D(108,BI(e)||"Unknown",o));return Ge({},n,r)}function wd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jo,ki=Lt.current,De(Lt,e),De(sn,sn.current),!0}function Mw(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=nb(e,t,ki),r.__reactInternalMemoizedMergedChildContext=e,ze(sn),ze(Lt),De(Lt,e)):ze(sn),De(sn,n)}var $r=null,Hd=!1,tg=!1;function rb(e){$r===null?$r=[e]:$r.push(e)}function tO(e){Hd=!0,rb(e)}function Go(){if(!tg&&$r!==null){tg=!0;var e=0,t=Ie;try{var n=$r;for(Ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$r=null,Hd=!1}catch(o){throw $r!==null&&($r=$r.slice(e+1)),PS(ch,Go),o}finally{Ie=t,tg=!1}}return null}var Ds=[],Fs=0,Sd=null,bd=0,In=[],Ln=0,Ri=null,jr=1,Wr="";function xi(e,t){Ds[Fs++]=bd,Ds[Fs++]=Sd,Sd=e,bd=t}function ob(e,t,n){In[Ln++]=jr,In[Ln++]=Wr,In[Ln++]=Ri,Ri=e;var r=jr;e=Wr;var o=32-Yn(r)-1;r&=~(1<<o),n+=1;var i=32-Yn(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,jr=1<<32-Yn(t)+o|n<<o|r,Wr=i+e}else jr=1<<i|n<<o|r,Wr=e}function vh(e){e.return!==null&&(xi(e,1),ob(e,1,0))}function xh(e){for(;e===Sd;)Sd=Ds[--Fs],Ds[Fs]=null,bd=Ds[--Fs],Ds[Fs]=null;for(;e===Ri;)Ri=In[--Ln],In[Ln]=null,Wr=In[--Ln],In[Ln]=null,jr=In[--Ln],In[Ln]=null}var hn=null,gn=null,Ue=!1,qn=null;function ib(e,t){var n=On(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function _w(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,hn=e,gn=zo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,hn=e,gn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ri!==null?{id:jr,overflow:Wr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=On(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,hn=e,gn=null,!0):!1;default:return!1}}function Fg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zg(e){if(Ue){var t=gn;if(t){var n=t;if(!_w(e,t)){if(Fg(e))throw Error(D(418));t=zo(n.nextSibling);var r=hn;t&&_w(e,t)?ib(r,n):(e.flags=e.flags&-4097|2,Ue=!1,hn=e)}}else{if(Fg(e))throw Error(D(418));e.flags=e.flags&-4097|2,Ue=!1,hn=e}}}function Dw(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;hn=e}function Yu(e){if(e!==hn)return!1;if(!Ue)return Dw(e),Ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ng(e.type,e.memoizedProps)),t&&(t=gn)){if(Fg(e))throw sb(),Error(D(418));for(;t;)ib(e,t),t=zo(t.nextSibling)}if(Dw(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gn=zo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gn=null}}else gn=hn?zo(e.stateNode.nextSibling):null;return!0}function sb(){for(var e=gn;e;)e=zo(e.nextSibling)}function Ys(){gn=hn=null,Ue=!1}function wh(e){qn===null?qn=[e]:qn.push(e)}var nO=Qr.ReactCurrentBatchConfig;function rl(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(D(309));var r=n.stateNode}if(!r)throw Error(D(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(D(284));if(!n._owner)throw Error(D(290,e))}return e}function Xu(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Fw(e){var t=e._init;return t(e._payload)}function ab(e){function t(y,m){if(e){var h=y.deletions;h===null?(y.deletions=[m],y.flags|=16):h.push(m)}}function n(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function o(y,m){return y=Vo(y,m),y.index=0,y.sibling=null,y}function i(y,m,h){return y.index=h,e?(h=y.alternate,h!==null?(h=h.index,h<m?(y.flags|=2,m):h):(y.flags|=2,m)):(y.flags|=1048576,m)}function s(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,m,h,w){return m===null||m.tag!==6?(m=lg(h,y.mode,w),m.return=y,m):(m=o(m,h),m.return=y,m)}function l(y,m,h,w){var E=h.type;return E===Is?u(y,m,h.props.children,w,h.key):m!==null&&(m.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ao&&Fw(E)===m.type)?(w=o(m,h.props),w.ref=rl(y,m,h),w.return=y,w):(w=cd(h.type,h.key,h.props,null,y.mode,w),w.ref=rl(y,m,h),w.return=y,w)}function c(y,m,h,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=cg(h,y.mode,w),m.return=y,m):(m=o(m,h.children||[]),m.return=y,m)}function u(y,m,h,w,E){return m===null||m.tag!==7?(m=Ci(h,y.mode,w,E),m.return=y,m):(m=o(m,h),m.return=y,m)}function d(y,m,h){if(typeof m=="string"&&m!==""||typeof m=="number")return m=lg(""+m,y.mode,h),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case _u:return h=cd(m.type,m.key,m.props,null,y.mode,h),h.ref=rl(y,null,m),h.return=y,h;case As:return m=cg(m,y.mode,h),m.return=y,m;case Ao:var w=m._init;return d(y,w(m._payload),h)}if(ll(m)||Ja(m))return m=Ci(m,y.mode,h,null),m.return=y,m;Xu(y,m)}return null}function f(y,m,h,w){var E=m!==null?m.key:null;if(typeof h=="string"&&h!==""||typeof h=="number")return E!==null?null:a(y,m,""+h,w);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case _u:return h.key===E?l(y,m,h,w):null;case As:return h.key===E?c(y,m,h,w):null;case Ao:return E=h._init,f(y,m,E(h._payload),w)}if(ll(h)||Ja(h))return E!==null?null:u(y,m,h,w,null);Xu(y,h)}return null}function p(y,m,h,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return y=y.get(h)||null,a(m,y,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _u:return y=y.get(w.key===null?h:w.key)||null,l(m,y,w,E);case As:return y=y.get(w.key===null?h:w.key)||null,c(m,y,w,E);case Ao:var C=w._init;return p(y,m,h,C(w._payload),E)}if(ll(w)||Ja(w))return y=y.get(h)||null,u(m,y,w,E,null);Xu(m,w)}return null}function v(y,m,h,w){for(var E=null,C=null,k=m,A=m=0,B=null;k!==null&&A<h.length;A++){k.index>A?(B=k,k=null):B=k.sibling;var M=f(y,k,h[A],w);if(M===null){k===null&&(k=B);break}e&&k&&M.alternate===null&&t(y,k),m=i(M,m,A),C===null?E=M:C.sibling=M,C=M,k=B}if(A===h.length)return n(y,k),Ue&&xi(y,A),E;if(k===null){for(;A<h.length;A++)k=d(y,h[A],w),k!==null&&(m=i(k,m,A),C===null?E=k:C.sibling=k,C=k);return Ue&&xi(y,A),E}for(k=r(y,k);A<h.length;A++)B=p(k,y,A,h[A],w),B!==null&&(e&&B.alternate!==null&&k.delete(B.key===null?A:B.key),m=i(B,m,A),C===null?E=B:C.sibling=B,C=B);return e&&k.forEach(function(N){return t(y,N)}),Ue&&xi(y,A),E}function g(y,m,h,w){var E=Ja(h);if(typeof E!="function")throw Error(D(150));if(h=E.call(h),h==null)throw Error(D(151));for(var C=E=null,k=m,A=m=0,B=null,M=h.next();k!==null&&!M.done;A++,M=h.next()){k.index>A?(B=k,k=null):B=k.sibling;var N=f(y,k,M.value,w);if(N===null){k===null&&(k=B);break}e&&k&&N.alternate===null&&t(y,k),m=i(N,m,A),C===null?E=N:C.sibling=N,C=N,k=B}if(M.done)return n(y,k),Ue&&xi(y,A),E;if(k===null){for(;!M.done;A++,M=h.next())M=d(y,M.value,w),M!==null&&(m=i(M,m,A),C===null?E=M:C.sibling=M,C=M);return Ue&&xi(y,A),E}for(k=r(y,k);!M.done;A++,M=h.next())M=p(k,y,A,M.value,w),M!==null&&(e&&M.alternate!==null&&k.delete(M.key===null?A:M.key),m=i(M,m,A),C===null?E=M:C.sibling=M,C=M);return e&&k.forEach(function(Z){return t(y,Z)}),Ue&&xi(y,A),E}function x(y,m,h,w){if(typeof h=="object"&&h!==null&&h.type===Is&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case _u:e:{for(var E=h.key,C=m;C!==null;){if(C.key===E){if(E=h.type,E===Is){if(C.tag===7){n(y,C.sibling),m=o(C,h.props.children),m.return=y,y=m;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ao&&Fw(E)===C.type){n(y,C.sibling),m=o(C,h.props),m.ref=rl(y,C,h),m.return=y,y=m;break e}n(y,C);break}else t(y,C);C=C.sibling}h.type===Is?(m=Ci(h.props.children,y.mode,w,h.key),m.return=y,y=m):(w=cd(h.type,h.key,h.props,null,y.mode,w),w.ref=rl(y,m,h),w.return=y,y=w)}return s(y);case As:e:{for(C=h.key;m!==null;){if(m.key===C)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(y,m.sibling),m=o(m,h.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=cg(h,y.mode,w),m.return=y,y=m}return s(y);case Ao:return C=h._init,x(y,m,C(h._payload),w)}if(ll(h))return v(y,m,h,w);if(Ja(h))return g(y,m,h,w);Xu(y,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,m!==null&&m.tag===6?(n(y,m.sibling),m=o(m,h),m.return=y,y=m):(n(y,m),m=lg(h,y.mode,w),m.return=y,y=m),s(y)):n(y,m)}return x}var Xs=ab(!0),lb=ab(!1),Ed=Ko(null),Td=null,zs=null,Sh=null;function bh(){Sh=zs=Td=null}function Eh(e){var t=Ed.current;ze(Ed),e._currentValue=t}function Hg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ws(e,t){Td=e,Sh=zs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(on=!0),e.firstContext=null)}function Mn(e){var t=e._currentValue;if(Sh!==e)if(e={context:e,memoizedValue:t,next:null},zs===null){if(Td===null)throw Error(D(308));zs=e,Td.dependencies={lanes:0,firstContext:e}}else zs=zs.next=e;return t}var bi=null;function Th(e){bi===null?bi=[e]:bi.push(e)}function cb(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,Th(t)):(n.next=o.next,o.next=n),t.interleaved=n,Yr(e,r)}function Yr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Io=!1;function Ch(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ub(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Kr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ho(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Se&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Yr(e,n)}return o=r.interleaved,o===null?(t.next=t,Th(r)):(t.next=o.next,o.next=t),r.interleaved=t,Yr(e,n)}function rd(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uh(e,n)}}function zw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Cd(e,t,n,r){var o=e.updateQueue;Io=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,u=c=l=null,a=i;do{var f=a.lane,p=a.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=e,g=a;switch(f=t,p=n,g.tag){case 1:if(v=g.payload,typeof v=="function"){d=v.call(p,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=g.payload,f=typeof v=="function"?v.call(p,d,f):v,f==null)break e;d=Ge({},d,f);break e;case 2:Io=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else p={eventTime:p,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Ai|=s,e.lanes=s,e.memoizedState=d}}function Hw(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(D(191,o));o.call(r)}}}var Bl={},kr=Ko(Bl),Ll=Ko(Bl),Ol=Ko(Bl);function Ei(e){if(e===Bl)throw Error(D(174));return e}function kh(e,t){switch(De(Ol,t),De(Ll,e),De(kr,Bl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xg(t,e)}ze(kr),De(kr,t)}function Qs(){ze(kr),ze(Ll),ze(Ol)}function db(e){Ei(Ol.current);var t=Ei(kr.current),n=xg(t,e.type);t!==n&&(De(Ll,e),De(kr,n))}function Rh(e){Ll.current===e&&(ze(kr),ze(Ll))}var We=Ko(0);function kd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ng=[];function Ph(){for(var e=0;e<ng.length;e++)ng[e]._workInProgressVersionPrimary=null;ng.length=0}var od=Qr.ReactCurrentDispatcher,rg=Qr.ReactCurrentBatchConfig,Pi=0,Ke=null,ot=null,pt=null,Rd=!1,hl=!1,Nl=0,rO=0;function Pt(){throw Error(D(321))}function Ah(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function Ih(e,t,n,r,o,i){if(Pi=i,Ke=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,od.current=e===null||e.memoizedState===null?aO:lO,e=n(r,o),hl){i=0;do{if(hl=!1,Nl=0,25<=i)throw Error(D(301));i+=1,pt=ot=null,t.updateQueue=null,od.current=cO,e=n(r,o)}while(hl)}if(od.current=Pd,t=ot!==null&&ot.next!==null,Pi=0,pt=ot=Ke=null,Rd=!1,t)throw Error(D(300));return e}function Lh(){var e=Nl!==0;return Nl=0,e}function Er(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ke.memoizedState=pt=e:pt=pt.next=e,pt}function _n(){if(ot===null){var e=Ke.alternate;e=e!==null?e.memoizedState:null}else e=ot.next;var t=pt===null?Ke.memoizedState:pt.next;if(t!==null)pt=t,ot=e;else{if(e===null)throw Error(D(310));ot=e,e={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},pt===null?Ke.memoizedState=pt=e:pt=pt.next=e}return pt}function Ml(e,t){return typeof t=="function"?t(e):t}function og(e){var t=_n(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=ot,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var a=s=null,l=null,c=i;do{var u=c.lane;if((Pi&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,Ke.lanes|=u,Ai|=u}c=c.next}while(c!==null&&c!==i);l===null?s=r:l.next=a,Qn(r,t.memoizedState)||(on=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Ke.lanes|=i,Ai|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ig(e){var t=_n(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Qn(i,t.memoizedState)||(on=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function fb(){}function pb(e,t){var n=Ke,r=_n(),o=t(),i=!Qn(r.memoizedState,o);if(i&&(r.memoizedState=o,on=!0),r=r.queue,Oh(hb.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||pt!==null&&pt.memoizedState.tag&1){if(n.flags|=2048,_l(9,gb.bind(null,n,r,o,t),void 0,null),mt===null)throw Error(D(349));(Pi&30)!==0||mb(n,t,o)}return o}function mb(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function gb(e,t,n,r){t.value=n,t.getSnapshot=r,yb(t)&&vb(e)}function hb(e,t,n){return n(function(){yb(t)&&vb(e)})}function yb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(r){return!0}}function vb(e){var t=Yr(e,1);t!==null&&Xn(t,e,1,-1)}function Bw(e){var t=Er();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ml,lastRenderedState:e},t.queue=e,e=e.dispatch=sO.bind(null,Ke,e),[t.memoizedState,e]}function _l(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ke.updateQueue,t===null?(t={lastEffect:null,stores:null},Ke.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function xb(){return _n().memoizedState}function id(e,t,n,r){var o=Er();Ke.flags|=e,o.memoizedState=_l(1|t,n,void 0,r===void 0?null:r)}function Bd(e,t,n,r){var o=_n();r=r===void 0?null:r;var i=void 0;if(ot!==null){var s=ot.memoizedState;if(i=s.destroy,r!==null&&Ah(r,s.deps)){o.memoizedState=_l(t,n,i,r);return}}Ke.flags|=e,o.memoizedState=_l(1|t,n,i,r)}function Uw(e,t){return id(8390656,8,e,t)}function Oh(e,t){return Bd(2048,8,e,t)}function wb(e,t){return Bd(4,2,e,t)}function Sb(e,t){return Bd(4,4,e,t)}function bb(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Eb(e,t,n){return n=n!=null?n.concat([e]):null,Bd(4,4,bb.bind(null,t,e),n)}function Nh(){}function Tb(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ah(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cb(e,t){var n=_n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ah(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function kb(e,t,n){return(Pi&21)===0?(e.baseState&&(e.baseState=!1,on=!0),e.memoizedState=n):(Qn(n,t)||(n=LS(),Ke.lanes|=n,Ai|=n,e.baseState=!0),t)}function oO(e,t){var n=Ie;Ie=n!==0&&4>n?n:4,e(!0);var r=rg.transition;rg.transition={};try{e(!1),t()}finally{Ie=n,rg.transition=r}}function Rb(){return _n().memoizedState}function iO(e,t,n){var r=Uo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Pb(e))Ab(t,n);else if(n=cb(e,t,n,r),n!==null){var o=Ut();Xn(n,e,r,o),Ib(n,t,r)}}function sO(e,t,n){var r=Uo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Pb(e))Ab(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Qn(a,s)){var l=t.interleaved;l===null?(o.next=o,Th(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch(c){}finally{}n=cb(e,t,o,r),n!==null&&(o=Ut(),Xn(n,e,r,o),Ib(n,t,r))}}function Pb(e){var t=e.alternate;return e===Ke||t!==null&&t===Ke}function Ab(e,t){hl=Rd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ib(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uh(e,n)}}var Pd={readContext:Mn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},aO={readContext:Mn,useCallback:function(e,t){return Er().memoizedState=[e,t===void 0?null:t],e},useContext:Mn,useEffect:Uw,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,id(4194308,4,bb.bind(null,t,e),n)},useLayoutEffect:function(e,t){return id(4194308,4,e,t)},useInsertionEffect:function(e,t){return id(4,2,e,t)},useMemo:function(e,t){var n=Er();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Er();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iO.bind(null,Ke,e),[r.memoizedState,e]},useRef:function(e){var t=Er();return e={current:e},t.memoizedState=e},useState:Bw,useDebugValue:Nh,useDeferredValue:function(e){return Er().memoizedState=e},useTransition:function(){var e=Bw(!1),t=e[0];return e=oO.bind(null,e[1]),Er().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ke,o=Er();if(Ue){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),mt===null)throw Error(D(349));(Pi&30)!==0||mb(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Uw(hb.bind(null,r,i,e),[e]),r.flags|=2048,_l(9,gb.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Er(),t=mt.identifierPrefix;if(Ue){var n=Wr,r=jr;n=(r&~(1<<32-Yn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Nl++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rO++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lO={readContext:Mn,useCallback:Tb,useContext:Mn,useEffect:Oh,useImperativeHandle:Eb,useInsertionEffect:wb,useLayoutEffect:Sb,useMemo:Cb,useReducer:og,useRef:xb,useState:function(){return og(Ml)},useDebugValue:Nh,useDeferredValue:function(e){var t=_n();return kb(t,ot.memoizedState,e)},useTransition:function(){var e=og(Ml)[0],t=_n().memoizedState;return[e,t]},useMutableSource:fb,useSyncExternalStore:pb,useId:Rb,unstable_isNewReconciler:!1},cO={readContext:Mn,useCallback:Tb,useContext:Mn,useEffect:Oh,useImperativeHandle:Eb,useInsertionEffect:wb,useLayoutEffect:Sb,useMemo:Cb,useReducer:ig,useRef:xb,useState:function(){return ig(Ml)},useDebugValue:Nh,useDeferredValue:function(e){var t=_n();return ot===null?t.memoizedState=e:kb(t,ot.memoizedState,e)},useTransition:function(){var e=ig(Ml)[0],t=_n().memoizedState;return[e,t]},useMutableSource:fb,useSyncExternalStore:pb,useId:Rb,unstable_isNewReconciler:!1};function Kn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Bg(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ud={isMounted:function(e){return(e=e._reactInternals)?Oi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Uo(e),i=Kr(r,o);i.payload=t,n!=null&&(i.callback=n),t=Ho(e,i,o),t!==null&&(Xn(t,e,o,r),rd(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ut(),o=Uo(e),i=Kr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ho(e,i,o),t!==null&&(Xn(t,e,o,r),rd(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ut(),r=Uo(e),o=Kr(n,r);o.tag=2,t!=null&&(o.callback=t),t=Ho(e,o,r),t!==null&&(Xn(t,e,r,n),rd(t,e,r))}};function Vw(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Rl(n,r)||!Rl(o,i):!0}function Lb(e,t,n){var r=!1,o=jo,i=t.contextType;return typeof i=="object"&&i!==null?i=Mn(i):(o=an(t)?ki:Lt.current,r=t.contextTypes,i=(r=r!=null)?qs(e,o):jo),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ud,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function $w(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ud.enqueueReplaceState(t,t.state,null)}function Ug(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ch(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Mn(i):(i=an(t)?ki:Lt.current,o.context=qs(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Bg(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Ud.enqueueReplaceState(o,o.state,null),Cd(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Zs(e,t){try{var n="",r=t;do n+=HI(r),r=r.return;while(r);var o=n}catch(i){o=`
7
7
  Error generating stack: `+i.message+`
8
- `+i.stack}return{value:e,source:t,stack:o,digest:null}}function og(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Bg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var p_=typeof WeakMap=="function"?WeakMap:Map;function Ob(e,t,n){n=Gr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Pd||(Pd=!0,Xg=r),Bg(e,t)},n}function Nb(e,t,n){n=Gr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Bg(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Bg(e,t),typeof r!="function"&&(Bo===null?Bo=new Set([this]):Bo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Kw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new p_;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=R_.bind(null,e,t,n),t.then(e,e))}function Ww(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function qw(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Gr(-1,1),t.tag=2,Ho(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var m_=Jr.ReactCurrentOwner,sn=!1;function zt(e,t,n,r){t.child=e===null?cb(t,null,n,r):Ys(t,e.child,n,r)}function Gw(e,t,n,r,o){n=n.render;var i=t.ref;return js(t,o),r=Ph(e,t,n,r,i,o),n=Ah(),e!==null&&!sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Zr(e,t,o)):(Ue&&n&&hh(t),t.flags|=1,zt(e,t,r,o),t.child)}function Yw(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Hh(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Mb(e,t,i,r,o)):(e=ad(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Rl,n(s,r)&&e.ref===t.ref)return Zr(e,t,o)}return t.flags|=1,e=Vo(i,r),e.ref=t.ref,e.return=t,t.child=e}function Mb(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Rl(i,r)&&e.ref===t.ref)if(sn=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(sn=!0);else return t.lanes=e.lanes,Zr(e,t,o)}return Ug(e,t,n,r,o)}function Db(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Hs,gn),gn|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(Hs,gn),gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,De(Hs,gn),gn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,De(Hs,gn),gn|=r;return zt(e,t,o,n),t.child}function Fb(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ug(e,t,n,r,o){var i=ln(n)?Ci:_t.current;return i=qs(t,i),js(t,o),n=Ph(e,t,n,r,i,o),r=Ah(),e!==null&&!sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Zr(e,t,o)):(Ue&&r&&hh(t),t.flags|=1,zt(e,t,n,o),t.child)}function Xw(e,t,n,r,o){if(ln(n)){var i=!0;vd(t)}else i=!1;if(js(t,o),t.stateNode===null)od(e,t),_b(t,n,r),Hg(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Nn(c):(c=ln(n)?Ci:_t.current,c=qs(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&jw(t,s,r,c),Io=!1;var f=t.memoizedState;s.state=f,Ed(t,r,s,o),l=t.memoizedState,a!==r||f!==l||an.current||Io?(typeof u=="function"&&(zg(t,n,u,r),l=t.memoizedState),(a=Io||$w(t,n,a,r,f,l,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,db(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Wn(t.type,a),s.props=c,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Nn(l):(l=ln(n)?Ci:_t.current,l=qs(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&jw(t,s,r,l),Io=!1,f=t.memoizedState,s.state=f,Ed(t,r,s,o);var v=t.memoizedState;a!==d||f!==v||an.current||Io?(typeof p=="function"&&(zg(t,n,p,r),v=t.memoizedState),(c=Io||$w(t,n,c,r,f,v,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Vg(e,t,n,r,i,o)}function Vg(e,t,n,r,o,i){Fb(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Mw(t,n,!1),Zr(e,t,i);r=t.stateNode,m_.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ys(t,e.child,null,i),t.child=Ys(t,null,a,i)):zt(e,t,a,i),t.memoizedState=r.state,o&&Mw(t,n,!0),t.child}function zb(e){var t=e.stateNode;t.pendingContext?Nw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Nw(e,t.context,!1),Th(e,t.containerInfo)}function Qw(e,t,n,r,o){return Gs(),vh(o),t.flags|=256,zt(e,t,n,r),t.child}var $g={dehydrated:null,treeContext:null,retryLane:0};function jg(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hb(e,t,n){var r=t.pendingProps,o=Ke.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),De(Ke,o&1),e===null)return Dg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Vd(s,r,0,null),e=Ti(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=jg(n),t.memoizedState=$g,e):_h(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return g_(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vo(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=Vo(a,i):(i=Ti(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?jg(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=$g,r}return i=e.child,e=i.sibling,r=Vo(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function _h(e,t){return t=Vd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Yu(e,t,n,r){return r!==null&&vh(r),Ys(t,e.child,null,n),e=_h(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function g_(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=og(Error(D(422))),Yu(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Vd({mode:"visible",children:r.children},o,0,null),i=Ti(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Ys(t,e.child,null,s),t.child.memoizedState=jg(s),t.memoizedState=$g,i);if((t.mode&1)===0)return Yu(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(D(419)),r=og(i,r,void 0),Yu(e,t,s,r)}if(a=(s&e.childLanes)!==0,sn||a){if(r=mt,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Qr(e,o),Xn(r,e,o,-1))}return zh(),r=og(Error(D(421))),Yu(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=P_.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,hn=zo(o.nextSibling),yn=t,Ue=!0,Gn=null,e!==null&&(In[Ln++]=Wr,In[Ln++]=qr,In[Ln++]=ki,Wr=e.id,qr=e.overflow,ki=t),t=_h(t,r.children),t.flags|=4096,t)}function Zw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Fg(e.return,t,n)}function ig(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Bb(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(zt(e,t,r.children,n),r=Ke.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zw(e,n,t);else if(e.tag===19)Zw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(Ke,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Td(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ig(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Td(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ig(t,!0,n,null,i);break;case"together":ig(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function od(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Zr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pi|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=Vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function h_(e,t,n){switch(t.tag){case 3:zb(t),Gs();break;case 5:fb(t);break;case 1:ln(t.type)&&vd(t);break;case 4:Th(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;De(Sd,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(Ke,Ke.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Hb(e,t,n):(De(Ke,Ke.current&1),e=Zr(e,t,n),e!==null?e.sibling:null);De(Ke,Ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Bb(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),De(Ke,Ke.current),r)break;return null;case 22:case 23:return t.lanes=0,Db(e,t,n)}return Zr(e,t,n)}var Ub,Kg,Vb,$b;Ub=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Kg=function(){};Vb=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,bi(Rr.current);var i=null;switch(n){case"input":o=pg(e,o),r=pg(e,r),i=[];break;case"select":o=qe({},o,{value:void 0}),r=qe({},r,{value:void 0}),i=[];break;case"textarea":o=hg(e,o),r=hg(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hd)}vg(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(wl.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(wl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Fe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};$b=function(e,t,n,r){n!==r&&(t.flags|=4)};function ol(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function It(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function y_(e,t,n){var r=t.pendingProps;switch(yh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(t),null;case 1:return ln(t.type)&&yd(),It(t),null;case 3:return r=t.stateNode,Xs(),ze(an),ze(_t),kh(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(qu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Gn!==null&&(Jg(Gn),Gn=null))),Kg(e,t),It(t),null;case 5:Ch(t);var o=bi(_l.current);if(n=t.type,e!==null&&t.stateNode!=null)Vb(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return It(t),null}if(e=bi(Rr.current),qu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Cr]=t,r[Il]=i,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(o=0;o<ul.length;o++)Fe(ul[o],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":sw(r,i),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Fe("invalid",r);break;case"textarea":lw(r,i),Fe("invalid",r)}vg(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&Wu(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&Wu(r.textContent,a,e),o=["children",""+a]):wl.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Fe("scroll",r)}switch(n){case"input":Nu(r),aw(r,i,!0);break;case"textarea":Nu(r),cw(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=hd)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=yS(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Cr]=t,e[Il]=r,Ub(e,t,!1,!1),t.stateNode=e;e:{switch(s=xg(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),o=r;break;case"iframe":case"object":case"embed":Fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<ul.length;o++)Fe(ul[o],e);o=r;break;case"source":Fe("error",e),o=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),o=r;break;case"details":Fe("toggle",e),o=r;break;case"input":sw(e,r),o=pg(e,r),Fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=qe({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":lw(e,r),o=hg(e,r),Fe("invalid",e);break;default:o=r}vg(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?wS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&vS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Sl(e,l):typeof l=="number"&&Sl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(wl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Fe("scroll",e):l!=null&&nh(e,i,l,s))}switch(n){case"input":Nu(e),aw(e,r,!1);break;case"textarea":Nu(e),cw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$o(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Bs(e,!!r.multiple,i,!1):r.defaultValue!=null&&Bs(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=hd)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return It(t),null;case 6:if(e&&t.stateNode!=null)$b(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=bi(_l.current),bi(Rr.current),qu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Cr]=t,(i=r.nodeValue!==n)&&(e=yn,e!==null))switch(e.tag){case 3:Wu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Wu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Cr]=t,t.stateNode=r}return It(t),null;case 13:if(ze(Ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&hn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)ab(),Gs(),t.flags|=98560,i=!1;else if(i=qu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(D(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(D(317));i[Cr]=t}else Gs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;It(t),i=!1}else Gn!==null&&(Jg(Gn),Gn=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ke.current&1)!==0?it===0&&(it=3):zh())),t.updateQueue!==null&&(t.flags|=4),It(t),null);case 4:return Xs(),Kg(e,t),e===null&&Pl(t.stateNode.containerInfo),It(t),null;case 10:return Sh(t.type._context),It(t),null;case 17:return ln(t.type)&&yd(),It(t),null;case 19:if(ze(Ke),i=t.memoizedState,i===null)return It(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)ol(i,!1);else{if(it!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Td(e),s!==null){for(t.flags|=128,ol(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(Ke,Ke.current&1|2),t.child}e=e.sibling}i.tail!==null&&Je()>Zs&&(t.flags|=128,r=!0,ol(i,!1),t.lanes=4194304)}else{if(!r)if(e=Td(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ol(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ue)return It(t),null}else 2*Je()-i.renderingStartTime>Zs&&n!==1073741824&&(t.flags|=128,r=!0,ol(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,n=Ke.current,De(Ke,r?n&1|2:n&1),t):(It(t),null);case 22:case 23:return Fh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(gn&1073741824)!==0&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function v_(e,t){switch(yh(t),t.tag){case 1:return ln(t.type)&&yd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xs(),ze(an),ze(_t),kh(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Ch(t),null;case 13:if(ze(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Gs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(Ke),null;case 4:return Xs(),null;case 10:return Sh(t.type._context),null;case 22:case 23:return Fh(),null;case 24:return null;default:return null}}var Xu=!1,Lt=!1,x_=typeof WeakSet=="function"?WeakSet:Set,X=null;function zs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function Wg(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var Jw=!1;function w_(e,t){if(Ag=pd,e=GS(),gh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(w){n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=s),f===i&&++u===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ig={focusedElem:e,selectionRange:n},pd=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,x=v.memoizedState,y=t.stateNode,g=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:Wn(t.type,m),x);y.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(w){Ye(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return v=Jw,Jw=!1,v}function yl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Wg(t,n,i)}o=o.next}while(o!==r)}}function Bd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function qg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function jb(e){var t=e.alternate;t!==null&&(e.alternate=null,jb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Cr],delete t[Il],delete t[Og],delete t[n_],delete t[r_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Kb(e){return e.tag===5||e.tag===3||e.tag===4}function eS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Gg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=hd));else if(r!==4&&(e=e.child,e!==null))for(Gg(e,t,n),e=e.sibling;e!==null;)Gg(e,t,n),e=e.sibling}function Yg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Yg(e,t,n),e=e.sibling;e!==null;)Yg(e,t,n),e=e.sibling}var wt=null,qn=!1;function Po(e,t,n){for(n=n.child;n!==null;)Wb(e,t,n),n=n.sibling}function Wb(e,t,n){if(kr&&typeof kr.onCommitFiberUnmount=="function")try{kr.onCommitFiberUnmount(_d,n)}catch(a){}switch(n.tag){case 5:Lt||zs(n,t);case 6:var r=wt,o=qn;wt=null,Po(e,t,n),wt=r,qn=o,wt!==null&&(qn?(e=wt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wt.removeChild(n.stateNode));break;case 18:wt!==null&&(qn?(e=wt,n=n.stateNode,e.nodeType===8?Zm(e.parentNode,n):e.nodeType===1&&Zm(e,n),Cl(e)):Zm(wt,n.stateNode));break;case 4:r=wt,o=qn,wt=n.stateNode.containerInfo,qn=!0,Po(e,t,n),wt=r,qn=o;break;case 0:case 11:case 14:case 15:if(!Lt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Wg(n,t,s),o=o.next}while(o!==r)}Po(e,t,n);break;case 1:if(!Lt&&(zs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ye(n,t,a)}Po(e,t,n);break;case 21:Po(e,t,n);break;case 22:n.mode&1?(Lt=(r=Lt)||n.memoizedState!==null,Po(e,t,n),Lt=r):Po(e,t,n);break;default:Po(e,t,n)}}function tS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new x_),t.forEach(function(r){var o=A_.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Kn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:wt=a.stateNode,qn=!1;break e;case 3:wt=a.stateNode.containerInfo,qn=!0;break e;case 4:wt=a.stateNode.containerInfo,qn=!0;break e}a=a.return}if(wt===null)throw Error(D(160));Wb(i,s,o),wt=null,qn=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ye(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)qb(t,e),t=t.sibling}function qb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Kn(t,e),Er(e),r&4){try{yl(3,e,e.return),Bd(3,e)}catch(m){Ye(e,e.return,m)}try{yl(5,e,e.return)}catch(m){Ye(e,e.return,m)}}break;case 1:Kn(t,e),Er(e),r&512&&n!==null&&zs(n,n.return);break;case 5:if(Kn(t,e),Er(e),r&512&&n!==null&&zs(n,n.return),e.flags&32){var o=e.stateNode;try{Sl(o,"")}catch(m){Ye(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&gS(o,i),xg(a,s);var c=xg(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];u==="style"?wS(o,d):u==="dangerouslySetInnerHTML"?vS(o,d):u==="children"?Sl(o,d):nh(o,u,d,c)}switch(a){case"input":mg(o,i);break;case"textarea":hS(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Bs(o,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Bs(o,!!i.multiple,i.defaultValue,!0):Bs(o,!!i.multiple,i.multiple?[]:"",!1))}o[Il]=i}catch(m){Ye(e,e.return,m)}}break;case 6:if(Kn(t,e),Er(e),r&4){if(e.stateNode===null)throw Error(D(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(m){Ye(e,e.return,m)}}break;case 3:if(Kn(t,e),Er(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Cl(t.containerInfo)}catch(m){Ye(e,e.return,m)}break;case 4:Kn(t,e),Er(e);break;case 13:Kn(t,e),Er(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Mh=Je())),r&4&&tS(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(Lt=(c=Lt)||u,Kn(t,e),Lt=c):Kn(t,e),Er(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(X=e,u=e.child;u!==null;){for(d=X=u;X!==null;){switch(f=X,p=f.child,f.tag){case 0:case 11:case 14:case 15:yl(4,f,f.return);break;case 1:zs(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(m){Ye(r,n,m)}}break;case 5:zs(f,f.return);break;case 22:if(f.memoizedState!==null){rS(d);continue}}p!==null?(p.return=f,X=p):rS(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=xS("display",s))}catch(m){Ye(e,e.return,m)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(m){Ye(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Kn(t,e),Er(e),r&4&&tS(e);break;case 21:break;default:Kn(t,e),Er(e)}}function Er(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Kb(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Sl(o,""),r.flags&=-33);var i=eS(e);Yg(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=eS(e);Gg(e,a,s);break;default:throw Error(D(161))}}catch(l){Ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function S_(e,t,n){X=e,Gb(e,t,n)}function Gb(e,t,n){for(var r=(e.mode&1)!==0;X!==null;){var o=X,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Xu;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Lt;a=Xu;var c=Lt;if(Xu=s,(Lt=l)&&!c)for(X=o;X!==null;)s=X,l=s.child,s.tag===22&&s.memoizedState!==null?oS(o):l!==null?(l.return=s,X=l):oS(o);for(;i!==null;)X=i,Gb(i,t,n),i=i.sibling;X=o,Xu=a,Lt=c}nS(e,t,n)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,X=i):nS(e,t,n)}}function nS(e){for(;X!==null;){var t=X;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Lt||Bd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Lt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Wn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Bw(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Bw(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Cl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}Lt||t.flags&512&&qg(t)}catch(f){Ye(t,t.return,f)}}if(t===e){X=null;break}if(n=t.sibling,n!==null){n.return=t.return,X=n;break}X=t.return}}function rS(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var n=t.sibling;if(n!==null){n.return=t.return,X=n;break}X=t.return}}function oS(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Bd(4,t)}catch(l){Ye(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Ye(t,o,l)}}var i=t.return;try{qg(t)}catch(l){Ye(t,i,l)}break;case 5:var s=t.return;try{qg(t)}catch(l){Ye(t,s,l)}}}catch(l){Ye(t,t.return,l)}if(t===e){X=null;break}var a=t.sibling;if(a!==null){a.return=t.return,X=a;break}X=t.return}}var b_=Math.ceil,Rd=Jr.ReactCurrentDispatcher,Oh=Jr.ReactCurrentOwner,On=Jr.ReactCurrentBatchConfig,we=0,mt=null,et=null,St=0,gn=0,Hs=Wo(0),it=0,Dl=null,Pi=0,Ud=0,Nh=0,vl=null,on=null,Mh=0,Zs=1/0,jr=null,Pd=!1,Xg=null,Bo=null,Qu=!1,No=null,Ad=0,xl=0,Qg=null,id=-1,sd=0;function Ht(){return(we&6)!==0?Je():id!==-1?id:id=Je()}function Uo(e){return(e.mode&1)===0?1:(we&2)!==0&&St!==0?St&-St:i_.transition!==null?(sd===0&&(sd=_S()),sd):(e=Ae,e!==0||(e=window.event,e=e===void 0?16:HS(e.type)),e)}function Xn(e,t,n,r){if(50<xl)throw xl=0,Qg=null,Error(D(185));Fl(e,n,r),((we&2)===0||e!==mt)&&(e===mt&&((we&2)===0&&(Ud|=n),it===4&&_o(e,St)),cn(e,r),n===1&&we===0&&(t.mode&1)===0&&(Zs=Je()+500,Fd&&qo()))}function cn(e,t){var n=e.callbackNode;aL(e,t);var r=fd(e,e===mt?St:0);if(r===0)n!==null&&fw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&fw(n),t===1)e.tag===0?o_(iS.bind(null,e)):ob(iS.bind(null,e)),e_(function(){(we&6)===0&&qo()}),n=null;else{switch(OS(r)){case 1:n=ah;break;case 4:n=IS;break;case 16:n=dd;break;case 536870912:n=LS;break;default:n=dd}n=nE(n,Yb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Yb(e,t){if(id=-1,sd=0,(we&6)!==0)throw Error(D(327));var n=e.callbackNode;if(Ks()&&e.callbackNode!==n)return null;var r=fd(e,e===mt?St:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Id(e,r);else{t=r;var o=we;we|=2;var i=Qb();(mt!==e||St!==t)&&(jr=null,Zs=Je()+500,Ei(e,t));do try{C_();break}catch(a){Xb(e,a)}while(!0);wh(),Rd.current=i,we=o,et!==null?t=0:(mt=null,St=0,t=it)}if(t!==0){if(t===2&&(o=Tg(e),o!==0&&(r=o,t=Zg(e,o))),t===1)throw n=Dl,Ei(e,0),_o(e,r),cn(e,Je()),n;if(t===6)_o(e,r);else{if(o=e.current.alternate,(r&30)===0&&!E_(o)&&(t=Id(e,r),t===2&&(i=Tg(e),i!==0&&(r=i,t=Zg(e,i))),t===1))throw n=Dl,Ei(e,0),_o(e,r),cn(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:xi(e,on,jr);break;case 3:if(_o(e,r),(r&130023424)===r&&(t=Mh+500-Je(),10<t)){if(fd(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ht(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=_g(xi.bind(null,e,on,jr),t);break}xi(e,on,jr);break;case 4:if(_o(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Yn(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*b_(r/1960))-r,10<r){e.timeoutHandle=_g(xi.bind(null,e,on,jr),r);break}xi(e,on,jr);break;case 5:xi(e,on,jr);break;default:throw Error(D(329))}}}return cn(e,Je()),e.callbackNode===n?Yb.bind(null,e):null}function Zg(e,t){var n=vl;return e.current.memoizedState.isDehydrated&&(Ei(e,t).flags|=256),e=Id(e,t),e!==2&&(t=on,on=n,t!==null&&Jg(t)),e}function Jg(e){on===null?on=e:on.push.apply(on,e)}function E_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Qn(i(),o))return!1}catch(s){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _o(e,t){for(t&=~Nh,t&=~Ud,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yn(t),r=1<<n;e[n]=-1,t&=~r}}function iS(e){if((we&6)!==0)throw Error(D(327));Ks();var t=fd(e,0);if((t&1)===0)return cn(e,Je()),null;var n=Id(e,t);if(e.tag!==0&&n===2){var r=Tg(e);r!==0&&(t=r,n=Zg(e,r))}if(n===1)throw n=Dl,Ei(e,0),_o(e,t),cn(e,Je()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xi(e,on,jr),cn(e,Je()),null}function Dh(e,t){var n=we;we|=1;try{return e(t)}finally{we=n,we===0&&(Zs=Je()+500,Fd&&qo())}}function Ai(e){No!==null&&No.tag===0&&(we&6)===0&&Ks();var t=we;we|=1;var n=On.transition,r=Ae;try{if(On.transition=null,Ae=1,e)return e()}finally{Ae=r,On.transition=n,we=t,(we&6)===0&&qo()}}function Fh(){gn=Hs.current,ze(Hs)}function Ei(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,JL(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(yh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&yd();break;case 3:Xs(),ze(an),ze(_t),kh();break;case 5:Ch(r);break;case 4:Xs();break;case 13:ze(Ke);break;case 19:ze(Ke);break;case 10:Sh(r.type._context);break;case 22:case 23:Fh()}n=n.return}if(mt=e,et=e=Vo(e.current,null),St=gn=t,it=0,Dl=null,Nh=Ud=Pi=0,on=vl=null,Si!==null){for(t=0;t<Si.length;t++)if(n=Si[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Si=null}return e}function Xb(e,t){do{var n=et;try{if(wh(),nd.current=kd,Cd){for(var r=We.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Cd=!1}if(Ri=0,pt=ot=We=null,hl=!1,Ol=0,Oh.current=null,n===null||n.return===null){it=1,Dl=t,et=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=St,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Ww(s);if(p!==null){p.flags&=-257,qw(p,s,a,i,t),p.mode&1&&Kw(i,c,t),t=p,l=c;var v=t.updateQueue;if(v===null){var m=new Set;m.add(l),t.updateQueue=m}else v.add(l);break e}else{if((t&1)===0){Kw(i,c,t),zh();break e}l=Error(D(426))}}else if(Ue&&a.mode&1){var x=Ww(s);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),qw(x,s,a,i,t),vh(Qs(l,a));break e}}i=l=Qs(l,a),it!==4&&(it=2),vl===null?vl=[i]:vl.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=Ob(i,l,t);Hw(i,y);break e;case 1:a=l;var g=i.type,h=i.stateNode;if((i.flags&128)===0&&(typeof g.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Bo===null||!Bo.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=Nb(i,a,t);Hw(i,w);break e}}i=i.return}while(i!==null)}Jb(n)}catch(E){t=E,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function Qb(){var e=Rd.current;return Rd.current=kd,e===null?kd:e}function zh(){(it===0||it===3||it===2)&&(it=4),mt===null||(Pi&268435455)===0&&(Ud&268435455)===0||_o(mt,St)}function Id(e,t){var n=we;we|=2;var r=Qb();(mt!==e||St!==t)&&(jr=null,Ei(e,t));do try{T_();break}catch(o){Xb(e,o)}while(!0);if(wh(),we=n,Rd.current=r,et!==null)throw Error(D(261));return mt=null,St=0,it}function T_(){for(;et!==null;)Zb(et)}function C_(){for(;et!==null&&!ZI();)Zb(et)}function Zb(e){var t=tE(e.alternate,e,gn);e.memoizedProps=e.pendingProps,t===null?Jb(e):et=t,Oh.current=null}function Jb(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=y_(n,t,gn),n!==null){et=n;return}}else{if(n=v_(n,t),n!==null){n.flags&=32767,et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,et=null;return}}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);it===0&&(it=5)}function xi(e,t,n){var r=Ae,o=On.transition;try{On.transition=null,Ae=1,k_(e,t,n,r)}finally{On.transition=o,Ae=r}return null}function k_(e,t,n,r){do Ks();while(No!==null);if((we&6)!==0)throw Error(D(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(lL(e,i),e===mt&&(et=mt=null,St=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Qu||(Qu=!0,nE(dd,function(){return Ks(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=On.transition,On.transition=null;var s=Ae;Ae=1;var a=we;we|=4,Oh.current=null,w_(e,n),qb(n,e),GL(Ig),pd=!!Ag,Ig=Ag=null,e.current=n,S_(n,e,o),JI(),we=a,Ae=s,On.transition=i}else e.current=n;if(Qu&&(Qu=!1,No=e,Ad=o),i=e.pendingLanes,i===0&&(Bo=null),nL(n.stateNode,r),cn(e,Je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Pd)throw Pd=!1,e=Xg,Xg=null,e;return(Ad&1)!==0&&e.tag!==0&&Ks(),i=e.pendingLanes,(i&1)!==0?e===Qg?xl++:(xl=0,Qg=e):xl=0,qo(),null}function Ks(){if(No!==null){var e=OS(Ad),t=On.transition,n=Ae;try{if(On.transition=null,Ae=16>e?16:e,No===null)var r=!1;else{if(e=No,No=null,Ad=0,(we&6)!==0)throw Error(D(331));var o=we;for(we|=4,X=e.current;X!==null;){var i=X,s=i.child;if((X.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(X=c;X!==null;){var u=X;switch(u.tag){case 0:case 11:case 15:yl(8,u,i)}var d=u.child;if(d!==null)d.return=u,X=d;else for(;X!==null;){u=X;var f=u.sibling,p=u.return;if(jb(u),u===c){X=null;break}if(f!==null){f.return=p,X=f;break}X=p}}}var v=i.alternate;if(v!==null){var m=v.child;if(m!==null){v.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}X=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,X=s;else e:for(;X!==null;){if(i=X,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:yl(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,X=y;break e}X=i.return}}var g=e.current;for(X=g;X!==null;){s=X;var h=s.child;if((s.subtreeFlags&2064)!==0&&h!==null)h.return=s,X=h;else e:for(s=g;X!==null;){if(a=X,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Bd(9,a)}}catch(E){Ye(a,a.return,E)}if(a===s){X=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,X=w;break e}X=a.return}}if(we=o,qo(),kr&&typeof kr.onPostCommitFiberRoot=="function")try{kr.onPostCommitFiberRoot(_d,e)}catch(E){}r=!0}return r}finally{Ae=n,On.transition=t}}return!1}function sS(e,t,n){t=Qs(n,t),t=Ob(e,t,1),e=Ho(e,t,1),t=Ht(),e!==null&&(Fl(e,1,t),cn(e,t))}function Ye(e,t,n){if(e.tag===3)sS(e,e,n);else for(;t!==null;){if(t.tag===3){sS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bo===null||!Bo.has(r))){e=Qs(n,e),e=Nb(t,e,1),t=Ho(t,e,1),e=Ht(),t!==null&&(Fl(t,1,e),cn(t,e));break}}t=t.return}}function R_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ht(),e.pingedLanes|=e.suspendedLanes&n,mt===e&&(St&n)===n&&(it===4||it===3&&(St&130023424)===St&&500>Je()-Mh?Ei(e,0):Nh|=n),cn(e,t)}function eE(e,t){t===0&&((e.mode&1)===0?t=1:(t=Fu,Fu<<=1,(Fu&130023424)===0&&(Fu=4194304)));var n=Ht();e=Qr(e,t),e!==null&&(Fl(e,t,n),cn(e,n))}function P_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),eE(e,n)}function A_(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),eE(e,n)}var tE;tE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||an.current)sn=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return sn=!1,h_(e,t,n);sn=(e.flags&131072)!==0}else sn=!1,Ue&&(t.flags&1048576)!==0&&ib(t,wd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;od(e,t),e=t.pendingProps;var o=qs(t,_t.current);js(t,n),o=Ph(null,t,r,e,o,n);var i=Ah();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ln(r)?(i=!0,vd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Eh(t),o.updater=Hd,t.stateNode=o,o._reactInternals=t,Hg(t,r,e,n),t=Vg(null,t,r,!0,i,n)):(t.tag=0,Ue&&i&&hh(t),zt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(od(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=L_(r),e=Wn(r,e),o){case 0:t=Ug(null,t,r,e,n);break e;case 1:t=Xw(null,t,r,e,n);break e;case 11:t=Gw(null,t,r,e,n);break e;case 14:t=Yw(null,t,r,Wn(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wn(r,o),Ug(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wn(r,o),Xw(e,t,r,o,n);case 3:e:{if(zb(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,o=i.element,db(e,t),Ed(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Qs(Error(D(423)),t),t=Qw(e,t,r,n,o);break e}else if(r!==o){o=Qs(Error(D(424)),t),t=Qw(e,t,r,n,o);break e}else for(hn=zo(t.stateNode.containerInfo.firstChild),yn=t,Ue=!0,Gn=null,n=cb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gs(),r===o){t=Zr(e,t,n);break e}zt(e,t,r,n)}t=t.child}return t;case 5:return fb(t),e===null&&Dg(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Lg(r,o)?s=null:i!==null&&Lg(r,i)&&(t.flags|=32),Fb(e,t),zt(e,t,s,n),t.child;case 6:return e===null&&Dg(t),null;case 13:return Hb(e,t,n);case 4:return Th(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ys(t,null,r,n):zt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wn(r,o),Gw(e,t,r,o,n);case 7:return zt(e,t,t.pendingProps,n),t.child;case 8:return zt(e,t,t.pendingProps.children,n),t.child;case 12:return zt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,De(Sd,r._currentValue),r._currentValue=s,i!==null)if(Qn(i.value,s)){if(i.children===o.children&&!an.current){t=Zr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Gr(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Fg(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(D(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Fg(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}zt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,js(t,n),o=Nn(o),r=r(o),t.flags|=1,zt(e,t,r,n),t.child;case 14:return r=t.type,o=Wn(r,t.pendingProps),o=Wn(r.type,o),Yw(e,t,r,o,n);case 15:return Mb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wn(r,o),od(e,t),t.tag=1,ln(r)?(e=!0,vd(t)):e=!1,js(t,n),_b(t,r,o),Hg(t,r,o,n),Vg(null,t,r,!0,e,n);case 19:return Bb(e,t,n);case 22:return Db(e,t,n)}throw Error(D(156,t.tag))};function nE(e,t){return AS(e,t)}function I_(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _n(e,t,n,r){return new I_(e,t,n,r)}function Hh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function L_(e){if(typeof e=="function")return Hh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===oh)return 11;if(e===ih)return 14}return 2}function Vo(e,t){var n=e.alternate;return n===null?(n=_n(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ad(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Hh(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case As:return Ti(n.children,o,i,t);case rh:s=8,o|=8;break;case cg:return e=_n(12,n,t,o|2),e.elementType=cg,e.lanes=i,e;case ug:return e=_n(13,n,t,o),e.elementType=ug,e.lanes=i,e;case dg:return e=_n(19,n,t,o),e.elementType=dg,e.lanes=i,e;case fS:return Vd(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uS:s=10;break e;case dS:s=9;break e;case oh:s=11;break e;case ih:s=14;break e;case Ao:s=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=_n(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ti(e,t,n,r){return e=_n(7,e,r,t),e.lanes=n,e}function Vd(e,t,n,r){return e=_n(22,e,r,t),e.elementType=fS,e.lanes=n,e.stateNode={isHidden:!1},e}function sg(e,t,n){return e=_n(6,e,null,t),e.lanes=n,e}function ag(e,t,n){return t=_n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function __(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jm(0),this.expirationTimes=jm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jm(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Bh(e,t,n,r,o,i,s,a,l){return e=new __(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=_n(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Eh(i),e}function O_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ps,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function rE(e){if(!e)return jo;e=e._reactInternals;e:{if(Li(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ln(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(ln(n))return rb(e,n,t)}return t}function oE(e,t,n,r,o,i,s,a,l){return e=Bh(n,r,!0,e,o,i,s,a,l),e.context=rE(null),n=e.current,r=Ht(),o=Uo(n),i=Gr(r,o),i.callback=t!=null?t:null,Ho(n,i,o),e.current.lanes=o,Fl(e,o,r),cn(e,r),e}function $d(e,t,n,r){var o=t.current,i=Ht(),s=Uo(o);return n=rE(n),t.context===null?t.context=n:t.pendingContext=n,t=Gr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ho(o,t,s),e!==null&&(Xn(e,o,s,i),td(e,o,s)),s}function Ld(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function aS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Uh(e,t){aS(e,t),(e=e.alternate)&&aS(e,t)}function N_(){return null}var iE=typeof reportError=="function"?reportError:function(e){console.error(e)};function Vh(e){this._internalRoot=e}jd.prototype.render=Vh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));$d(e,t,null,null)};jd.prototype.unmount=Vh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ai(function(){$d(null,e,null,null)}),t[Xr]=null}};function jd(e){this._internalRoot=e}jd.prototype.unstable_scheduleHydration=function(e){if(e){var t=DS();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lo.length&&t!==0&&t<Lo[n].priority;n++);Lo.splice(n,0,e),n===0&&zS(e)}};function $h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Kd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lS(){}function M_(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=Ld(s);i.call(c)}}var s=oE(t,r,e,0,null,!1,!1,"",lS);return e._reactRootContainer=s,e[Xr]=s.current,Pl(e.nodeType===8?e.parentNode:e),Ai(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=Ld(l);a.call(c)}}var l=Bh(e,0,!1,null,null,!1,!1,"",lS);return e._reactRootContainer=l,e[Xr]=l.current,Pl(e.nodeType===8?e.parentNode:e),Ai(function(){$d(t,l,n,r)}),l}function Wd(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=Ld(s);a.call(l)}}$d(t,s,e,o)}else s=M_(n,t,e,o,r);return Ld(s)}NS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cl(t.pendingLanes);n!==0&&(lh(t,n|1),cn(t,Je()),(we&6)===0&&(Zs=Je()+500,qo()))}break;case 13:Ai(function(){var r=Qr(e,1);if(r!==null){var o=Ht();Xn(r,e,1,o)}}),Uh(e,1)}};ch=function(e){if(e.tag===13){var t=Qr(e,134217728);if(t!==null){var n=Ht();Xn(t,e,134217728,n)}Uh(e,134217728)}};MS=function(e){if(e.tag===13){var t=Uo(e),n=Qr(e,t);if(n!==null){var r=Ht();Xn(n,e,t,r)}Uh(e,t)}};DS=function(){return Ae};FS=function(e,t){var n=Ae;try{return Ae=e,t()}finally{Ae=n}};Sg=function(e,t,n){switch(t){case"input":if(mg(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Dd(r);if(!o)throw Error(D(90));mS(r),mg(r,o)}}}break;case"textarea":hS(e,n);break;case"select":t=n.value,t!=null&&Bs(e,!!n.multiple,t,!1)}};ES=Dh;TS=Ai;var D_={usingClientEntryPoint:!1,Events:[Hl,Os,Dd,SS,bS,Dh]},il={findFiberByHostInstance:wi,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F_={bundleType:il.bundleType,version:il.version,rendererPackageName:il.rendererPackageName,rendererConfig:il.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Jr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=RS(e),e===null?null:e.stateNode},findFiberByHostInstance:il.findFiberByHostInstance||N_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(sl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!sl.isDisabled&&sl.supportsFiber))try{_d=sl.inject(F_),kr=sl}catch(e){}var sl;wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D_;wn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$h(t))throw Error(D(200));return O_(e,t,null,n)};wn.createRoot=function(e,t){if(!$h(e))throw Error(D(299));var n=!1,r="",o=iE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Bh(e,1,!1,null,null,n,!1,r,o),e[Xr]=t.current,Pl(e.nodeType===8?e.parentNode:e),new Vh(t)};wn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=RS(t),e=e===null?null:e.stateNode,e};wn.flushSync=function(e){return Ai(e)};wn.hydrate=function(e,t,n){if(!Kd(t))throw Error(D(200));return Wd(null,e,t,!0,n)};wn.hydrateRoot=function(e,t,n){if(!$h(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=iE;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=oE(t,null,e,1,n!=null?n:null,o,!1,i,s),e[Xr]=t.current,Pl(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new jd(t)};wn.render=function(e,t,n){if(!Kd(t))throw Error(D(200));return Wd(null,e,t,!1,n)};wn.unmountComponentAtNode=function(e){if(!Kd(e))throw Error(D(40));return e._reactRootContainer?(Ai(function(){Wd(null,null,e,!1,function(){e._reactRootContainer=null,e[Xr]=null})}),!0):!1};wn.unstable_batchedUpdates=Dh;wn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Kd(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return Wd(e,t,n,!1,r)};wn.version="18.3.1-next-f1338f8080-20240426"});var Ul=en((M6,lE)=>{"use strict";function aE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aE)}catch(e){console.error(e)}}aE(),lE.exports=sE()});var uE=en(jh=>{"use strict";var cE=Ul();jh.createRoot=cE.createRoot,jh.hydrateRoot=cE.hydrateRoot;var D6});var KE=en(jE=>{"use strict";var Kl=Z();function OO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var NO=typeof Object.is=="function"?Object.is:OO,MO=Kl.useSyncExternalStore,DO=Kl.useRef,FO=Kl.useEffect,zO=Kl.useMemo,HO=Kl.useDebugValue;jE.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=DO(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=zO(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&s.hasValue){var v=s.value;if(o(v,p))return d=v}return d=p}if(v=d,NO(u,p))return v;var m=r(p);return o!==void 0&&o(v,m)?(u=p,v):(u=p,d=m)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=MO(e,i[0],i[1]);return FO(function(){s.hasValue=!0,s.value=a},[a]),HO(a),a}});var qE=en((E9,WE)=>{"use strict";WE.exports=KE()});var zy=en((nH,wT)=>{"use strict";var TM="Expected a function",vT=NaN,CM="[object Symbol]",kM=/^\s+|\s+$/g,RM=/^[-+]0x[0-9a-f]+$/i,PM=/^0b[01]+$/i,AM=/^0o[0-7]+$/i,IM=parseInt,LM=typeof global=="object"&&global&&global.Object===Object&&global,_M=typeof self=="object"&&self&&self.Object===Object&&self,OM=LM||_M||Function("return this")(),NM=Object.prototype,MM=NM.toString,DM=Math.max,FM=Math.min,Dy=function(){return OM.Date.now()};function zM(e,t,n){var r,o,i,s,a,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(TM);t=xT(t)||0,Fy(n)&&(u=!!n.leading,d="maxWait"in n,i=d?DM(xT(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(C){var k=r,A=o;return r=o=void 0,c=C,s=e.apply(A,k),s}function v(C){return c=C,a=setTimeout(y,t),u?p(C):s}function m(C){var k=C-l,A=C-c,F=t-k;return d?FM(F,i-A):F}function x(C){var k=C-l,A=C-c;return l===void 0||k>=t||k<0||d&&A>=i}function y(){var C=Dy();if(x(C))return g(C);a=setTimeout(y,m(C))}function g(C){return a=void 0,f&&r?p(C):(r=o=void 0,s)}function h(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function w(){return a===void 0?s:g(Dy())}function E(){var C=Dy(),k=x(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return v(l);if(d)return a=setTimeout(y,t),p(l)}return a===void 0&&(a=setTimeout(y,t)),s}return E.cancel=h,E.flush=w,E}function Fy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function HM(e){return!!e&&typeof e=="object"}function BM(e){return typeof e=="symbol"||HM(e)&&MM.call(e)==CM}function xT(e){if(typeof e=="number")return e;if(BM(e))return vT;if(Fy(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fy(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(kM,"");var n=PM.test(e);return n||AM.test(e)?IM(e.slice(2),n?2:8):RM.test(e)?vT:+e}wT.exports=zM});var zT=en((BH,FT)=>{"use strict";var QM=/["'&<>]/;FT.exports=ZM;function ZM(e){var t=""+e,n=QM.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var YF={};Rt(YF,{Card:()=>Ie,ContentEditableInput:()=>ps,DeepdeskAPI:()=>Eo,DeepdeskSDK:()=>lu,HTTPClient:()=>gs,InputMediator:()=>bo,InputType:()=>Cs,KeyboardHint:()=>Tu,Label:()=>Rx,Locale:()=>Wl,Section:()=>Sr,SectionList:()=>Es,Sources:()=>$r,Suggestion:()=>Ee,SuggestionList:()=>rn,TextAreaInput:()=>ms,ToggleButton:()=>hi,attachFile:()=>LA,authenticateWithKey:()=>_A,createFullRange:()=>Ba,createOverlayContainer:()=>au,createRangeFromOffsets:()=>ci,escapeHTML:()=>da,formatTextMarkup:()=>OA,getRangeOffsets:()=>iu,getRangeText:()=>su,insertCKEditor:()=>FA,isHTML:()=>Vf,isSupportedInputElement:()=>cm,updateContentEditable:()=>MA,updateTextArea:()=>NA,useClickOutsideRoot:()=>ri,useStyles:()=>M,waitForElementVisibilityChange:()=>fm});var Pm=b(Ne()),Pn=b(Z());var xu=b(Z()),yx=b(Ne());var Ya=xu.default.createContext({});function M(e,t){let i=(0,xu.useContext)(Ya),{debug:n}=i,o=oe(i,["debug"])[e];return Object.entries(t).reduce((s,[a,l])=>{let c=o==null?void 0:o[a];return P(S({},s),{[a]:(0,yx.default)(l,c,n?`${e}__${a}`:!1)})},{})}var vx={root:"dd-4s9wq"};var mi=b(R()),Su=()=>(0,mi.jsxs)("svg",{className:vx.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,mi.jsx)("defs",{children:(0,mi.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,mi.jsx)("title",{children:"Failed loading image"}),(0,mi.jsx)("path",{className:"cls-1",d:"M15 130.896V16.994c0-1.097.898-1.994 2.007-1.994h150.986A2 2 0 0 1 170 16.994v69.147L133.015 51 87.26 120.377l-35.863-17.758L15 130.896zM2 0C.895 0 0 .887 0 2v166c0 1.105.887 2 2 2h181c1.105 0 2-.887 2-2V2c0-1.105-.887-2-2-2H2zm49 72c11.046 0 20-9.178 20-20.5S62.046 31 51 31s-20 9.178-20 20.5S39.954 72 51 72z",fillRule:"evenodd"})]});var Rm={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var gi=b(R()),bu=(0,Pn.createContext)(Rm),xI=({title:e,src:t})=>{let n=(0,Pn.useContext)(bu),[r,o]=(0,Pn.useState)(!1);return(0,Pn.useEffect)(()=>{o(!1)},[t]),(0,gi.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,gi.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,gi.jsx)(Su,{})})},wI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Pn.useContext)(bu);return(0,gi.jsx)("div",{className:(0,Pm.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},SI=i=>{var s=i,{as:e="h1",cropText:t=!1,className:n,children:r}=s,o=oe(s,["as","cropText","className","children"]);let a=(0,Pn.useContext)(bu);return Pn.default.createElement(e,S({className:(0,Pm.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Eu=({children:e})=>{let t=M("Card",Rm);return(0,gi.jsx)("div",{className:t.root,children:(0,gi.jsx)(bu.Provider,{value:t,children:e})})};Eu.Image=xI;Eu.Content=wI;Eu.Title=SI;var Ie=Eu;var Ex=b(Ne());var bx={root:"dd-llBx9"};var Tx=b(R());var bI={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},EI=r=>{var o=r,{className:e,keyCode:t}=o,n=oe(o,["className","keyCode"]);let i=M("KeyboardHint",bx);return(0,Tx.jsx)("span",S({"data-key":bI[t],className:(0,Ex.default)(e,i.root)},n))},Tu=EI;var kx=b(Ne());var Cx={root:"dd-e6HXZ"};var Px=b(R()),TI=r=>{var o=r,{className:e,children:t}=o,n=oe(o,["className","children"]);let i=M("Label",Cx);return(0,Px.jsx)("span",P(S({},n),{className:(0,kx.default)(e,i.root),children:t}))},Rx=TI;var Ax={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var bs=b(R()),CI=o=>{var i=o,{title:e,children:t,type:n}=i,r=oe(i,["title","children","type"]);let s=M("Section",Ax);return(0,bs.jsxs)("section",P(S({},r),{className:s.root,"data-section-type":n,children:[e&&(0,bs.jsx)("div",{className:s.subTitleContainer,children:(0,bs.jsx)("span",{className:s.subtitle,children:e})}),(0,bs.jsx)("div",{className:s.suggestions,children:t})]}))},Sr=CI;var Mx=b(Ne()),Dx=b(Z());var To=b(Z()),Ox=b(R()),Ix=(0,To.createContext)(null),Lx=({scrollContainerRef:e,children:t})=>{let n=(0,To.useCallback)(r=>{let o=e.current;if(!o||o.scrollHeight<=o.clientHeight)return;let{top:i}=o.getBoundingClientRect(),{top:s}=r.getBoundingClientRect();o.scrollTo({top:s-i})},[]);return(0,Ox.jsx)(Ix.Provider,{value:n,children:t})},_x=e=>{let t=(0,To.useContext)(Ix);(0,To.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var Nx={root:"dd-uoTXh"};var Am=b(R()),kI=({className:e,children:t})=>{let n=M("SectionList",Nx),r=(0,Dx.useRef)(null);return(0,Am.jsx)(Lx,{scrollContainerRef:r,children:(0,Am.jsx)("div",{ref:r,className:(0,Mx.default)(n.root,e),children:t})})},Es=kI;var Ts=b(Ne()),nn=b(Z());var Im={root:"dd-1g-A9",fadein:"dd-McXxq",isClickable:"dd-CTG8E",isSelected:"dd-yhg27",actions:"dd-Nlm6p",actionsIsFixed:"dd-OK-kw",actionButton:"dd-zbXsQ",dropdownList:"dd-AvwWP",dropdownButton:"dd-piaJi",dropdownItem:"dd-qgkTO",dropdownItemButton:"dd-sTE2D",actionButtonIsPrimary:"dd-mhkWS",actionButtonIsDisabled:"dd-0eKLQ",labels:"dd-QKJu6",label:"dd-aMplE",buttonsContainer:"dd-uRYN4",button:"dd-9UE-x",buttonWithIcon:"dd-MQVt5",buttonDisabled:"dd-agTuH"};var tn=b(R()),Co=(0,nn.createContext)(Im),RI=r=>{var o=r,{fixed:e,children:t}=o,n=oe(o,["fixed","children"]);let i=(0,nn.useContext)(Co);return(0,tn.jsx)("div",P(S({},n),{className:(0,Ts.default)(i.actions,{[i.actionsIsFixed]:e}),children:t}))};function PI(a){var l=a,{as:e,className:t,icon:n,title:r,children:o,disabled:i}=l,s=oe(l,["as","className","icon","title","children","disabled"]);let c=(0,nn.useContext)(Co);return(0,tn.jsxs)(e||"button",P(S({type:"button",className:(0,Ts.default)(c.button,{[c.buttonWithIcon]:n,[c.buttonDisabled]:i},t),title:r,"aria-label":r},s),{children:[n,o]}))}var AI=({children:e})=>{let t=(0,nn.useContext)(Co);return(0,tn.jsx)("div",{className:t.buttonsContainer,children:e})},II=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,nn.useContext)(Co);return(0,tn.jsxs)("div",{className:(0,Ts.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,tn.jsx)("ul",{className:i.dropdownList,children:o})]})},LI=({index:e,label:t,onClick:n})=>{let r=(0,nn.useContext)(Co);return(0,tn.jsx)("li",{className:r.dropdownItem,children:(0,tn.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},_I=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,nn.useContext)(Co);return(0,tn.jsx)("button",{type:"button",className:(0,Ts.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r!=null?r:s=>s.stopPropagation(),disabled:n,"aria-hidden":n,children:o})},OI=({labels:e})=>{let t=(0,nn.useContext)(Co);return(0,tn.jsx)("div",{className:t.labels,children:e.map(n=>(0,tn.jsx)("span",{className:t.label,children:n},n))})},ko=nn.default.forwardRef((a,s)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,i=oe(l,["className","selected","onClick","children","as"]);let c=M("Suggestion",Im),u=(0,nn.useCallback)(d=>{d.preventDefault(),n&&n(d)},[n]);return(0,tn.jsx)(o,P(S({},i),{ref:s,className:(0,Ts.default)(e,c.root,{[c.isSelected]:t,[c.isClickable]:!!n}),onClick:u,children:(0,tn.jsx)(Co.Provider,{value:c,children:r})}))});ko.Labels=OI;ko.Actions=RI;ko.ActionButton=_I;ko.DropdownButton=II;ko.DropdownItem=LI;ko.ButtonsContainer=AI;ko.Button=PI;var Ee=ko;var zx=b(Ne());var Fx={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var Hx=b(R()),NI=({withDivider:e,children:t})=>{let n=M("SuggestionList",Fx);return(0,Hx.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,zx.default)(n.root,{[n.isWithDivider]:e}),children:t})},rn=NI;var Ux=b(Ne());var Bx={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Cu=b(R()),MI=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=M("ToggleButton",Bx);return(0,Cu.jsx)("button",{type:"button",className:(0,Ux.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Cu.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Cu.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},hi=MI;var Vx=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,ku=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var $x=/x-deepdesk-(([a-z0-9\-_])+-version)/,Ru=["cues","custom-data","knowledge-assist"],jx=Intl.DateTimeFormat().resolvedOptions().timeZone,$r=(m=>(m.SEARCH="search",m.TEMPLATE="template",m.ELASTIC_SEARCH="search-autocomplete",m.GPT="gpt",m.TRIE="trie",m.TRIE_WITH_TYPOS="trie-with-typos",m.SEMANTIC="semantic",m.TEXT_RECOMMENDATION="text_recommendation",m.URL_RECOMMENDATION="url_recommendation",m.LINK_RECOMMENDATION="link_recommendation",m.PERSONAL_COLLECTION="personal-collection",m.PERSONAL_COLLECTION_SEARCH="personal-collection-search",m.SEARCH_OVERLAY="search-overlay",m.SEARCH_PREVIEW="search-preview",m.SEARCH_URL="search-url",m))($r||{}),Cs=(s=>(s.ENTER="enter",s.TAB="tab",s.ARROW="arrow",s.HOTKEY="hotkey",s.MOUSE="mouse",s.SPACE="space",s))(Cs||{});var di=b(uE());var RR=b(Z());function Et(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var z_=typeof Symbol=="function"&&Symbol.observable||"@@observable",dE=z_,Kh=()=>Math.random().toString(36).substring(7).split("").join("."),H_={INIT:`@@redux/INIT${Kh()}`,REPLACE:`@@redux/REPLACE${Kh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kh()}`},qd=H_;function Gd(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Wh(e,t,n){if(typeof e!="function")throw new Error(Et(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Et(1));return n(Wh)(e,t)}let r=e,o=t,i=new Map,s=i,a=0,l=!1;function c(){s===i&&(s=new Map,i.forEach((x,y)=>{s.set(y,x)}))}function u(){if(l)throw new Error(Et(3));return o}function d(x){if(typeof x!="function")throw new Error(Et(4));if(l)throw new Error(Et(5));let y=!0;c();let g=a++;return s.set(g,x),function(){if(y){if(l)throw new Error(Et(6));y=!1,c(),s.delete(g),i=null}}}function f(x){if(!Gd(x))throw new Error(Et(7));if(typeof x.type=="undefined")throw new Error(Et(8));if(typeof x.type!="string")throw new Error(Et(17));if(l)throw new Error(Et(9));try{l=!0,o=r(o,x)}finally{l=!1}return(i=s).forEach(g=>{g()}),x}function p(x){if(typeof x!="function")throw new Error(Et(10));r=x,f({type:qd.REPLACE})}function v(){let x=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Et(11));function g(){let w=y;w.next&&w.next(u())}return g(),{unsubscribe:x(g)}},[dE](){return this}}}return f({type:qd.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[dE]:v}}function B_(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:qd.INIT})=="undefined")throw new Error(Et(12));if(typeof n(void 0,{type:qd.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Et(13))})}function Yd(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let a=t[s];typeof e[a]=="function"&&(n[a]=e[a])}let r=Object.keys(n),o,i;try{B_(n)}catch(s){i=s}return function(a={},l){if(i)throw i;let c=!1,u={};for(let d=0;d<r.length;d++){let f=r[d],p=n[f],v=a[f],m=p(v,l);if(typeof m=="undefined"){let x=l&&l.type;throw new Error(Et(14))}u[f]=m,c=c||m!==v}return c=c||r.length!==Object.keys(a).length,c?u:a}}function ta(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function fE(...e){return t=>(n,r)=>{let o=t(n,r),i=()=>{throw new Error(Et(15))},s={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},a=e.map(l=>l(s));return i=ta(...a)(o.dispatch),P(S({},o),{dispatch:i})}}function pE(e){return Gd(e)&&"type"in e&&typeof e.type=="string"}var xE=Symbol.for("immer-nothing"),mE=Symbol.for("immer-draftable"),Sn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var na=Object.getPrototypeOf;function Go(e){return!!e&&!!e[Sn]}function Jn(e){var t;return e?wE(e)||Array.isArray(e)||!!e[mE]||!!((t=e.constructor)!=null&&t[mE])||ef(e)||tf(e):!1}var U_=Object.prototype.constructor.toString();function wE(e){if(!e||typeof e!="object")return!1;let t=na(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===U_}function Xd(e,t){Jd(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Jd(e){let t=e[Sn];return t?t.type_:Array.isArray(e)?1:ef(e)?2:tf(e)?3:0}function Yh(e,t){return Jd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function SE(e,t,n){let r=Jd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function V_(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ef(e){return e instanceof Map}function tf(e){return e instanceof Set}function _i(e){return e.copy_||e.base_}function Xh(e,t){if(ef(e))return new Map(e);if(tf(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=wE(e);if(t===!0||t==="class_only"&&!n){let r=Object.getOwnPropertyDescriptors(e);delete r[Sn];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){let s=o[i],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(na(e),r)}else{let r=na(e);if(r!==null&&n)return S({},e);let o=Object.create(r);return Object.assign(o,e)}}function ty(e,t=!1){return nf(e)||Go(e)||!Jn(e)||(Jd(e)>1&&(e.set=e.add=e.clear=e.delete=$_),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ty(r,!0))),e}function $_(){Zn(2)}function nf(e){return Object.isFrozen(e)}var j_={};function Oi(e){let t=j_[e];return t||Zn(0,e),t}var Vl;function bE(){return Vl}function K_(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function gE(e,t){t&&(Oi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qh(e){Zh(e),e.drafts_.forEach(W_),e.drafts_=null}function Zh(e){e===Vl&&(Vl=e.parent_)}function hE(e){return Vl=K_(Vl,e)}function W_(e){let t=e[Sn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function yE(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[Sn].modified_&&(Qh(t),Zn(4)),Jn(e)&&(e=Qd(t,e),t.parent_||Zd(t,e)),t.patches_&&Oi("Patches").generateReplacementPatches_(n[Sn].base_,e,t.patches_,t.inversePatches_)):e=Qd(t,n,[]),Qh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xE?e:void 0}function Qd(e,t,n){if(nf(t))return t;let r=t[Sn];if(!r)return Xd(t,(o,i)=>vE(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Zd(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let o=r.copy_,i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),Xd(i,(a,l)=>vE(e,r,o,a,l,n,s)),Zd(e,o,!1),n&&e.patches_&&Oi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function vE(e,t,n,r,o,i,s){if(Go(o)){let a=i&&t&&t.type_!==3&&!Yh(t.assigned_,r)?i.concat(r):void 0,l=Qd(e,o,a);if(SE(n,r,l),Go(l))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Jn(o)&&!nf(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Qd(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Zd(e,o)}}function Zd(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ty(t,n)}function q_(e,t){let n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:bE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=r,i=ny;n&&(o=[r],i=$l);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var ny={get(e,t){if(t===Sn)return e;let n=_i(e);if(!Yh(n,t))return G_(e,n,t);let r=n[t];return e.finalized_||!Jn(r)?r:r===qh(e.base_,t)?(Gh(e),e.copy_[t]=ey(r,e)):r},has(e,t){return t in _i(e)},ownKeys(e){return Reflect.ownKeys(_i(e))},set(e,t,n){let r=EE(_i(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=qh(_i(e),t),i=o==null?void 0:o[Sn];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(V_(n,o)&&(n!==void 0||Yh(e.base_,t)))return!0;Gh(e),Jh(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return qh(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Gh(e),Jh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=_i(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return na(e.base_)},setPrototypeOf(){Zn(12)}},$l={};Xd(ny,(e,t)=>{$l[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$l.deleteProperty=function(e,t){return $l.set.call(this,e,t,void 0)};$l.set=function(e,t,n){return ny.set.call(this,e[0],t,n,e[0])};function qh(e,t){let n=e[Sn];return(n?_i(n):e)[t]}function G_(e,t,n){var o;let r=EE(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function EE(e,t){if(!(t in e))return;let n=na(e);for(;n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=na(n)}}function Jh(e){e.modified_||(e.modified_=!0,e.parent_&&Jh(e.parent_))}function Gh(e){e.copy_||(e.copy_=Xh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Y_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){let i=n;n=t;let s=this;return function(l=i,...c){return s.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let o;if(Jn(t)){let i=hE(this),s=ey(t,void 0),a=!0;try{o=n(s),a=!1}finally{a?Qh(i):Zh(i)}return gE(i,r),yE(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===xE&&(o=void 0),this.autoFreeze_&&ty(o,!0),r){let i=[],s=[];Oi("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jn(e)||Zn(8),Go(e)&&(e=X_(e));let t=hE(this),n=ey(e,void 0);return n[Sn].isManual_=!0,Zh(t),n}finishDraft(e,t){let n=e&&e[Sn];(!n||!n.isManual_)&&Zn(9);let{scope_:r}=n;return gE(r,t),yE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));let r=Oi("Patches").applyPatches_;return Go(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ey(e,t){let n=ef(e)?Oi("MapSet").proxyMap_(e,t):tf(e)?Oi("MapSet").proxySet_(e,t):q_(e,t);return(t?t.scope_:bE()).drafts_.push(n),n}function X_(e){return Go(e)||Zn(10,e),TE(e)}function TE(e){if(!Jn(e)||nf(e))return e;let t=e[Sn],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Xh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Xh(e,!0);return Xd(n,(r,o)=>{SE(n,r,TE(o))}),t&&(t.finalized_=!1),n}var bn=new Y_,rf=bn.produce,B6=bn.produceWithPatches.bind(bn),U6=bn.setAutoFreeze.bind(bn),V6=bn.setUseStrictShallowCopy.bind(bn),$6=bn.applyPatches.bind(bn),j6=bn.createDraft.bind(bn),K6=bn.finishDraft.bind(bn);function Q_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Z_(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function J_(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var CE=e=>Array.isArray(e)?e:[e];function eO(e){let t=Array.isArray(e[0])?e[0]:e;return J_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tO(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Y6=Symbol();var X6=Object.getPrototypeOf({});var nO=class{constructor(e){this.value=e}deref(){return this.value}},rO=typeof WeakRef!="undefined"?WeakRef:nO,oO=0,kE=1;function of(){return{s:oO,v:void 0,o:null,p:null}}function ry(e,t={}){let n=of(),{resultEqualityCheck:r}=t,o,i=0;function s(){var d,f;let a=n,{length:l}=arguments;for(let p=0,v=l;p<v;p++){let m=arguments[p];if(typeof m=="function"||typeof m=="object"&&m!==null){let x=a.o;x===null&&(a.o=x=new WeakMap);let y=x.get(m);y===void 0?(a=of(),x.set(m,a)):a=y}else{let x=a.p;x===null&&(a.p=x=new Map);let y=x.get(m);y===void 0?(a=of(),x.set(m,a)):a=y}}let c=a,u;if(a.s===kE)u=a.v;else if(u=e.apply(null,arguments),i++,r){let p=(f=(d=o==null?void 0:o.deref)==null?void 0:d.call(o))!=null?f:o;p!=null&&r(p,u)&&(u=p,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new rO(u):u}return c.s=kE,c.v=u,u}return s.clearCache=()=>{n=of(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function RE(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),Q_(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let u=S(S({},n),l),{memoize:d,memoizeOptions:f=[],argsMemoize:p=ry,argsMemoizeOptions:v=[],devModeChecks:m={}}=u,x=CE(f),y=CE(v),g=eO(o),h=d(function(){return i++,c.apply(null,arguments)},...x),w=!0,E=p(function(){s++;let k=tO(g,arguments);return a=h.apply(null,k),a},...y);return Object.assign(E,{resultFunc:c,memoizedResultFunc:h,dependencies:g,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Dn=RE(ry),iO=Object.assign((e,t=Dn)=>{Z_(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>iO});function PE(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var AE=PE(),IE=PE;var sO=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ta:ta.apply(null,arguments)},i9=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},aO=e=>e&&typeof e.match=="function";function st(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(eo(0));return S(S({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>pE(r)&&r.type===e,n}var DE=class jl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,jl.prototype)}static get[Symbol.species](){return jl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new jl(...t[0].concat(this)):new jl(...t.concat(this))}};function LE(e){return Jn(e)?rf(e,()=>{}):e}function _E(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function lO(e){return typeof e=="boolean"}var cO=()=>function(t){let{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t!=null?t:{},s=new DE;return n&&(lO(n)?s.push(AE):s.push(IE(n.extraArgument))),s},uO="RTK_autoBatch";var OE=e=>t=>{setTimeout(t,e)},dO=(e={type:"raf"})=>t=>(...n)=>{let r=t(...n),o=!0,i=!1,s=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window!="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame:OE(10):e.type==="callback"?e.queueNotification:OE(e.timeout),c=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let d=()=>o&&u(),f=r.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){var d;try{return o=!((d=u==null?void 0:u.meta)!=null&&d[uO]),i=!o,i&&(s||(s=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},fO=e=>function(n){let{autoBatch:r=!0}=n!=null?n:{},o=new DE(e);return r&&o.push(dO(typeof r=="object"?r:void 0)),o};function FE(e){let t=cO(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{},a;if(typeof n=="function")a=n;else if(Gd(n))a=Yd(n);else throw new Error(eo(1));let l;typeof r=="function"?l=r(t):l=t();let c=ta;o&&(c=sO(S({trace:!1},typeof o=="object"&&o)));let u=fE(...l),d=fO(u),f=typeof s=="function"?s(d):d(),p=c(...f);return Wh(a,i,p)}function zE(e){let t={},n=[],r,o={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(eo(28));if(a in t)throw new Error(eo(29));return t[a]=s,o},addMatcher(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase(i){return r=i,o}};return e(o),[t,n,r]}function pO(e){return typeof e=="function"}function mO(e,t){let[n,r,o]=zE(t),i;if(pO(e))i=()=>LE(e());else{let a=LE(e);i=()=>a}function s(a=i(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,d)=>{if(d)if(Go(u)){let p=d(u,l);return p===void 0?u:p}else{if(Jn(u))return rf(u,f=>d(f,l));{let f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=i,s}var gO=(e,t)=>aO(e)?e.match(t):e(t);function hO(...e){return t=>e.some(n=>gO(n,t))}var yO="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vO=(e=21)=>{let t="",n=e;for(;n--;)t+=yO[Math.random()*64|0];return t},xO=["name","message","stack","code"],oy=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},NE=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},wO=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of xO)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},ME="External signal was aborted",ge=(()=>{function e(t,n,r){let o=st(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:P(S({},d||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),i=st(t+"/pending",(l,c,u)=>({payload:void 0,meta:P(S({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),s=st(t+"/rejected",(l,c,u,d,f)=>({payload:d,error:(r&&r.serializeError||wO)(l||"Rejected"),meta:P(S({},f||{}),{arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"})}));function a(l,{signal:c}={}){return(u,d,f)=>{let p=r!=null&&r.idGenerator?r.idGenerator(l):vO(),v=new AbortController,m,x;function y(h){x=h,v.abort()}c&&(c.aborted?y(ME):c.addEventListener("abort",()=>y(ME),{once:!0}));let g=function(){return I(this,null,function*(){var E,C;let h;try{let k=(E=r==null?void 0:r.condition)==null?void 0:E.call(r,l,{getState:d,extra:f});if(bO(k)&&(k=yield k),k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let A=new Promise((F,N)=>{m=()=>{N({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",m)});u(i(p,l,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:p,arg:l},{getState:d,extra:f}))),h=yield Promise.race([A,Promise.resolve(n(l,{dispatch:u,getState:d,extra:f,requestId:p,signal:v.signal,abort:y,rejectWithValue:(F,N)=>new oy(F,N),fulfillWithValue:(F,N)=>new NE(F,N)})).then(F=>{if(F instanceof oy)throw F;return F instanceof NE?o(F.payload,p,l,F.meta):o(F,p,l)})])}catch(k){h=k instanceof oy?s(null,p,l,k.payload,k.meta):s(k,p,l)}finally{m&&v.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&s.match(h)&&h.meta.condition||u(h),h})}();return Object.assign(g,{abort:y,requestId:p,arg:l,unwrap(){return g.then(SO)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:hO(s,o),typePrefix:t})}return e.withTypes=()=>e,e})();function SO(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function bO(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var HE=Symbol.for("rtk-slice-createasyncthunk"),u9={[HE]:ge};function EO(e,t){return`${e}/${t}`}function TO({creators:e}={}){var n;let t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[HE];return function(o){let{name:i,reducerPath:s=i}=o;if(!i)throw new Error(eo(11));let a=(typeof o.reducers=="function"?o.reducers(kO()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(h,w){let E=typeof h=="string"?h:h.type;if(!E)throw new Error(eo(12));if(E in c.sliceCaseReducersByType)throw new Error(eo(13));return c.sliceCaseReducersByType[E]=w,u},addMatcher(h,w){return c.sliceMatchers.push({matcher:h,reducer:w}),u},exposeAction(h,w){return c.actionCreators[h]=w,u},exposeCaseReducer(h,w){return c.sliceCaseReducersByName[h]=w,u}};l.forEach(h=>{let w=a[h],E={reducerName:h,type:EO(i,h),createNotation:typeof o.reducers=="function"};PO(w)?IO(E,w,u,t):RO(E,w,u)});function d(){let[h={},w=[],E=void 0]=typeof o.extraReducers=="function"?zE(o.extraReducers):[o.extraReducers],C=S(S({},h),c.sliceCaseReducersByType);return mO(o.initialState,k=>{for(let A in C)k.addCase(A,C[A]);for(let A of c.sliceMatchers)k.addMatcher(A.matcher,A.reducer);for(let A of w)k.addMatcher(A.matcher,A.reducer);E&&k.addDefaultCase(E)})}let f=h=>h,p=new Map,v;function m(h,w){return v||(v=d()),v(h,w)}function x(){return v||(v=d()),v.getInitialState()}function y(h,w=!1){function E(k){let A=k[h];return typeof A=="undefined"&&w&&(A=x()),A}function C(k=f){let A=_E(p,w,()=>new WeakMap);return _E(A,k,()=>{var N;let F={};for(let[O,G]of Object.entries((N=o.selectors)!=null?N:{}))F[O]=CO(G,k,x,w);return F})}return{reducerPath:h,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}let g=P(S({name:i,reducer:m,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x},y(s)),{injectInto(h,C={}){var k=C,{reducerPath:w}=k,E=oe(k,["reducerPath"]);let A=w!=null?w:s;return h.inject({reducerPath:A,reducer:m},E),S(S({},g),y(A,!0))}});return g}}function CO(e,t,n,r){function o(i,...s){let a=t(i);return typeof a=="undefined"&&r&&(a=n()),e(a,...s)}return o.unwrapped=e,o}var Ce=TO();function kO(){function e(t,n){return S({_reducerDefinitionType:"asyncThunk",payloadCreator:t},n)}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function RO({type:e,reducerName:t,createNotation:n},r,o){let i,s;if("reducer"in r){if(n&&!AO(r))throw new Error(eo(17));i=r.reducer,s=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?st(e,s):st(e))}function PO(e){return e._reducerDefinitionType==="asyncThunk"}function AO(e){return e._reducerDefinitionType==="reducerWithPrepare"}function IO({type:e,reducerName:t},n,r,o){if(!o)throw new Error(eo(18));let{payloadCreator:i,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),s&&r.addCase(d.fulfilled,s),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:s||sf,pending:a||sf,rejected:l||sf,settled:c||sf})}function sf(){}var BE="listener",UE="completed",VE="cancelled",d9=`task-${VE}`,f9=`task-${UE}`,p9=`${BE}-${VE}`,m9=`${BE}-${UE}`;var{assign:$E}=Object;var iy="listenerMiddleware";var LO=$E(st(`${iy}/add`),{withTypes:()=>LO}),g9=st(`${iy}/removeAll`),_O=$E(st(`${iy}/remove`),{withTypes:()=>_O});var h9=Symbol.for("rtk-state-proxy-original");function eo(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var le=b(Z(),1),a1=b(qE(),1);var BO=le.version.startsWith("19"),UO=Symbol.for(BO?"react.transitional.element":"react.element"),VO=Symbol.for("react.portal"),$O=Symbol.for("react.fragment"),jO=Symbol.for("react.strict_mode"),KO=Symbol.for("react.profiler"),WO=Symbol.for("react.consumer"),qO=Symbol.for("react.context"),e1=Symbol.for("react.forward_ref"),GO=Symbol.for("react.suspense"),YO=Symbol.for("react.suspense_list"),dy=Symbol.for("react.memo"),XO=Symbol.for("react.lazy");var QO=e1,ZO=dy;function JO(e){if(typeof e=="object"&&e!==null){let{$$typeof:t}=e;switch(t){case UO:switch(e=e.type,e){case $O:case KO:case jO:case GO:case YO:return e;default:switch(e=e&&e.$$typeof,e){case qO:case e1:case XO:case dy:return e;case WO:return e;default:return t}}case VO:return t}}}function eN(e){return JO(e)===dy}function tN(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,c,u,d,f;function p(g,h){return l=g,c=h,u=e(l,c),d=t(r,c),f=n(u,d,c),a=!0,f}function v(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function m(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function x(){let g=e(l,c),h=!s(g,u);return u=g,h&&(f=n(u,d,c)),f}function y(g,h){let w=!i(h,c),E=!o(g,l,h,c);return l=g,c=h,w&&E?v():w?m():E?x():f}return function(h,w){return a?y(h,w):p(h,w)}}function nN(e,i){var s=i,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=s,o=oe(s,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);let a=t(e,o),l=n(e,o),c=r(e,o);return tN(a,l,c,e,o)}function rN(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function cy(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function GE(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function t1(e,t){return function(r,{displayName:o}){let i=function(a,l){return i.dependsOnOwnProps?i.mapToProps(a,l):i.mapToProps(a,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(a,l){i.mapToProps=e,i.dependsOnOwnProps=GE(e);let c=i(a,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=GE(c),c=i(a,l)),c},i}}function fy(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function oN(e){return e&&typeof e=="object"?cy(t=>rN(e,t)):e?typeof e=="function"?t1(e,"mapDispatchToProps"):fy(e,"mapDispatchToProps"):cy(t=>({dispatch:t}))}function iN(e){return e?typeof e=="function"?t1(e,"mapStateToProps"):fy(e,"mapStateToProps"):cy(()=>({}))}function sN(e,t,n){return S(S(S({},n),e),t)}function aN(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,c,u){let d=e(l,c,u);return i?o(d,s)||(s=d):(i=!0,s=d),s}}}function lN(e){return e?typeof e=="function"?aN(e):fy(e,"mergeProps"):()=>sN}function cN(e){e()}function uN(){let e=null,t=null;return{clear(){e=null,t=null},notify(){cN(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0,o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var YE={notify(){},get:()=>[]};function n1(e,t){let n,r=YE,o=0,i=!1;function s(m){u();let x=r.subscribe(m),y=!1;return()=>{y||(y=!0,x(),d())}}function a(){r.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=uN())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=YE)}function f(){i||(i=!0,u())}function p(){i&&(i=!1,d())}let v={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return v}var dN=()=>typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",fN=dN(),pN=()=>typeof navigator!="undefined"&&navigator.product==="ReactNative",mN=pN(),gN=()=>fN||mN?le.useLayoutEffect:le.useEffect,af=gN();function XE(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function sy(e,t){if(XE(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!XE(e[n[o]],t[n[o]]))return!1;return!0}var hN={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},yN={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},vN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},r1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},xN={[QO]:vN,[ZO]:r1};function QE(e){return eN(e)?r1:xN[e.$$typeof]||hN}var wN=Object.defineProperty,SN=Object.getOwnPropertyNames,ZE=Object.getOwnPropertySymbols,bN=Object.getOwnPropertyDescriptor,EN=Object.getPrototypeOf,JE=Object.prototype;function uy(e,t){if(typeof t!="string"){if(JE){let i=EN(t);i&&i!==JE&&uy(e,i)}let n=SN(t);ZE&&(n=n.concat(ZE(t)));let r=QE(e),o=QE(t);for(let i=0;i<n.length;++i){let s=n[i];if(!yN[s]&&!(o&&o[s])&&!(r&&r[s])){let a=bN(t,s);try{wN(e,s,a)}catch(l){}}}}return e}var ay=Symbol.for("react-redux-context"),ly=typeof globalThis!="undefined"?globalThis:{};function TN(){var n;if(!le.createContext)return{};let e=(n=ly[ay])!=null?n:ly[ay]=new Map,t=e.get(le.createContext);return t||(t=le.createContext(null),e.set(le.createContext,t)),t}var to=TN(),CN=[null,null];function kN(e,t,n){af(()=>e(...t),n)}function RN(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function PN(e,t,n,r,o,i,s,a,l,c,u){if(!e)return()=>{};let d=!1,f=null,p=()=>{if(d||!a.current)return;let m=t.getState(),x,y;try{x=r(m,o.current)}catch(g){y=g,f=g}y||(f=null),x===i.current?s.current||c():(i.current=x,l.current=x,s.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function AN(e,t){return e===t}function IN(e,t,n,{pure:r,areStatesEqual:o=AN,areOwnPropsEqual:i=sy,areStatePropsEqual:s=sy,areMergedPropsEqual:a=sy,forwardRef:l=!1,context:c=to}={}){let u=c,d=iN(e),f=oN(t),p=lN(n),v=!!e;return x=>{let y=x.displayName||x.name||"Component",g=`Connect(${y})`,h={shouldHandleStateChanges:v,displayName:g,wrappedComponentName:y,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function w(k){let[A,F,N]=le.useMemo(()=>{let pe=k,{reactReduxForwardedRef:Q}=pe,ae=oe(pe,["reactReduxForwardedRef"]);return[k.context,Q,ae]},[k]),O=le.useMemo(()=>{let Q=u;return A!=null&&A.Consumer,Q},[A,u]),G=le.useContext(O),W=!!k.store&&!!k.store.getState&&!!k.store.dispatch,L=!!G&&!!G.store,z=W?k.store:G.store,ie=L?G.getServerState:z.getState,Y=le.useMemo(()=>nN(z.dispatch,h),[z]),[V,U]=le.useMemo(()=>{if(!v)return CN;let Q=n1(z,W?void 0:G.subscription),ae=Q.notifyNestedSubs.bind(Q);return[Q,ae]},[z,W,G]),q=le.useMemo(()=>W?G:P(S({},G),{subscription:V}),[W,G,V]),$=le.useRef(void 0),K=le.useRef(N),H=le.useRef(void 0),de=le.useRef(!1),ue=le.useRef(!1),Se=le.useRef(void 0);af(()=>(ue.current=!0,()=>{ue.current=!1}),[]);let me=le.useMemo(()=>()=>H.current&&N===K.current?H.current:Y(z.getState(),N),[z,N]),re=le.useMemo(()=>ae=>V?PN(v,z,V,Y,K,$,de,ue,H,U,ae):()=>{},[V]);kN(RN,[K,$,de,N,H,U]);let Te;try{Te=le.useSyncExternalStore(re,me,ie?()=>Y(ie(),N):me)}catch(Q){throw Se.current&&(Q.message+=`
8
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function sg(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function Vg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var uO=typeof WeakMap=="function"?WeakMap:Map;function Ob(e,t,n){n=Kr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Id||(Id=!0,Zg=r),Vg(e,t)},n}function Nb(e,t,n){n=Kr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Vg(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Vg(e,t),typeof r!="function"&&(Bo===null?Bo=new Set([this]):Bo.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function jw(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new uO;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=TO.bind(null,e,t,n),t.then(e,e))}function Ww(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Kw(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Kr(-1,1),t.tag=2,Ho(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var dO=Qr.ReactCurrentOwner,on=!1;function Bt(e,t,n,r){t.child=e===null?lb(t,null,n,r):Xs(t,e.child,n,r)}function Gw(e,t,n,r,o){n=n.render;var i=t.ref;return Ws(t,o),r=Ih(e,t,n,r,i,o),n=Lh(),e!==null&&!on?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xr(e,t,o)):(Ue&&n&&vh(t),t.flags|=1,Bt(e,t,r,o),t.child)}function qw(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Uh(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Mb(e,t,i,r,o)):(e=cd(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Rl,n(s,r)&&e.ref===t.ref)return Xr(e,t,o)}return t.flags|=1,e=Vo(i,r),e.ref=t.ref,e.return=t,t.child=e}function Mb(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Rl(i,r)&&e.ref===t.ref)if(on=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(on=!0);else return t.lanes=e.lanes,Xr(e,t,o)}return $g(e,t,n,r,o)}function _b(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Bs,mn),mn|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(Bs,mn),mn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,De(Bs,mn),mn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,De(Bs,mn),mn|=r;return Bt(e,t,o,n),t.child}function Db(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $g(e,t,n,r,o){var i=an(n)?ki:Lt.current;return i=qs(t,i),Ws(t,o),n=Ih(e,t,n,r,i,o),r=Lh(),e!==null&&!on?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Xr(e,t,o)):(Ue&&r&&vh(t),t.flags|=1,Bt(e,t,n,o),t.child)}function Yw(e,t,n,r,o){if(an(n)){var i=!0;wd(t)}else i=!1;if(Ws(t,o),t.stateNode===null)sd(e,t),Lb(t,n,r),Ug(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;typeof c=="object"&&c!==null?c=Mn(c):(c=an(n)?ki:Lt.current,c=qs(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==c)&&$w(t,s,r,c),Io=!1;var f=t.memoizedState;s.state=f,Cd(t,r,s,o),l=t.memoizedState,a!==r||f!==l||sn.current||Io?(typeof u=="function"&&(Bg(t,n,u,r),l=t.memoizedState),(a=Io||Vw(t,n,a,r,f,l,c))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,ub(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Kn(t.type,a),s.props=c,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Mn(l):(l=an(n)?ki:Lt.current,l=qs(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&$w(t,s,r,l),Io=!1,f=t.memoizedState,s.state=f,Cd(t,r,s,o);var v=t.memoizedState;a!==d||f!==v||sn.current||Io?(typeof p=="function"&&(Bg(t,n,p,r),v=t.memoizedState),(c=Io||Vw(t,n,c,r,f,v,l)||!1)?(u||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),s.props=r,s.state=v,s.context=l,r=c):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return jg(e,t,n,r,i,o)}function jg(e,t,n,r,o,i){Db(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&Mw(t,n,!1),Xr(e,t,i);r=t.stateNode,dO.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Xs(t,e.child,null,i),t.child=Xs(t,null,a,i)):Bt(e,t,a,i),t.memoizedState=r.state,o&&Mw(t,n,!0),t.child}function Fb(e){var t=e.stateNode;t.pendingContext?Nw(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Nw(e,t.context,!1),kh(e,t.containerInfo)}function Xw(e,t,n,r,o){return Ys(),wh(o),t.flags|=256,Bt(e,t,n,r),t.child}var Wg={dehydrated:null,treeContext:null,retryLane:0};function Kg(e){return{baseLanes:e,cachePool:null,transitions:null}}function zb(e,t,n){var r=t.pendingProps,o=We.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),De(We,o&1),e===null)return zg(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=jd(s,r,0,null),e=Ci(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Kg(n),t.memoizedState=Wg,e):Mh(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return fO(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vo(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=Vo(a,i):(i=Ci(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Kg(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Wg,r}return i=e.child,e=i.sibling,r=Vo(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Mh(e,t){return t=jd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Qu(e,t,n,r){return r!==null&&wh(r),Xs(t,e.child,null,n),e=Mh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fO(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=sg(Error(D(422))),Qu(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=jd({mode:"visible",children:r.children},o,0,null),i=Ci(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&Xs(t,e.child,null,s),t.child.memoizedState=Kg(s),t.memoizedState=Wg,i);if((t.mode&1)===0)return Qu(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(D(419)),r=sg(i,r,void 0),Qu(e,t,s,r)}if(a=(s&e.childLanes)!==0,on||a){if(r=mt,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Yr(e,o),Xn(r,e,o,-1))}return Bh(),r=sg(Error(D(421))),Qu(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=CO.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,gn=zo(o.nextSibling),hn=t,Ue=!0,qn=null,e!==null&&(In[Ln++]=jr,In[Ln++]=Wr,In[Ln++]=Ri,jr=e.id,Wr=e.overflow,Ri=t),t=Mh(t,r.children),t.flags|=4096,t)}function Qw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hg(e.return,t,n)}function ag(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Hb(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Bt(e,t,r.children,n),r=We.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qw(e,n,t);else if(e.tag===19)Qw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(We,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&kd(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ag(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&kd(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ag(t,!0,n,null,i);break;case"together":ag(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function sd(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ai|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=Vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pO(e,t,n){switch(t.tag){case 3:Fb(t),Ys();break;case 5:db(t);break;case 1:an(t.type)&&wd(t);break;case 4:kh(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;De(Ed,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(We,We.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?zb(e,t,n):(De(We,We.current&1),e=Xr(e,t,n),e!==null?e.sibling:null);De(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Hb(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),De(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,_b(e,t,n)}return Xr(e,t,n)}var Bb,Gg,Ub,Vb;Bb=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Gg=function(){};Ub=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ei(kr.current);var i=null;switch(n){case"input":o=gg(e,o),r=gg(e,r),i=[];break;case"select":o=Ge({},o,{value:void 0}),r=Ge({},r,{value:void 0}),i=[];break;case"textarea":o=vg(e,o),r=vg(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=vd)}wg(n,r);var s;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(wl.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(wl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Fe("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};Vb=function(e,t,n,r){n!==r&&(t.flags|=4)};function ol(e,t){if(!Ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function At(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function mO(e,t,n){var r=t.pendingProps;switch(xh(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(t),null;case 1:return an(t.type)&&xd(),At(t),null;case 3:return r=t.stateNode,Qs(),ze(sn),ze(Lt),Ph(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Yu(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,qn!==null&&(th(qn),qn=null))),Gg(e,t),At(t),null;case 5:Rh(t);var o=Ei(Ol.current);if(n=t.type,e!==null&&t.stateNode!=null)Ub(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return At(t),null}if(e=Ei(kr.current),Yu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Tr]=t,r[Il]=i,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(o=0;o<ul.length;o++)Fe(ul[o],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":iw(r,i),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Fe("invalid",r);break;case"textarea":aw(r,i),Fe("invalid",r)}wg(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&qu(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&qu(r.textContent,a,e),o=["children",""+a]):wl.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&Fe("scroll",r)}switch(n){case"input":Du(r),sw(r,i,!0);break;case"textarea":Du(r),lw(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=vd)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=hS(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Tr]=t,e[Il]=r,Bb(e,t,!1,!1),t.stateNode=e;e:{switch(s=Sg(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),o=r;break;case"iframe":case"object":case"embed":Fe("load",e),o=r;break;case"video":case"audio":for(o=0;o<ul.length;o++)Fe(ul[o],e);o=r;break;case"source":Fe("error",e),o=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),o=r;break;case"details":Fe("toggle",e),o=r;break;case"input":iw(e,r),o=gg(e,r),Fe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ge({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":aw(e,r),o=vg(e,r),Fe("invalid",e);break;default:o=r}wg(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?xS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&yS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Sl(e,l):typeof l=="number"&&Sl(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(wl.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Fe("scroll",e):l!=null&&oh(e,i,l,s))}switch(n){case"input":Du(e),sw(e,r,!1);break;case"textarea":Du(e),lw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+$o(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Us(e,!!r.multiple,i,!1):r.defaultValue!=null&&Us(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=vd)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return At(t),null;case 6:if(e&&t.stateNode!=null)Vb(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(D(166));if(n=Ei(Ol.current),Ei(kr.current),Yu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Tr]=t,(i=r.nodeValue!==n)&&(e=hn,e!==null))switch(e.tag){case 3:qu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&qu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Tr]=t,t.stateNode=r}return At(t),null;case 13:if(ze(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ue&&gn!==null&&(t.mode&1)!==0&&(t.flags&128)===0)sb(),Ys(),t.flags|=98560,i=!1;else if(i=Yu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(D(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(D(317));i[Tr]=t}else Ys(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;At(t),i=!1}else qn!==null&&(th(qn),qn=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(We.current&1)!==0?it===0&&(it=3):Bh())),t.updateQueue!==null&&(t.flags|=4),At(t),null);case 4:return Qs(),Gg(e,t),e===null&&Pl(t.stateNode.containerInfo),At(t),null;case 10:return Eh(t.type._context),At(t),null;case 17:return an(t.type)&&xd(),At(t),null;case 19:if(ze(We),i=t.memoizedState,i===null)return At(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)ol(i,!1);else{if(it!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=kd(e),s!==null){for(t.flags|=128,ol(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(We,We.current&1|2),t.child}e=e.sibling}i.tail!==null&&Je()>Js&&(t.flags|=128,r=!0,ol(i,!1),t.lanes=4194304)}else{if(!r)if(e=kd(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ol(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Ue)return At(t),null}else 2*Je()-i.renderingStartTime>Js&&n!==1073741824&&(t.flags|=128,r=!0,ol(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Je(),t.sibling=null,n=We.current,De(We,r?n&1|2:n&1),t):(At(t),null);case 22:case 23:return Hh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(mn&1073741824)!==0&&(At(t),t.subtreeFlags&6&&(t.flags|=8192)):At(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function gO(e,t){switch(xh(t),t.tag){case 1:return an(t.type)&&xd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qs(),ze(sn),ze(Lt),Ph(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Rh(t),null;case 13:if(ze(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Ys()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(We),null;case 4:return Qs(),null;case 10:return Eh(t.type._context),null;case 22:case 23:return Hh(),null;case 24:return null;default:return null}}var Zu=!1,It=!1,hO=typeof WeakSet=="function"?WeakSet:Set,q=null;function Hs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ye(e,t,r)}else n.current=null}function qg(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var Zw=!1;function yO(e,t){if(Lg=gd,e=GS(),yh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(w){n=null;break e}var s=0,a=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=s),f===i&&++u===r&&(l=s),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Og={focusedElem:e,selectionRange:n},gd=!1,q=t;q!==null;)if(t=q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,q=e;else for(;q!==null;){t=q;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var g=v.memoizedProps,x=v.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:Kn(t.type,g),x);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(w){Ye(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,q=e;break}q=t.return}return v=Zw,Zw=!1,v}function yl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&qg(t,n,i)}o=o.next}while(o!==r)}}function Vd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $b(e){var t=e.alternate;t!==null&&(e.alternate=null,$b(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tr],delete t[Il],delete t[_g],delete t[JL],delete t[eO])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function jb(e){return e.tag===5||e.tag===3||e.tag===4}function Jw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vd));else if(r!==4&&(e=e.child,e!==null))for(Xg(e,t,n),e=e.sibling;e!==null;)Xg(e,t,n),e=e.sibling}function Qg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Qg(e,t,n),e=e.sibling;e!==null;)Qg(e,t,n),e=e.sibling}var wt=null,Gn=!1;function Po(e,t,n){for(n=n.child;n!==null;)Wb(e,t,n),n=n.sibling}function Wb(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Md,n)}catch(a){}switch(n.tag){case 5:It||Hs(n,t);case 6:var r=wt,o=Gn;wt=null,Po(e,t,n),wt=r,Gn=o,wt!==null&&(Gn?(e=wt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wt.removeChild(n.stateNode));break;case 18:wt!==null&&(Gn?(e=wt,n=n.stateNode,e.nodeType===8?eg(e.parentNode,n):e.nodeType===1&&eg(e,n),Cl(e)):eg(wt,n.stateNode));break;case 4:r=wt,o=Gn,wt=n.stateNode.containerInfo,Gn=!0,Po(e,t,n),wt=r,Gn=o;break;case 0:case 11:case 14:case 15:if(!It&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&qg(n,t,s),o=o.next}while(o!==r)}Po(e,t,n);break;case 1:if(!It&&(Hs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ye(n,t,a)}Po(e,t,n);break;case 21:Po(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,Po(e,t,n),It=r):Po(e,t,n);break;default:Po(e,t,n)}}function eS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new hO),t.forEach(function(r){var o=kO.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Wn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:wt=a.stateNode,Gn=!1;break e;case 3:wt=a.stateNode.containerInfo,Gn=!0;break e;case 4:wt=a.stateNode.containerInfo,Gn=!0;break e}a=a.return}if(wt===null)throw Error(D(160));Wb(i,s,o),wt=null,Gn=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(c){Ye(o,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Kb(t,e),t=t.sibling}function Kb(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wn(t,e),br(e),r&4){try{yl(3,e,e.return),Vd(3,e)}catch(g){Ye(e,e.return,g)}try{yl(5,e,e.return)}catch(g){Ye(e,e.return,g)}}break;case 1:Wn(t,e),br(e),r&512&&n!==null&&Hs(n,n.return);break;case 5:if(Wn(t,e),br(e),r&512&&n!==null&&Hs(n,n.return),e.flags&32){var o=e.stateNode;try{Sl(o,"")}catch(g){Ye(e,e.return,g)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&mS(o,i),Sg(a,s);var c=Sg(a,i);for(s=0;s<l.length;s+=2){var u=l[s],d=l[s+1];u==="style"?xS(o,d):u==="dangerouslySetInnerHTML"?yS(o,d):u==="children"?Sl(o,d):oh(o,u,d,c)}switch(a){case"input":hg(o,i);break;case"textarea":gS(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Us(o,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Us(o,!!i.multiple,i.defaultValue,!0):Us(o,!!i.multiple,i.multiple?[]:"",!1))}o[Il]=i}catch(g){Ye(e,e.return,g)}}break;case 6:if(Wn(t,e),br(e),r&4){if(e.stateNode===null)throw Error(D(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(g){Ye(e,e.return,g)}}break;case 3:if(Wn(t,e),br(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Cl(t.containerInfo)}catch(g){Ye(e,e.return,g)}break;case 4:Wn(t,e),br(e);break;case 13:Wn(t,e),br(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Fh=Je())),r&4&&eS(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(It=(c=It)||u,Wn(t,e),It=c):Wn(t,e),br(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(q=e,u=e.child;u!==null;){for(d=q=u;q!==null;){switch(f=q,p=f.child,f.tag){case 0:case 11:case 14:case 15:yl(4,f,f.return);break;case 1:Hs(f,f.return);var v=f.stateNode;if(typeof v.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(g){Ye(r,n,g)}}break;case 5:Hs(f,f.return);break;case 22:if(f.memoizedState!==null){nS(d);continue}}p!==null?(p.return=f,q=p):nS(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{o=d.stateNode,c?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=vS("display",s))}catch(g){Ye(e,e.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Ye(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Wn(t,e),br(e),r&4&&eS(e);break;case 21:break;default:Wn(t,e),br(e)}}function br(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(jb(n)){var r=n;break e}n=n.return}throw Error(D(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Sl(o,""),r.flags&=-33);var i=Jw(e);Qg(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=Jw(e);Xg(e,a,s);break;default:throw Error(D(161))}}catch(l){Ye(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vO(e,t,n){q=e,Gb(e,t,n)}function Gb(e,t,n){for(var r=(e.mode&1)!==0;q!==null;){var o=q,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Zu;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||It;a=Zu;var c=It;if(Zu=s,(It=l)&&!c)for(q=o;q!==null;)s=q,l=s.child,s.tag===22&&s.memoizedState!==null?rS(o):l!==null?(l.return=s,q=l):rS(o);for(;i!==null;)q=i,Gb(i,t,n),i=i.sibling;q=o,Zu=a,It=c}tS(e,t,n)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,q=i):tS(e,t,n)}}function tS(e){for(;q!==null;){var t=q;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:It||Vd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!It)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Hw(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Hw(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Cl(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}It||t.flags&512&&Yg(t)}catch(f){Ye(t,t.return,f)}}if(t===e){q=null;break}if(n=t.sibling,n!==null){n.return=t.return,q=n;break}q=t.return}}function nS(e){for(;q!==null;){var t=q;if(t===e){q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,q=n;break}q=t.return}}function rS(e){for(;q!==null;){var t=q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Vd(4,t)}catch(l){Ye(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Ye(t,o,l)}}var i=t.return;try{Yg(t)}catch(l){Ye(t,i,l)}break;case 5:var s=t.return;try{Yg(t)}catch(l){Ye(t,s,l)}}}catch(l){Ye(t,t.return,l)}if(t===e){q=null;break}var a=t.sibling;if(a!==null){a.return=t.return,q=a;break}q=t.return}}var xO=Math.ceil,Ad=Qr.ReactCurrentDispatcher,_h=Qr.ReactCurrentOwner,Nn=Qr.ReactCurrentBatchConfig,Se=0,mt=null,et=null,St=0,mn=0,Bs=Ko(0),it=0,Dl=null,Ai=0,$d=0,Dh=0,vl=null,rn=null,Fh=0,Js=1/0,Vr=null,Id=!1,Zg=null,Bo=null,Ju=!1,Mo=null,Ld=0,xl=0,Jg=null,ad=-1,ld=0;function Ut(){return(Se&6)!==0?Je():ad!==-1?ad:ad=Je()}function Uo(e){return(e.mode&1)===0?1:(Se&2)!==0&&St!==0?St&-St:nO.transition!==null?(ld===0&&(ld=LS()),ld):(e=Ie,e!==0||(e=window.event,e=e===void 0?16:zS(e.type)),e)}function Xn(e,t,n,r){if(50<xl)throw xl=0,Jg=null,Error(D(185));Fl(e,n,r),((Se&2)===0||e!==mt)&&(e===mt&&((Se&2)===0&&($d|=n),it===4&&Oo(e,St)),ln(e,r),n===1&&Se===0&&(t.mode&1)===0&&(Js=Je()+500,Hd&&Go()))}function ln(e,t){var n=e.callbackNode;oL(e,t);var r=md(e,e===mt?St:0);if(r===0)n!==null&&dw(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dw(n),t===1)e.tag===0?tO(oS.bind(null,e)):rb(oS.bind(null,e)),QL(function(){(Se&6)===0&&Go()}),n=null;else{switch(OS(r)){case 1:n=ch;break;case 4:n=AS;break;case 16:n=pd;break;case 536870912:n=IS;break;default:n=pd}n=tE(n,qb.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function qb(e,t){if(ad=-1,ld=0,(Se&6)!==0)throw Error(D(327));var n=e.callbackNode;if(Ks()&&e.callbackNode!==n)return null;var r=md(e,e===mt?St:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Od(e,r);else{t=r;var o=Se;Se|=2;var i=Xb();(mt!==e||St!==t)&&(Vr=null,Js=Je()+500,Ti(e,t));do try{bO();break}catch(a){Yb(e,a)}while(!0);bh(),Ad.current=i,Se=o,et!==null?t=0:(mt=null,St=0,t=it)}if(t!==0){if(t===2&&(o=kg(e),o!==0&&(r=o,t=eh(e,o))),t===1)throw n=Dl,Ti(e,0),Oo(e,r),ln(e,Je()),n;if(t===6)Oo(e,r);else{if(o=e.current.alternate,(r&30)===0&&!wO(o)&&(t=Od(e,r),t===2&&(i=kg(e),i!==0&&(r=i,t=eh(e,i))),t===1))throw n=Dl,Ti(e,0),Oo(e,r),ln(e,Je()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(D(345));case 2:wi(e,rn,Vr);break;case 3:if(Oo(e,r),(r&130023424)===r&&(t=Fh+500-Je(),10<t)){if(md(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ut(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Mg(wi.bind(null,e,rn,Vr),t);break}wi(e,rn,Vr);break;case 4:if(Oo(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Yn(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xO(r/1960))-r,10<r){e.timeoutHandle=Mg(wi.bind(null,e,rn,Vr),r);break}wi(e,rn,Vr);break;case 5:wi(e,rn,Vr);break;default:throw Error(D(329))}}}return ln(e,Je()),e.callbackNode===n?qb.bind(null,e):null}function eh(e,t){var n=vl;return e.current.memoizedState.isDehydrated&&(Ti(e,t).flags|=256),e=Od(e,t),e!==2&&(t=rn,rn=n,t!==null&&th(t)),e}function th(e){rn===null?rn=e:rn.push.apply(rn,e)}function wO(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Qn(i(),o))return!1}catch(s){return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Oo(e,t){for(t&=~Dh,t&=~$d,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yn(t),r=1<<n;e[n]=-1,t&=~r}}function oS(e){if((Se&6)!==0)throw Error(D(327));Ks();var t=md(e,0);if((t&1)===0)return ln(e,Je()),null;var n=Od(e,t);if(e.tag!==0&&n===2){var r=kg(e);r!==0&&(t=r,n=eh(e,r))}if(n===1)throw n=Dl,Ti(e,0),Oo(e,t),ln(e,Je()),n;if(n===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wi(e,rn,Vr),ln(e,Je()),null}function zh(e,t){var n=Se;Se|=1;try{return e(t)}finally{Se=n,Se===0&&(Js=Je()+500,Hd&&Go())}}function Ii(e){Mo!==null&&Mo.tag===0&&(Se&6)===0&&Ks();var t=Se;Se|=1;var n=Nn.transition,r=Ie;try{if(Nn.transition=null,Ie=1,e)return e()}finally{Ie=r,Nn.transition=n,Se=t,(Se&6)===0&&Go()}}function Hh(){mn=Bs.current,ze(Bs)}function Ti(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,XL(n)),et!==null)for(n=et.return;n!==null;){var r=n;switch(xh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&xd();break;case 3:Qs(),ze(sn),ze(Lt),Ph();break;case 5:Rh(r);break;case 4:Qs();break;case 13:ze(We);break;case 19:ze(We);break;case 10:Eh(r.type._context);break;case 22:case 23:Hh()}n=n.return}if(mt=e,et=e=Vo(e.current,null),St=mn=t,it=0,Dl=null,Dh=$d=Ai=0,rn=vl=null,bi!==null){for(t=0;t<bi.length;t++)if(n=bi[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}bi=null}return e}function Yb(e,t){do{var n=et;try{if(bh(),od.current=Pd,Rd){for(var r=Ke.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Rd=!1}if(Pi=0,pt=ot=Ke=null,hl=!1,Nl=0,_h.current=null,n===null||n.return===null){it=1,Dl=t,et=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=St,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=Ww(s);if(p!==null){p.flags&=-257,Kw(p,s,a,i,t),p.mode&1&&jw(i,c,t),t=p,l=c;var v=t.updateQueue;if(v===null){var g=new Set;g.add(l),t.updateQueue=g}else v.add(l);break e}else{if((t&1)===0){jw(i,c,t),Bh();break e}l=Error(D(426))}}else if(Ue&&a.mode&1){var x=Ww(s);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),Kw(x,s,a,i,t),wh(Zs(l,a));break e}}i=l=Zs(l,a),it!==4&&(it=2),vl===null?vl=[i]:vl.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=Ob(i,l,t);zw(i,y);break e;case 1:a=l;var m=i.type,h=i.stateNode;if((i.flags&128)===0&&(typeof m.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Bo===null||!Bo.has(h)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=Nb(i,a,t);zw(i,w);break e}}i=i.return}while(i!==null)}Zb(n)}catch(E){t=E,et===n&&n!==null&&(et=n=n.return);continue}break}while(!0)}function Xb(){var e=Ad.current;return Ad.current=Pd,e===null?Pd:e}function Bh(){(it===0||it===3||it===2)&&(it=4),mt===null||(Ai&268435455)===0&&($d&268435455)===0||Oo(mt,St)}function Od(e,t){var n=Se;Se|=2;var r=Xb();(mt!==e||St!==t)&&(Vr=null,Ti(e,t));do try{SO();break}catch(o){Yb(e,o)}while(!0);if(bh(),Se=n,Ad.current=r,et!==null)throw Error(D(261));return mt=null,St=0,it}function SO(){for(;et!==null;)Qb(et)}function bO(){for(;et!==null&&!YI();)Qb(et)}function Qb(e){var t=eE(e.alternate,e,mn);e.memoizedProps=e.pendingProps,t===null?Zb(e):et=t,_h.current=null}function Zb(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=mO(n,t,mn),n!==null){et=n;return}}else{if(n=gO(n,t),n!==null){n.flags&=32767,et=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,et=null;return}}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);it===0&&(it=5)}function wi(e,t,n){var r=Ie,o=Nn.transition;try{Nn.transition=null,Ie=1,EO(e,t,n,r)}finally{Nn.transition=o,Ie=r}return null}function EO(e,t,n,r){do Ks();while(Mo!==null);if((Se&6)!==0)throw Error(D(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(iL(e,i),e===mt&&(et=mt=null,St=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Ju||(Ju=!0,tE(pd,function(){return Ks(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=Nn.transition,Nn.transition=null;var s=Ie;Ie=1;var a=Se;Se|=4,_h.current=null,yO(e,n),Kb(n,e),WL(Og),gd=!!Lg,Og=Lg=null,e.current=n,vO(n,e,o),XI(),Se=a,Ie=s,Nn.transition=i}else e.current=n;if(Ju&&(Ju=!1,Mo=e,Ld=o),i=e.pendingLanes,i===0&&(Bo=null),JI(n.stateNode,r),ln(e,Je()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Id)throw Id=!1,e=Zg,Zg=null,e;return(Ld&1)!==0&&e.tag!==0&&Ks(),i=e.pendingLanes,(i&1)!==0?e===Jg?xl++:(xl=0,Jg=e):xl=0,Go(),null}function Ks(){if(Mo!==null){var e=OS(Ld),t=Nn.transition,n=Ie;try{if(Nn.transition=null,Ie=16>e?16:e,Mo===null)var r=!1;else{if(e=Mo,Mo=null,Ld=0,(Se&6)!==0)throw Error(D(331));var o=Se;for(Se|=4,q=e.current;q!==null;){var i=q,s=i.child;if((q.flags&16)!==0){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(q=c;q!==null;){var u=q;switch(u.tag){case 0:case 11:case 15:yl(8,u,i)}var d=u.child;if(d!==null)d.return=u,q=d;else for(;q!==null;){u=q;var f=u.sibling,p=u.return;if($b(u),u===c){q=null;break}if(f!==null){f.return=p,q=f;break}q=p}}}var v=i.alternate;if(v!==null){var g=v.child;if(g!==null){v.child=null;do{var x=g.sibling;g.sibling=null,g=x}while(g!==null)}}q=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,q=s;else e:for(;q!==null;){if(i=q,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:yl(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,q=y;break e}q=i.return}}var m=e.current;for(q=m;q!==null;){s=q;var h=s.child;if((s.subtreeFlags&2064)!==0&&h!==null)h.return=s,q=h;else e:for(s=m;q!==null;){if(a=q,(a.flags&2048)!==0)try{switch(a.tag){case 0:case 11:case 15:Vd(9,a)}}catch(E){Ye(a,a.return,E)}if(a===s){q=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,q=w;break e}q=a.return}}if(Se=o,Go(),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(Md,e)}catch(E){}r=!0}return r}finally{Ie=n,Nn.transition=t}}return!1}function iS(e,t,n){t=Zs(n,t),t=Ob(e,t,1),e=Ho(e,t,1),t=Ut(),e!==null&&(Fl(e,1,t),ln(e,t))}function Ye(e,t,n){if(e.tag===3)iS(e,e,n);else for(;t!==null;){if(t.tag===3){iS(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bo===null||!Bo.has(r))){e=Zs(n,e),e=Nb(t,e,1),t=Ho(t,e,1),e=Ut(),t!==null&&(Fl(t,1,e),ln(t,e));break}}t=t.return}}function TO(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ut(),e.pingedLanes|=e.suspendedLanes&n,mt===e&&(St&n)===n&&(it===4||it===3&&(St&130023424)===St&&500>Je()-Fh?Ti(e,0):Dh|=n),ln(e,t)}function Jb(e,t){t===0&&((e.mode&1)===0?t=1:(t=Hu,Hu<<=1,(Hu&130023424)===0&&(Hu=4194304)));var n=Ut();e=Yr(e,t),e!==null&&(Fl(e,t,n),ln(e,n))}function CO(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Jb(e,n)}function kO(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(D(314))}r!==null&&r.delete(t),Jb(e,n)}var eE;eE=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)on=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return on=!1,pO(e,t,n);on=(e.flags&131072)!==0}else on=!1,Ue&&(t.flags&1048576)!==0&&ob(t,bd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;sd(e,t),e=t.pendingProps;var o=qs(t,Lt.current);Ws(t,n),o=Ih(null,t,r,e,o,n);var i=Lh();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,an(r)?(i=!0,wd(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ch(t),o.updater=Ud,t.stateNode=o,o._reactInternals=t,Ug(t,r,e,n),t=jg(null,t,r,!0,i,n)):(t.tag=0,Ue&&i&&vh(t),Bt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(sd(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=PO(r),e=Kn(r,e),o){case 0:t=$g(null,t,r,e,n);break e;case 1:t=Yw(null,t,r,e,n);break e;case 11:t=Gw(null,t,r,e,n);break e;case 14:t=qw(null,t,r,Kn(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),$g(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Yw(e,t,r,o,n);case 3:e:{if(Fb(t),e===null)throw Error(D(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ub(e,t),Cd(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Zs(Error(D(423)),t),t=Xw(e,t,r,n,o);break e}else if(r!==o){o=Zs(Error(D(424)),t),t=Xw(e,t,r,n,o);break e}else for(gn=zo(t.stateNode.containerInfo.firstChild),hn=t,Ue=!0,qn=null,n=lb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ys(),r===o){t=Xr(e,t,n);break e}Bt(e,t,r,n)}t=t.child}return t;case 5:return db(t),e===null&&zg(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Ng(r,o)?s=null:i!==null&&Ng(r,i)&&(t.flags|=32),Db(e,t),Bt(e,t,s,n),t.child;case 6:return e===null&&zg(t),null;case 13:return zb(e,t,n);case 4:return kh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Xs(t,null,r,n):Bt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Gw(e,t,r,o,n);case 7:return Bt(e,t,t.pendingProps,n),t.child;case 8:return Bt(e,t,t.pendingProps.children,n),t.child;case 12:return Bt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,De(Ed,r._currentValue),r._currentValue=s,i!==null)if(Qn(i.value,s)){if(i.children===o.children&&!sn.current){t=Xr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Kr(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Hg(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(D(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Hg(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Bt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Ws(t,n),o=Mn(o),r=r(o),t.flags|=1,Bt(e,t,r,n),t.child;case 14:return r=t.type,o=Kn(r,t.pendingProps),o=Kn(r.type,o),qw(e,t,r,o,n);case 15:return Mb(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),sd(e,t),t.tag=1,an(r)?(e=!0,wd(t)):e=!1,Ws(t,n),Lb(t,r,o),Ug(t,r,o,n),jg(null,t,r,!0,e,n);case 19:return Hb(e,t,n);case 22:return _b(e,t,n)}throw Error(D(156,t.tag))};function tE(e,t){return PS(e,t)}function RO(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,t,n,r){return new RO(e,t,n,r)}function Uh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function PO(e){if(typeof e=="function")return Uh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sh)return 11;if(e===ah)return 14}return 2}function Vo(e,t){var n=e.alternate;return n===null?(n=On(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function cd(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Uh(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Is:return Ci(n.children,o,i,t);case ih:s=8,o|=8;break;case dg:return e=On(12,n,t,o|2),e.elementType=dg,e.lanes=i,e;case fg:return e=On(13,n,t,o),e.elementType=fg,e.lanes=i,e;case pg:return e=On(19,n,t,o),e.elementType=pg,e.lanes=i,e;case dS:return jd(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cS:s=10;break e;case uS:s=9;break e;case sh:s=11;break e;case ah:s=14;break e;case Ao:s=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=On(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ci(e,t,n,r){return e=On(7,e,r,t),e.lanes=n,e}function jd(e,t,n,r){return e=On(22,e,r,t),e.elementType=dS,e.lanes=n,e.stateNode={isHidden:!1},e}function lg(e,t,n){return e=On(6,e,null,t),e.lanes=n,e}function cg(e,t,n){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function AO(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Km(0),this.expirationTimes=Km(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Km(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vh(e,t,n,r,o,i,s,a,l){return e=new AO(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=On(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ch(i),e}function IO(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:As,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function nE(e){if(!e)return jo;e=e._reactInternals;e:{if(Oi(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(an(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var n=e.type;if(an(n))return nb(e,n,t)}return t}function rE(e,t,n,r,o,i,s,a,l){return e=Vh(n,r,!0,e,o,i,s,a,l),e.context=nE(null),n=e.current,r=Ut(),o=Uo(n),i=Kr(r,o),i.callback=t!=null?t:null,Ho(n,i,o),e.current.lanes=o,Fl(e,o,r),ln(e,r),e}function Wd(e,t,n,r){var o=t.current,i=Ut(),s=Uo(o);return n=nE(n),t.context===null?t.context=n:t.pendingContext=n,t=Kr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ho(o,t,s),e!==null&&(Xn(e,o,s,i),rd(e,o,s)),s}function Nd(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function sS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $h(e,t){sS(e,t),(e=e.alternate)&&sS(e,t)}function LO(){return null}var oE=typeof reportError=="function"?reportError:function(e){console.error(e)};function jh(e){this._internalRoot=e}Kd.prototype.render=jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));Wd(e,t,null,null)};Kd.prototype.unmount=jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ii(function(){Wd(null,e,null,null)}),t[qr]=null}};function Kd(e){this._internalRoot=e}Kd.prototype.unstable_scheduleHydration=function(e){if(e){var t=_S();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lo.length&&t!==0&&t<Lo[n].priority;n++);Lo.splice(n,0,e),n===0&&FS(e)}};function Wh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Gd(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function aS(){}function OO(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var c=Nd(s);i.call(c)}}var s=rE(t,r,e,0,null,!1,!1,"",aS);return e._reactRootContainer=s,e[qr]=s.current,Pl(e.nodeType===8?e.parentNode:e),Ii(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var c=Nd(l);a.call(c)}}var l=Vh(e,0,!1,null,null,!1,!1,"",aS);return e._reactRootContainer=l,e[qr]=l.current,Pl(e.nodeType===8?e.parentNode:e),Ii(function(){Wd(t,l,n,r)}),l}function qd(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=Nd(s);a.call(l)}}Wd(t,s,e,o)}else s=OO(n,t,e,o,r);return Nd(s)}NS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cl(t.pendingLanes);n!==0&&(uh(t,n|1),ln(t,Je()),(Se&6)===0&&(Js=Je()+500,Go()))}break;case 13:Ii(function(){var r=Yr(e,1);if(r!==null){var o=Ut();Xn(r,e,1,o)}}),$h(e,1)}};dh=function(e){if(e.tag===13){var t=Yr(e,134217728);if(t!==null){var n=Ut();Xn(t,e,134217728,n)}$h(e,134217728)}};MS=function(e){if(e.tag===13){var t=Uo(e),n=Yr(e,t);if(n!==null){var r=Ut();Xn(n,e,t,r)}$h(e,t)}};_S=function(){return Ie};DS=function(e,t){var n=Ie;try{return Ie=e,t()}finally{Ie=n}};Eg=function(e,t,n){switch(t){case"input":if(hg(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=zd(r);if(!o)throw Error(D(90));pS(r),hg(r,o)}}}break;case"textarea":gS(e,n);break;case"select":t=n.value,t!=null&&Us(e,!!n.multiple,t,!1)}};bS=zh;ES=Ii;var NO={usingClientEntryPoint:!1,Events:[Hl,Ms,zd,wS,SS,zh]},il={findFiberByHostInstance:Si,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},MO={bundleType:il.bundleType,version:il.version,rendererPackageName:il.rendererPackageName,rendererConfig:il.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Qr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=kS(e),e===null?null:e.stateNode},findFiberByHostInstance:il.findFiberByHostInstance||LO,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(sl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!sl.isDisabled&&sl.supportsFiber))try{Md=sl.inject(MO),Cr=sl}catch(e){}var sl;xn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NO;xn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Wh(t))throw Error(D(200));return IO(e,t,null,n)};xn.createRoot=function(e,t){if(!Wh(e))throw Error(D(299));var n=!1,r="",o=oE;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Vh(e,1,!1,null,null,n,!1,r,o),e[qr]=t.current,Pl(e.nodeType===8?e.parentNode:e),new jh(t)};xn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=kS(t),e=e===null?null:e.stateNode,e};xn.flushSync=function(e){return Ii(e)};xn.hydrate=function(e,t,n){if(!Gd(t))throw Error(D(200));return qd(null,e,t,!0,n)};xn.hydrateRoot=function(e,t,n){if(!Wh(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=oE;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=rE(t,null,e,1,n!=null?n:null,o,!1,i,s),e[qr]=t.current,Pl(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Kd(t)};xn.render=function(e,t,n){if(!Gd(t))throw Error(D(200));return qd(null,e,t,!1,n)};xn.unmountComponentAtNode=function(e){if(!Gd(e))throw Error(D(40));return e._reactRootContainer?(Ii(function(){qd(null,null,e,!1,function(){e._reactRootContainer=null,e[qr]=null})}),!0):!1};xn.unstable_batchedUpdates=zh;xn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gd(n))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return qd(e,t,n,!1,r)};xn.version="18.3.1-next-f1338f8080-20240426"});var Ul=tn((N6,aE)=>{"use strict";function sE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sE)}catch(e){console.error(e)}}sE(),aE.exports=iE()});var cE=tn(Kh=>{"use strict";var lE=Ul();Kh.createRoot=lE.createRoot,Kh.hydrateRoot=lE.hydrateRoot;var M6});var jE=tn($E=>{"use strict";var Wl=Q();function IN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var LN=typeof Object.is=="function"?Object.is:IN,ON=Wl.useSyncExternalStore,NN=Wl.useRef,MN=Wl.useEffect,_N=Wl.useMemo,DN=Wl.useDebugValue;$E.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=NN(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=_N(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&s.hasValue){var v=s.value;if(o(v,p))return d=v}return d=p}if(v=d,LN(u,p))return v;var g=r(p);return o!==void 0&&o(v,g)?(u=p,v):(u=p,d=g)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=ON(e,i[0],i[1]);return MN(function(){s.hasValue=!0,s.value=a},[a]),DN(a),a}});var KE=tn((Sz,WE)=>{"use strict";WE.exports=jE()});var By=tn((eH,xT)=>{"use strict";var S_="Expected a function",yT=NaN,b_="[object Symbol]",E_=/^\s+|\s+$/g,T_=/^[-+]0x[0-9a-f]+$/i,C_=/^0b[01]+$/i,k_=/^0o[0-7]+$/i,R_=parseInt,P_=typeof global=="object"&&global&&global.Object===Object&&global,A_=typeof self=="object"&&self&&self.Object===Object&&self,I_=P_||A_||Function("return this")(),L_=Object.prototype,O_=L_.toString,N_=Math.max,M_=Math.min,zy=function(){return I_.Date.now()};function __(e,t,n){var r,o,i,s,a,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(S_);t=vT(t)||0,Hy(n)&&(u=!!n.leading,d="maxWait"in n,i=d?N_(vT(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(C){var k=r,A=o;return r=o=void 0,c=C,s=e.apply(A,k),s}function v(C){return c=C,a=setTimeout(y,t),u?p(C):s}function g(C){var k=C-l,A=C-c,B=t-k;return d?M_(B,i-A):B}function x(C){var k=C-l,A=C-c;return l===void 0||k>=t||k<0||d&&A>=i}function y(){var C=zy();if(x(C))return m(C);a=setTimeout(y,g(C))}function m(C){return a=void 0,f&&r?p(C):(r=o=void 0,s)}function h(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function w(){return a===void 0?s:m(zy())}function E(){var C=zy(),k=x(C);if(r=arguments,o=this,l=C,k){if(a===void 0)return v(l);if(d)return a=setTimeout(y,t),p(l)}return a===void 0&&(a=setTimeout(y,t)),s}return E.cancel=h,E.flush=w,E}function Hy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function D_(e){return!!e&&typeof e=="object"}function F_(e){return typeof e=="symbol"||D_(e)&&O_.call(e)==b_}function vT(e){if(typeof e=="number")return e;if(F_(e))return yT;if(Hy(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Hy(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(E_,"");var n=C_.test(e);return n||k_.test(e)?R_(e.slice(2),n?2:8):T_.test(e)?yT:+e}xT.exports=__});var zT=tn((FH,FT)=>{"use strict";var q_=/["'&<>]/;FT.exports=Y_;function Y_(e){var t=""+e,n=q_.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var GF={};kt(GF,{Card:()=>Te,ContentEditableInput:()=>ms,DeepdeskAPI:()=>bo,DeepdeskSDK:()=>uu,HTTPClient:()=>hs,InputMediator:()=>So,InputType:()=>ks,KeyboardHint:()=>ku,Label:()=>kx,Locale:()=>Kl,Section:()=>wr,SectionList:()=>Ts,Sources:()=>ko,Suggestion:()=>ye,SuggestionList:()=>Ht,TextAreaInput:()=>gs,ToggleButton:()=>yi,attachFile:()=>PA,authenticateWithKey:()=>AA,createFullRange:()=>Ba,createOverlayContainer:()=>lu,createRangeFromOffsets:()=>ui,escapeHTML:()=>fa,formatTextMarkup:()=>IA,getRangeOffsets:()=>su,getRangeText:()=>au,insertCKEditor:()=>MA,isHTML:()=>jf,isSupportedInputElement:()=>um,updateContentEditable:()=>OA,updateTextArea:()=>LA,useClickOutsideRoot:()=>ri,useStyles:()=>_,waitForElementVisibilityChange:()=>pm});var Im=b(Me()),Pn=b(Q());var Su=b(Q()),hx=b(Me());var Ya=Su.default.createContext({});function _(e,t){let i=(0,Su.useContext)(Ya),{debug:n}=i,o=oe(i,["debug"])[e];return Object.entries(t).reduce((s,[a,l])=>{let c=o==null?void 0:o[a];return P(S({},s),{[a]:(0,hx.default)(l,c,n?`${e}__${a}`:!1)})},{})}var yx={root:"dd-4s9wq"};var gi=b(R()),Eu=()=>(0,gi.jsxs)("svg",{className:yx.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,gi.jsx)("defs",{children:(0,gi.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,gi.jsx)("title",{children:"Failed loading image"}),(0,gi.jsx)("path",{className:"cls-1",d:"M15 130.896V16.994c0-1.097.898-1.994 2.007-1.994h150.986A2 2 0 0 1 170 16.994v69.147L133.015 51 87.26 120.377l-35.863-17.758L15 130.896zM2 0C.895 0 0 .887 0 2v166c0 1.105.887 2 2 2h181c1.105 0 2-.887 2-2V2c0-1.105-.887-2-2-2H2zm49 72c11.046 0 20-9.178 20-20.5S62.046 31 51 31s-20 9.178-20 20.5S39.954 72 51 72z",fillRule:"evenodd"})]});var Am={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var hi=b(R()),Tu=(0,Pn.createContext)(Am),hI=({title:e,src:t})=>{let n=(0,Pn.useContext)(Tu),[r,o]=(0,Pn.useState)(!1);return(0,Pn.useEffect)(()=>{o(!1)},[t]),(0,hi.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,hi.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,hi.jsx)(Eu,{})})},yI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Pn.useContext)(Tu);return(0,hi.jsx)("div",{className:(0,Im.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},vI=i=>{var s=i,{as:e="h1",cropText:t=!1,className:n,children:r}=s,o=oe(s,["as","cropText","className","children"]);let a=(0,Pn.useContext)(Tu);return Pn.default.createElement(e,S({className:(0,Im.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Cu=({children:e})=>{let t=_("Card",Am);return(0,hi.jsx)("div",{className:t.root,children:(0,hi.jsx)(Tu.Provider,{value:t,children:e})})};Cu.Image=hI;Cu.Content=yI;Cu.Title=vI;var Te=Cu;var bx=b(Me());var Sx={root:"dd-llBx9"};var Ex=b(R());var xI={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},wI=r=>{var o=r,{className:e,keyCode:t}=o,n=oe(o,["className","keyCode"]);let i=_("KeyboardHint",Sx);return(0,Ex.jsx)("span",S({"data-key":xI[t],className:(0,bx.default)(e,i.root)},n))},ku=wI;var Cx=b(Me());var Tx={root:"dd-e6HXZ"};var Rx=b(R()),SI=r=>{var o=r,{className:e,children:t}=o,n=oe(o,["className","children"]);let i=_("Label",Tx);return(0,Rx.jsx)("span",P(S({},n),{className:(0,Cx.default)(e,i.root),children:t}))},kx=SI;var Px={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var Es=b(R()),bI=o=>{var i=o,{title:e,children:t,type:n}=i,r=oe(i,["title","children","type"]);let s=_("Section",Px);return(0,Es.jsxs)("section",P(S({},r),{className:s.root,"data-section-type":n,children:[e&&(0,Es.jsx)("div",{className:s.subTitleContainer,children:(0,Es.jsx)("span",{className:s.subtitle,children:e})}),(0,Es.jsx)("div",{className:s.suggestions,children:t})]}))},wr=bI;var Mx=b(Me()),_x=b(Q());var Eo=b(Q()),Ox=b(R()),Ax=(0,Eo.createContext)(null),Ix=({scrollContainerRef:e,children:t})=>{let n=(0,Eo.useCallback)(r=>{let o=e.current;if(!o||o.scrollHeight<=o.clientHeight)return;let{top:i}=o.getBoundingClientRect(),{top:s}=r.getBoundingClientRect();o.scrollTo({top:s-i})},[]);return(0,Ox.jsx)(Ax.Provider,{value:n,children:t})},Lx=e=>{let t=(0,Eo.useContext)(Ax);(0,Eo.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var Nx={root:"dd-uoTXh"};var Lm=b(R()),EI=({className:e,children:t})=>{let n=_("SectionList",Nx),r=(0,_x.useRef)(null);return(0,Lm.jsx)(Ix,{scrollContainerRef:r,children:(0,Lm.jsx)("div",{ref:r,className:(0,Mx.default)(n.root,e),children:t})})},Ts=EI;var Cs=b(Me()),nn=b(Q());var Om={root:"dd-1g-A9",fadein:"dd-McXxq",isClickable:"dd-CTG8E",isSelected:"dd-yhg27",actions:"dd-Nlm6p",actionsIsFixed:"dd-OK-kw",actionButton:"dd-zbXsQ",dropdownList:"dd-AvwWP",dropdownButton:"dd-piaJi",dropdownItem:"dd-qgkTO",dropdownItemButton:"dd-sTE2D",actionButtonIsPrimary:"dd-mhkWS",actionButtonIsDisabled:"dd-0eKLQ",labels:"dd-QKJu6",label:"dd-aMplE",buttonsContainer:"dd-uRYN4",button:"dd-9UE-x",buttonWithIcon:"dd-MQVt5",icon:"dd-Jr-ww",buttonDisabled:"dd-agTuH"};var zt=b(R()),To=(0,nn.createContext)(Om),TI=r=>{var o=r,{fixed:e,children:t}=o,n=oe(o,["fixed","children"]);let i=(0,nn.useContext)(To);return(0,zt.jsx)("div",P(S({},n),{className:(0,Cs.default)(i.actions,{[i.actionsIsFixed]:e}),children:t}))};function CI(a){var l=a,{as:e,className:t,icon:n,title:r,children:o,disabled:i}=l,s=oe(l,["as","className","icon","title","children","disabled"]);let c=(0,nn.useContext)(To);return(0,zt.jsxs)(e||"button",P(S({type:"button",className:(0,Cs.default)(c.button,{[c.buttonWithIcon]:n,[c.buttonDisabled]:i},t),title:r,"aria-label":r},s),{children:[n&&(0,zt.jsx)("span",{className:c.icon,children:n}),o]}))}var kI=({children:e})=>{let t=(0,nn.useContext)(To);return(0,zt.jsx)("div",{className:t.buttonsContainer,children:e})},RI=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,nn.useContext)(To);return(0,zt.jsxs)("div",{className:(0,Cs.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,zt.jsx)("ul",{className:i.dropdownList,children:o})]})},PI=({index:e,label:t,onClick:n})=>{let r=(0,nn.useContext)(To);return(0,zt.jsx)("li",{className:r.dropdownItem,children:(0,zt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},AI=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,nn.useContext)(To);return(0,zt.jsx)("button",{type:"button",className:(0,Cs.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r!=null?r:s=>s.stopPropagation(),disabled:n,"aria-hidden":n,children:o})},II=({labels:e})=>{let t=(0,nn.useContext)(To);return(0,zt.jsx)("div",{className:t.labels,children:e.map(n=>(0,zt.jsx)("span",{className:t.label,children:n},n))})},Co=nn.default.forwardRef((a,s)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,i=oe(l,["className","selected","onClick","children","as"]);let c=_("Suggestion",Om),u=(0,nn.useCallback)(d=>{d.preventDefault(),n&&n(d)},[n]);return(0,zt.jsx)(o,P(S({},i),{ref:s,className:(0,Cs.default)(e,c.root,{[c.isSelected]:t,[c.isClickable]:!!n}),onClick:u,children:(0,zt.jsx)(To.Provider,{value:c,children:r})}))});Co.Labels=II;Co.Actions=TI;Co.ActionButton=AI;Co.DropdownButton=RI;Co.DropdownItem=PI;Co.ButtonsContainer=kI;Co.Button=CI;var ye=Co;var Fx=b(Me());var Dx={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var zx=b(R()),LI=({withDivider:e,children:t})=>{let n=_("SuggestionList",Dx);return(0,zx.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Fx.default)(n.root,{[n.isWithDivider]:e}),children:t})},Ht=LI;var Bx=b(Me());var Hx={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Ru=b(R()),OI=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=_("ToggleButton",Hx);return(0,Ru.jsx)("button",{type:"button",className:(0,Bx.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Ru.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Ru.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},yi=OI;var Ux=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Pu=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Vx=/x-deepdesk-(([a-z0-9\-_])+-version)/,Au=["cues","custom-data","custom-data-banner","knowledge-assist"],$x=Intl.DateTimeFormat().resolvedOptions().timeZone,ko=(g=>(g.SEARCH="search",g.TEMPLATE="template",g.ELASTIC_SEARCH="search-autocomplete",g.GPT="gpt",g.TRIE="trie",g.TRIE_WITH_TYPOS="trie-with-typos",g.SEMANTIC="semantic",g.TEXT_RECOMMENDATION="text_recommendation",g.URL_RECOMMENDATION="url_recommendation",g.LINK_RECOMMENDATION="link_recommendation",g.PERSONAL_COLLECTION="personal-collection",g.PERSONAL_COLLECTION_SEARCH="personal-collection-search",g.SEARCH_OVERLAY="search-overlay",g.SEARCH_PREVIEW="search-preview",g.SEARCH_URL="search-url",g))(ko||{}),ks=(s=>(s.ENTER="enter",s.TAB="tab",s.ARROW="arrow",s.HOTKEY="hotkey",s.MOUSE="mouse",s.SPACE="space",s))(ks||{});var fi=b(cE());var RR=b(Q());function Et(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var _O=typeof Symbol=="function"&&Symbol.observable||"@@observable",uE=_O,Gh=()=>Math.random().toString(36).substring(7).split("").join("."),DO={INIT:`@@redux/INIT${Gh()}`,REPLACE:`@@redux/REPLACE${Gh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Gh()}`},Yd=DO;function Xd(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function qh(e,t,n){if(typeof e!="function")throw new Error(Et(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Et(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Et(1));return n(qh)(e,t)}let r=e,o=t,i=new Map,s=i,a=0,l=!1;function c(){s===i&&(s=new Map,i.forEach((x,y)=>{s.set(y,x)}))}function u(){if(l)throw new Error(Et(3));return o}function d(x){if(typeof x!="function")throw new Error(Et(4));if(l)throw new Error(Et(5));let y=!0;c();let m=a++;return s.set(m,x),function(){if(y){if(l)throw new Error(Et(6));y=!1,c(),s.delete(m),i=null}}}function f(x){if(!Xd(x))throw new Error(Et(7));if(typeof x.type=="undefined")throw new Error(Et(8));if(typeof x.type!="string")throw new Error(Et(17));if(l)throw new Error(Et(9));try{l=!0,o=r(o,x)}finally{l=!1}return(i=s).forEach(m=>{m()}),x}function p(x){if(typeof x!="function")throw new Error(Et(10));r=x,f({type:Yd.REPLACE})}function v(){let x=d;return{subscribe(y){if(typeof y!="object"||y===null)throw new Error(Et(11));function m(){let w=y;w.next&&w.next(u())}return m(),{unsubscribe:x(m)}},[uE](){return this}}}return f({type:Yd.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[uE]:v}}function FO(e){Object.keys(e).forEach(t=>{let n=e[t];if(typeof n(void 0,{type:Yd.INIT})=="undefined")throw new Error(Et(12));if(typeof n(void 0,{type:Yd.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Et(13))})}function Qd(e){let t=Object.keys(e),n={};for(let s=0;s<t.length;s++){let a=t[s];typeof e[a]=="function"&&(n[a]=e[a])}let r=Object.keys(n),o,i;try{FO(n)}catch(s){i=s}return function(a={},l){if(i)throw i;let c=!1,u={};for(let d=0;d<r.length;d++){let f=r[d],p=n[f],v=a[f],g=p(v,l);if(typeof g=="undefined"){let x=l&&l.type;throw new Error(Et(14))}u[f]=g,c=c||g!==v}return c=c||r.length!==Object.keys(a).length,c?u:a}}function na(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function dE(...e){return t=>(n,r)=>{let o=t(n,r),i=()=>{throw new Error(Et(15))},s={getState:o.getState,dispatch:(l,...c)=>i(l,...c)},a=e.map(l=>l(s));return i=na(...a)(o.dispatch),P(S({},o),{dispatch:i})}}function fE(e){return Xd(e)&&"type"in e&&typeof e.type=="string"}var vE=Symbol.for("immer-nothing"),pE=Symbol.for("immer-draftable"),wn=Symbol.for("immer-state");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ra=Object.getPrototypeOf;function qo(e){return!!e&&!!e[wn]}function Jn(e){var t;return e?xE(e)||Array.isArray(e)||!!e[pE]||!!((t=e.constructor)!=null&&t[pE])||nf(e)||rf(e):!1}var zO=Object.prototype.constructor.toString();function xE(e){if(!e||typeof e!="object")return!1;let t=ra(e);if(t===null)return!0;let n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===zO}function Zd(e,t){tf(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function tf(e){let t=e[wn];return t?t.type_:Array.isArray(e)?1:nf(e)?2:rf(e)?3:0}function Qh(e,t){return tf(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function wE(e,t,n){let r=tf(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function HO(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nf(e){return e instanceof Map}function rf(e){return e instanceof Set}function Ni(e){return e.copy_||e.base_}function Zh(e,t){if(nf(e))return new Map(e);if(rf(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let n=xE(e);if(t===!0||t==="class_only"&&!n){let r=Object.getOwnPropertyDescriptors(e);delete r[wn];let o=Reflect.ownKeys(r);for(let i=0;i<o.length;i++){let s=o[i],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(ra(e),r)}else{let r=ra(e);if(r!==null&&n)return S({},e);let o=Object.create(r);return Object.assign(o,e)}}function ry(e,t=!1){return of(e)||qo(e)||!Jn(e)||(tf(e)>1&&(e.set=e.add=e.clear=e.delete=BO),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>ry(r,!0))),e}function BO(){Zn(2)}function of(e){return Object.isFrozen(e)}var UO={};function Mi(e){let t=UO[e];return t||Zn(0,e),t}var Vl;function SE(){return Vl}function VO(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function mE(e,t){t&&(Mi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jh(e){ey(e),e.drafts_.forEach($O),e.drafts_=null}function ey(e){e===Vl&&(Vl=e.parent_)}function gE(e){return Vl=VO(Vl,e)}function $O(e){let t=e[wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function hE(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];return e!==void 0&&e!==n?(n[wn].modified_&&(Jh(t),Zn(4)),Jn(e)&&(e=Jd(t,e),t.parent_||ef(t,e)),t.patches_&&Mi("Patches").generateReplacementPatches_(n[wn].base_,e,t.patches_,t.inversePatches_)):e=Jd(t,n,[]),Jh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vE?e:void 0}function Jd(e,t,n){if(of(t))return t;let r=t[wn];if(!r)return Zd(t,(o,i)=>yE(e,r,t,o,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return ef(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;let o=r.copy_,i=o,s=!1;r.type_===3&&(i=new Set(o),o.clear(),s=!0),Zd(i,(a,l)=>yE(e,r,o,a,l,n,s)),ef(e,o,!1),n&&e.patches_&&Mi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function yE(e,t,n,r,o,i,s){if(qo(o)){let a=i&&t&&t.type_!==3&&!Qh(t.assigned_,r)?i.concat(r):void 0,l=Jd(e,o,a);if(wE(n,r,l),qo(l))e.canAutoFreeze_=!1;else return}else s&&n.add(o);if(Jn(o)&&!of(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Jd(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&ef(e,o)}}function ef(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ry(t,n)}function jO(e,t){let n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:SE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=r,i=oy;n&&(o=[r],i=$l);let{revoke:s,proxy:a}=Proxy.revocable(o,i);return r.draft_=a,r.revoke_=s,a}var oy={get(e,t){if(t===wn)return e;let n=Ni(e);if(!Qh(n,t))return WO(e,n,t);let r=n[t];return e.finalized_||!Jn(r)?r:r===Yh(e.base_,t)?(Xh(e),e.copy_[t]=ny(r,e)):r},has(e,t){return t in Ni(e)},ownKeys(e){return Reflect.ownKeys(Ni(e))},set(e,t,n){let r=bE(Ni(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=Yh(Ni(e),t),i=o==null?void 0:o[wn];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(HO(n,o)&&(n!==void 0||Qh(e.base_,t)))return!0;Xh(e),ty(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Yh(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Xh(e),ty(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=Ni(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return ra(e.base_)},setPrototypeOf(){Zn(12)}},$l={};Zd(oy,(e,t)=>{$l[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$l.deleteProperty=function(e,t){return $l.set.call(this,e,t,void 0)};$l.set=function(e,t,n){return oy.set.call(this,e[0],t,n,e[0])};function Yh(e,t){let n=e[wn];return(n?Ni(n):e)[t]}function WO(e,t,n){var o;let r=bE(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function bE(e,t){if(!(t in e))return;let n=ra(e);for(;n;){let r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ra(n)}}function ty(e){e.modified_||(e.modified_=!0,e.parent_&&ty(e.parent_))}function Xh(e){e.copy_||(e.copy_=Zh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var KO=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){let i=n;n=t;let s=this;return function(l=i,...c){return s.produce(l,u=>n.call(this,u,...c))}}typeof n!="function"&&Zn(6),r!==void 0&&typeof r!="function"&&Zn(7);let o;if(Jn(t)){let i=gE(this),s=ny(t,void 0),a=!0;try{o=n(s),a=!1}finally{a?Jh(i):ey(i)}return mE(i,r),hE(o,i)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===vE&&(o=void 0),this.autoFreeze_&&ry(o,!0),r){let i=[],s=[];Mi("Patches").generateReplacementPatches_(t,o,i,s),r(i,s)}return o}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,o;return[this.produce(t,n,(s,a)=>{r=s,o=a}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Jn(e)||Zn(8),qo(e)&&(e=GO(e));let t=gE(this),n=ny(e,void 0);return n[wn].isManual_=!0,ey(t),n}finishDraft(e,t){let n=e&&e[wn];(!n||!n.isManual_)&&Zn(9);let{scope_:r}=n;return mE(r,t),hE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));let r=Mi("Patches").applyPatches_;return qo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ny(e,t){let n=nf(e)?Mi("MapSet").proxyMap_(e,t):rf(e)?Mi("MapSet").proxySet_(e,t):jO(e,t);return(t?t.scope_:SE()).drafts_.push(n),n}function GO(e){return qo(e)||Zn(10,e),EE(e)}function EE(e){if(!Jn(e)||of(e))return e;let t=e[wn],n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Zh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Zh(e,!0);return Zd(n,(r,o)=>{wE(n,r,EE(o))}),t&&(t.finalized_=!1),n}var Sn=new KO,sf=Sn.produce,z6=Sn.produceWithPatches.bind(Sn),H6=Sn.setAutoFreeze.bind(Sn),B6=Sn.setUseStrictShallowCopy.bind(Sn),U6=Sn.applyPatches.bind(Sn),V6=Sn.createDraft.bind(Sn),$6=Sn.finishDraft.bind(Sn);function qO(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function YO(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function XO(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){let n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var TE=e=>Array.isArray(e)?e:[e];function QO(e){let t=Array.isArray(e[0])?e[0]:e;return XO(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ZO(e,t){let n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var G6=Symbol();var q6=Object.getPrototypeOf({});var JO=class{constructor(e){this.value=e}deref(){return this.value}},eN=typeof WeakRef!="undefined"?WeakRef:JO,tN=0,CE=1;function af(){return{s:tN,v:void 0,o:null,p:null}}function iy(e,t={}){let n=af(),{resultEqualityCheck:r}=t,o,i=0;function s(){var d,f;let a=n,{length:l}=arguments;for(let p=0,v=l;p<v;p++){let g=arguments[p];if(typeof g=="function"||typeof g=="object"&&g!==null){let x=a.o;x===null&&(a.o=x=new WeakMap);let y=x.get(g);y===void 0?(a=af(),x.set(g,a)):a=y}else{let x=a.p;x===null&&(a.p=x=new Map);let y=x.get(g);y===void 0?(a=af(),x.set(g,a)):a=y}}let c=a,u;if(a.s===CE)u=a.v;else if(u=e.apply(null,arguments),i++,r){let p=(f=(d=o==null?void 0:o.deref)==null?void 0:d.call(o))!=null?f:o;p!=null&&r(p,u)&&(u=p,i!==0&&i--),o=typeof u=="object"&&u!==null||typeof u=="function"?new eN(u):u}return c.s=CE,c.v=u,u}return s.clearCache=()=>{n=af(),s.resetResultsCount()},s.resultsCount=()=>i,s.resetResultsCount=()=>{i=0},s}function kE(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,s=0,a,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),qO(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let u=S(S({},n),l),{memoize:d,memoizeOptions:f=[],argsMemoize:p=iy,argsMemoizeOptions:v=[],devModeChecks:g={}}=u,x=TE(f),y=TE(v),m=QO(o),h=d(function(){return i++,c.apply(null,arguments)},...x),w=!0,E=p(function(){s++;let k=ZO(m,arguments);return a=h.apply(null,k),a},...y);return Object.assign(E,{resultFunc:c,memoizedResultFunc:h,dependencies:m,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Dn=kE(iy),nN=Object.assign((e,t=Dn)=>{YO(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>nN});function RE(e){return({dispatch:n,getState:r})=>o=>i=>typeof i=="function"?i(n,r,e):o(i)}var PE=RE(),AE=RE;var rN=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?na:na.apply(null,arguments)},rz=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},oN=e=>e&&typeof e.match=="function";function st(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(Zr(0));return S(S({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>fE(r)&&r.type===e,n}var _E=class jl extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,jl.prototype)}static get[Symbol.species](){return jl}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new jl(...t[0].concat(this)):new jl(...t.concat(this))}};function IE(e){return Jn(e)?sf(e,()=>{}):e}function LE(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function iN(e){return typeof e=="boolean"}var sN=()=>function(t){let{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t!=null?t:{},s=new _E;return n&&(iN(n)?s.push(PE):s.push(AE(n.extraArgument))),s},aN="RTK_autoBatch";var OE=e=>t=>{setTimeout(t,e)},lN=(e={type:"raf"})=>t=>(...n)=>{let r=t(...n),o=!0,i=!1,s=!1,a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window!="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame:OE(10):e.type==="callback"?e.queueNotification:OE(e.timeout),c=()=>{s=!1,i&&(i=!1,a.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){let d=()=>o&&u(),f=r.subscribe(d);return a.add(u),()=>{f(),a.delete(u)}},dispatch(u){var d;try{return o=!((d=u==null?void 0:u.meta)!=null&&d[aN]),i=!o,i&&(s||(s=!0,l(c))),r.dispatch(u)}finally{o=!0}}})},cN=e=>function(n){let{autoBatch:r=!0}=n!=null?n:{},o=new _E(e);return r&&o.push(lN(typeof r=="object"?r:void 0)),o};function DE(e){let t=sN(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{},a;if(typeof n=="function")a=n;else if(Xd(n))a=Qd(n);else throw new Error(Zr(1));let l;typeof r=="function"?l=r(t):l=t();let c=na;o&&(c=rN(S({trace:!1},typeof o=="object"&&o)));let u=dE(...l),d=cN(u),f=typeof s=="function"?s(d):d(),p=c(...f);return qh(a,i,p)}function FE(e){let t={},n=[],r,o={addCase(i,s){let a=typeof i=="string"?i:i.type;if(!a)throw new Error(Zr(28));if(a in t)throw new Error(Zr(29));return t[a]=s,o},addMatcher(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase(i){return r=i,o}};return e(o),[t,n,r]}function uN(e){return typeof e=="function"}function dN(e,t){let[n,r,o]=FE(t),i;if(uN(e))i=()=>IE(e());else{let a=IE(e);i=()=>a}function s(a=i(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[o]),c.reduce((u,d)=>{if(d)if(qo(u)){let p=d(u,l);return p===void 0?u:p}else{if(Jn(u))return sf(u,f=>d(f,l));{let f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},a)}return s.getInitialState=i,s}var fN=(e,t)=>oN(e)?e.match(t):e(t);function pN(...e){return t=>e.some(n=>fN(n,t))}var mN="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gN=(e=21)=>{let t="",n=e;for(;n--;)t+=mN[Math.random()*64|0];return t},hN=["name","message","stack","code"],sy=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},NE=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},yN=e=>{if(typeof e=="object"&&e!==null){let t={};for(let n of hN)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},ME="External signal was aborted",ge=(()=>{function e(t,n,r){let o=st(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:P(S({},d||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),i=st(t+"/pending",(l,c,u)=>({payload:void 0,meta:P(S({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),s=st(t+"/rejected",(l,c,u,d,f)=>({payload:d,error:(r&&r.serializeError||yN)(l||"Rejected"),meta:P(S({},f||{}),{arg:u,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"})}));function a(l,{signal:c}={}){return(u,d,f)=>{let p=r!=null&&r.idGenerator?r.idGenerator(l):gN(),v=new AbortController,g,x;function y(h){x=h,v.abort()}c&&(c.aborted?y(ME):c.addEventListener("abort",()=>y(ME),{once:!0}));let m=function(){return I(this,null,function*(){var E,C;let h;try{let k=(E=r==null?void 0:r.condition)==null?void 0:E.call(r,l,{getState:d,extra:f});if(xN(k)&&(k=yield k),k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let A=new Promise((B,M)=>{g=()=>{M({name:"AbortError",message:x||"Aborted"})},v.signal.addEventListener("abort",g)});u(i(p,l,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:p,arg:l},{getState:d,extra:f}))),h=yield Promise.race([A,Promise.resolve(n(l,{dispatch:u,getState:d,extra:f,requestId:p,signal:v.signal,abort:y,rejectWithValue:(B,M)=>new sy(B,M),fulfillWithValue:(B,M)=>new NE(B,M)})).then(B=>{if(B instanceof sy)throw B;return B instanceof NE?o(B.payload,p,l,B.meta):o(B,p,l)})])}catch(k){h=k instanceof sy?s(null,p,l,k.payload,k.meta):s(k,p,l)}finally{g&&v.signal.removeEventListener("abort",g)}return r&&!r.dispatchConditionRejection&&s.match(h)&&h.meta.condition||u(h),h})}();return Object.assign(m,{abort:y,requestId:p,arg:l,unwrap(){return m.then(vN)}})}}return Object.assign(a,{pending:i,rejected:s,fulfilled:o,settled:pN(s,o),typePrefix:t})}return e.withTypes=()=>e,e})();function vN(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function xN(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var zE=Symbol.for("rtk-slice-createasyncthunk"),lz={[zE]:ge};function wN(e,t){return`${e}/${t}`}function SN({creators:e}={}){var n;let t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[zE];return function(o){let{name:i,reducerPath:s=i}=o;if(!i)throw new Error(Zr(11));let a=(typeof o.reducers=="function"?o.reducers(EN()):o.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(h,w){let E=typeof h=="string"?h:h.type;if(!E)throw new Error(Zr(12));if(E in c.sliceCaseReducersByType)throw new Error(Zr(13));return c.sliceCaseReducersByType[E]=w,u},addMatcher(h,w){return c.sliceMatchers.push({matcher:h,reducer:w}),u},exposeAction(h,w){return c.actionCreators[h]=w,u},exposeCaseReducer(h,w){return c.sliceCaseReducersByName[h]=w,u}};l.forEach(h=>{let w=a[h],E={reducerName:h,type:wN(i,h),createNotation:typeof o.reducers=="function"};CN(w)?RN(E,w,u,t):TN(E,w,u)});function d(){let[h={},w=[],E=void 0]=typeof o.extraReducers=="function"?FE(o.extraReducers):[o.extraReducers],C=S(S({},h),c.sliceCaseReducersByType);return dN(o.initialState,k=>{for(let A in C)k.addCase(A,C[A]);for(let A of c.sliceMatchers)k.addMatcher(A.matcher,A.reducer);for(let A of w)k.addMatcher(A.matcher,A.reducer);E&&k.addDefaultCase(E)})}let f=h=>h,p=new Map,v;function g(h,w){return v||(v=d()),v(h,w)}function x(){return v||(v=d()),v.getInitialState()}function y(h,w=!1){function E(k){let A=k[h];return typeof A=="undefined"&&w&&(A=x()),A}function C(k=f){let A=LE(p,w,()=>new WeakMap);return LE(A,k,()=>{var M;let B={};for(let[N,Z]of Object.entries((M=o.selectors)!=null?M:{}))B[N]=bN(Z,k,x,w);return B})}return{reducerPath:h,getSelectors:C,get selectors(){return C(E)},selectSlice:E}}let m=P(S({name:i,reducer:g,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x},y(s)),{injectInto(h,C={}){var k=C,{reducerPath:w}=k,E=oe(k,["reducerPath"]);let A=w!=null?w:s;return h.inject({reducerPath:A,reducer:g},E),S(S({},m),y(A,!0))}});return m}}function bN(e,t,n,r){function o(i,...s){let a=t(i);return typeof a=="undefined"&&r&&(a=n()),e(a,...s)}return o.unwrapped=e,o}var ke=SN();function EN(){function e(t,n){return S({_reducerDefinitionType:"asyncThunk",payloadCreator:t},n)}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function TN({type:e,reducerName:t,createNotation:n},r,o){let i,s;if("reducer"in r){if(n&&!kN(r))throw new Error(Zr(17));i=r.reducer,s=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,s?st(e,s):st(e))}function CN(e){return e._reducerDefinitionType==="asyncThunk"}function kN(e){return e._reducerDefinitionType==="reducerWithPrepare"}function RN({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Zr(18));let{payloadCreator:i,fulfilled:s,pending:a,rejected:l,settled:c,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),s&&r.addCase(d.fulfilled,s),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:s||lf,pending:a||lf,rejected:l||lf,settled:c||lf})}function lf(){}var HE="listener",BE="completed",UE="cancelled",cz=`task-${UE}`,uz=`task-${BE}`,dz=`${HE}-${UE}`,fz=`${HE}-${BE}`;var{assign:VE}=Object;var ay="listenerMiddleware";var PN=VE(st(`${ay}/add`),{withTypes:()=>PN}),pz=st(`${ay}/removeAll`),AN=VE(st(`${ay}/remove`),{withTypes:()=>AN});var mz=Symbol.for("rtk-state-proxy-original");function Zr(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var le=b(Q(),1),s1=b(KE(),1);var FN=le.version.startsWith("19"),zN=Symbol.for(FN?"react.transitional.element":"react.element"),HN=Symbol.for("react.portal"),BN=Symbol.for("react.fragment"),UN=Symbol.for("react.strict_mode"),VN=Symbol.for("react.profiler"),$N=Symbol.for("react.consumer"),jN=Symbol.for("react.context"),JE=Symbol.for("react.forward_ref"),WN=Symbol.for("react.suspense"),KN=Symbol.for("react.suspense_list"),py=Symbol.for("react.memo"),GN=Symbol.for("react.lazy");var qN=JE,YN=py;function XN(e){if(typeof e=="object"&&e!==null){let{$$typeof:t}=e;switch(t){case zN:switch(e=e.type,e){case BN:case VN:case UN:case WN:case KN:return e;default:switch(e=e&&e.$$typeof,e){case jN:case JE:case GN:case py:return e;case $N:return e;default:return t}}case HN:return t}}}function QN(e){return XN(e)===py}function ZN(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,c,u,d,f;function p(m,h){return l=m,c=h,u=e(l,c),d=t(r,c),f=n(u,d,c),a=!0,f}function v(){return u=e(l,c),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function g(){return e.dependsOnOwnProps&&(u=e(l,c)),t.dependsOnOwnProps&&(d=t(r,c)),f=n(u,d,c),f}function x(){let m=e(l,c),h=!s(m,u);return u=m,h&&(f=n(u,d,c)),f}function y(m,h){let w=!i(h,c),E=!o(m,l,h,c);return l=m,c=h,w&&E?v():w?g():E?x():f}return function(h,w){return a?y(h,w):p(h,w)}}function JN(e,i){var s=i,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=s,o=oe(s,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]);let a=t(e,o),l=n(e,o),c=r(e,o);return ZN(a,l,c,e,o)}function eM(e,t){let n={};for(let r in e){let o=e[r];typeof o=="function"&&(n[r]=(...i)=>t(o(...i)))}return n}function dy(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function GE(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function e1(e,t){return function(r,{displayName:o}){let i=function(a,l){return i.dependsOnOwnProps?i.mapToProps(a,l):i.mapToProps(a,void 0)};return i.dependsOnOwnProps=!0,i.mapToProps=function(a,l){i.mapToProps=e,i.dependsOnOwnProps=GE(e);let c=i(a,l);return typeof c=="function"&&(i.mapToProps=c,i.dependsOnOwnProps=GE(c),c=i(a,l)),c},i}}function my(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function tM(e){return e&&typeof e=="object"?dy(t=>eM(e,t)):e?typeof e=="function"?e1(e,"mapDispatchToProps"):my(e,"mapDispatchToProps"):dy(t=>({dispatch:t}))}function nM(e){return e?typeof e=="function"?e1(e,"mapStateToProps"):my(e,"mapStateToProps"):dy(()=>({}))}function rM(e,t,n){return S(S(S({},n),e),t)}function oM(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,c,u){let d=e(l,c,u);return i?o(d,s)||(s=d):(i=!0,s=d),s}}}function iM(e){return e?typeof e=="function"?oM(e):my(e,"mergeProps"):()=>rM}function sM(e){e()}function aM(){let e=null,t=null;return{clear(){e=null,t=null},notify(){sM(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){let n=[],r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0,o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var qE={notify(){},get:()=>[]};function t1(e,t){let n,r=qE,o=0,i=!1;function s(g){u();let x=r.subscribe(g),y=!1;return()=>{y||(y=!0,x(),d())}}function a(){r.notify()}function l(){v.onStateChange&&v.onStateChange()}function c(){return i}function u(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=aM())}function d(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=qE)}function f(){i||(i=!0,u())}function p(){i&&(i=!1,d())}let v={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return v}var lM=()=>typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",cM=lM(),uM=()=>typeof navigator!="undefined"&&navigator.product==="ReactNative",dM=uM(),fM=()=>cM||dM?le.useLayoutEffect:le.useEffect,cf=fM();function YE(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ly(e,t){if(YE(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!YE(e[n[o]],t[n[o]]))return!1;return!0}var pM={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},mM={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},gM={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},n1={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},hM={[qN]:gM,[YN]:n1};function XE(e){return QN(e)?n1:hM[e.$$typeof]||pM}var yM=Object.defineProperty,vM=Object.getOwnPropertyNames,QE=Object.getOwnPropertySymbols,xM=Object.getOwnPropertyDescriptor,wM=Object.getPrototypeOf,ZE=Object.prototype;function fy(e,t){if(typeof t!="string"){if(ZE){let i=wM(t);i&&i!==ZE&&fy(e,i)}let n=vM(t);QE&&(n=n.concat(QE(t)));let r=XE(e),o=XE(t);for(let i=0;i<n.length;++i){let s=n[i];if(!mM[s]&&!(o&&o[s])&&!(r&&r[s])){let a=xM(t,s);try{yM(e,s,a)}catch(l){}}}}return e}var cy=Symbol.for("react-redux-context"),uy=typeof globalThis!="undefined"?globalThis:{};function SM(){var n;if(!le.createContext)return{};let e=(n=uy[cy])!=null?n:uy[cy]=new Map,t=e.get(le.createContext);return t||(t=le.createContext(null),e.set(le.createContext,t)),t}var Jr=SM(),bM=[null,null];function EM(e,t,n){cf(()=>e(...t),n)}function TM(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function CM(e,t,n,r,o,i,s,a,l,c,u){if(!e)return()=>{};let d=!1,f=null,p=()=>{if(d||!a.current)return;let g=t.getState(),x,y;try{x=r(g,o.current)}catch(m){y=m,f=m}y||(f=null),x===i.current?s.current||c():(i.current=x,l.current=x,s.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function kM(e,t){return e===t}function RM(e,t,n,{pure:r,areStatesEqual:o=kM,areOwnPropsEqual:i=ly,areStatePropsEqual:s=ly,areMergedPropsEqual:a=ly,forwardRef:l=!1,context:c=Jr}={}){let u=c,d=nM(e),f=tM(t),p=iM(n),v=!!e;return x=>{let y=x.displayName||x.name||"Component",m=`Connect(${y})`,h={shouldHandleStateChanges:v,displayName:m,wrappedComponentName:y,WrappedComponent:x,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function w(k){let[A,B,M]=le.useMemo(()=>{let pe=k,{reactReduxForwardedRef:X}=pe,ae=oe(pe,["reactReduxForwardedRef"]);return[k.context,X,ae]},[k]),N=le.useMemo(()=>{let X=u;return A!=null&&A.Consumer,X},[A,u]),Z=le.useContext(N),Y=!!k.store&&!!k.store.getState&&!!k.store.dispatch,O=!!Z&&!!Z.store,F=Y?k.store:Z.store,ie=O?Z.getServerState:F.getState,G=le.useMemo(()=>JN(F.dispatch,h),[F]),[V,U]=le.useMemo(()=>{if(!v)return bM;let X=t1(F,Y?void 0:Z.subscription),ae=X.notifyNestedSubs.bind(X);return[X,ae]},[F,Y,Z]),K=le.useMemo(()=>Y?Z:P(S({},Z),{subscription:V}),[Y,Z,V]),$=le.useRef(void 0),W=le.useRef(M),z=le.useRef(void 0),fe=le.useRef(!1),de=le.useRef(!1),be=le.useRef(void 0);cf(()=>(de.current=!0,()=>{de.current=!1}),[]);let me=le.useMemo(()=>()=>z.current&&M===W.current?z.current:G(F.getState(),M),[F,M]),re=le.useMemo(()=>ae=>V?CM(v,F,V,G,W,$,fe,de,z,U,ae):()=>{},[V]);EM(TM,[W,$,fe,M,z,U]);let Ce;try{Ce=le.useSyncExternalStore(re,me,ie?()=>G(ie(),M):me)}catch(X){throw be.current&&(X.message+=`
9
9
  The error may be correlated with this previous error:
10
- ${Se.current.stack}
10
+ ${be.current.stack}
11
11
 
12
- `),Q}af(()=>{Se.current=void 0,H.current=void 0,$.current=Te});let rt=le.useMemo(()=>le.createElement(x,P(S({},Te),{ref:F})),[F,x,Te]);return le.useMemo(()=>v?le.createElement(O.Provider,{value:q},rt):rt,[O,rt,q])}let C=le.memo(w);if(C.WrappedComponent=x,C.displayName=w.displayName=g,l){let A=le.forwardRef(function(N,O){return le.createElement(C,P(S({},N),{reactReduxForwardedRef:O}))});return A.displayName=g,A.WrappedComponent=x,uy(A,x)}return uy(C,x)}}var ra=IN;function LN(e){let{children:t,context:n,serverState:r,store:o}=e,i=le.useMemo(()=>{let l=n1(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),s=le.useMemo(()=>o.getState(),[o]);return af(()=>{let{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]),le.createElement((n||to).Provider,{value:i},t)}var o1=LN;function py(e=to){return function(){return le.useContext(e)}}var i1=py();function s1(e=to){let t=e===to?i1:py(e),n=()=>{let{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var _N=s1();function ON(e=to){let t=e===to?_N:s1(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ye=ON(),NN=(e,t)=>e===t;function MN(e=to){let t=e===to?i1:py(e),n=(r,o={})=>{let{equalityFn:i=NN}=typeof o=="function"?{equalityFn:o}:o,s=t(),{store:a,subscription:l,getServerState:c}=s,u=le.useRef(!0),d=le.useCallback({[r.name](p){return r(p)}}[r.name],[r]),f=(0,a1.useSyncExternalStoreWithSelector)(l.addNestedSub,a.getState,c||a.getState,d,i);return le.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var j=MN();var Wl=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Wl||{});var DN={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,detectSubmit:!1,automaticHandlingTime:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!1,adminUrl:void 0,productName:"Deepdesk",hasKeyboardInput:!0},l1=Ce({name:"settings",initialState:DN,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o!="undefined"&&(e[r]=o)})}}}),{set:lf}=l1.actions,ql=e=>t=>t.settings[e],ee=e=>j(ql(e)),c1=l1.reducer;var FN={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Vt=e=>e.auth.isLoggedIn,u1=e=>e.auth.loginFetchState,d1=e=>e.auth.verifyFetchState,f1=e=>e.auth.showLoginOverlay,no=ge("auth/validate",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.isLoggedIn()})),p1=ge("auth/requestLogin",(n,r)=>I(void 0,[n,r],function*({email:e},t){let{deepdeskAPI:o}=t.extra;return o.requestLoginByEmail(e)})),Gl=ge("auth/verifyLoginToken",(n,r)=>I(void 0,[n,r],function*({token:e},t){let{deepdeskAPI:o}=t.extra;return o.verifyLoginToken(e)})),m1=Ce({name:"auth",initialState:FN,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(no.pending,t=>{t.loginFetchState="loading"}),e.addCase(no.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(no.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Gl.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Gl.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Gl.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:oa,setShowLoginOverlay:g1}=m1.actions,h1=m1.reducer;function ro(){}ro.prototype={diff:function(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.callback;typeof o=="function"&&(i=o,o={}),this.options=o;var s=this;function a(w){return i?(setTimeout(function(){i(void 0,w)},0),!0):w}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var l=n.length,c=t.length,u=1,d=l+c;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var f=(r=o.timeout)!==null&&r!==void 0?r:1/0,p=Date.now()+f,v=[{oldPos:-1,lastComponent:void 0}],m=this.extractCommon(v[0],n,t,0);if(v[0].oldPos+1>=c&&m+1>=l)return a([{value:this.join(n),count:n.length}]);var x=-1/0,y=1/0;function g(){for(var w=Math.max(x,-u);w<=Math.min(y,u);w+=2){var E=void 0,C=v[w-1],k=v[w+1];C&&(v[w-1]=void 0);var A=!1;if(k){var F=k.oldPos-w;A=k&&0<=F&&F<l}var N=C&&C.oldPos+1<c;if(!A&&!N){v[w]=void 0;continue}if(!N||A&&C.oldPos+1<k.oldPos?E=s.addToPath(k,!0,void 0,0):E=s.addToPath(C,void 0,!0,1),m=s.extractCommon(E,n,t,w),E.oldPos+1>=c&&m+1>=l)return a(zN(s,E.lastComponent,n,t,s.useLongestToken));v[w]=E,E.oldPos+1>=c&&(y=Math.min(y,w-1)),m+1>=l&&(x=Math.max(x,w+1))}u++}if(i)(function w(){setTimeout(function(){if(u>d||Date.now()>p)return i();g()||w()},0)})();else for(;u<=d&&Date.now()<=p;){var h=g();if(h)return h}},addToPath:function(t,n,r,o){var i=t.lastComponent;return i&&i.added===n&&i.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:i.count+1,added:n,removed:r,previousComponent:i.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:i}}},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.oldPos,l=a-o,c=0;l+1<i&&a+1<s&&this.equals(n[l+1],r[a+1]);)l++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function zN(e,t,n,r,o){for(var i=[],s;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();for(var a=0,l=i.length,c=0,u=0;a<l;a++){var d=i[a];if(d.removed){if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,a&&i[a-1].added){var p=i[a-1];i[a-1]=i[a],i[a]=p}}else{if(!d.added&&o){var f=n.slice(c,c+d.count);f=f.map(function(m,x){var y=r[u+x];return y.length>m.length?y:m}),d.value=e.join(f)}else d.value=e.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}var v=i[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(i[l-2].value+=v.value,i.pop()),i}var HN=new ro;function x1(e,t,n){return HN.diff(e,t,n)}var y1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,v1=/\S/,w1=new ro;w1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!v1.test(e)&&!v1.test(t)};w1.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&y1.test(t[n])&&y1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var S1=new ro;S1.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
13
- `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var BN=new ro;BN.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var UN=new ro;UN.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function cf(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cf=function(t){return typeof t}:cf=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}var VN=Object.prototype.toString,Yl=new ro;Yl.useLongestToken=!0;Yl.tokenize=S1.tokenize;Yl.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s=="undefined"?n:s}:r;return typeof e=="string"?e:JSON.stringify(my(e,null,null,o),o," ")};Yl.equals=function(e,t){return ro.prototype.equals.call(Yl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function my(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var s;if(VN.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=my(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),cf(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),i=0;i<a.length;i+=1)l=a[i],s[l]=my(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var gy=new ro;gy.tokenize=function(e){return e.slice()};gy.join=gy.removeEmpty=function(e){return e};function b1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Yo(e,t,n=10){let r=typeof e,o=typeof t;if(n===0)throw new Error("Max depth deepEqual, possible circular references?");return r!==o?!1:e==null||r==="string"||r==="number"||r==="boolean"?e===t:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:e.every((i,s)=>Yo(i,t[s],n-1)):b1(e)&&b1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>Yo(e[s],t[s],n-1)):!1}function $N(e){return Math.max(...e.map(t=>t.length))}function jN(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return P(S({},r),{[o]:i})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function E1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<$N(r);o++){let i=jN(r.map(a=>a[o]),t),s=r.filter(a=>!i.includes(a[o]));if(s.length>=t)r=s;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var KN=2;function T1(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=E1(e,KN);return n&&n.text!==t?n:e[0]}var WN={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},te=WN;var C1={current:null,isSupported:null},at=st("resetConversation"),k1=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},Pr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},ia=e=>e.conversation.isSupported,hy=ge("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),uf=ge("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),df=ge("conversation/byExternalId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId,e.options)}),ff=ge("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Pr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),yy=ge("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,metadata:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,metadata:l})})}),vy=ge("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Pr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>S({},o)))}),qN=[uf.rejected,df.rejected,ff.rejected,vy.rejected].map(e=>e==null?void 0:e.toString());function GN(e){return qN.includes(e.type)}var YN=Ce({name:"conversation",initialState:C1,reducers:{},extraReducers:e=>{e.addCase(hy.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(uf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(df.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(yy.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(ff.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(at,()=>C1).addMatcher(GN,(t,n)=>{var r;throw te.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),R1=YN.reducer;var Ni={text:"",html:null,selection:{start:0,end:0},beforeInputChange:null,mixedSuggestion:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function xy(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}}var pf=st("input/replaceText"),Mi=st("input/sendMessage"),mf=st("input/applyImageSuggestion"),oo=st("input/sendEvent"),P1=Ce({name:"input",initialState:Ni,reducers:{setInput(e,t){var i,s;let{beforeInputChange:n}=e,{text:r,html:o}=t.payload;if(e.text=r,e.html=o!=null?o:null,r==="")e.metrics=Ni.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:a,shiftKey:l,ctrlKey:c,metaKey:u,altKey:d}=n.keyDown;switch(a){case"Enter":l&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:f}=e,p=x1(n.text,f);n.text.length-f.length>1&&e.metrics.deletions.push(...p.filter(v=>v.removed).map(v=>v.value)),e.metrics.numCharsDeleted+=n.text.length-f.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(c||u)break;default:if(!c&&!u&&!d){e.metrics.numCharsTyped+=1;let f=((i=n.selection)==null?void 0:i.start)!==void 0&&((s=n.selection)==null?void 0:s.end)!==void 0?n.text.substring(n.selection.start,n.selection.end):null;f&&f.length>0&&(e.metrics.numCharsDeleted+=f.length,e.metrics.deletions.push(f))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},setSelection(e,t){t.payload!==null&&(Yo(e.selection,t.payload)||(e.selection=t.payload))},commitSuggestion(e,t){let n=t.payload,{text:r,suggestion:{source:o,abVariant:i,abTestName:s,trainingJobs:a,sourceText:l,searchTerm:c,text:u},eventMetrics:{inputType:d},replace:f}=n,p=o==="search"||o==="personal-collection-search",v=r.slice(e.text.substring(0,e.selection.start).length);(p||f==="selection")&&(v=r),n.suggestion.source==="search-overlay"&&(v=u),e.metrics.textSuggestions.push({text:v,source:o,abVariant:i,abTestName:s,inputType:d,sourceText:l,trainingJobs:a||[],searchTerm:p?e.text:c}),e.textSuggestions=[],e.selectedSuggestionIndex=-1},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerKeyDown(e,t){let{key:n}=t.payload;["Control","Meta","Shift","Alt"].includes(n)||(e.beforeInputChange={text:e.text,selection:e.selection,keyDown:t.payload})},registerKeyUp(e,t){},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics=P(S({},e.metrics),{numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]})},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o!=null&&o.length?o.length:0),s=o!=null&&o.length?[...n.deletions,o]:n.deletions;e.metrics=P(S({},e.metrics),{numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]})},selectNextTextSuggestion(e){let t=e.textSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},selectPreviousTextSuggestion(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},selectTextSuggestionByIndex(e,t){e.selectedSuggestionIndex=t.payload},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0){e.mixedSuggestion=null;return}let n=e.text.substring(0,e.selection.end),r=T1(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=Ni.metrics}},extraReducers:e=>{e.addCase(at,t=>{t.mixedSuggestion=Ni.mixedSuggestion,t.textSuggestions=Ni.textSuggestions,t.selectedSuggestionIndex=Ni.selectedSuggestionIndex,t.metrics=Ni.metrics})}}),sa=e=>e.input.text.substring(0,e.input.selection.end),XN=e=>e.input.selection,aa=e=>{let{mixedSuggestion:t,selectedSuggestionIndex:n,textSuggestions:r}=e.input;return n>-1?r[n]:t},A1=()=>j(XN),{commitSuggestion:er,offeredTextSuggestion:I1,registerCut:L1,registerKeyDown:_1,registerKeyUp:O1,registerPaste:N1,selectNextTextSuggestion:M1,selectPreviousTextSuggestion:D1,selectTextSuggestionByIndex:gf,setInput:hf,setMetrics:F1,setSelection:yf,setTextSuggestions:Xo,resetMetrics:z1}=P1.actions,H1=P1.reducer;function B1(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var QN={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle"},la=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},U1=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},V1=e=>{var t;return(t=e.info.customData)!=null?t:null},Ql=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&B1(e.visitorTimeZone)?e.visitorTimeZone:jx,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},ZN=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],Xl=ge("info/setAgentInfo",(e,t)=>I(void 0,null,function*(){var i,s,a;let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=[];if(e.agentId&&e.skipSync!==!0&&o.push(n.postIdentity({externalId:e.agentId})),e.skipSync!==!0){let l=ZN.reduce((c,[u,d])=>!r[d]&&u in e?P(S({},c),{[d]:e[u]}):c,{});Object.keys(l).length>0&&o.push(n.patchMe(l).then(c=>r=c))}return o.length>0&&(yield Promise.all(o)),{agentId:e.agentId,agentName:e.agentName,agentNickname:(i=r.nickname)!=null?i:e.agentNickname,agentEmail:(s=r.email)!=null?s:e.agentEmail,agentDefaultLocale:(a=r.defaultLocale)!=null?a:e.agentDefaultLocale,agentTimeZone:e.agentTimeZone}})),wy=ge("info/setAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=S(S({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),Sy=ge("info/getAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),$1=Ce({name:"info",initialState:QN,reducers:{setVisitorInfo(e,t){e.visitorInfo=S(S({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload}},extraReducers:e=>{e.addCase(Xl.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=S(S({},t.agentInfo),n.meta.arg)}).addCase(Xl.rejected,t=>{t.fetchState="error"}).addCase(Xl.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(wy.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Sy.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(at,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:j1,setCustomData:K1,setPlatformVariables:W1}=$1.actions,q1=$1.reducer;function un(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replaceAll(r,o),e):e}var vf={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},G1=e=>e.search.isOpen,Y1=e=>e.search.page,by=e=>e.search.list,X1=e=>e.search.aggregates,JN=Dn([by,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),Q1=e=>t=>JN(t,e),Di=ge("search/getAll",(e,t)=>I(void 0,null,function*(){var l;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(l=r.conversation.current)==null?void 0:l.profileCode,{platformVariables:i}=r.info;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:s,aggregates:a}=yield n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:Ql(r)});return{results:s.map(c=>P(S(S({},c),c.title&&i?{title:un(c.title,i)}:{}),{text:un(c.text,i!=null?i:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),Z1=Ce({name:"search",initialState:vf,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=vf.fetchState,e.list=vf.list}},extraReducers:e=>{e.addCase(Di.pending,t=>{t.fetchState="loading"}).addCase(Di.rejected,(t,n)=>{t.fetchState="error",te.error(n.error)}).addCase(Di.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(at,()=>vf)}}),{resetSearch:xf,setIsOpen:Fn,setPage:io}=Z1.actions,J1=Z1.reducer;var Ey="SetOutputs",ca="ShowLoginOverlay",Zl="UserLoggedIn",eM="UserLoggedOut",Ar="ApplySuggestion",Ty="ApplyImageSuggestion",tM="ShowCommandPalette",nM=e=>({[Ey]:t=>{e.dispatch(P(S({},t),{isBroadcasted:!0}))},[tM]:t=>{e.dispatch(Fn(t.isOpen)),t.page&&e.dispatch(io(t.page))},[ca]:t=>{e.dispatch(g1(t))},[Zl]:()=>{e.dispatch(no())},[eM]:()=>{e.dispatch(no())},[Ty]:t=>{e.dispatch(mf({suggestion:t.suggestion}))},[Ar]:t=>{e.dispatch(er(P(S({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),eT=nM;var Jl=b(Z()),nT=b(R()),tT=Jl.default.createContext(null),Qo=({broadcastEvents:e,children:t})=>{let n=Jl.default.useMemo(()=>e,[]);return(0,nT.jsx)(tT.Provider,{value:n,children:t})},dn=()=>{let e=(0,Jl.useContext)(tT);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var If=b(Ne()),tr=b(Z());var Rf=b(Z());var Cy=function(e,t){return Cy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Cy(e,t)};function ec(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Cy(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var En=function(){return En=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},En.apply(this,arguments)};function rT(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function wf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Sf(e,t){var n=t&&t.cache?t.cache:cM,r=t&&t.serializer?t.serializer:aM,o=t&&t.strategy?t.strategy:oM;return o(e,{cache:n,serializer:r})}function rM(e){return e==null||typeof e=="number"||typeof e=="boolean"}function oT(e,t,n,r){var o=rM(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function iT(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(o,i)),i}function ky(e,t,n,r,o){return n.bind(t,e,r,o)}function oM(e,t){var n=e.length===1?oT:iT;return ky(e,this,n,t.cache.create(),t.serializer)}function iM(e,t){return ky(e,this,iT,t.cache.create(),t.serializer)}function sM(e,t){return ky(e,this,oT,t.cache.create(),t.serializer)}var aM=function(){return JSON.stringify(arguments)},lM=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),cM={create:function(){return new lM}},bf={variadic:iM,monadic:sM};var Ef;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Ef||(Ef={}));var Tf=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var zn;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(zn||(zn={}));var Cf;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Cf||(Cf={}));function Ry(e){return e.type===zn.literal}function Py(e){return e.type===zn.argument}function tc(e){return e.type===zn.number}function nc(e){return e.type===zn.date}function rc(e){return e.type===zn.time}function oc(e){return e.type===zn.select}function ic(e){return e.type===zn.plural}function sT(e){return e.type===zn.pound}function sc(e){return e.type===zn.tag}function kf(e){return!!(e&&typeof e=="object"&&e.type===Cf.number)}function ac(e){return!!(e&&typeof e=="object"&&e.type===Cf.dateTime)}function Ay(e){e.forEach(function(t){if(delete t.location,oc(t)||ic(t))for(var n in t.options)delete t.options[n].location,Ay(t.options[n].value);else tc(t)&&kf(t.style)||(nc(t)||rc(t))&&ac(t.style)?delete t.style.location:sc(t)&&Ay(t.children)})}function aT(e,t){t===void 0&&(t={}),t=En({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Tf(e,t).parse();if(n.err){var r=SyntaxError(Ef[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Ay(n.val),n.val}var Fi;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Fi||(Fi={}));var lc=function(e){ec(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Iy=function(e){ec(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Fi.INVALID_VALUE,i)||this}return t}(lc);var lT=function(e){ec(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Fi.INVALID_VALUE,o)||this}return t}(lc);var cT=function(e){ec(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),Fi.MISSING_VALUE,r)||this}return t}(lc);var Ot;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ot||(Ot={}));function uM(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ot.literal||n.type!==Ot.literal?t.push(n):r.value+=n.value,t},[])}function dM(e){return typeof e=="function"}function cc(e,t,n,r,o,i,s){if(e.length===1&&Ry(e[0]))return[{type:Ot.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(Ry(u)){a.push({type:Ot.literal,value:u.value});continue}if(sT(u)){typeof i=="number"&&a.push({type:Ot.literal,value:n.getNumberFormat(t).format(i)});continue}var d=u.value;if(!(o&&d in o))throw new cT(d,s);var f=o[d];if(Py(u)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),a.push({type:typeof f=="string"?Ot.literal:Ot.object,value:f});continue}if(nc(u)){var p=typeof u.style=="string"?r.date[u.style]:ac(u.style)?u.style.parsedOptions:void 0;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(rc(u)){var p=typeof u.style=="string"?r.time[u.style]:ac(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(tc(u)){var p=typeof u.style=="string"?r.number[u.style]:kf(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(f=f*(p.scale||1)),a.push({type:Ot.literal,value:n.getNumberFormat(t,p).format(f)});continue}if(sc(u)){var v=u.children,m=u.value,x=o[m];if(!dM(x))throw new lT(m,"function",s);var y=cc(v,t,n,r,o,i),g=x(y.map(function(E){return E.value}));Array.isArray(g)||(g=[g]),a.push.apply(a,g.map(function(E){return{type:typeof E=="string"?Ot.literal:Ot.object,value:E}}))}if(oc(u)){var h=u.options[f]||u.options.other;if(!h)throw new Iy(u.value,f,Object.keys(u.options),s);a.push.apply(a,cc(h.value,t,n,r,o));continue}if(ic(u)){var h=u.options["=".concat(f)];if(!h){if(!Intl.PluralRules)throw new lc(`Intl.PluralRules is not available in this environment.
12
+ `),X}cf(()=>{be.current=void 0,z.current=void 0,$.current=Ce});let rt=le.useMemo(()=>le.createElement(x,P(S({},Ce),{ref:B})),[B,x,Ce]);return le.useMemo(()=>v?le.createElement(N.Provider,{value:K},rt):rt,[N,rt,K])}let C=le.memo(w);if(C.WrappedComponent=x,C.displayName=w.displayName=m,l){let A=le.forwardRef(function(M,N){return le.createElement(C,P(S({},M),{reactReduxForwardedRef:N}))});return A.displayName=m,A.WrappedComponent=x,fy(A,x)}return fy(C,x)}}var oa=RM;function PM(e){let{children:t,context:n,serverState:r,store:o}=e,i=le.useMemo(()=>{let l=t1(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),s=le.useMemo(()=>o.getState(),[o]);return cf(()=>{let{subscription:l}=i;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[i,s]),le.createElement((n||Jr).Provider,{value:i},t)}var r1=PM;function gy(e=Jr){return function(){return le.useContext(e)}}var o1=gy();function i1(e=Jr){let t=e===Jr?o1:gy(e),n=()=>{let{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var AM=i1();function IM(e=Jr){let t=e===Jr?AM:i1(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ve=IM(),LM=(e,t)=>e===t;function OM(e=Jr){let t=e===Jr?o1:gy(e),n=(r,o={})=>{let{equalityFn:i=LM}=typeof o=="function"?{equalityFn:o}:o,s=t(),{store:a,subscription:l,getServerState:c}=s,u=le.useRef(!0),d=le.useCallback({[r.name](p){return r(p)}}[r.name],[r]),f=(0,s1.useSyncExternalStoreWithSelector)(l.addNestedSub,a.getState,c||a.getState,d,i);return le.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var j=OM();var Kl=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Kl||{});var NM={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,detectSubmit:!1,automaticHandlingTime:!1,enableSuggestionFeedback:!1,enableFeedbackForm:!1,adminUrl:void 0,productName:"Deepdesk",hasKeyboardInput:!0},a1=ke({name:"settings",initialState:NM,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o!="undefined"&&(e[r]=o)})}}}),{set:uf}=a1.actions,Gl=e=>t=>t.settings[e],te=e=>j(Gl(e)),l1=a1.reducer;var MM={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},$t=e=>e.auth.isLoggedIn,c1=e=>e.auth.loginFetchState,u1=e=>e.auth.verifyFetchState,d1=e=>e.auth.showLoginOverlay,eo=ge("auth/validate",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.isLoggedIn()})),f1=ge("auth/requestLogin",(n,r)=>I(void 0,[n,r],function*({email:e},t){let{deepdeskAPI:o}=t.extra;return o.requestLoginByEmail(e)})),ql=ge("auth/verifyLoginToken",(n,r)=>I(void 0,[n,r],function*({token:e},t){let{deepdeskAPI:o}=t.extra;return o.verifyLoginToken(e)})),p1=ke({name:"auth",initialState:MM,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(eo.pending,t=>{t.loginFetchState="loading"}),e.addCase(eo.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(eo.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(ql.pending,t=>{t.verifyFetchState="loading"}),e.addCase(ql.rejected,t=>{t.verifyFetchState="error"}),e.addCase(ql.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:ia,setShowLoginOverlay:m1}=p1.actions,g1=p1.reducer;function to(){}to.prototype={diff:function(t,n){var r,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=o.callback;typeof o=="function"&&(i=o,o={}),this.options=o;var s=this;function a(w){return i?(setTimeout(function(){i(void 0,w)},0),!0):w}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var l=n.length,c=t.length,u=1,d=l+c;o.maxEditLength&&(d=Math.min(d,o.maxEditLength));var f=(r=o.timeout)!==null&&r!==void 0?r:1/0,p=Date.now()+f,v=[{oldPos:-1,lastComponent:void 0}],g=this.extractCommon(v[0],n,t,0);if(v[0].oldPos+1>=c&&g+1>=l)return a([{value:this.join(n),count:n.length}]);var x=-1/0,y=1/0;function m(){for(var w=Math.max(x,-u);w<=Math.min(y,u);w+=2){var E=void 0,C=v[w-1],k=v[w+1];C&&(v[w-1]=void 0);var A=!1;if(k){var B=k.oldPos-w;A=k&&0<=B&&B<l}var M=C&&C.oldPos+1<c;if(!A&&!M){v[w]=void 0;continue}if(!M||A&&C.oldPos+1<k.oldPos?E=s.addToPath(k,!0,void 0,0):E=s.addToPath(C,void 0,!0,1),g=s.extractCommon(E,n,t,w),E.oldPos+1>=c&&g+1>=l)return a(_M(s,E.lastComponent,n,t,s.useLongestToken));v[w]=E,E.oldPos+1>=c&&(y=Math.min(y,w-1)),g+1>=l&&(x=Math.max(x,w+1))}u++}if(i)(function w(){setTimeout(function(){if(u>d||Date.now()>p)return i();m()||w()},0)})();else for(;u<=d&&Date.now()<=p;){var h=m();if(h)return h}},addToPath:function(t,n,r,o){var i=t.lastComponent;return i&&i.added===n&&i.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:i.count+1,added:n,removed:r,previousComponent:i.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:i}}},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.oldPos,l=a-o,c=0;l+1<i&&a+1<s&&this.equals(n[l+1],r[a+1]);)l++,a++,c++;return c&&(t.lastComponent={count:c,previousComponent:t.lastComponent}),t.oldPos=a,l},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function _M(e,t,n,r,o){for(var i=[],s;t;)i.push(t),s=t.previousComponent,delete t.previousComponent,t=s;i.reverse();for(var a=0,l=i.length,c=0,u=0;a<l;a++){var d=i[a];if(d.removed){if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,a&&i[a-1].added){var p=i[a-1];i[a-1]=i[a],i[a]=p}}else{if(!d.added&&o){var f=n.slice(c,c+d.count);f=f.map(function(g,x){var y=r[u+x];return y.length>g.length?y:g}),d.value=e.join(f)}else d.value=e.join(n.slice(c,c+d.count));c+=d.count,d.added||(u+=d.count)}}var v=i[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(i[l-2].value+=v.value,i.pop()),i}var DM=new to;function v1(e,t,n){return DM.diff(e,t,n)}var h1=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,y1=/\S/,x1=new to;x1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!y1.test(e)&&!y1.test(t)};x1.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&h1.test(t[n])&&h1.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var w1=new to;w1.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
13
+ `));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var o=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=o:(this.options.ignoreWhitespace&&(o=o.trim()),t.push(o))}return t};var FM=new to;FM.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var zM=new to;zM.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function df(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?df=function(t){return typeof t}:df=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}var HM=Object.prototype.toString,Yl=new to;Yl.useLongestToken=!0;Yl.tokenize=w1.tokenize;Yl.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s=="undefined"?n:s}:r;return typeof e=="string"?e:JSON.stringify(hy(e,null,null,o),o," ")};Yl.equals=function(e,t){return to.prototype.equals.call(Yl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function hy(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var s;if(HM.call(e)==="[object Array]"){for(t.push(e),s=new Array(e.length),n.push(s),i=0;i<e.length;i+=1)s[i]=hy(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),df(e)==="object"&&e!==null){t.push(e),s={},n.push(s);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),i=0;i<a.length;i+=1)l=a[i],s[l]=hy(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var yy=new to;yy.tokenize=function(e){return e.slice()};yy.join=yy.removeEmpty=function(e){return e};function S1(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Yo(e,t,n=10){let r=typeof e,o=typeof t;if(n===0)throw new Error("Max depth deepEqual, possible circular references?");return r!==o?!1:e==null||r==="string"||r==="number"||r==="boolean"?e===t:Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:e.every((i,s)=>Yo(i,t[s],n-1)):S1(e)&&S1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>Yo(e[s],t[s],n-1)):!1}function BM(e){return Math.max(...e.map(t=>t.length))}function UM(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return P(S({},r),{[o]:i})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function b1(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<BM(r);o++){let i=UM(r.map(a=>a[o]),t),s=r.filter(a=>!i.includes(a[o]));if(s.length>=t)r=s;else return{text:r[0].slice(0,o).join("").replace(/ (\?| |!|\.|,|\n)/g,"$1").trimEnd(),source:"mixed"}}}var VM=2;function E1(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=b1(e,VM);return n&&n.text!==t?n:e[0]}var $M={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},ee=$M;var T1={current:null,isSupported:null},at=st("resetConversation"),C1=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},Rr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},sa=e=>e.conversation.isSupported,vy=ge("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),ff=ge("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),pf=ge("conversation/byExternalId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId,e.options)}),mf=ge("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),xy=ge("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationByExternalId(e.externalId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,metadata:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,metadata:l})})}),wy=ge("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Rr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>S({},o)))}),jM=[ff.rejected,pf.rejected,mf.rejected,wy.rejected].map(e=>e==null?void 0:e.toString());function WM(e){return jM.includes(e.type)}var KM=ke({name:"conversation",initialState:T1,reducers:{},extraReducers:e=>{e.addCase(vy.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(ff.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(pf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(xy.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(mf.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=!!((r=n.payload)!=null&&r.profileCode)}).addCase(at,()=>T1).addMatcher(WM,(t,n)=>{var r;throw ee.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),k1=KM.reducer;var _i={text:"",html:null,selection:{start:0,end:0},beforeInputChange:null,mixedSuggestion:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function Sy(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:i}}var gf=st("input/replaceText"),Di=st("input/sendMessage"),hf=st("input/applyImageSuggestion"),no=st("input/sendEvent"),R1=ke({name:"input",initialState:_i,reducers:{setInput(e,t){var i,s;let{beforeInputChange:n}=e,{text:r,html:o}=t.payload;if(e.text=r,e.html=o!=null?o:null,r==="")e.metrics=_i.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:a,shiftKey:l,ctrlKey:c,metaKey:u,altKey:d}=n.keyDown;switch(a){case"Enter":l&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:f}=e,p=v1(n.text,f);n.text.length-f.length>1&&e.metrics.deletions.push(...p.filter(v=>v.removed).map(v=>v.value)),e.metrics.numCharsDeleted+=n.text.length-f.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(c||u)break;default:if(!c&&!u&&!d){e.metrics.numCharsTyped+=1;let f=((i=n.selection)==null?void 0:i.start)!==void 0&&((s=n.selection)==null?void 0:s.end)!==void 0?n.text.substring(n.selection.start,n.selection.end):null;f&&f.length>0&&(e.metrics.numCharsDeleted+=f.length,e.metrics.deletions.push(f))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},setSelection(e,t){t.payload!==null&&(Yo(e.selection,t.payload)||(e.selection=t.payload))},commitSuggestion(e,t){let n=t.payload,{text:r,suggestion:{source:o,abVariant:i,abTestName:s,trainingJobs:a,sourceText:l,searchTerm:c,text:u},eventMetrics:{inputType:d},replace:f}=n,p=o==="search"||o==="personal-collection-search",v=r.slice(e.text.substring(0,e.selection.start).length);(p||f==="selection")&&(v=r),n.suggestion.source==="search-overlay"&&(v=u),e.metrics.textSuggestions.push({text:v,source:o,abVariant:i,abTestName:s,inputType:d,sourceText:l,trainingJobs:a||[],searchTerm:p?e.text:c}),e.textSuggestions=[],e.selectedSuggestionIndex=-1},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerKeyDown(e,t){let{key:n}=t.payload;["Control","Meta","Shift","Alt"].includes(n)||(e.beforeInputChange={text:e.text,selection:e.selection,keyDown:t.payload})},registerKeyUp(e,t){},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics=P(S({},e.metrics),{numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]})},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o!=null&&o.length?o.length:0),s=o!=null&&o.length?[...n.deletions,o]:n.deletions;e.metrics=P(S({},e.metrics),{numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]})},selectNextTextSuggestion(e){let t=e.textSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},selectPreviousTextSuggestion(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},selectTextSuggestionByIndex(e,t){e.selectedSuggestionIndex=t.payload},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0){e.mixedSuggestion=null;return}let n=e.text.substring(0,e.selection.end),r=E1(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=_i.metrics}},extraReducers:e=>{e.addCase(at,t=>{t.mixedSuggestion=_i.mixedSuggestion,t.textSuggestions=_i.textSuggestions,t.selectedSuggestionIndex=_i.selectedSuggestionIndex,t.metrics=_i.metrics})}}),aa=e=>e.input.text.substring(0,e.input.selection.end),GM=e=>e.input.selection,la=e=>{let{mixedSuggestion:t,selectedSuggestionIndex:n,textSuggestions:r}=e.input;return n>-1?r[n]:t},P1=()=>j(GM),{commitSuggestion:er,offeredTextSuggestion:A1,registerCut:I1,registerKeyDown:L1,registerKeyUp:O1,registerPaste:N1,selectNextTextSuggestion:M1,selectPreviousTextSuggestion:_1,selectTextSuggestionByIndex:yf,setInput:vf,setMetrics:D1,setSelection:xf,setTextSuggestions:Xo,resetMetrics:F1}=R1.actions,z1=R1.reducer;function H1(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var qM={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle"},ca=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},B1=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},U1=e=>{var t;return(t=e.info.customData)!=null?t:null},Ql=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&H1(e.visitorTimeZone)?e.visitorTimeZone:$x,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},YM=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],Xl=ge("info/setAgentInfo",(e,t)=>I(void 0,null,function*(){var i,s,a;let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=[];if(e.agentId&&e.skipSync!==!0&&o.push(n.postIdentity({externalId:e.agentId})),e.skipSync!==!0){let l=YM.reduce((c,[u,d])=>!r[d]&&u in e?P(S({},c),{[d]:e[u]}):c,{});Object.keys(l).length>0&&o.push(n.patchMe(l).then(c=>r=c))}return o.length>0&&(yield Promise.all(o)),{agentId:e.agentId,agentName:e.agentName,agentNickname:(i=r.nickname)!=null?i:e.agentNickname,agentEmail:(s=r.email)!=null?s:e.agentEmail,agentDefaultLocale:(a=r.defaultLocale)!=null?a:e.agentDefaultLocale,agentTimeZone:e.agentTimeZone}})),by=ge("info/setAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=S(S({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),Ey=ge("info/getAgentSettings",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),V1=ke({name:"info",initialState:qM,reducers:{setVisitorInfo(e,t){e.visitorInfo=S(S({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload}},extraReducers:e=>{e.addCase(Xl.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=S(S({},t.agentInfo),n.meta.arg)}).addCase(Xl.rejected,t=>{t.fetchState="error"}).addCase(Xl.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(by.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Ey.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(at,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:$1,setCustomData:j1,setPlatformVariables:W1}=V1.actions,K1=V1.reducer;function cn(e,t){return t?Object.entries(t).reduce((n,[r,o])=>n.replaceAll(r,o),e):e}var wf={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},G1=e=>e.search.isOpen,q1=e=>e.search.page,Ty=e=>e.search.list,Y1=e=>e.search.aggregates,XM=Dn([Ty,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),X1=e=>t=>XM(t,e),Fi=ge("search/getAll",(e,t)=>I(void 0,null,function*(){var l;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(l=r.conversation.current)==null?void 0:l.profileCode,{platformVariables:i}=r.info;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:s,aggregates:a}=yield n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:Ql(r)});return{results:s.map(c=>P(S(S({},c),c.title&&i?{title:cn(c.title,i)}:{}),{text:cn(c.text,i!=null?i:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),Q1=ke({name:"search",initialState:wf,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=wf.fetchState,e.list=wf.list}},extraReducers:e=>{e.addCase(Fi.pending,t=>{t.fetchState="loading"}).addCase(Fi.rejected,(t,n)=>{t.fetchState="error",ee.error(n.error)}).addCase(Fi.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(at,()=>wf)}}),{resetSearch:Sf,setIsOpen:Fn,setPage:ro}=Q1.actions,Z1=Q1.reducer;var Cy="SetOutputs",ua="ShowLoginOverlay",Zl="UserLoggedIn",QM="UserLoggedOut",Pr="ApplySuggestion",ky="ApplyImageSuggestion",ZM="ShowCommandPalette",JM=e=>({[Cy]:t=>{e.dispatch(P(S({},t),{isBroadcasted:!0}))},[ZM]:t=>{e.dispatch(Fn(t.isOpen)),t.page&&e.dispatch(ro(t.page))},[ua]:t=>{e.dispatch(m1(t))},[Zl]:()=>{e.dispatch(eo())},[QM]:()=>{e.dispatch(eo())},[ky]:t=>{e.dispatch(hf({suggestion:t.suggestion}))},[Pr]:t=>{e.dispatch(er(P(S({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),J1=JM;var Jl=b(Q()),tT=b(R()),eT=Jl.default.createContext(null),Qo=({broadcastEvents:e,children:t})=>{let n=Jl.default.useMemo(()=>e,[]);return(0,tT.jsx)(eT.Provider,{value:n,children:t})},un=()=>{let e=(0,Jl.useContext)(eT);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var Of=b(Me()),tr=b(Q());var Af=b(Q());var Ry=function(e,t){return Ry=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},Ry(e,t)};function ec(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ry(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var En=function(){return En=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},En.apply(this,arguments)};function nT(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function bf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}function Ef(e,t){var n=t&&t.cache?t.cache:s_,r=t&&t.serializer?t.serializer:o_,o=t&&t.strategy?t.strategy:t_;return o(e,{cache:n,serializer:r})}function e_(e){return e==null||typeof e=="number"||typeof e=="boolean"}function rT(e,t,n,r){var o=e_(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function oT(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.apply(this,r),t.set(o,i)),i}function Py(e,t,n,r,o){return n.bind(t,e,r,o)}function t_(e,t){var n=e.length===1?rT:oT;return Py(e,this,n,t.cache.create(),t.serializer)}function n_(e,t){return Py(e,this,oT,t.cache.create(),t.serializer)}function r_(e,t){return Py(e,this,rT,t.cache.create(),t.serializer)}var o_=function(){return JSON.stringify(arguments)},i_=function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(t){return this.cache[t]},e.prototype.set=function(t,n){this.cache[t]=n},e}(),s_={create:function(){return new i_}},Tf={variadic:n_,monadic:r_};var Cf;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG"})(Cf||(Cf={}));var kf=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var zn;(function(e){e[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag"})(zn||(zn={}));var Rf;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Rf||(Rf={}));function Ay(e){return e.type===zn.literal}function Iy(e){return e.type===zn.argument}function tc(e){return e.type===zn.number}function nc(e){return e.type===zn.date}function rc(e){return e.type===zn.time}function oc(e){return e.type===zn.select}function ic(e){return e.type===zn.plural}function iT(e){return e.type===zn.pound}function sc(e){return e.type===zn.tag}function Pf(e){return!!(e&&typeof e=="object"&&e.type===Rf.number)}function ac(e){return!!(e&&typeof e=="object"&&e.type===Rf.dateTime)}function Ly(e){e.forEach(function(t){if(delete t.location,oc(t)||ic(t))for(var n in t.options)delete t.options[n].location,Ly(t.options[n].value);else tc(t)&&Pf(t.style)||(nc(t)||rc(t))&&ac(t.style)?delete t.style.location:sc(t)&&Ly(t.children)})}function sT(e,t){t===void 0&&(t={}),t=En({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new kf(e,t).parse();if(n.err){var r=SyntaxError(Cf[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Ly(n.val),n.val}var zi;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(zi||(zi={}));var lc=function(e){ec(t,e);function t(n,r,o){var i=e.call(this,n)||this;return i.code=r,i.originalMessage=o,i}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Oy=function(e){ec(t,e);function t(n,r,o,i){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),zi.INVALID_VALUE,i)||this}return t}(lc);var aT=function(e){ec(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),zi.INVALID_VALUE,o)||this}return t}(lc);var lT=function(e){ec(t,e);function t(n,r){return e.call(this,'The intl string context variable "'.concat(n,'" was not provided to the string "').concat(r,'"'),zi.MISSING_VALUE,r)||this}return t}(lc);var Ot;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ot||(Ot={}));function a_(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ot.literal||n.type!==Ot.literal?t.push(n):r.value+=n.value,t},[])}function l_(e){return typeof e=="function"}function cc(e,t,n,r,o,i,s){if(e.length===1&&Ay(e[0]))return[{type:Ot.literal,value:e[0].value}];for(var a=[],l=0,c=e;l<c.length;l++){var u=c[l];if(Ay(u)){a.push({type:Ot.literal,value:u.value});continue}if(iT(u)){typeof i=="number"&&a.push({type:Ot.literal,value:n.getNumberFormat(t).format(i)});continue}var d=u.value;if(!(o&&d in o))throw new lT(d,s);var f=o[d];if(Iy(u)){(!f||typeof f=="string"||typeof f=="number")&&(f=typeof f=="string"||typeof f=="number"?String(f):""),a.push({type:typeof f=="string"?Ot.literal:Ot.object,value:f});continue}if(nc(u)){var p=typeof u.style=="string"?r.date[u.style]:ac(u.style)?u.style.parsedOptions:void 0;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(rc(u)){var p=typeof u.style=="string"?r.time[u.style]:ac(u.style)?u.style.parsedOptions:r.time.medium;a.push({type:Ot.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(tc(u)){var p=typeof u.style=="string"?r.number[u.style]:Pf(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(f=f*(p.scale||1)),a.push({type:Ot.literal,value:n.getNumberFormat(t,p).format(f)});continue}if(sc(u)){var v=u.children,g=u.value,x=o[g];if(!l_(x))throw new aT(g,"function",s);var y=cc(v,t,n,r,o,i),m=x(y.map(function(E){return E.value}));Array.isArray(m)||(m=[m]),a.push.apply(a,m.map(function(E){return{type:typeof E=="string"?Ot.literal:Ot.object,value:E}}))}if(oc(u)){var h=u.options[f]||u.options.other;if(!h)throw new Oy(u.value,f,Object.keys(u.options),s);a.push.apply(a,cc(h.value,t,n,r,o));continue}if(ic(u)){var h=u.options["=".concat(f)];if(!h){if(!Intl.PluralRules)throw new lc(`Intl.PluralRules is not available in this environment.
14
14
  Try polyfilling it using "@formatjs/intl-pluralrules"
15
- `,Fi.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));h=u.options[w]||u.options.other}if(!h)throw new Iy(u.value,f,Object.keys(u.options),s);a.push.apply(a,cc(h.value,t,n,r,o,f-(u.offset||0)));continue}}return uM(a)}function fM(e,t){return t?En(En(En({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=En(En({},e[r]),t[r]||{}),n},{})):e}function pM(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=fM(e[r],t[r]),n},En({},e)):e}function Ly(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function mM(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Sf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,wf([void 0],n,!1)))},{cache:Ly(e.number),strategy:bf.variadic}),getDateTimeFormat:Sf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,wf([void 0],n,!1)))},{cache:Ly(e.dateTime),strategy:bf.variadic}),getPluralRules:Sf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,wf([void 0],n,!1)))},{cache:Ly(e.pluralRules),strategy:bf.variadic})}}var _y=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=i.formatToParts(c);if(u.length===1)return u[0].value;var d=u.reduce(function(f,p){return!f.length||p.type!==Ot.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(c){return cc(i.ast,i.locales,i.formatters,i.formats,c,void 0,i.message)},this.resolvedOptions=function(){var c;return{locale:((c=i.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{},a=s.formatters,l=rT(s,["formatters"]);this.ast=e.__parse(t,En(En({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=pM(e.formats,r),this.formatters=o&&o.formatters||mM(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=aT,e.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"}}},e}();function gM(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var hM="dummy",Oy=(0,Rf.createContext)(null);function ce(e){var r;let t=(0,Rf.useContext)(Oy);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=(r=e[t])!=null?r:{};return(o,i)=>{let s=gM(n,o);return s?new _y(s).format(i):(t!==hM&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}var Pf=b(Z());var uT={root:"dd-tvkOF",content:"dd-eXA1D"};var Ny=b(R()),yM=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,Pf.useRef)(null),c=M("Dialog",uT),u=f=>{if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),o();return}i&&i(f)},d=f=>{f.target===l.current&&e&&r()};return(0,Pf.useEffect)(()=>{var f,p;!l.current||!e||!t||(p=(f=l.current)==null?void 0:f.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,Ny.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":s,ref:l,onKeyDown:u,onMouseDown:d,children:(0,Ny.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},Af=yM;var fT=b(Ne());var dT={root:"dd-ranhW"};var pT=b(R()),vM=r=>{var o=r,{className:e,value:t}=o,n=oe(o,["className","value"]);let i=M("TextInput",dT);return(0,pT.jsx)("input",S({className:(0,fT.default)(e,i.root),type:"text",value:t},n))},uc=vM;var My={};Rt(My,{enUS:()=>xM,nlNL:()=>wM});var xM={back:[{type:0,value:"Back"}],promptTitle:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Paste the code from your email"}],verifyCodeBody:[{type:0,value:"Copy the code from the email you just received and paste it here."}],verifyCodeInputPlaceholder:[{type:0,value:"Paste link or code here"}],verifyCodeSubmitLabel:[{type:0,value:"Sign in"}],verifyCodeError:[{type:0,value:"Sign in failed. The code is probably no longer valid. Please "},{type:8,value:"login",children:[{type:0,value:"request new code"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Have a code sent to your email"}],requestCodeBody:[{type:0,value:"Enter your email and request a code. If you are an existing "},{type:1,value:"productName"},{type:0,value:" user you will receive an email with a code. If you are a new user you will receive an email asking to request access to "},{type:1,value:"productName"},{type:0,value:" first."}],requestCodeInputPlaceholder:[{type:0,value:"Enter your email"}],requestCodeSubmitLabel:[{type:0,value:"Request code"}]},wM={back:[{type:0,value:"Terug"}],promptTitle:[{type:0,value:"Login bij "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Plak de code uit je email"}],verifyCodeBody:[{type:0,value:"Kopieer de code uit de email en plak deze hier."}],verifyCodeInputPlaceholder:[{type:0,value:"Plak hier de code"}],verifyCodeSubmitLabel:[{type:0,value:"Inloggen"}],verifyCodeError:[{type:0,value:"Inloggen is niet gelukt. De code is waarschijnlijk niet meer geldig. "},{type:8,value:"login",children:[{type:0,value:"Vraag een nieuwe code aan"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Verstuur een login code naar je email"}],requestCodeBody:[{type:0,value:"Voer je e-mailadres in en krijg een login code. Als je een bestaande "},{type:1,value:"productName"},{type:0,value:" gebruiker bent krijg je een email met een code. Als je een nieuwe gebruiker bent wordt er een email verstuurd met een toegangsverzoek voor "},{type:1,value:"productName"},{type:0,value:"."}],requestCodeInputPlaceholder:[{type:0,value:"Typ hier je e-mailadres"}],requestCodeSubmitLabel:[{type:0,value:"Code aanvragen"}]};var mT={root:"dd-lWxnE",anchorButton:"dd-TZ4in",errorMessage:"dd-fIsPg",title:"dd-pGhJx",subtitle:"dd-f5l29",text:"dd-iamoD",input:"dd-uhQZ3",actions:"dd-lubvx",button:"dd-CJsNI",primaryButton:"dd-MWBfl"};var tt=b(R());var SM=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},bM=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=ce(My),s=M("LoginTokenDialog",mT),a=j(d1),l=ye(),c=ee("productName"),[u,d]=(0,tr.useState)(e||""),[f,p]=(0,tr.useState)(0),[v,m]=(0,tr.useState)(""),x=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault(),l(p1({email:u})),p(1)}),[n,u]),y=()=>{m(""),p(0)},g=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault();let E=SM(w.target.elements.token.value);if(!E){m(i("verifyCodeError",{login:h}));return}l(Gl({token:E}))}),[n]),h=(0,tr.useMemo)(()=>w=>(0,tt.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:y,children:w},"back-button"),[]);return(0,tr.useEffect)(()=>{a==="error"&&m(i("verifyCodeError",{login:h})),a==="done"&&r()},[a]),(0,tt.jsx)(Af,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:c}),overlayAriaLabel:i("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,tt.jsxs)("div",{className:s.root,children:[(0,tt.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:c})}),f===0&&(0,tt.jsxs)("form",{onSubmit:x,children:[(0,tt.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,tt.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:c})}),(0,tt.jsx)(uc,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:u,onChange:w=>d(w.target.value)}),(0,tt.jsx)("div",{className:s.actions,children:(0,tt.jsx)("button",{type:"submit",className:(0,If.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),f===1&&(0,tt.jsxs)("form",{onSubmit:g,children:[(0,tt.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,tt.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,tt.jsx)(uc,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,tt.jsx)("div",{className:s.errorMessage,children:v}),(0,tt.jsxs)("div",{className:s.actions,children:[(0,tt.jsx)("button",{type:"button",className:(0,If.default)(s.button),onClick:y,children:i("back")}),(0,tt.jsx)("button",{type:"submit",className:(0,If.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},gT=bM;var yT=b(R()),EM=()=>{let e=j(f1),t=j(la),n=ee("adminUrl"),r=dn(),o=()=>r.send(ca,!1),i=()=>{r.send(ca,!1),r.send(Zl)};return(0,yT.jsx)(gT,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},hT=EM;var CR=b(zy()),Yt=b(Z());var dc="__summarizerAssistant__",ST={cues:[],threads:{},fetchState:"idle"},bT=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var fc=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},Lf=st("assistants/callToAction"),nr=ge("assistants/evaluateSummaryAssistant",(e,t)=>I(void 0,null,function*(){let r=t.getState().profile.data;if(!r)throw new Error("No Profile is loaded");let{summarizerAssistantNew:o}=r;if(!o)throw new Error("No Summarizer Assistant set in Profile");let i=yield t.dispatch(rr(S({assistantCode:o,expectFormat:"text",transcript:"in-memory-transcript",skipState:!0},e)));if(i.error)throw new Error(i.error.message);if(typeof i.payload!="string")throw te.warn("Unexpected summary output",i),new Error("Unexpected summary output");return i.payload})),UM=1,zi=ge("assistants/evaluateKnowledgeAssistantLegacy",(e,t)=>I(void 0,null,function*(){var p,v,m,x;let{threadId:n}=e,{onNewThreadId:r,input:o}=e,{deepdeskAPI:i}=t.extra,s=t.getState(),{platformVariables:a}=s.info;n||(n=UM++,r&&r(n));let l=(p=fc(n)(s))!=null?p:[],c=yield i.getKnowledgeAssistant(e.assistantCode),u=(v=s.conversation.current)==null?void 0:v.externalId,d=(x=(m=s.info)==null?void 0:m.agentInfo)==null?void 0:x.agentId;if(!c)throw new Error("KnowledgeAssistant is not found");let f=yield i.knowledgeAssist({customerInstruction:c.customerInstruction,doNotKnowAnswer:c.doNotKnowAnswer,question:o},l,c.code,{agentId:d,conversationId:u});return a&&(f.answer=un(f.answer,a)),{threadId:n,question:o,answer:f}})),Hi=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>I(void 0,null,function*(){let{threadId:n}=e,{onNewThreadId:r}=e,{deepdeskAPI:o}=t.extra,i=t.getState(),{platformVariables:s}=i.info;n||(n=(yield o.createAssistantThread({assistantCode:e.assistantCode})).id,r&&r(n)),yield o.postMessageToAssistantThread({assistantCode:e.assistantCode,threadId:n,message:e.input});let a=yield t.dispatch(rr(P(S({expectFormat:"json-schema:knowledge-assist",skipState:!0},e),{input:{},threadId:n})));if(a.error)throw new Error(a.error.message);let l=a.payload;return{threadId:n,question:e.input,answer:{answer:un(l.response,s!=null?s:{}),sources:l.sources}}})),rr=ge("assistants/evaluate",(e,t)=>I(void 0,null,function*(){var p;let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra,{transcript:o,input:i={},expectFormat:s,threadId:a}=e,l=t.getState(),{platformVariables:c}=l.info,u=(p=l.conversation.current)==null?void 0:p.externalId,d;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");d=yield r.conversationQuery()}else Array.isArray(o)&&(d=o);if(e.includeMetadata){if(!l.conversation.current)throw new Error("Can't include metadata, no current conversation");let{metadata:v}=l.conversation.current;Object.assign(i,{metadata:v})}let f=yield n.evaluateAssistant(e.assistantCode,{expectFormat:s,input:i,transcript:d,externalConversationId:u,threadId:a});switch(s){case"text":return un(f,c);case"json-schema:cues":return Array.isArray(f)?f.map(v=>P(S({},v),{name:un(v.name,c),response:un(v.response,c)})):[];case"json-schema:knowledge-assist":{let v=f;return P(S({},v),{answer:un(v.response,c)})}default:return f}})),ET=Ce({name:"assistants",initialState:ST,reducers:{resetCues(e){e.cues=[]},removeCueByCode(e,t){e.cues=e.cues.filter(n=>n.code!==t.payload.code)},removeThreadById(e,t){delete e.threads[t.payload]}},extraReducers:e=>{e.addCase(rr.pending,(t,n)=>{n.meta.arg.skipState||(t.fetchState="loading")}).addCase(rr.rejected,(t,n)=>{var r;te.warn((r=n.error)==null?void 0:r.message),!n.meta.arg.skipState&&(t.fetchState="error")}).addCase(rr.fulfilled,(t,n)=>{if(!n.meta.arg.skipState)switch(n.meta.arg.expectFormat){case"json-schema:cues":{let r=n.payload,o=r.map(s=>s.code),i=t.cues.filter(s=>!o.includes(s.code));t.fetchState="done",t.cues=[...i,...r];break}}}).addCase(Hi.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=oe(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(zi.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=oe(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(nr.pending,t=>{let n={code:dc,name:"Summary",response:"",isLoading:!0},r=t.cues.filter(o=>o.code!==dc);t.cues=[...r,n]}).addCase(nr.rejected,t=>{let n=t.cues.filter(r=>r.code!==dc);t.cues=n}).addCase(nr.fulfilled,(t,n)=>{let r={code:dc,name:"Summary",response:n.payload,specialType:"summary"},o=t.cues.filter(i=>i.code!==dc);t.cues=[...o,r]}).addCase(at,()=>ST)}}),{removeCueByCode:TT,resetCues:cH,removeThreadById:ua}=ET.actions,CT=ET.reducer;var VM={data:null,fetchState:"idle"},kT=e=>e.contentTypes.data,pc=ge("contentTypes/getContentTypes",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),$M=Ce({name:"contentTypes",initialState:VM,reducers:{},extraReducers:e=>{e.addCase(pc.pending,t=>{t.fetchState="loading"}).addCase(pc.rejected,t=>{t.fetchState="error"}).addCase(pc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),RT=$M.reducer;var jM={data:null,fetchState:"idle"},KM=[],Bi=e=>e.profile.data,WM=e=>e.profile.data?e.profile.data.uiConfig.widget.types:KM,gc=Dn([WM],e=>e.filter(t=>t.isActive)),PT=e=>{var t;return(t=e.profile.data)==null?void 0:t.summarizerAssistantNew},AT=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},Hy=e=>t=>gc(t).find(n=>n.type===e),IT=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,_f=e=>{var t;return(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew},Of=e=>{var t;return(t=e.profile.data)==null?void 0:t.knowledgeAssistant},mc=ge("profile/getProfile",(e,t)=>I(void 0,null,function*(){var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)})),qM=Ce({name:"profile",initialState:jM,reducers:{},extraReducers:e=>{e.addCase(mc.pending,t=>{t.fetchState="loading"}).addCase(mc.rejected,t=>{t.fetchState="error"}).addCase(mc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),LT=qM.reducer;function Ir(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove()}var fo=b(Z());var _T=b(Z()),Nf=b(Ne());var Tn={root:"dd-U2SX4",list:"dd-cYTlj",listWrapper:"dd-GLQFR",listHorizontal:"dd-x-knl",page:"dd-1F4vk",search:"dd-nvbxc",pageNav:"dd-sRUuT",pageTitle:"dd-t-MKS",pageBackButton:"dd-cjptm",listHeader:"dd-Fg666",listHeading:"dd-w-xhJ",listMoreButton:"dd--mKep",listItem:"dd-wpvuA",listItemContent:"dd-V-mKo",listItemText:"dd-ukCHL",listItemDescription:"dd-sSyu4",listItemActions:"dd-xelho",listItemTooltip:"dd-SWFsE",listItemTooltipContent:"dd-I7J9N",truncate:"dd-IlopJ",lineClamp:"dd-Twaca",listItemTitle:"dd-lMGHq",listItemAction:"dd-xPLAs",listItemSelected:"dd-jFX0Y",sources:"dd-pZx4v",sourcesTitle:"dd-phYVd",source:"dd-DaR6h",sourceShowMore:"dd-M1-8j",icon:"dd-m6yxD",searchIcon:"dd-0AU-O",searchInputWrapper:"dd-DUFcE",searchInput:"dd-ukrlD",select:"dd--Tifv",selectType:"dd-IkZb2",selectWrapper:"dd-J14mx",image:"dd-RQgsB",imageSrc:"dd-jxh8F",imageSrcHidden:"dd-e20Jk",imageSrcStatus:"dd-j50Tt",imageTitle:"dd-qCjfW",actions:"dd-3mfWc",actionsWrapper:"dd-TjDyI",actionsBar:"dd-LiA35",actionButton:"dd-4wk0u",hasShortKeys:"dd-XilV-",actionShortcut:"dd-s4Mla",actionShortcutFixKerning:"dd-lyh5e"};var so={};Rt(so,{enUS:()=>GM,nlNL:()=>YM});var GM={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}],sources:[{type:0,value:"Sources"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},YM={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}],sources:[{type:0,value:"Bronnen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var Zo=b(R()),XM=({src:e,title:t})=>{let n=M("CommandPalette",Tn),[r,o]=(0,_T.useState)("loading"),i=ce(so);return(0,Zo.jsxs)("div",{className:n.image,children:[(0,Zo.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Nf.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Zo.jsx)("span",{className:(0,Nf.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Zo.jsx)("span",{className:(0,Nf.default)(n.imageSrc,n.imageSrcStatus),children:(0,Zo.jsx)(Su,{})}),t&&(0,Zo.jsx)("span",{className:n.imageTitle,children:t})]})},OT=XM;var NT=b(Z()),MT=b(Ne());var Ui=b(R());function By({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=ce(so),s=M("CommandPalette",Tn);return NT.default.Children.count(e)===0?null:(0,Ui.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Ui.jsxs)("div",{className:s.listHeader,children:[t&&(0,Ui.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Ui.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Ui.jsx)("div",{className:(0,MT.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var Ac=b(Ne());var Mf=b(Z());function hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ke=1,Vy=2,$y=4,lt=8,Df=16,yc=32,or=64,Uy={a:{content:ke|lt,self:!1,type:ke|lt|yc|or},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:ke|lt,void:!0},body:{content:ke|Vy|$y|lt|Df|yc|or},button:{content:lt,type:ke|lt|yc|or},caption:{content:ke,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:ke|yc|or},dd:{content:ke,parent:["dl"]},dl:{children:["dt","dd"],type:ke},dt:{content:ke,invalid:["footer","header"],parent:["dl"]},figcaption:{content:ke,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:ke,void:!0},img:{void:!0},li:{content:ke,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:ke},picture:{children:["source","img"],type:ke|lt|Df},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:lt,parent:["ruby","rtc"]},rtc:{content:lt,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:lt,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:ke},tbody:{parent:["table"],children:["tr"]},td:{content:ke,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:ke,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:ke},video:{children:["track","source"]},wbr:{type:ke|lt,void:!0}};function $i(e){return t=>{Uy[t]=S(S({},e),Uy[t])}}["address","main","div","figure","p","pre"].forEach($i({content:ke,type:ke|or}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach($i({content:lt,type:ke|lt|or}));["p","pre"].forEach($i({content:lt,type:ke|or}));["s","small","span","del","ins"].forEach($i({content:lt,type:ke|lt}));["article","aside","footer","header","nav","section","blockquote"].forEach($i({content:ke,type:ke|Vy|or}));["h1","h2","h3","h4","h5","h6"].forEach($i({content:lt,type:ke|$y|or}));["audio","canvas","iframe","img","video"].forEach($i({type:ke|lt|Df|or}));var xc=Object.freeze(Uy),jy=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Ky=Object.keys(xc).filter(e=>e!=="canvas"&&e!=="iframe"),_e=1,Wy=2,Vi=3,Jo=4,zf=5,Hf=Object.freeze({alt:_e,cite:_e,class:_e,colspan:Vi,controls:Jo,datetime:_e,default:Jo,disabled:Jo,dir:_e,height:_e,href:_e,id:_e,kind:_e,label:_e,lang:_e,loading:_e,loop:Jo,media:_e,muted:Jo,poster:_e,rel:_e,role:_e,rowspan:Vi,scope:_e,sizes:_e,span:Vi,start:Vi,style:zf,src:_e,srclang:_e,srcset:_e,tabindex:_e,target:_e,title:_e,type:_e,width:_e}),qy=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Ff(){return Ff=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ff.apply(this,arguments)}function Bf({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Mf.default.createElement(i,Ff({className:t},e)):Mf.default.createElement(i,Ff({className:t},e),n)}var vc=class{attribute(t,n){return n}node(t,n){return n}};function DT(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?P(S({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var ao=class{constructor(t,n,r){hc(this,"greedy",!1),hc(this,"options",void 0),hc(this,"propName",void 0),hc(this,"inverseName",void 0),hc(this,"factory",void 0),this.options=S({},n),this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r!=null?r:null}createElement(t,n){return this.factory?Mf.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return DT(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var ji=b(Z()),BT=b(zT());function lo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var JM=/(url|image|image-set)\(/i,Gy=class extends vc{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(JM)&&delete n[r]}),n}},HT=1,e2=3,t2=/^<(!doctype|(html|head|body)(\s|>))/i,n2=/^(aria-|data-|\w+:)/iu,r2=/{{{(\w+)\/?}}}/;function o2(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var Uf=class{constructor(t,n={},r=[],o=[]){var i;lo(this,"allowed",void 0),lo(this,"banned",void 0),lo(this,"blocked",void 0),lo(this,"container",void 0),lo(this,"content",[]),lo(this,"props",void 0),lo(this,"matchers",void 0),lo(this,"filters",void 0),lo(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new Gy],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Ky),this.banned=new Set(jy),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let c=l.asTag().toLowerCase(),u=this.getTagConfig(c);if(o[l.inverseName]||!this.isTagAllowed(c)||!this.canRenderChild(n,u))return;let d="";for(;i&&(a=l.match(i));){let f=a,{index:p,length:v,match:m,valid:x,void:y}=f,g=oe(f,["index","length","match","valid","void"]),h=l.propName+String(s);p>0&&(d+=i.slice(0,p)),x?(d+=y?`{{{${h}/}}}`:`{{{${h}}}}${m}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:m,matcher:l,props:P(S(S({},o),g),{key:this.keyIndex})}):d+=m,l.greedy?(i=d+i.slice(p+v),d=""):i=i.slice(p+(v||m.length))}l.greedy||(i=d+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
15
+ `,zi.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));h=u.options[w]||u.options.other}if(!h)throw new Oy(u.value,f,Object.keys(u.options),s);a.push.apply(a,cc(h.value,t,n,r,o,f-(u.offset||0)));continue}}return a_(a)}function c_(e,t){return t?En(En(En({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=En(En({},e[r]),t[r]||{}),n},{})):e}function u_(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=c_(e[r],t[r]),n},En({},e)):e}function Ny(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function d_(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.number),strategy:Tf.variadic}),getDateTimeFormat:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.dateTime),strategy:Tf.variadic}),getPluralRules:Ef(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,bf([void 0],n,!1)))},{cache:Ny(e.pluralRules),strategy:Tf.variadic})}}var My=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=i.formatToParts(c);if(u.length===1)return u[0].value;var d=u.reduce(function(f,p){return!f.length||p.type!==Ot.literal||typeof f[f.length-1]!="string"?f.push(p.value):f[f.length-1]+=p.value,f},[]);return d.length<=1?d[0]||"":d},this.formatToParts=function(c){return cc(i.ast,i.locales,i.formatters,i.formats,c,void 0,i.message)},this.resolvedOptions=function(){var c;return{locale:((c=i.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(i.locales)[0]}},this.getAst=function(){return i.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t=="string"){if(this.message=t,!e.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var s=o||{},a=s.formatters,l=nT(s,["formatters"]);this.ast=e.__parse(t,En(En({},l),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=u_(e.formats,r),this.formatters=o&&o.formatters||d_(this.formatterCache)}return Object.defineProperty(e,"defaultLocale",{get:function(){return e.memoizedDefaultLocale||(e.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(t){if(typeof Intl.Locale!="undefined"){var n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])}},e.__parse=sT,e.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"}}},e}();function f_(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var p_="dummy",_y=(0,Af.createContext)(null);function ue(e){var r;let t=(0,Af.useContext)(_y);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=(r=e[t])!=null?r:{};return(o,i)=>{let s=f_(n,o);return s?new My(s).format(i):(t!==p_&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}var If=b(Q());var cT={root:"dd-tvkOF",content:"dd-eXA1D"};var Dy=b(R()),m_=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,If.useRef)(null),c=_("Dialog",cT),u=f=>{if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),o();return}i&&i(f)},d=f=>{f.target===l.current&&e&&r()};return(0,If.useEffect)(()=>{var f,p;!l.current||!e||!t||(p=(f=l.current)==null?void 0:f.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,Dy.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":s,ref:l,onKeyDown:u,onMouseDown:d,children:(0,Dy.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},Lf=m_;var dT=b(Me());var uT={root:"dd-ranhW"};var fT=b(R()),g_=r=>{var o=r,{className:e,value:t}=o,n=oe(o,["className","value"]);let i=_("TextInput",uT);return(0,fT.jsx)("input",S({className:(0,dT.default)(e,i.root),type:"text",value:t},n))},uc=g_;var Fy={};kt(Fy,{enUS:()=>h_,nlNL:()=>y_});var h_={back:[{type:0,value:"Back"}],promptTitle:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Paste the code from your email"}],verifyCodeBody:[{type:0,value:"Copy the code from the email you just received and paste it here."}],verifyCodeInputPlaceholder:[{type:0,value:"Paste link or code here"}],verifyCodeSubmitLabel:[{type:0,value:"Sign in"}],verifyCodeError:[{type:0,value:"Sign in failed. The code is probably no longer valid. Please "},{type:8,value:"login",children:[{type:0,value:"request new code"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Have a code sent to your email"}],requestCodeBody:[{type:0,value:"Enter your email and request a code. If you are an existing "},{type:1,value:"productName"},{type:0,value:" user you will receive an email with a code. If you are a new user you will receive an email asking to request access to "},{type:1,value:"productName"},{type:0,value:" first."}],requestCodeInputPlaceholder:[{type:0,value:"Enter your email"}],requestCodeSubmitLabel:[{type:0,value:"Request code"}]},y_={back:[{type:0,value:"Terug"}],promptTitle:[{type:0,value:"Login bij "},{type:1,value:"productName"}],verifyCodeTitle:[{type:0,value:"Plak de code uit je email"}],verifyCodeBody:[{type:0,value:"Kopieer de code uit de email en plak deze hier."}],verifyCodeInputPlaceholder:[{type:0,value:"Plak hier de code"}],verifyCodeSubmitLabel:[{type:0,value:"Inloggen"}],verifyCodeError:[{type:0,value:"Inloggen is niet gelukt. De code is waarschijnlijk niet meer geldig. "},{type:8,value:"login",children:[{type:0,value:"Vraag een nieuwe code aan"}]},{type:0,value:"."}],requestCodeTitle:[{type:0,value:"Verstuur een login code naar je email"}],requestCodeBody:[{type:0,value:"Voer je e-mailadres in en krijg een login code. Als je een bestaande "},{type:1,value:"productName"},{type:0,value:" gebruiker bent krijg je een email met een code. Als je een nieuwe gebruiker bent wordt er een email verstuurd met een toegangsverzoek voor "},{type:1,value:"productName"},{type:0,value:"."}],requestCodeInputPlaceholder:[{type:0,value:"Typ hier je e-mailadres"}],requestCodeSubmitLabel:[{type:0,value:"Code aanvragen"}]};var pT={root:"dd-lWxnE",anchorButton:"dd-TZ4in",errorMessage:"dd-fIsPg",title:"dd-pGhJx",subtitle:"dd-f5l29",text:"dd-iamoD",input:"dd-uhQZ3",actions:"dd-lubvx",button:"dd-CJsNI",primaryButton:"dd-MWBfl"};var tt=b(R());var v_=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},x_=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=ue(Fy),s=_("LoginTokenDialog",pT),a=j(u1),l=ve(),c=te("productName"),[u,d]=(0,tr.useState)(e||""),[f,p]=(0,tr.useState)(0),[v,g]=(0,tr.useState)(""),x=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault(),l(f1({email:u})),p(1)}),[n,u]),y=()=>{g(""),p(0)},m=(0,tr.useCallback)(w=>I(void 0,null,function*(){w.preventDefault();let E=v_(w.target.elements.token.value);if(!E){g(i("verifyCodeError",{login:h}));return}l(ql({token:E}))}),[n]),h=(0,tr.useMemo)(()=>w=>(0,tt.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:y,children:w},"back-button"),[]);return(0,tr.useEffect)(()=>{a==="error"&&g(i("verifyCodeError",{login:h})),a==="done"&&r()},[a]),(0,tt.jsx)(Lf,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:c}),overlayAriaLabel:i("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,tt.jsxs)("div",{className:s.root,children:[(0,tt.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:c})}),f===0&&(0,tt.jsxs)("form",{onSubmit:x,children:[(0,tt.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,tt.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:c})}),(0,tt.jsx)(uc,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:u,onChange:w=>d(w.target.value)}),(0,tt.jsx)("div",{className:s.actions,children:(0,tt.jsx)("button",{type:"submit",className:(0,Of.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),f===1&&(0,tt.jsxs)("form",{onSubmit:m,children:[(0,tt.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,tt.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,tt.jsx)(uc,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,tt.jsx)("div",{className:s.errorMessage,children:v}),(0,tt.jsxs)("div",{className:s.actions,children:[(0,tt.jsx)("button",{type:"button",className:(0,Of.default)(s.button),onClick:y,children:i("back")}),(0,tt.jsx)("button",{type:"submit",className:(0,Of.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},mT=x_;var hT=b(R()),w_=()=>{let e=j(d1),t=j(ca),n=te("adminUrl"),r=un(),o=()=>r.send(ua,!1),i=()=>{r.send(ua,!1),r.send(Zl)};return(0,hT.jsx)(mT,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},gT=w_;var CR=b(By()),Xt=b(Q());var dc="__summarizerAssistant__",wT={cues:[],threads:{},pending:[]},ST=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var fc=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},Nf=st("assistants/callToAction"),oo=ge("assistants/evaluateSummaryAssistant",(e,t)=>I(void 0,null,function*(){let r=t.getState().profile.data;if(!r)throw new Error("No Profile is loaded");let{summarizerAssistantNew:o}=r;if(!o)throw new Error("No Summarizer Assistant set in Profile");let i=yield t.dispatch(nr(S({assistantCode:o,expectFormat:"text",transcript:"in-memory-transcript",skipState:!0},e)));if(i.error)throw new Error(i.error.message);if(typeof i.payload!="string")throw ee.warn("Unexpected summary output",i),new Error("Unexpected summary output");return i.payload})),z_=1,Hi=ge("assistants/evaluateKnowledgeAssistantLegacy",(e,t)=>I(void 0,null,function*(){var p,v,g,x;let{threadId:n}=e,{onNewThreadId:r,input:o}=e,{deepdeskAPI:i}=t.extra,s=t.getState(),{platformVariables:a}=s.info;n||(n=z_++,r&&r(n));let l=(p=fc(n)(s))!=null?p:[],c=yield i.getKnowledgeAssistant(e.assistantCode),u=(v=s.conversation.current)==null?void 0:v.externalId,d=(x=(g=s.info)==null?void 0:g.agentInfo)==null?void 0:x.agentId;if(!c)throw new Error("KnowledgeAssistant is not found");let f=yield i.knowledgeAssist({customerInstruction:c.customerInstruction,doNotKnowAnswer:c.doNotKnowAnswer,question:o},l,c.code,{agentId:d,conversationId:u});return a&&(f.answer=cn(f.answer,a)),{threadId:n,question:o,answer:f}})),Bi=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>I(void 0,null,function*(){let{threadId:n}=e,{onNewThreadId:r}=e,{deepdeskAPI:o}=t.extra,i=t.getState(),{platformVariables:s}=i.info;n||(n=(yield o.createAssistantThread({assistantCode:e.assistantCode})).id,r&&r(n)),yield o.postMessageToAssistantThread({assistantCode:e.assistantCode,threadId:n,message:e.input});let a=yield t.dispatch(nr(P(S({expectFormat:"json-schema:knowledge-assist",skipState:!0},e),{input:{},threadId:n})));if(a.error)throw new Error(a.error.message);let l=a.payload;return{threadId:n,question:e.input,answer:{answer:cn(l.response,s!=null?s:{}),sources:l.sources}}})),nr=ge("assistants/evaluate",(e,t)=>I(void 0,null,function*(){var p;let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra,{transcript:o,input:i={},expectFormat:s,threadId:a}=e,l=t.getState(),{platformVariables:c}=l.info,u=(p=l.conversation.current)==null?void 0:p.externalId,d;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");d=yield r.conversationQuery()}else Array.isArray(o)&&(d=o);if(e.includeMetadata){if(!l.conversation.current)throw new Error("Can't include metadata, no current conversation");let{metadata:v}=l.conversation.current;Object.assign(i,{metadata:v})}let f=yield n.evaluateAssistant(e.assistantCode,{expectFormat:s,input:i,transcript:d,externalConversationId:u,threadId:a});switch(s){case"text":return cn(f,c);case"json-schema:cues":return Array.isArray(f)?f.map(v=>P(S({},v),{name:cn(v.name,c),response:cn(v.response,c)})):[];case"json-schema:knowledge-assist":{let v=f;return P(S({},v),{answer:cn(v.response,c)})}default:return f}})),bT=ke({name:"assistants",initialState:wT,reducers:{resetCues(e){e.cues=[]},removeCueByCode(e,t){e.cues=e.cues.filter(n=>n.code!==t.payload.code)},removeThreadById(e,t){delete e.threads[t.payload]}},extraReducers:e=>{e.addCase(nr.pending,(t,n)=>{t.pending.includes(n.meta.arg.assistantCode)&&ee.warn(`Assistant ${n.meta.arg.assistantCode} already evaluating`),t.pending.push(n.meta.arg.assistantCode)}).addCase(nr.rejected,(t,n)=>{var o;ee.warn((o=n.error)==null?void 0:o.message);let r=t.pending.indexOf(n.meta.arg.assistantCode);r!==-1&&t.pending.splice(r,1)}).addCase(nr.fulfilled,(t,n)=>{let r=t.pending.indexOf(n.meta.arg.assistantCode);if(r!==-1&&t.pending.splice(r,1),!n.meta.arg.skipState)switch(n.meta.arg.expectFormat){case"json-schema:cues":{let o=n.payload,i=o.map(a=>a.code),s=t.cues.filter(a=>!i.includes(a.code));t.cues=[...s,...o];break}}}).addCase(Bi.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=oe(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(Hi.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=oe(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(oo.pending,t=>{let n={code:dc,name:"Summary",response:"",isLoading:!0},r=t.cues.filter(o=>o.code!==dc);t.cues=[...r,n]}).addCase(oo.rejected,t=>{let n=t.cues.filter(r=>r.code!==dc);t.cues=n}).addCase(oo.fulfilled,(t,n)=>{let r={code:dc,name:"Summary",response:n.payload,specialType:"summary"},o=t.cues.filter(i=>i.code!==dc);t.cues=[...o,r]}).addCase(at,()=>wT)}}),{removeCueByCode:ET,resetCues:sH,removeThreadById:da}=bT.actions,TT=bT.reducer;var H_={data:null,fetchState:"idle"},CT=e=>e.contentTypes.data,pc=ge("contentTypes/getContentTypes",(e,t)=>I(void 0,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),B_=ke({name:"contentTypes",initialState:H_,reducers:{},extraReducers:e=>{e.addCase(pc.pending,t=>{t.fetchState="loading"}).addCase(pc.rejected,t=>{t.fetchState="error"}).addCase(pc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),kT=B_.reducer;var U_={data:null,fetchState:"idle"},V_=[],Ui=e=>e.profile.data,$_=e=>e.profile.data?e.profile.data.uiConfig.widget.types:V_,gc=Dn([$_],e=>e.filter(t=>t.isActive)),RT=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.summarizerAssistantNew)!=null?n:null},PT=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},AT=e=>t=>gc(t).find(n=>n.type===e),IT=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,Mf=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew)!=null?n:null},_f=e=>{var t,n;return(n=(t=e.profile.data)==null?void 0:t.knowledgeAssistant)!=null?n:null},mc=ge("profile/getProfile",(e,t)=>I(void 0,null,function*(){var i;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return((i=r.profile.data)==null?void 0:i.code)===o.profileCode?r.profile.data:n.getProfile(o.profileCode)})),j_=ke({name:"profile",initialState:U_,reducers:{},extraReducers:e=>{e.addCase(mc.pending,t=>{t.fetchState="loading"}).addCase(mc.rejected,t=>{t.fetchState="error"}).addCase(mc.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),LT=j_.reducer;function Ar(e){let t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select(),document.execCommand("copy"),t.remove()}var uo=b(Q());var OT=b(Q()),Df=b(Me());var Tn={root:"dd-U2SX4",list:"dd-cYTlj",listWrapper:"dd-GLQFR",listHorizontal:"dd-x-knl",page:"dd-1F4vk",search:"dd-nvbxc",pageNav:"dd-sRUuT",pageTitle:"dd-t-MKS",pageBackButton:"dd-cjptm",listHeader:"dd-Fg666",listHeading:"dd-w-xhJ",listMoreButton:"dd--mKep",listItem:"dd-wpvuA",listItemContent:"dd-V-mKo",listItemText:"dd-ukCHL",listItemDescription:"dd-sSyu4",listItemActions:"dd-xelho",listItemTooltip:"dd-SWFsE",listItemTooltipContent:"dd-I7J9N",truncate:"dd-IlopJ",lineClamp:"dd-Twaca",listItemTitle:"dd-lMGHq",listItemAction:"dd-xPLAs",listItemSelected:"dd-jFX0Y",sources:"dd-pZx4v",sourcesTitle:"dd-phYVd",source:"dd-DaR6h",sourceShowMore:"dd-M1-8j",icon:"dd-m6yxD",searchIcon:"dd-0AU-O",searchInputWrapper:"dd-DUFcE",searchInput:"dd-ukrlD",select:"dd--Tifv",selectType:"dd-IkZb2",selectWrapper:"dd-J14mx",image:"dd-RQgsB",imageSrc:"dd-jxh8F",imageSrcHidden:"dd-e20Jk",imageSrcStatus:"dd-j50Tt",imageTitle:"dd-qCjfW",actions:"dd-3mfWc",actionsWrapper:"dd-TjDyI",actionsBar:"dd-LiA35",actionButton:"dd-4wk0u",hasShortKeys:"dd-XilV-",actionShortcut:"dd-s4Mla",actionShortcutFixKerning:"dd-lyh5e"};var io={};kt(io,{enUS:()=>W_,nlNL:()=>K_});var W_={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}],sources:[{type:0,value:"Sources"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},K_={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}],sources:[{type:0,value:"Bronnen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var Zo=b(R()),G_=({src:e,title:t})=>{let n=_("CommandPalette",Tn),[r,o]=(0,OT.useState)("loading"),i=ue(io);return(0,Zo.jsxs)("div",{className:n.image,children:[(0,Zo.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Df.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Zo.jsx)("span",{className:(0,Df.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Zo.jsx)("span",{className:(0,Df.default)(n.imageSrc,n.imageSrcStatus),children:(0,Zo.jsx)(Eu,{})}),t&&(0,Zo.jsx)("span",{className:n.imageTitle,children:t})]})},NT=G_;var MT=b(Q()),_T=b(Me());var Vi=b(R());function Uy({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=ue(io),s=_("CommandPalette",Tn);return MT.default.Children.count(e)===0?null:(0,Vi.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Vi.jsxs)("div",{className:s.listHeader,children:[t&&(0,Vi.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Vi.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Vi.jsx)("div",{className:(0,_T.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var Ac=b(Me());var Ff=b(Q());function hc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Re=1,$y=2,jy=4,lt=8,zf=16,yc=32,rr=64,Vy={a:{content:Re|lt,self:!1,type:Re|lt|yc|rr},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:Re|lt,void:!0},body:{content:Re|$y|jy|lt|zf|yc|rr},button:{content:lt,type:Re|lt|yc|rr},caption:{content:Re,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:Re|yc|rr},dd:{content:Re,parent:["dl"]},dl:{children:["dt","dd"],type:Re},dt:{content:Re,invalid:["footer","header"],parent:["dl"]},figcaption:{content:Re,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:Re,void:!0},img:{void:!0},li:{content:Re,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:Re},picture:{children:["source","img"],type:Re|lt|zf},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:lt,parent:["ruby","rtc"]},rtc:{content:lt,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:lt,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:Re},tbody:{parent:["table"],children:["tr"]},td:{content:Re,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:Re,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:Re},video:{children:["track","source"]},wbr:{type:Re|lt,void:!0}};function ji(e){return t=>{Vy[t]=S(S({},e),Vy[t])}}["address","main","div","figure","p","pre"].forEach(ji({content:Re,type:Re|rr}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(ji({content:lt,type:Re|lt|rr}));["p","pre"].forEach(ji({content:lt,type:Re|rr}));["s","small","span","del","ins"].forEach(ji({content:lt,type:Re|lt}));["article","aside","footer","header","nav","section","blockquote"].forEach(ji({content:Re,type:Re|$y|rr}));["h1","h2","h3","h4","h5","h6"].forEach(ji({content:lt,type:Re|jy|rr}));["audio","canvas","iframe","img","video"].forEach(ji({type:Re|lt|zf|rr}));var xc=Object.freeze(Vy),Wy=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Ky=Object.keys(xc).filter(e=>e!=="canvas"&&e!=="iframe"),Oe=1,Gy=2,$i=3,Jo=4,Bf=5,Uf=Object.freeze({alt:Oe,cite:Oe,class:Oe,colspan:$i,controls:Jo,datetime:Oe,default:Jo,disabled:Jo,dir:Oe,height:Oe,href:Oe,id:Oe,kind:Oe,label:Oe,lang:Oe,loading:Oe,loop:Jo,media:Oe,muted:Jo,poster:Oe,rel:Oe,role:Oe,rowspan:$i,scope:Oe,sizes:Oe,span:$i,start:$i,style:Bf,src:Oe,srclang:Oe,srcset:Oe,tabindex:Oe,target:Oe,title:Oe,type:Oe,width:Oe}),qy=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Hf(){return Hf=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hf.apply(this,arguments)}function Vf({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Ff.default.createElement(i,Hf({className:t},e)):Ff.default.createElement(i,Hf({className:t},e),n)}var vc=class{attribute(t,n){return n}node(t,n){return n}};function DT(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?P(S({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var so=class{constructor(t,n,r){hc(this,"greedy",!1),hc(this,"options",void 0),hc(this,"propName",void 0),hc(this,"inverseName",void 0),hc(this,"factory",void 0),this.options=S({},n),this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r!=null?r:null}createElement(t,n){return this.factory?Ff.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return DT(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Wi=b(Q()),BT=b(zT());function ao(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X_=/(url|image|image-set)\(/i,Yy=class extends vc{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(X_)&&delete n[r]}),n}},HT=1,Q_=3,Z_=/^<(!doctype|(html|head|body)(\s|>))/i,J_=/^(aria-|data-|\w+:)/iu,e2=/{{{(\w+)\/?}}}/;function t2(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var $f=class{constructor(t,n={},r=[],o=[]){var i;ao(this,"allowed",void 0),ao(this,"banned",void 0),ao(this,"blocked",void 0),ao(this,"container",void 0),ao(this,"content",[]),ao(this,"props",void 0),ao(this,"matchers",void 0),ao(this,"filters",void 0),ao(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new Yy],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Ky),this.banned=new Set(Wy),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let c=l.asTag().toLowerCase(),u=this.getTagConfig(c);if(o[l.inverseName]||!this.isTagAllowed(c)||!this.canRenderChild(n,u))return;let d="";for(;i&&(a=l.match(i));){let f=a,{index:p,length:v,match:g,valid:x,void:y}=f,m=oe(f,["index","length","match","valid","void"]),h=l.propName+String(s);p>0&&(d+=i.slice(0,p)),x?(d+=y?`{{{${h}/}}}`:`{{{${h}}}}${g}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:g,matcher:l,props:P(S(S({},o),m),{key:this.keyIndex})}):d+=g,l.greedy?(i=d+i.slice(p+v),d=""):i=i.slice(p+(v||g.length))}l.greedy||(i=d+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
16
16
  `);return o=o.replace(/\n{3,}/g,`
17
17
 
18
18
 
19
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||o2)();if(!o)return;let i=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",s=i==="body"||i==="fragment"?o.body:o.createElement(i);return t.match(t2)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,BT.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==HT||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),c=Hf[l]||Hf[s];if(!this.isSafe(t)||!l.match(n2)&&(!n&&(!c||c===Wy)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u=l==="style"?this.extractStyleAttribute(t):a;c===Jo?u=!0:c===Vi?u=Number.parseFloat(String(u)):c!==zf&&(u=String(u)),r[qy[l]||l]=this.applyAttributeFilters(l,u),o+=1}),o===0)?null:r}extractStyleAttribute(t){let n={};return Array.from(t.style).forEach(r=>{let o=t.style[r];(typeof o=="string"||typeof o=="number")&&(n[r.replace(/-([a-z])/g,(i,s)=>String(s).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return xc[t]?P(S(S({},n),xc[t]),{tagName:t}):n}isSafe(t){if(typeof HTMLAnchorElement!="undefined"&&t instanceof HTMLAnchorElement){let n=t.getAttribute("href");if(n!=null&&n.startsWith("#"))return!0;let r=t.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(t){return this.banned.has(t)||this.blocked.has(t)?!1:this.props.allowElements||this.allowed.has(t)}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(t,n){let{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:s,transformOnlyAllowList:a}=this.props,l=[],c="";return[...t.childNodes].forEach(u=>{if(u.nodeType===HT){let f=u.nodeName.toLowerCase(),p=this.getTagConfig(f);c&&(l.push(c),c="");let v=this.applyNodeFilters(f,u);if(!v)return;let m;if(s&&!(a&&!this.isTagAllowed(f))){this.keyIndex+=1;let x=this.keyIndex;m=this.parseNode(v,p);let y=s(v,m,p);if(y===null)return;if(typeof y!="undefined"){l.push(ji.default.cloneElement(y,{key:x}));return}this.keyIndex=x-1}if(this.banned.has(f))return;if(!(r||o&&f!=="br")&&this.isTagAllowed(f)&&(i||this.canRenderChild(n,p))){var d;this.keyIndex+=1;let x=this.extractAttributes(v),y={tagName:f};x&&(y.attributes=x),p.void&&(y.selfClose=p.void),l.push(ji.default.createElement(Bf,P(S({},y),{key:this.keyIndex}),(d=m)!==null&&d!==void 0?d:this.parseNode(v,p)))}else l=[...l,...this.parseNode(v,p.tagName?p:n)]}else if(u.nodeType===e2){let f=r&&!o?u.textContent:this.applyMatchers(u.textContent||"",n);Array.isArray(f)?l=[...l,...f]:c+=f}}),c&&l.push(c),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(r2);){let[s,a]=i,l=i.index,c=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:u,matcher:d,props:f}=n[a],p;if(c)p=s.length,r.push(d.createElement(u,f));else{let v=o.match(new RegExp(`{{{/${a}}}}`));p=v.index+v[0].length,r.push(d.createElement(this.replaceTokens(o.slice(s.length,v.index),n),f))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function i2(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:c}=e,u=(t=o!=null?o:l)!==null&&t!==void 0?t:"span",d=u==="fragment"?!0:c,f;if(a)f=a;else{let p=new Uf(i!=null?i:"",e).parse();p.length>0&&(f=p)}return f||(f=s),d?ji.default.createElement(ji.default.Fragment,null,f):ji.default.createElement(Bf,{attributes:n,className:r,tagName:u},f)}function Ki(e){let E=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1}=E,p=oe(E,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),v=i?[]:l,m=o?[]:a,x=u?[u]:[],y=c?[c]:[];v.forEach(C=>{C.onBeforeParse&&x.push(C.onBeforeParse.bind(C)),C.onAfterParse&&y.push(C.onAfterParse.bind(C))});let g=x.reduce((C,k)=>k(C,e),r!=null?r:""),h=new Uf(g,p,v,m),w=y.reduce((C,k)=>k(C,e),h.parse());return ji.default.createElement(i2,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:f,parsedContent:w.length===0?void 0:w,tagName:d})}var Ic=b(Z());var s2=/[.*+?^${}()|[\]\\]/g,a2=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function l2(e){return e.replace(s2,"\\$&")}function c2(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function u2(e){return e.search(a2)}function UT(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${l2(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function VT(e){return e.replace(ku,'<mark data-type="placeholder">$1</mark>')}function da(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function d2(e,t){return e.split("").map((s,a)=>({char:s,index:a})).filter(({char:s,index:a})=>/\s/.test(s)&&a<=t).map(({index:s})=>s).reverse()[0]}function Yy(e,t,n={}){if(t){let r=c2(t.toLowerCase(),e.toLowerCase()),o=da(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),c=u2(l);return`<span style="opacity: 0.5">${l.substring(c+1)}</span>${o}`}let s=t.split(Vx).length>3||t.length>30?d2(t.trim(),r):0;return`${`${s>0?"\u2026":""}${da(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var f2=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Vf(e){return f2.test(e)}function $T(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var $f=b(Z()),WT=b(R()),jT=$f.default.createContext(void 0);function ei(){let e=$f.default.useContext(jT);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var KT=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=$f.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,WT.jsx)(jT.Provider,{value:s,children:e})};var _r=b(Z());var _=b(Z(),1),Ea=b(Z(),1);function Kf(){return typeof window!="undefined"}function Lr(e){return qT(e)?(e.nodeName||"").toLowerCase():"#document"}function $t(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sr(e){var t;return(t=(qT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qT(e){return Kf()?e instanceof Node||e instanceof $t(e).Node:!1}function Oe(e){return Kf()?e instanceof Element||e instanceof $t(e).Element:!1}function Xe(e){return Kf()?e instanceof HTMLElement||e instanceof $t(e).HTMLElement:!1}function jf(e){return!Kf()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof $t(e).ShadowRoot}function fa(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function GT(e){return["table","td","th"].includes(Lr(e))}function wc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function Wf(e){let t=pa(),n=Oe(e)?fn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function YT(e){let t=ir(e);for(;Xe(t)&&!ar(t);){if(Wf(t))return t;if(wc(t))return null;t=ir(t)}return null}function pa(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function ar(e){return["html","body","#document"].includes(Lr(e))}function fn(e){return $t(e).getComputedStyle(e)}function Sc(e){return Oe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ir(e){if(Lr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||jf(e)&&e.host||sr(e);return jf(t)?t.host:t}function XT(e){let t=ir(e);return ar(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&fa(t)?t:XT(t)}function Cn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=XT(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=$t(o);if(i){let a=qf(s);return t.concat(s,s.visualViewport||[],fa(o)?o:[],a&&n?Cn(a):[])}return t.concat(o,Cn(o,[],n))}function qf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ti(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function gt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&jf(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function QT(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Qy(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function ZT(e){return e.mozInputSource===0&&e.isTrusted?!0:Xy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function JT(e){return p2()?!1:!Xy()&&e.width===0&&e.height===0||Xy()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function eC(){return/apple/i.test(navigator.vendor)}function Xy(){let e=/android/i;return e.test(QT())||e.test(Qy())}function p2(){return Qy().includes("jsdom/")}function ma(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function tC(e){return"nativeEvent"in e}function nC(e){return e.matches("html,body")}function ht(e){return(e==null?void 0:e.ownerDocument)||document}function Gf(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function co(e){return"composedPath"in e?e.composedPath()[0]:e.target}var m2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Zy(e){return Xe(e)&&e.matches(m2)}function Yf(e){e.preventDefault(),e.stopPropagation()}function Jy(e){return e?e.getAttribute("role")==="combobox"&&Zy(e):!1}var ga=Math.min,uo=Math.max,Ec=Math.round,Tc=Math.floor,lr=e=>({x:e,y:e}),g2={left:"right",right:"left",bottom:"top",top:"bottom"},h2={start:"end",end:"start"};function ev(e,t,n){return uo(e,ga(t,n))}function Cc(e,t){return typeof e=="function"?e(t):e}function ni(e){return e.split("-")[0]}function kc(e){return e.split("-")[1]}function tv(e){return e==="x"?"y":"x"}function nv(e){return e==="y"?"height":"width"}function Wi(e){return["top","bottom"].includes(ni(e))?"y":"x"}function rv(e){return tv(Wi(e))}function rC(e,t,n){n===void 0&&(n=!1);let r=kc(e),o=rv(e),i=nv(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=bc(s)),[s,bc(s)]}function oC(e){let t=bc(e);return[Xf(e),t,Xf(t)]}function Xf(e){return e.replace(/start|end/g,t=>h2[t])}function y2(e,t,n){let r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function iC(e,t,n,r){let o=kc(e),i=y2(ni(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Xf)))),i}function bc(e){return e.replace(/left|right|bottom|top/g,t=>g2[t])}function v2(e){return S({top:0,right:0,bottom:0,left:0},e)}function sC(e){return typeof e!="number"?v2(e):{top:e,right:e,bottom:e,left:e}}function qi(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var mn=b(R(),1);var x2=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Qf=x2.join(","),lC=typeof Element=="undefined",ha=lC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Zf=!lC&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Jf=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},w2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},S2=function(t,n,r){if(Jf(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Qf));return n&&ha.call(t,Qf)&&o.unshift(t),o=o.filter(r),o},b2=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Jf(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=ha.call(s,Qf);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!Jf(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},cC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},uC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||w2(t))&&!cC(t)?0:t.tabIndex},E2=function(t,n){var r=uC(t);return r<0&&n&&!cC(t)?0:r},T2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},dC=function(t){return t.tagName==="INPUT"},C2=function(t){return dC(t)&&t.type==="hidden"},k2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},R2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},P2=function(t){if(!t.name)return!0;var n=t.form||Zf(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window!="undefined"&&typeof window.CSS!="undefined"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=R2(o,t.form);return!i||i===t},A2=function(t){return dC(t)&&t.type==="radio"},I2=function(t){return A2(t)&&!P2(t)},L2=function(t){var n,r=t&&Zf(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=Zf(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},aC=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},_2=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ha.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(ha.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=Zf(t);if(l&&!l.shadowRoot&&o(l)===!0)return aC(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(L2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aC(t);return!1},O2=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ha.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},N2=function(t,n){return!(n.disabled||Jf(n)||C2(n)||_2(n,t)||k2(n)||O2(n))},ov=function(t,n){return!(I2(n)||uC(n)<0||!N2(t,n))},M2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},D2=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=E2(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(T2).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Rc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=b2([t],n.includeContainer,{filter:ov.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:M2}):r=S2(t,n.includeContainer,ov.bind(null,n)),D2(r)};var fC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ha.call(t,Qf)===!1?!1:ov(n,t)};var xv=b(Ul(),1);function pC(e,t,n){let{reference:r,floating:o}=e,i=Wi(t),s=rv(t),a=nv(s),l=ni(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(kc(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}var mC=(e,t,n)=>I(void 0,null,function*(){let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield s.isRTL==null?void 0:s.isRTL(t),c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=pC(c,r,l),f=r,p={},v=0;for(let m=0;m<a.length;m++){let{name:x,fn:y}=a[m],{x:g,y:h,data:w,reset:E}=yield y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=g!=null?g:u,d=h!=null?h:d,p=P(S({},p),{[x]:S(S({},p[x]),w)}),E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=pC(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}});function iv(e,t){return I(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Cc(t,e),v=sC(p),x=a[f?d==="floating"?"reference":"floating":d],y=qi(yield i.getClippingRect({element:(n=yield i.isElement==null?void 0:i.isElement(x))==null||n?x:x.contextElement||(yield i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,h=yield i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating),w=(yield i.isElement==null?void 0:i.isElement(h))?(yield i.getScale==null?void 0:i.getScale(h))||{x:1,y:1}:{x:1,y:1},E=qi(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:h,strategy:l}):g);return{top:(y.top-E.top+v.top)/w.y,bottom:(E.bottom-y.bottom+v.bottom)/w.y,left:(y.left-E.left+v.left)/w.x,right:(E.right-y.right+v.right)/w.x}})}var gC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return I(this,null,function*(){var r,o;let{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,z=Cc(e,n),{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:x=!0}=z,y=oe(z,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=s.arrow)!=null&&r.alignmentOffset)return{};let g=ni(i),h=Wi(l),w=ni(l)===l,E=yield c.isRTL==null?void 0:c.isRTL(u.floating),C=p||(w||!x?[bc(l)]:oC(l)),k=m!=="none";!p&&k&&C.push(...iC(l,x,m,E));let A=[l,...C],F=yield iv(n,y),N=[],O=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&N.push(F[g]),f){let ie=rC(i,a,E);N.push(F[ie[0]],F[ie[1]])}if(O=[...O,{placement:i,overflows:N}],!N.every(ie=>ie<=0)){var G,W;let ie=(((G=s.flip)==null?void 0:G.index)||0)+1,Y=A[ie];if(Y)return{data:{index:ie,overflows:O},reset:{placement:Y}};let V=(W=O.filter(U=>U.overflows[0]<=0).sort((U,q)=>U.overflows[1]-q.overflows[1])[0])==null?void 0:W.placement;if(!V)switch(v){case"bestFit":{var L;let U=(L=O.filter(q=>{if(k){let $=Wi(q.placement);return $===h||$==="y"}return!0}).map(q=>[q.placement,q.overflows.filter($=>$>0).reduce(($,K)=>$+K,0)]).sort((q,$)=>q[1]-$[1])[0])==null?void 0:L[0];U&&(V=U);break}case"initialPlacement":V=l;break}if(i!==V)return{reset:{placement:V}}}return{}})}}};function F2(e,t){return I(this,null,function*(){let{placement:n,platform:r,elements:o}=e,i=yield r.isRTL==null?void 0:r.isRTL(o.floating),s=ni(n),a=kc(n),l=Wi(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=Cc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}})}var hC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return I(this,null,function*(){var r,o;let{x:i,y:s,placement:a,middlewareData:l}=n,c=yield F2(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:P(S({},c),{placement:a})}})}}},yC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return I(this,null,function*(){let{x:r,y:o,placement:i}=n,y=Cc(e,n),{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:g=>{let{x:h,y:w}=g;return{x:h,y:w}}}}=y,c=oe(y,["mainAxis","crossAxis","limiter"]),u={x:r,y:o},d=yield iv(n,c),f=Wi(ni(i)),p=tv(f),v=u[p],m=u[f];if(s){let g=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=v+d[g],E=v-d[h];v=ev(w,v,E)}if(a){let g=f==="y"?"top":"left",h=f==="y"?"bottom":"right",w=m+d[g],E=m-d[h];m=ev(w,m,E)}let x=l.fn(P(S({},n),{[p]:v,[f]:m}));return P(S({},x),{data:{x:x.x-r,y:x.y-o,enabled:{[p]:s,[f]:a}}})})}}};function wC(e){let t=fn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Xe(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ec(n)!==i||Ec(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function av(e){return Oe(e)?e:e.contextElement}function ya(e){let t=av(e);if(!Xe(t))return lr(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wC(t),s=(i?Ec(n.width):n.width)/r,a=(i?Ec(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var z2=lr(0);function SC(e){let t=$t(e);return!pa()||!t.visualViewport?z2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function H2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$t(e)?!1:t}function Gi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=av(e),s=lr(1);t&&(r?Oe(r)&&(s=ya(r)):s=ya(e));let a=H2(i,n,r)?SC(i):lr(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){let f=$t(i),p=r&&Oe(r)?$t(r):r,v=f,m=qf(v);for(;m&&r&&p!==v;){let x=ya(m),y=m.getBoundingClientRect(),g=fn(m),h=y.left+(m.clientLeft+parseFloat(g.paddingLeft))*x.x,w=y.top+(m.clientTop+parseFloat(g.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=h,c+=w,v=$t(m),m=qf(v)}}return qi({width:u,height:d,x:l,y:c})}function lv(e,t){let n=Sc(e).scrollLeft;return t?t.left+n:Gi(sr(e)).left+n}function bC(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:lv(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function B2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=sr(r),a=t?wc(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=lr(1),u=lr(0),d=Xe(r);if((d||!d&&!i)&&((Lr(r)!=="body"||fa(s))&&(l=Sc(r)),Xe(r))){let p=Gi(r);c=ya(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let f=s&&!d&&!i?bC(s,l,!0):lr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function U2(e){return Array.from(e.getClientRects())}function V2(e){let t=sr(e),n=Sc(e),r=e.ownerDocument.body,o=uo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=uo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+lv(e),a=-n.scrollTop;return fn(r).direction==="rtl"&&(s+=uo(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function $2(e,t){let n=$t(e),r=sr(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let c=pa();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function j2(e,t){let n=Gi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Xe(e)?ya(e):lr(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function vC(e,t,n){let r;if(t==="viewport")r=$2(e,n);else if(t==="document")r=V2(sr(e));else if(Oe(t))r=j2(t,n);else{let o=SC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qi(r)}function EC(e,t){let n=ir(e);return n===t||!Oe(n)||ar(n)?!1:fn(n).position==="fixed"||EC(n,t)}function K2(e,t){let n=t.get(e);if(n)return n;let r=Cn(e,[],!1).filter(a=>Oe(a)&&Lr(a)!=="body"),o=null,i=fn(e).position==="fixed",s=i?ir(e):e;for(;Oe(s)&&!ar(s);){let a=fn(s),l=Wf(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fa(s)&&!l&&EC(e,s))?r=r.filter(u=>u!==s):o=a,s=ir(s)}return t.set(e,r),r}function W2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?wc(t)?[]:K2(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{let d=vC(t,u,o);return c.top=uo(d.top,c.top),c.right=ga(d.right,c.right),c.bottom=ga(d.bottom,c.bottom),c.left=uo(d.left,c.left),c},vC(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function q2(e){let{width:t,height:n}=wC(e);return{width:t,height:n}}function G2(e,t,n){let r=Xe(t),o=sr(t),i=n==="fixed",s=Gi(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=lr(0);if(r||!r&&!i)if((Lr(t)!=="body"||fa(o))&&(a=Sc(t)),r){let f=Gi(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=lv(o));let c=o&&!r&&!i?bC(o,a):lr(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function sv(e){return fn(e).position==="static"}function xC(e,t){if(!Xe(e)||fn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return sr(e)===n&&(n=n.ownerDocument.body),n}function TC(e,t){let n=$t(e);if(wc(e))return n;if(!Xe(e)){let o=ir(e);for(;o&&!ar(o);){if(Oe(o)&&!sv(o))return o;o=ir(o)}return n}let r=xC(e,t);for(;r&&GT(r)&&sv(r);)r=xC(r,t);return r&&ar(r)&&sv(r)&&!Wf(r)?n:r||YT(e)||n}var Y2=function(e){return I(this,null,function*(){let t=this.getOffsetParent||TC,n=this.getDimensions,r=yield n(e.floating);return{reference:G2(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function X2(e){return fn(e).direction==="rtl"}var cv={convertOffsetParentRelativeRectToViewportRelativeRect:B2,getDocumentElement:sr,getClippingRect:W2,getOffsetParent:TC,getElementRects:Y2,getClientRects:U2,getDimensions:q2,getScale:ya,isElement:Oe,isRTL:X2};function CC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q2(e,t){let n=null,r,o=sr(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let v=Tc(d),m=Tc(o.clientWidth-(u+f)),x=Tc(o.clientHeight-(d+p)),y=Tc(u),h={rootMargin:-v+"px "+-m+"px "+-x+"px "+-y+"px",threshold:uo(0,ga(1,l))||1},w=!0;function E(C){let k=C[0].intersectionRatio;if(k!==l){if(!w)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!CC(c,e.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(E,P(S({},h),{root:o.ownerDocument}))}catch(C){n=new IntersectionObserver(E,h)}n.observe(e)}return s(!0),i}function ep(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=av(e),u=o||i?[...c?Cn(c):[],...Cn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});let d=c&&a?Q2(c,n):null,f=-1,p=null;s&&(p=new ResizeObserver(y=>{let[g]=y;g&&g.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var h;(h=p)==null||h.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,m=l?Gi(e):null;l&&x();function x(){let y=Gi(e);m&&!CC(m,y)&&n(),m=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(g=>{o&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}var kC=hC;var RC=yC,PC=gC;var tp=(e,t,n)=>{let r=new Map,o=S({platform:cv},n),i=P(S({},o.platform),{_c:r});return mC(e,t,P(S({},o),{platform:i}))};var nt=b(Z(),1),op=b(Z(),1),LC=b(Ul(),1);var np=typeof document!="undefined"?op.useLayoutEffect:op.useEffect;function rp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!rp(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){let i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!rp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function _C(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function AC(e,t){let n=_C(e);return Math.round(t*n)/n}function uv(e){let t=nt.useRef(e);return np(()=>{t.current=e}),t}function OC(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=nt.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=nt.useState(r);rp(f,r)||p(r);let[v,m]=nt.useState(null),[x,y]=nt.useState(null),g=nt.useCallback(V=>{V!==C.current&&(C.current=V,m(V))},[]),h=nt.useCallback(V=>{V!==k.current&&(k.current=V,y(V))},[]),w=i||v,E=s||x,C=nt.useRef(null),k=nt.useRef(null),A=nt.useRef(u),F=l!=null,N=uv(l),O=uv(o),G=uv(c),W=nt.useCallback(()=>{if(!C.current||!k.current)return;let V={placement:t,strategy:n,middleware:f};O.current&&(V.platform=O.current),tp(C.current,k.current,V).then(U=>{let q=P(S({},U),{isPositioned:G.current!==!1});L.current&&!rp(A.current,q)&&(A.current=q,LC.flushSync(()=>{d(q)}))})},[f,t,n,O,G]);np(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(V=>P(S({},V),{isPositioned:!1})))},[c]);let L=nt.useRef(!1);np(()=>(L.current=!0,()=>{L.current=!1}),[]),np(()=>{if(w&&(C.current=w),E&&(k.current=E),w&&E){if(N.current)return N.current(w,E,W);W()}},[w,E,W,N,F]);let z=nt.useMemo(()=>({reference:C,floating:k,setReference:g,setFloating:h}),[g,h]),ie=nt.useMemo(()=>({reference:w,floating:E}),[w,E]),Y=nt.useMemo(()=>{let V={position:n,left:0,top:0};if(!ie.floating)return V;let U=AC(ie.floating,u.x),q=AC(ie.floating,u.y);return a?S(P(S({},V),{transform:"translate("+U+"px, "+q+"px)"}),_C(ie.floating)>=1.5&&{willChange:"transform"}):{position:n,left:U,top:q}},[n,a,ie.floating,u.x,u.y]);return nt.useMemo(()=>P(S({},u),{update:W,refs:z,elements:ie,floatingStyles:Y}),[u,W,z,ie,Y])}var ip=(e,t)=>P(S({},kC(e)),{options:[e,t]}),dv=(e,t)=>P(S({},RC(e)),{options:[e,t]});var fv=(e,t)=>P(S({},PC(e)),{options:[e,t]});function wv(e){let t=_.useRef(void 0),n=_.useCallback(r=>{let o=e.map(i=>{if(i!=null){if(typeof i=="function"){let s=i,a=s(r);return typeof a=="function"?a:()=>{s(null)}}return i.current=r,()=>{i.current=null}}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return _.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}var YC=S({},_),Z2=YC.useInsertionEffect,J2=Z2||(e=>e());function kn(e){let t=_.useRef(()=>{});return J2(()=>{t.current=e}),_.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var eD="ArrowUp",tD="ArrowDown",nD="ArrowLeft",rD="ArrowRight";var pn=typeof document!="undefined"?Ea.useLayoutEffect:Ea.useEffect;var oD=[nD,rD],iD=[eD,tD],H7=[...oD,...iD];var NC=!1,sD=0,MC=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+sD++;function aD(){let[e,t]=_.useState(()=>NC?MC():void 0);return pn(()=>{e==null&&t(MC())},[]),_.useEffect(()=>{NC=!0},[]),e}var lD=YC.useId,Sv=lD||aD;function cD(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}var uD=_.createContext(null),dD=_.createContext(null),bv=()=>{var e;return((e=_.useContext(uD))==null?void 0:e.id)||null},cp=()=>_.useContext(dD);function ba(e){return"data-floating-ui-"+e}function cr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function wa(e){let t=(0,Ea.useRef)(e);return pn(()=>{t.current=e}),t}var DC=ba("safe-polygon");function pv(e,t,n){return n&&!ma(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function XC(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=cp(),v=bv(),m=wa(c),x=wa(l),y=wa(n),g=_.useRef(),h=_.useRef(-1),w=_.useRef(),E=_.useRef(-1),C=_.useRef(!0),k=_.useRef(!1),A=_.useRef(()=>{}),F=_.useRef(!1),N=_.useCallback(()=>{var Y;let V=(Y=o.current.openEvent)==null?void 0:Y.type;return(V==null?void 0:V.includes("mouse"))&&V!=="mousedown"},[o]);_.useEffect(()=>{if(!a)return;function Y(V){let{open:U}=V;U||(cr(h),cr(E),C.current=!0,F.current=!1)}return i.on("openchange",Y),()=>{i.off("openchange",Y)}},[a,i]),_.useEffect(()=>{if(!a||!m.current||!n)return;function Y(U){N()&&r(!1,U,"hover")}let V=ht(s.floating).documentElement;return V.addEventListener("mouseleave",Y),()=>{V.removeEventListener("mouseleave",Y)}},[s.floating,n,r,a,m,N]);let O=_.useCallback(function(Y,V,U){V===void 0&&(V=!0),U===void 0&&(U="hover");let q=pv(x.current,"close",g.current);q&&!w.current?(cr(h),h.current=window.setTimeout(()=>r(!1,Y,U),q)):V&&(cr(h),r(!1,Y,U))},[x,r]),G=kn(()=>{A.current(),w.current=void 0}),W=kn(()=>{if(k.current){let Y=ht(s.floating).body;Y.style.pointerEvents="",Y.removeAttribute(DC),k.current=!1}}),L=kn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);_.useEffect(()=>{if(!a)return;function Y($){if(cr(h),C.current=!1,u&&!ma(g.current)||d>0&&!pv(x.current,"open"))return;let K=pv(x.current,"open",g.current);K?h.current=window.setTimeout(()=>{y.current||r(!0,$,"hover")},K):n||r(!0,$,"hover")}function V($){if(L())return;A.current();let K=ht(s.floating);if(cr(E),F.current=!1,m.current&&o.current.floatingContext){n||cr(h),w.current=m.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){W(),G(),L()||O($,!0,"safe-polygon")}}));let de=w.current;K.addEventListener("mousemove",de),A.current=()=>{K.removeEventListener("mousemove",de)};return}(g.current==="touch"?!gt(s.floating,$.relatedTarget):!0)&&O($)}function U($){L()||o.current.floatingContext&&(m.current==null||m.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){W(),G(),L()||O($)}}))($))}if(Oe(s.domReference)){var q;let $=s.domReference;return n&&$.addEventListener("mouseleave",U),(q=s.floating)==null||q.addEventListener("mouseleave",U),f&&$.addEventListener("mousemove",Y,{once:!0}),$.addEventListener("mouseenter",Y),$.addEventListener("mouseleave",V),()=>{var K;n&&$.removeEventListener("mouseleave",U),(K=s.floating)==null||K.removeEventListener("mouseleave",U),f&&$.removeEventListener("mousemove",Y),$.removeEventListener("mouseenter",Y),$.removeEventListener("mouseleave",V)}}},[s,a,e,u,d,f,O,G,W,r,n,y,p,x,m,o,L]),pn(()=>{var Y;if(a&&n&&(Y=m.current)!=null&&Y.__options.blockPointerEvents&&N()){k.current=!0;let U=s.floating;if(Oe(s.domReference)&&U){var V;let q=ht(s.floating).body;q.setAttribute(DC,"");let $=s.domReference,K=p==null||(V=p.nodesRef.current.find(H=>H.id===v))==null||(V=V.context)==null?void 0:V.elements.floating;return K&&(K.style.pointerEvents=""),q.style.pointerEvents="none",$.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{q.style.pointerEvents="",$.style.pointerEvents="",U.style.pointerEvents=""}}}},[a,n,v,s,p,m,N]),pn(()=>{n||(g.current=void 0,F.current=!1,G(),W())},[n,G,W]),_.useEffect(()=>()=>{G(),cr(h),cr(E),W()},[a,s.domReference,G,W]);let z=_.useMemo(()=>{function Y(V){g.current=V.pointerType}return{onPointerDown:Y,onPointerEnter:Y,onMouseMove(V){let{nativeEvent:U}=V;function q(){!C.current&&!y.current&&r(!0,U,"hover")}u&&!ma(g.current)||n||d===0||F.current&&wm(V.movementX,2)+wm(V.movementY,2)<2||(cr(E),g.current==="touch"?q():(F.current=!0,E.current=window.setTimeout(q,d)))}}},[u,r,n,y,d]),ie=_.useMemo(()=>({onMouseEnter(){cr(h)},onMouseLeave(Y){L()||O(Y.nativeEvent,!1)}}),[O,L]);return _.useMemo(()=>a?{reference:z,floating:ie}:{},[a,z,ie])}var FC=0;function va(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(FC);let i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():FC=requestAnimationFrame(i)}function zC(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){let i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function Sa(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}var xa=new WeakMap,sp=new WeakSet,ap={},mv=0,fD=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype,QC=e=>e&&(e.host||QC(e.parentNode)),pD=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=QC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function mD(e,t,n,r){let o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=pD(t,e),a=new Set,l=new Set(s),c=[];ap[o]||(ap[o]=new WeakMap);let u=ap[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(Lr(v)!=="script")if(a.has(v))f(v);else{let m=i?v.getAttribute(i):null,x=m!==null&&m!=="false",y=xa.get(v)||0,g=i?y+1:y,h=(u.get(v)||0)+1;xa.set(v,g),u.set(v,h),c.push(v),g===1&&x&&sp.add(v),h===1&&v.setAttribute(o,""),!x&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return mv++,()=>{c.forEach(p=>{let v=xa.get(p)||0,m=i?v-1:v,x=(u.get(p)||0)-1;xa.set(p,m),u.set(p,x),m||(!sp.has(p)&&i&&p.removeAttribute(i),sp.delete(p)),x||p.removeAttribute(o)}),mv--,mv||(xa=new WeakMap,xa=new WeakMap,sp=new WeakSet,ap={})}}function HC(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=ht(e[0]).body;return mD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}var up=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ZC(e,t){let n=Rc(e,up());t==="prev"&&n.reverse();let r=n.indexOf(ti(ht(e)));return n.slice(r+1)[0]}function JC(e){return ZC(ht(e).body,"next")||e}function ek(e){return ZC(ht(e).body,"prev")||e}function Pc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function gD(e){Rc(e,up()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function BC(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{let r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var dp={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},lp=_.forwardRef(function(t,n){let[r,o]=_.useState();pn(()=>{eC()&&o("button")},[]);let i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ba("focus-guard")]:"",style:dp};return(0,mn.jsx)("span",S(S({},t),i))}),tk=_.createContext(null),UC=ba("portal");function hD(e){e===void 0&&(e={});let{id:t,root:n}=e,r=Sv(),o=rk(),[i,s]=_.useState(null),a=_.useRef(null);return pn(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),pn(()=>{if(!r||a.current)return;let l=t?document.getElementById(t):null;if(!l)return;let c=document.createElement("div");c.id=r,c.setAttribute(UC,""),l.appendChild(c),a.current=c,s(c)},[t,r]),pn(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Oe(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));let u=document.createElement("div");u.id=r,u.setAttribute(UC,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function nk(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=hD({id:n,root:r}),[s,a]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),f=s==null?void 0:s.modal,p=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||i);return _.useEffect(()=>{if(!i||!o||f)return;function m(x){i&&Pc(x)&&(x.type==="focusin"?BC:gD)(i)}return i.addEventListener("focusin",m,!0),i.addEventListener("focusout",m,!0),()=>{i.removeEventListener("focusin",m,!0),i.removeEventListener("focusout",m,!0)}},[i,o,f]),_.useEffect(()=>{i&&(p||BC(i))},[p,i]),(0,mn.jsxs)(tk.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[v&&i&&(0,mn.jsx)(lp,{"data-type":"outside",ref:l,onFocus:m=>{if(Pc(m,i)){var x;(x=u.current)==null||x.focus()}else{let y=s?s.domReference:null,g=ek(y);g==null||g.focus()}}}),v&&i&&(0,mn.jsx)("span",{"aria-owns":i.id,style:dp}),i&&xv.createPortal(t,i),v&&i&&(0,mn.jsx)(lp,{"data-type":"outside",ref:c,onFocus:m=>{if(Pc(m,i)){var x;(x=d.current)==null||x.focus()}else{let y=s?s.domReference:null,g=JC(y);g==null||g.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,m.nativeEvent,"focus-out"))}}})]})}var rk=()=>_.useContext(tk),vv="data-floating-ui-focusable";function VC(e){return e?e.hasAttribute(vv)?e:e.querySelector("["+vv+"]")||e:null}function $C(e){return _.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var yD=20,Yi=[];function vD(e){Yi=Yi.filter(t=>t.isConnected),e&&Lr(e)!=="body"&&(Yi.push(e),Yi.length>yD&&(Yi=Yi.slice(-20)))}function jC(){return Yi.slice().reverse().find(e=>e.isConnected)}function xD(e){let t=up();return fC(e,t)?e:Rc(e,t)[0]||e}var wD=_.forwardRef(function(t,n){return(0,mn.jsx)("button",P(S({},t),{type:"button",ref:n,tabIndex:-1,style:dp}))});function ok(e){let{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:m,events:x,dataRef:y,elements:{domReference:g,floating:h}}=t,w=kn(()=>{var se;return(se=y.current.floatingContext)==null?void 0:se.nodeId}),E=kn(p),C=typeof s=="number"&&s<0,k=Jy(g)&&C,A=fD(),F=A?i:!0,N=!F||A&&f,O=wa(o),G=wa(s),W=wa(a),L=cp(),z=rk(),ie=_.useRef(null),Y=_.useRef(null),V=_.useRef(!1),U=_.useRef(!1),q=_.useRef(-1),$=z!=null,K=VC(h),H=kn(function(se){return se===void 0&&(se=K),se?Rc(se,up()):[]}),de=kn(se=>{let Q=H(se);return O.current.map(ae=>g&&ae==="reference"?g:K&&ae==="floating"?K:Q).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function se(ae){if(ae.key==="Tab"){gt(K,ti(ht(K)))&&H().length===0&&!k&&Yf(ae);let pe=de(),je=co(ae);O.current[0]==="reference"&&je===g&&(Yf(ae),ae.shiftKey?va(pe[pe.length-1]):va(pe[1])),O.current[1]==="floating"&&je===K&&ae.shiftKey&&(Yf(ae),va(pe[0]))}}let Q=ht(K);return Q.addEventListener("keydown",se),()=>{Q.removeEventListener("keydown",se)}},[r,g,K,c,O,k,H,de]),_.useEffect(()=>{if(r||!h)return;function se(Q){let ae=co(Q),je=H().indexOf(ae);je!==-1&&(q.current=je)}return h.addEventListener("focusin",se),()=>{h.removeEventListener("focusin",se)}},[r,h,H]),_.useEffect(()=>{if(r||!d)return;function se(){U.current=!0,setTimeout(()=>{U.current=!1})}function Q(ae){let pe=ae.relatedTarget;queueMicrotask(()=>{let je=w(),vt=!(gt(g,pe)||gt(h,pe)||gt(pe,h)||gt(z==null?void 0:z.portalNode,pe)||pe!=null&&pe.hasAttribute(ba("focus-guard"))||L&&(Sa(L.nodesRef.current,je).find(Qe=>{var He,Ze;return gt((He=Qe.context)==null?void 0:He.elements.floating,pe)||gt((Ze=Qe.context)==null?void 0:Ze.elements.domReference,pe)})||zC(L.nodesRef.current,je).find(Qe=>{var He,Ze,dt;return[(He=Qe.context)==null?void 0:He.elements.floating,VC((Ze=Qe.context)==null?void 0:Ze.elements.floating)].includes(pe)||((dt=Qe.context)==null?void 0:dt.elements.domReference)===pe})));if(l&&vt&&ti(ht(K))===ht(K).body){Xe(K)&&K.focus();let Qe=q.current,He=H(),Ze=He[Qe]||He[He.length-1]||K;Xe(Ze)&&Ze.focus()}(k||!c)&&pe&&vt&&!U.current&&pe!==jC()&&(V.current=!0,m(!1,ae,"focus-out"))})}if(h&&Xe(g))return g.addEventListener("focusout",Q),g.addEventListener("pointerdown",se),h.addEventListener("focusout",Q),()=>{g.removeEventListener("focusout",Q),g.removeEventListener("pointerdown",se),h.removeEventListener("focusout",Q)}},[r,g,h,K,c,L,z,m,d,l,H,k,w]);let ue=_.useRef(null),Se=_.useRef(null),me=$C([ue,z==null?void 0:z.beforeInsideRef]),re=$C([Se,z==null?void 0:z.afterInsideRef]);_.useEffect(()=>{var se,Q;if(r||!h)return;let ae=Array.from((z==null||(se=z.portalNode)==null?void 0:se.querySelectorAll("["+ba("portal")+"]"))||[]),pe=L?zC(L.nodesRef.current,w()):[],je=L&&!c?pe.map(Ze=>{var dt;return(dt=Ze.context)==null?void 0:dt.elements.floating}):[],vt=(Q=pe.find(Ze=>{var dt;return Jy(((dt=Ze.context)==null?void 0:dt.elements.domReference)||null)}))==null||(Q=Q.context)==null?void 0:Q.elements.domReference,Qe=[h,vt,...ae,...je,...E(),ie.current,Y.current,ue.current,Se.current,z==null?void 0:z.beforeOutsideRef.current,z==null?void 0:z.afterOutsideRef.current,O.current.includes("reference")||k?g:null].filter(Ze=>Ze!=null),He=c||k?HC(Qe,!N,N):HC(Qe);return()=>{He()}},[r,g,h,c,O,z,k,F,N,L,w,E]),pn(()=>{if(r||!Xe(K))return;let se=ht(K),Q=ti(se);queueMicrotask(()=>{let ae=de(K),pe=G.current,je=(typeof pe=="number"?ae[pe]:pe.current)||K,vt=gt(K,Q);!C&&!vt&&v&&va(je,{preventScroll:je===K})})},[r,v,K,C,de,G]),pn(()=>{if(r||!K)return;let se=!1,Q=!1,ae=ht(K),pe=ti(ae),vt=y.current.openEvent;vD(pe);function Qe(dt){let{open:fi,reason:pi,event:Zt,nested:vr}=dt;if(fi&&(vt=Zt),pi==="escape-key"&&(Q=!0),["hover","safe-polygon"].includes(pi)&&Zt.type==="mouseleave"&&(V.current=!0),pi==="outside-press")if(vr)V.current=!1,se=!0;else if(ZT(Zt)||JT(Zt))V.current=!1;else{let Br=!1;document.createElement("div").focus({get preventScroll(){return Br=!0,!1}}),Br?(V.current=!1,se=!0):V.current=!0}}x.on("openchange",Qe);let He=ae.createElement("span");He.setAttribute("tabindex","-1"),He.setAttribute("aria-hidden","true"),Object.assign(He.style,dp),$&&g&&g.insertAdjacentElement("afterend",He);function Ze(){return typeof W.current=="boolean"?Q&&g?g:jC()||He:W.current.current||He}return()=>{x.off("openchange",Qe);let dt=ti(ae),fi=gt(h,dt)||L&&Sa(L.nodesRef.current,w()).some(Zt=>{var vr;return gt((vr=Zt.context)==null?void 0:vr.elements.floating,dt)});(fi||vt&&["click","mousedown"].includes(vt.type))&&(Q=!0);let pi=Ze();queueMicrotask(()=>{let Zt=xD(pi);W.current&&!V.current&&Xe(Zt)&&(!(Zt!==dt&&dt!==ae.body)||fi)&&Zt.focus({preventScroll:se}),He.remove()})}},[r,h,K,W,y,x,L,$,g,w]),_.useEffect(()=>{queueMicrotask(()=>{V.current=!1})},[r]),pn(()=>{if(!r&&z)return z.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:m,domReference:g}),()=>{z.setFocusManagerState(null)}},[r,z,c,v,m,d,g]),pn(()=>{if(r||!K||typeof MutationObserver!="function"||C)return;let se=()=>{let ae=K.getAttribute("tabindex"),pe=H(),je=ti(ht(h)),vt=pe.indexOf(je);vt!==-1&&(q.current=vt),O.current.includes("floating")||je!==g&&pe.length===0?ae!=="0"&&K.setAttribute("tabindex","0"):ae!=="-1"&&K.setAttribute("tabindex","-1")};se();let Q=new MutationObserver(se);return Q.observe(K,{childList:!0,subtree:!0,attributes:!0}),()=>{Q.disconnect()}},[r,h,K,g,O,H,C]);function Te(se){return r||!u||!c?null:(0,mn.jsx)(wD,{ref:se==="start"?ie:Y,onClick:Q=>m(!1,Q.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}let rt=!r&&F&&(c?!k:!0)&&($||c);return(0,mn.jsxs)(mn.Fragment,{children:[rt&&(0,mn.jsx)(lp,{"data-type":"inside",ref:me,onFocus:se=>{if(c){let ae=de();va(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(V.current=!1,Pc(se,z.portalNode)){let ae=JC(g);ae==null||ae.focus()}else{var Q;(Q=z.beforeOutsideRef.current)==null||Q.focus()}}}),!k&&Te("start"),n,Te("end"),rt&&(0,mn.jsx)(lp,{"data-type":"inside",ref:re,onFocus:se=>{if(c)va(de()[0]);else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(d&&(V.current=!0),Pc(se,z.portalNode)){let ae=ek(g);ae==null||ae.focus()}else{var Q;(Q=z.afterOutsideRef.current)==null||Q.focus()}}})]})}function KC(e){return Xe(e.target)&&e.target.tagName==="BUTTON"}function SD(e){return Xe(e.target)&&e.target.tagName==="A"}function WC(e){return Zy(e)}function ik(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=_.useRef(),p=_.useRef(!1),v=_.useMemo(()=>({onPointerDown(m){f.current=m.pointerType},onMouseDown(m){let x=f.current;m.button===0&&a!=="click"&&(ma(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,m.nativeEvent,"click"):(m.preventDefault(),r(!0,m.nativeEvent,"click"))))},onClick(m){let x=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}ma(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,m.nativeEvent,"click"):r(!0,m.nativeEvent,"click"))},onKeyDown(m){f.current=void 0,!(m.defaultPrevented||!u||KC(m))&&(m.key===" "&&!WC(i)&&(m.preventDefault(),p.current=!0),!SD(m)&&m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||KC(m)||WC(i)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return _.useMemo(()=>s?{reference:v}:{},[s,v])}var bD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ED={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},qC=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function sk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,m=cp(),x=kn(typeof l=="function"?l:()=>!1),y=typeof l=="function"?x:l,g=_.useRef(!1),h=_.useRef(!1),{escapeKey:w,outsidePress:E}=qC(p),{escapeKey:C,outsidePress:k}=qC(v),A=_.useRef(!1),F=kn(z=>{var ie;if(!n||!s||!a||z.key!=="Escape"||A.current)return;let Y=(ie=i.current.floatingContext)==null?void 0:ie.nodeId,V=m?Sa(m.nodesRef.current,Y):[];if(!w&&(z.stopPropagation(),V.length>0)){let U=!0;if(V.forEach(q=>{var $;if(($=q.context)!=null&&$.open&&!q.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,tC(z)?z.nativeEvent:z,"escape-key")}),N=kn(z=>{var ie;let Y=()=>{var V;F(z),(V=co(z))==null||V.removeEventListener("keydown",Y)};(ie=co(z))==null||ie.addEventListener("keydown",Y)}),O=kn(z=>{var ie;let Y=g.current;g.current=!1;let V=h.current;if(h.current=!1,c==="click"&&V||Y||typeof y=="function"&&!y(z))return;let U=co(z),q="["+ba("inert")+"]",$=ht(o.floating).querySelectorAll(q),K=Oe(U)?U:null;for(;K&&!ar(K);){let Se=ir(K);if(ar(Se)||!Oe(Se))break;K=Se}if($.length&&Oe(U)&&!nC(U)&&!gt(U,o.floating)&&Array.from($).every(Se=>!gt(K,Se)))return;if(Xe(U)&&L){let Se=ar(U),me=fn(U),re=/auto|scroll/,Te=Se||re.test(me.overflowX),rt=Se||re.test(me.overflowY),se=Te&&U.clientWidth>0&&U.scrollWidth>U.clientWidth,Q=rt&&U.clientHeight>0&&U.scrollHeight>U.clientHeight,ae=me.direction==="rtl",pe=Q&&(ae?z.offsetX<=U.offsetWidth-U.clientWidth:z.offsetX>U.clientWidth),je=se&&z.offsetY>U.clientHeight;if(pe||je)return}let H=(ie=i.current.floatingContext)==null?void 0:ie.nodeId,de=m&&Sa(m.nodesRef.current,H).some(Se=>{var me;return Gf(z,(me=Se.context)==null?void 0:me.elements.floating)});if(Gf(z,o.floating)||Gf(z,o.domReference)||de)return;let ue=m?Sa(m.nodesRef.current,H):[];if(ue.length>0){let Se=!0;if(ue.forEach(me=>{var re;if((re=me.context)!=null&&re.open&&!me.context.dataRef.current.__outsidePressBubbles){Se=!1;return}}),!Se)return}r(!1,z,"outside-press")}),G=kn(z=>{var ie;let Y=()=>{var V;O(z),(V=co(z))==null||V.removeEventListener(c,Y)};(ie=co(z))==null||ie.addEventListener(c,Y)});_.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=E;let z=-1;function ie($){r(!1,$,"ancestor-scroll")}function Y(){window.clearTimeout(z),A.current=!0}function V(){z=window.setTimeout(()=>{A.current=!1},pa()?5:0)}let U=ht(o.floating);a&&(U.addEventListener("keydown",C?N:F,C),U.addEventListener("compositionstart",Y),U.addEventListener("compositionend",V)),y&&U.addEventListener(c,k?G:O,k);let q=[];return f&&(Oe(o.domReference)&&(q=Cn(o.domReference)),Oe(o.floating)&&(q=q.concat(Cn(o.floating))),!Oe(o.reference)&&o.reference&&o.reference.contextElement&&(q=q.concat(Cn(o.reference.contextElement)))),q=q.filter($=>{var K;return $!==((K=U.defaultView)==null?void 0:K.visualViewport)}),q.forEach($=>{$.addEventListener("scroll",ie,{passive:!0})}),()=>{a&&(U.removeEventListener("keydown",C?N:F,C),U.removeEventListener("compositionstart",Y),U.removeEventListener("compositionend",V)),y&&U.removeEventListener(c,k?G:O,k),q.forEach($=>{$.removeEventListener("scroll",ie)}),window.clearTimeout(z)}},[i,o,a,y,c,n,r,f,s,w,E,F,C,N,O,k,G]),_.useEffect(()=>{g.current=!1},[y,c]);let W=_.useMemo(()=>S({onKeyDown:F},u&&S({[bD[d]]:z=>{r(!1,z.nativeEvent,"reference-press")}},d!=="click"&&{onClick(z){r(!1,z.nativeEvent,"reference-press")}})),[F,r,u,d]),L=_.useMemo(()=>({onKeyDown:F,onMouseDown(){h.current=!0},onMouseUp(){h.current=!0},[ED[c]]:()=>{g.current=!0}}),[F,c]);return _.useMemo(()=>s?{reference:W,floating:L}:{},[s,W,L])}function TD(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=Sv(),i=_.useRef({}),[s]=_.useState(()=>cD()),a=bv()!=null,[l,c]=_.useState(r.reference),u=kn((p,v,m)=>{i.current.openEvent=p?v:void 0,s.emit("openchange",{open:p,event:v,reason:m,nested:a}),n==null||n(p,v,m)}),d=_.useMemo(()=>({setPositionReference:c}),[]),f=_.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return _.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function ak(e){e===void 0&&(e={});let{nodeId:t}=e,n=TD(P(S({},e),{elements:S({reference:null,floating:null},e.elements)})),r=e.rootContext||n,o=r.elements,[i,s]=_.useState(null),[a,l]=_.useState(null),u=(o==null?void 0:o.domReference)||i,d=_.useRef(null),f=cp();pn(()=>{u&&(d.current=u)},[u]);let p=OC(P(S({},e),{elements:S(S({},o),a&&{reference:a})})),v=_.useCallback(h=>{let w=Oe(h)?{getBoundingClientRect:()=>h.getBoundingClientRect(),getClientRects:()=>h.getClientRects(),contextElement:h}:h;l(w),p.refs.setReference(w)},[p.refs]),m=_.useCallback(h=>{(Oe(h)||h===null)&&(d.current=h,s(h)),(Oe(p.refs.reference.current)||p.refs.reference.current===null||h!==null&&!Oe(h))&&p.refs.setReference(h)},[p.refs]),x=_.useMemo(()=>P(S({},p.refs),{setReference:m,setPositionReference:v,domReference:d}),[p.refs,m,v]),y=_.useMemo(()=>P(S({},p.elements),{domReference:u}),[p.elements,u]),g=_.useMemo(()=>P(S(S({},p),r),{refs:x,elements:y,nodeId:t}),[p,x,y,t,r]);return pn(()=>{r.dataRef.current.floatingContext=g;let h=f==null?void 0:f.nodesRef.current.find(w=>w.id===t);h&&(h.context=g)}),_.useMemo(()=>P(S({},p),{context:g,refs:x,elements:y}),[p,x,y,g])}var gv="active",hv="selected";function yv(e,t,n){let r=new Map,o=n==="item",i=e;if(o&&e){let s=e,{[gv]:a,[hv]:l}=s;i=oe(s,[Sm(gv),Sm(hv)])}return S(S(S({},n==="floating"&&{tabIndex:-1,[vv]:""}),i),t.map(a=>{let l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(c=>{let[u,d]=c;if(!(o&&[gv,hv].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var f;(f=r.get(u))==null||f.push(d),a[u]=function(){for(var p,v=arguments.length,m=new Array(v),x=0;x<v;x++)m[x]=arguments[x];return(p=r.get(u))==null?void 0:p.map(y=>y(...m)).find(y=>y!==void 0)}}}else a[u]=d}),a),{}))}function lk(e){e===void 0&&(e=[]);let t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=_.useCallback(a=>yv(a,e,"reference"),t),i=_.useCallback(a=>yv(a,e,"floating"),n),s=_.useCallback(a=>yv(a,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}var CD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ck(e,t){var n;t===void 0&&(t={});let{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=CD.get(s))!=null?n:s,l=Sv(),u=bv()!=null,d=_.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:S(S(S(S(S({"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o: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,o,u,r,l,s]),f=_.useMemo(()=>{let v=S({id:o},a&&{role:a});return a==="tooltip"||s==="label"?v:S(S({},v),a==="menu"&&{"aria-labelledby":l})},[a,o,l,s]),p=_.useCallback(v=>{let{active:m,selected:x}=v,y=S({role:"option"},m&&{id:o+"-option"});switch(s){case"select":return P(S({},y),{"aria-selected":m&&x});case"combobox":return S(S({},y),m&&{"aria-selected":!0})}return{}},[o,s]);return _.useMemo(()=>i?{reference:d,floating:f,item:p}:{},[i,d,f,p])}function GC(e,t){let[n,r]=e,o=!1,i=t.length;for(let s=0,a=i-1;s<i;a=s++){let[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function kD(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function uk(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o,i=!1,s=null,a=null,l=performance.now();function c(d,f){let p=performance.now(),v=p-l;if(s===null||a===null||v===0)return s=d,a=f,l=p,null;let m=d-s,x=f-a,g=Math.sqrt(m*m+x*x)/v;return s=d,a=f,l=p,g}let u=d=>{let{x:f,y:p,placement:v,elements:m,onClose:x,nodeId:y,tree:g}=d;return function(w){function E(){clearTimeout(o),x()}if(clearTimeout(o),!m.domReference||!m.floating||v==null||f==null||p==null)return;let{clientX:C,clientY:k}=w,A=[C,k],F=co(w),N=w.type==="mouseleave",O=gt(m.floating,F),G=gt(m.domReference,F),W=m.domReference.getBoundingClientRect(),L=m.floating.getBoundingClientRect(),z=v.split("-")[0],ie=f>L.right-L.width/2,Y=p>L.bottom-L.height/2,V=kD(A,W),U=L.width>W.width,q=L.height>W.height,$=(U?W:L).left,K=(U?W:L).right,H=(q?W:L).top,de=(q?W:L).bottom;if(O&&(i=!0,!N))return;if(G&&(i=!1),G&&!N){i=!0;return}if(N&&Oe(w.relatedTarget)&&gt(m.floating,w.relatedTarget)||g&&Sa(g.nodesRef.current,y).some(me=>{let{context:re}=me;return re==null?void 0:re.open}))return;if(z==="top"&&p>=W.bottom-1||z==="bottom"&&p<=W.top+1||z==="left"&&f>=W.right-1||z==="right"&&f<=W.left+1)return E();let ue=[];switch(z){case"top":ue=[[$,W.top+1],[$,L.bottom-1],[K,L.bottom-1],[K,W.top+1]];break;case"bottom":ue=[[$,L.top+1],[$,W.bottom-1],[K,W.bottom-1],[K,L.top+1]];break;case"left":ue=[[L.right-1,de],[L.right-1,H],[W.left+1,H],[W.left+1,de]];break;case"right":ue=[[W.right-1,de],[W.right-1,H],[L.left+1,H],[L.left+1,de]];break}function Se(me){let[re,Te]=me;switch(z){case"top":{let rt=[U?re+t/2:ie?re+t*4:re-t*4,Te+t+1],se=[U?re-t/2:ie?re+t*4:re-t*4,Te+t+1],Q=[[L.left,ie||U?L.bottom-t:L.top],[L.right,ie?U?L.bottom-t:L.top:L.bottom-t]];return[rt,se,...Q]}case"bottom":{let rt=[U?re+t/2:ie?re+t*4:re-t*4,Te-t],se=[U?re-t/2:ie?re+t*4:re-t*4,Te-t],Q=[[L.left,ie||U?L.top+t:L.bottom],[L.right,ie?U?L.top+t:L.bottom:L.top+t]];return[rt,se,...Q]}case"left":{let rt=[re+t+1,q?Te+t/2:Y?Te+t*4:Te-t*4],se=[re+t+1,q?Te-t/2:Y?Te+t*4:Te-t*4];return[...[[Y||q?L.right-t:L.left,L.top],[Y?q?L.right-t:L.left:L.right-t,L.bottom]],rt,se]}case"right":{let rt=[re-t,q?Te+t/2:Y?Te+t*4:Te-t*4],se=[re-t,q?Te-t/2:Y?Te+t*4:Te-t*4],Q=[[Y||q?L.left+t:L.right,L.top],[Y?q?L.left+t:L.right:L.left+t,L.bottom]];return[rt,se,...Q]}}}if(!GC([C,k],ue)){if(i&&!V)return E();if(!N&&r){let me=c(w.clientX,w.clientY);if(me!==null&&me<.1)return E()}GC([C,k],Se([f,p]))?!i&&r&&(o=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}var fp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var Hn=b(R());function RD({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:i}={}){let[s,a]=_r.useState(e),l=o!=null?o:s,c=i!=null?i:a,u=ak({placement:t,open:l,onOpenChange:c,whileElementsMounted:ep,middleware:[ip(5),fv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),dv({padding:10})]}),d=u.context,f=ik(d,{enabled:o==null}),p=sk(d),v=ck(d),m=XC(d,{enabled:r!=null?r:!1,handleClose:uk()}),x=lk([f,p,v,m]);return _r.useMemo(()=>P(S(S({open:l,setOpen:c},x),u),{modal:n}),[l,c,x,u,n])}var dk=_r.createContext(null),Ev=()=>{let e=_r.useContext(dk);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},Xi=r=>{var o=r,{children:e,modal:t=!1}=o,n=oe(o,["children","modal"]);let i=RD(S({modal:t},n));return(0,Hn.jsx)(dk.Provider,{value:i,children:e})};function PD(r){var o=r,{as:e,children:t}=o,n=oe(o,["as","children"]);let i=Ev(),s=e||"button",a=t.ref,l=wv([i.refs.setReference,a]);return(0,Hn.jsx)(s,P(S({ref:l,type:"button"},i.getReferenceProps(n)),{children:t}))}var AD=_r.forwardRef(function(o,r){var i=o,{style:t}=i,n=oe(i,["style"]);let c=Ev(),{context:s}=c,a=oe(c,["context"]),l=wv([a.refs.setFloating,r]);return s.open?(0,Hn.jsx)(nk,{children:(0,Hn.jsx)(ok,{context:s,modal:a.modal,children:(0,Hn.jsx)("div",P(S({ref:l,style:S(P(S({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function ID(o){var i=o,{as:e,children:t,onClick:n}=i,r=oe(i,["as","children","onClick"]);let{setOpen:s}=Ev();return(0,Hn.jsx)(e||"button",P(S({type:"button",onClick:c=>{n(c),s(!1),c.stopPropagation()}},r),{children:t}))}function fk({trigger:e,children:t,placement:n="top"}){return(0,Hn.jsxs)(Xi,{tooltip:!0,placement:n,children:[(0,Hn.jsxs)(Xi.Content,{className:fp.tooltip,children:[t,(0,Hn.jsx)("div",{className:fp.arrow})]}),(0,Hn.jsx)(Xi.Trigger,{className:fp.tooltipTrigger,children:e})]})}Xi.Trigger=PD;Xi.Content=AD;Xi.Button=ID;var yt=Xi;var jt=b(R()),LD=3,_D=90,pk=({children:e})=>{let t=M("CommandPalette",Tn);return(0,jt.jsx)("div",{className:t.listItemActions,children:e})};function Tv(p){var v=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:i,onSourceClick:s,description:a,sources:l,id:c,styles:u,defaultSourcesAmount:d=LD}=v,f=oe(v,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var A;let m=ce(so),[x,y]=(0,Ic.useState)(!1),{selected:g,onChangeOpen:h}=ei(),[w,E]=(0,Ic.useState)(!1),C=M("CommandPalette",Tn);function k(F){o(F),e&&h(!1)}return(0,Ic.useEffect)(()=>{E(g===c)},[g]),(0,jt.jsxs)("div",{className:(0,Ac.default)(C.listItem,c===g&&C.listItemSelected),children:[(0,jt.jsxs)(yt,{placement:"right-start",tooltip:!0,onOpenChange:E,open:w,children:[(0,jt.jsx)(yt.Trigger,P(S({className:C.listItemAction,"aria-disabled":(A=f.disabled)!=null?A:!1,onClick:k,"data-command-palette-item":!0,"data-item-id":c},f),{children:(0,jt.jsxs)("div",{className:C.listItemContent,children:[typeof r=="string"?(0,jt.jsx)("p",{className:(0,Ac.default)(C.listItemText,C.truncate,u==null?void 0:u.title),children:r}):r,a&&typeof a=="string"?(0,jt.jsx)(Ki,{tagName:"p",allowList:[],content:Vf(a)?$T(a):a,className:(0,Ac.default)(C.listItemDescription,u==null?void 0:u.description,t?C.lineClamp:C.truncate)}):a]})})),n&&n.toString().length>_D&&(0,jt.jsx)(yt.Content,{className:C.listItemTooltip,children:(0,jt.jsx)(Ki,{className:C.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p"],tagName:"div",content:n})})]}),c===g&&i,l&&l.length>0&&(0,jt.jsxs)("div",{className:C.sources,children:[(0,jt.jsx)("span",{className:C.sourcesTitle,children:m("sources")}),l.slice(0,x?l.length:d).map(F=>(0,jt.jsx)("a",{className:C.source,href:F.url,target:"_blank",title:F.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>s==null?void 0:s(F),children:F.name},F.url)),!x&&l.length>d&&(0,jt.jsx)("button",{className:(0,Ac.default)(C.source,C.sourceShowMore),type:"button",onClick:()=>y(!0),children:m("showMore",{amount:l.length-d})})]})]})}var Lc=b(R()),mk=()=>(0,Lc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Lc.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Lc.jsx)("path",{d:"M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"})]});var Qi=b(R());function Cv({children:e,title:t,id:n,onDismiss:r}){let o=ce(so),i=M("CommandPalette",Tn),{page:s}=ei();return s!==n?null:(0,Qi.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Qi.jsxs)("div",{className:i.pageNav,children:[(0,Qi.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,Qi.jsx)(mk,{}),o("back")]}),t&&(0,Qi.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var gk=b(Z());var _c=b(R()),Ta=()=>(0,_c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,_c.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,_c.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})]});var ur=b(R());function OD({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=M("CommandPalette",Tn);return(0,ur.jsxs)("div",{className:l.search,children:[(0,ur.jsx)("div",{className:l.searchIcon,children:(0,ur.jsx)(Ta,{})}),(0,ur.jsxs)("div",{className:l.searchInputWrapper,children:[(0,ur.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:c=>{e(c.currentTarget.value)},onFocus:c=>{c.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,ur.jsx)("div",{className:l.selectWrapper,children:(0,ur.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:c=>t(c.target.value===r?void 0:c.target.value),value:s||r,children:[r&&(0,ur.jsx)("option",{children:r}),o.map(c=>(0,ur.jsx)("option",{value:c.value,children:c.label},c.value))]})})]})]})}var hk=(0,gk.forwardRef)(OD);var kv=b(Ne());var pp=b(R()),ND=o=>{var i=o,{onClick:e,shortKeys:t,children:n}=i,r=oe(i,["onClick","shortKeys","children"]);let s=M("CommandPalette",Tn);return(0,pp.jsxs)("button",P(S({type:"button"},r),{onClick:e,className:(0,kv.default)(s.actionButton,r.className,{[s.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,pp.jsx)("span",{className:(0,kv.default)(s.actionShortcut,a===8629&&s.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},yk=ND;var Oc=b(R()),MD="[data-command-palette-item]";function Zi({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:c,children:u,isOpen:d,search:f,updateDeps:p=[]}){let[v,m]=(0,fo.useState)(),x=(0,fo.useRef)(null),y=()=>{o&&o(n),s(void 0),i(""),a(!1)},g=()=>{var O;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(O=x.current)==null||O.focus();return}if(f.length>0){i("");return}a(!1)},h=()=>{let O=w();O.length!==0&&m(O[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(MD)||[]),E=O=>document.querySelector(`[data-item-id=${O}]`),C=O=>{let G=E(O);G&&m(G.dataset.itemId)},k=O=>{let G=E(O);G&&G.scrollIntoView({behavior:"smooth"})},A=()=>{if(!v)return;let O=w(),G=E(v);if(!G)return;let W=O.indexOf(G),L=O[W+1];L!=null&&L.dataset.itemId?C(L.dataset.itemId):h()},F=()=>{if(!v)return;let O=w(),G=E(v);if(!G)return;let W=O.indexOf(G),L=O[W-1];L!=null&&L.dataset.itemId?C(L.dataset.itemId):C(O[O.length-1].dataset.itemId)},N=(0,fo.useCallback)(O=>{switch(O.key){case"ArrowDown":{O.preventDefault(),A();break}case"ArrowUp":{O.preventDefault(),F();break}case"Enter":{if(v){let G=E(v);G==null||G.click()}break}}},[v]);return(0,fo.useEffect)(()=>{h()},[f,r,l,d,...p]),(0,fo.useEffect)(()=>{v&&k(v)},[v]),(0,Oc.jsx)(Af,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:d,onBack:g,onClose:y,onKeyDown:N,children:(0,Oc.jsxs)(KT,{selected:v,setSelected:m,isOpen:d,onChangeOpen:a,page:r,children:[r===n&&(0,Oc.jsx)(hk,{ref:x,onChange:i,onChangeType:s,placeholder:e,value:f,selectedType:l,types:c,typePlaceholder:t}),u]})})}Zi.Page=Cv;Zi.List=By;Zi.Image=OT;Zi.ListItem=Tv;Zi.ListItemActions=pk;Zi.Button=yk;var Ge=Zi;var vk=b(Z());function xk(e,t){(0,vk.useEffect)(()=>{let n=r=>{var o;((o=navigator==null?void 0:navigator.platform)!=null&&o.toLowerCase().includes("mac")?r.metaKey:r.ctrlKey)&&r.key===e&&(r.preventDefault(),r.stopPropagation(),t())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[])}var Nc=b(Z());var wk={data:null,fetchState:"idle"},DD=e=>{var t;return(t=e.entities.data)!=null?t:null},mp=Dn([DD,la,U1],(e,t,n)=>{var a;let r=[],{visitorName:o}=n!=null?n:{},{agentName:i,agentNickname:s}=t!=null?t:{};return i&&i!==o&&r.push(i),s&&s!==o&&r.push(s),(a=e==null?void 0:e.filter(l=>!r.includes(l.text)))!=null?a:null}),dr=ge("entities/getEntities",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=yield o();return i.length===0?Promise.resolve([]):n.getEntities(i)})),FD=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),zD=Ce({name:"entities",initialState:wk,reducers:{},extraReducers:e=>{e.addCase(dr.pending,t=>{t.fetchState="loading"}).addCase(dr.rejected,t=>{t.fetchState="error"}).addCase(dr.fulfilled,(t,n)=>{t.fetchState="done",t.data=FD(t.data?[...t.data,...n.payload]:n.payload)}).addCase(at,()=>wk)}}),Sk=zD.reducer;var Rv={};Rt(Rv,{enUS:()=>HD,nlNL:()=>BD});var HD={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},BD={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var bk={root:"dd-TYTKs",empty:"dd-AU7uT"};var Ca=b(R()),UD=({onCopy:e})=>{let t=(0,Nc.useRef)(null),n=M("EntitiesList",bk),r=j(mp),{setSelected:o}=ei(),i=ce(Rv),s=ye();return(0,Nc.useEffect)(()=>{s(dr())},[]),(0,Nc.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,Ca.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,Ca.jsx)(Ge.List,{children:r.map((a,l)=>(0,Ca.jsx)(Ge.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,Ca.jsx)("p",{className:n.empty,children:i("noResults")})]})},Ek=UD;var ss=b(Z());var ka=b(Z());function po(e,t){let n=(0,ka.useRef)(e);n.current=e;let[r,o]=(0,ka.useState)(void 0),[i,s]=(0,ka.useState)(void 0),[a,l]=(0,ka.useState)("idle"),c=ye();return{error:i,state:a,data:r,call:f=>I(this,null,function*(){l("loading"),yield c(n.current(f)).unwrap().then(p=>{o(p),l("done"),t!=null&&t.onSuccess&&(t==null||t.onSuccess(p))}).catch(p=>{s(p),l("error"),t!=null&&t.onError&&(t==null||t.onError(p))})}),reset:()=>{l("idle"),o(void 0),s(void 0)}}}var gp=b(Ne()),Rk=b(Z());var Pv=b(R()),Av=e=>(0,Pv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Pv.jsx)("path",{fillRule:"evenodd",d:"M6.57086468,14.9173453 C6.38997052,14.9711236 6.19835748,15 6,15 L4,15 C2.8954305,15 2,14.1045695 2,13 L2,4 C2,2.8954305 2.8954305,2 4,2 L6,2 C6.68685475,2 7.29284112,2.34623869 7.65294381,2.87370078 C7.95642355,2.67736738 8.29504785,2.51351337 8.66312366,2.3818197 C9.50544052,2.08044754 10.3408482,1.9879107 10.9989281,1.99971266 C11.0150698,2.00005426 13.3487605,2.00015005 18,2 C20.7551411,2 22,6.05643086 22,12 C22,13.6824804 20.8695981,15 19,15 L15.9269768,15 C15.9359266,15.0245465 15.9451954,15.0497804 15.9547911,15.0757271 C16.007193,15.2174219 16.2391583,15.8256341 16.2970775,15.9810953 C16.4872151,16.4914441 16.6259612,16.9026411 16.7382242,17.3098712 C16.9079007,17.9253665 17,18.4798886 17,19 C17,20.4720069 16.091867,21.3862822 14.748281,21.777514 C14.1422801,21.9539723 13.6147967,22.0000922 13.0076976,22.0000008 L12.5204954,22 L12.2202699,21.6261158 C11.2556275,20.4248034 7.64562469,16.4822788 6.57086468,14.9173453 Z M8,13 C8,13.2401953 8.04443154,13.4528921 8.14171093,13.6800176 C8.40663864,14.2985643 11.914268,18.1371493 13.4599624,19.9848695 C13.7113931,19.9660111 13.9483736,19.9273712 14.1891338,19.8572655 C14.7621788,19.6904035 15,19.4509737 15,19 C15,18.6834183 14.9359344,18.2976852 14.8101464,17.8413935 C14.7161494,17.500423 14.5944107,17.1396301 14.4229225,16.6793379 C14.3689242,16.5344009 14.1358033,15.923159 14.0789589,15.7694517 C13.9489218,15.4178313 13.8632547,15.1589343 13.8046536,14.9236885 C13.5555377,13.9236468 13.8054549,13 15,13 L19,13 C19.6912225,13 20,12.6401099 20,12 C20,7.20925475 19.015127,4 18,4 C15.9322103,4 15.9322103,4 10.9655994,3.99940813 C10.5253746,3.99154158 9.91062406,4.05963657 9.33687634,4.2649175 C8.45196659,4.58152894 8,5.09776992 8,6 L8,13 Z M4,4 L4,13 L6,13 L6,4 L4,4 Z"})}));var Iv=b(R()),Tk=e=>(0,Iv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Iv.jsx)("path",{fillRule:"evenodd",d:"M7.65336736,21.1256786 C7.2933164,21.6534897 6.68712411,22 6,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,11 C2,9.8954305 2.8954305,9 4,9 L6,9 C6.198171,9 6.38961023,9.02882212 6.57035446,9.08250314 C7.6444817,7.51807482 11.2554748,3.57449216 12.2202699,2.37298955 L12.5204954,1.99910538 L13,1.99910538 C13.6147967,1.99901314 14.1422801,2.04513312 14.748281,2.22159137 C16.091867,2.61282321 17,3.52709845 17,4.99910538 C17,5.51921677 16.9079007,6.07373891 16.7382242,6.68923415 C16.6259612,7.09646424 16.4872151,7.50766133 16.2970775,8.01801005 C16.2391583,8.17347129 16.007193,8.78168345 15.9547911,8.92337824 C15.9451954,8.94932503 15.9359266,8.9745589 15.9269768,8.99910538 L19,8.99910538 C20.8695981,8.99910538 22,10.316625 22,11.9991054 C22,17.9426745 20.7551411,21.9991054 18,21.9991054 L11.0344006,21.9985135 C10.3408482,22.0111947 9.50544052,21.9186578 8.66312366,21.6172857 C8.29521907,21.4856533 7.9567386,21.3218904 7.65336736,21.1256786 Z M8,17.9991054 C8,18.9013355 8.45196659,19.4175764 9.33687634,19.7341879 C9.91062406,19.9394688 10.5253746,20.0075638 10.963066,19.9997143 C10.9703499,19.9995545 10.9703499,19.9995545 11,19.9991054 L18,19.9991054 C19.015127,19.9991054 20,16.7898506 20,11.9991054 C20,11.3589955 19.6912225,10.9991054 19,10.9991054 L15,10.9991054 C13.8054549,10.9991054 13.5555377,10.0754586 13.8046536,9.07541689 C13.8632547,8.84017106 13.9489218,8.5812741 14.0789589,8.22965366 C14.1358033,8.07594642 14.3689242,7.46470447 14.4229225,7.31976744 C14.5944107,6.85947528 14.7161494,6.4986824 14.8101464,6.1577119 C14.9359344,5.70142019 15,5.31568707 15,4.99910538 C15,4.54813166 14.7621788,4.30870189 14.1891338,4.1418399 C13.9483736,4.07173418 13.7113931,4.0330943 13.4599624,4.01423587 C11.914268,5.86195611 8.40663864,9.70054105 8.14171093,10.3190878 C8.04443154,10.5462133 8,10.7589101 8,10.9991054 L8,17.9991054 Z M4,11 L4,20 L6,20 L6,11 L4,11 Z"})}));function Ra(e,t){var o;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",t.split(" ").forEach(i=>{n.classList.add(i)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var Lv={};Rt(Lv,{enUS:()=>VD,nlNL:()=>$D});var VD={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},$D={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function Ck(e){return ge("analytics/logEvent",(t,n)=>{var i,s,a;let r=(s=(i=n.getState())==null?void 0:i.conversation.current)==null?void 0:s.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,P(S({conversationId:r},o),{data:t.data}))})(e)}function ct(){let e=ye();return(t,n)=>I(this,null,function*(){yield e(Ck({name:t,data:n}))})}var kk={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Pa=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t,i=o||window.location.origin;return r&&!n?null:r&&n?`${i}/apis/admin/session/passwordless/login/?token=${n}&redirect=${encodeURIComponent(e)}`:`${i}${e}`};var mo=b(R()),jD=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=M("FeedbackThumbs",kk),i=ee("enableFeedbackForm"),s=j(Pr),a=j(Pa(`/admin/feedback?conversationId=${s}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=ce(Lv),c=ct(),[u,d]=(0,Rk.useState)(null),f=v=>{v.stopPropagation(),Ra(v.target,o.fadeup),d("up"),c(e,P(S({},t),{rating:"up"}))},p=v=>{v.stopPropagation(),Ra(v.target,o.fadedown),d("down"),c(e,P(S({},t),{rating:"down"}))};return(0,mo.jsxs)("div",{className:o.thumbs,children:[(0,mo.jsx)(Ee.Button,{title:l("thumbsUp"),onClick:f,icon:(0,mo.jsx)(Tk,{}),className:(0,gp.default)(o.thumbsUp,u==="up"&&o.selected),disabled:!!u}),i&&a?(0,mo.jsx)(Ee.Button,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:p,icon:(0,mo.jsx)(Av,{}),className:(0,gp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u}):(0,mo.jsx)(Ee.Button,{title:l("thumbsDown"),onClick:p,icon:(0,mo.jsx)(Av,{}),className:(0,gp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u})]})},Ji=jD;var Mc=b(R()),Pk=()=>(0,Mc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Mc.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Mc.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var _v={};Rt(_v,{enUS:()=>KD,nlNL:()=>WD});var KD={use:[{type:0,value:"Use"}],loading:[{type:0,value:"Loading..."}],error:[{type:0,value:"Something went wrong, please try again later."}],anotherQuestion:[{type:0,value:"Send a message..."}],reset:[{type:0,value:"Reset conversation"}]},WD={use:[{type:0,value:"Gebruik"}],loading:[{type:0,value:"Laden..."}],error:[{type:0,value:"Er ging iets mis, probeer het later opnieuw."}],anotherQuestion:[{type:0,value:"Stuur een bericht..."}],reset:[{type:0,value:"Reset gesprek"}]};var Ak={root:"dd-fxP4c",title:"dd-vDbMh",empty:"dd-sB0lz",status:"dd--oZ1C",form:"dd-t0hnD",input:"dd-i1v3W",submit:"dd-oo2Oa",question:"dd-WvK17",answer:"dd-HAHcU",alignRight:"dd-oxrX3",listItemFeedback:"dd-POUal"};var{entries:Hk,setPrototypeOf:Ik,isFrozen:qD,getPrototypeOf:GD,getOwnPropertyDescriptor:YD}=Object,{freeze:Wt,seal:Bn,create:Bk}=Object,{apply:zv,construct:Hv}=typeof Reflect!="undefined"&&Reflect;Wt||(Wt=function(t){return t});Bn||(Bn=function(t){return t});zv||(zv=function(t,n,r){return t.apply(n,r)});Hv||(Hv=function(t,n){return new t(...n)});var hp=qt(Array.prototype.forEach),XD=qt(Array.prototype.lastIndexOf),Lk=qt(Array.prototype.pop),Dc=qt(Array.prototype.push),QD=qt(Array.prototype.splice),vp=qt(String.prototype.toLowerCase),Ov=qt(String.prototype.toString),_k=qt(String.prototype.match),Fc=qt(String.prototype.replace),ZD=qt(String.prototype.indexOf),JD=qt(String.prototype.trim),fr=qt(Object.prototype.hasOwnProperty),Kt=qt(RegExp.prototype.test),zc=e3(TypeError);function qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return zv(e,t,r)}}function e3(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hv(e,n)}}function ve(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vp;Ik&&Ik(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(qD(t)||(t[r]=i),o=i)}e[o]=!0}return e}function t3(e){for(let t=0;t<e.length;t++)fr(e,t)||(e[t]=null);return e}function es(e){let t=Bk(null);for(let[n,r]of Hk(e))fr(e,n)&&(Array.isArray(r)?t[n]=t3(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=es(r):t[n]=r);return t}function Hc(e,t){for(;e!==null;){let r=YD(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=GD(e)}function n(){return null}return n}var Ok=Wt(["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"]),Nv=Wt(["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"]),Mv=Wt(["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"]),n3=Wt(["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"]),Dv=Wt(["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"]),r3=Wt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nk=Wt(["#text"]),Mk=Wt(["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","popover","popovertarget","popovertargetaction","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","wrap","xmlns","slot"]),Fv=Wt(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","slope","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","tablevalues","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"]),Dk=Wt(["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"]),yp=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),o3=Bn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),i3=Bn(/<%[\w\W]*|[\w\W]*%>/gm),s3=Bn(/\$\{[\w\W]*/gm),a3=Bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),l3=Bn(/^aria-[\-\w]+$/),Uk=Bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),c3=Bn(/^(?:\w+script|data):/i),u3=Bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vk=Bn(/^html$/i),d3=Bn(/^[a-z][.\w]*(-[.\w]+)+$/i),Fk=Object.freeze({__proto__:null,ARIA_ATTR:l3,ATTR_WHITESPACE:u3,CUSTOM_ELEMENT:d3,DATA_ATTR:a3,DOCTYPE_NAME:Vk,ERB_EXPR:i3,IS_ALLOWED_URI:Uk,IS_SCRIPT_OR_DATA:c3,MUSTACHE_EXPR:o3,TMPLIT_EXPR:s3}),Bc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},f3=function(){return typeof window=="undefined"?null:window},p3=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch(s){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},zk=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $k(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f3(),t=ne=>$k(ne);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Bc.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,v=l.prototype,m=Hc(v,"cloneNode"),x=Hc(v,"remove"),y=Hc(v,"nextSibling"),g=Hc(v,"childNodes"),h=Hc(v,"parentNode");if(typeof s=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let w,E="",{implementation:C,createNodeIterator:k,createDocumentFragment:A,getElementsByTagName:F}=n,{importNode:N}=r,O=zk();t.isSupported=typeof Hk=="function"&&typeof h=="function"&&C&&C.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:G,ERB_EXPR:W,TMPLIT_EXPR:L,DATA_ATTR:z,ARIA_ATTR:ie,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:U}=Fk,{IS_ALLOWED_URI:q}=Fk,$=null,K=ve({},[...Ok,...Nv,...Mv,...Dv,...Nk]),H=null,de=ve({},[...Mk,...Fv,...Dk,...yp]),ue=Object.seal(Bk(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}})),Se=null,me=null,re=!0,Te=!0,rt=!1,se=!0,Q=!1,ae=!0,pe=!1,je=!1,vt=!1,Qe=!1,He=!1,Ze=!1,dt=!0,fi=!1,pi="user-content-",Zt=!0,vr=!1,Br={},vs=null,B0=ve({},["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"]),U0=null,V0=ve({},["audio","video","img","source","image","track"]),pm=null,$0=ve({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),cu="http://www.w3.org/1998/Math/MathML",uu="http://www.w3.org/2000/svg",Ur="http://www.w3.org/1999/xhtml",xs=Ur,mm=!1,gm=null,zA=ve({},[cu,uu,Ur],Ov),du=ve({},["mi","mo","mn","ms","mtext"]),fu=ve({},["annotation-xml"]),HA=ve({},["title","style","font","a","script"]),Ka=null,BA=["application/xhtml+xml","text/html"],UA="text/html",ft=null,ws=null,VA=n.createElement("form"),j0=function(T){return T instanceof RegExp||T instanceof Function},hm=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ws&&ws===T)){if((!T||typeof T!="object")&&(T={}),T=es(T),Ka=BA.indexOf(T.PARSER_MEDIA_TYPE)===-1?UA:T.PARSER_MEDIA_TYPE,ft=Ka==="application/xhtml+xml"?Ov:vp,$=fr(T,"ALLOWED_TAGS")?ve({},T.ALLOWED_TAGS,ft):K,H=fr(T,"ALLOWED_ATTR")?ve({},T.ALLOWED_ATTR,ft):de,gm=fr(T,"ALLOWED_NAMESPACES")?ve({},T.ALLOWED_NAMESPACES,Ov):zA,pm=fr(T,"ADD_URI_SAFE_ATTR")?ve(es($0),T.ADD_URI_SAFE_ATTR,ft):$0,U0=fr(T,"ADD_DATA_URI_TAGS")?ve(es(V0),T.ADD_DATA_URI_TAGS,ft):V0,vs=fr(T,"FORBID_CONTENTS")?ve({},T.FORBID_CONTENTS,ft):B0,Se=fr(T,"FORBID_TAGS")?ve({},T.FORBID_TAGS,ft):{},me=fr(T,"FORBID_ATTR")?ve({},T.FORBID_ATTR,ft):{},Br=fr(T,"USE_PROFILES")?T.USE_PROFILES:!1,re=T.ALLOW_ARIA_ATTR!==!1,Te=T.ALLOW_DATA_ATTR!==!1,rt=T.ALLOW_UNKNOWN_PROTOCOLS||!1,se=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Q=T.SAFE_FOR_TEMPLATES||!1,ae=T.SAFE_FOR_XML!==!1,pe=T.WHOLE_DOCUMENT||!1,Qe=T.RETURN_DOM||!1,He=T.RETURN_DOM_FRAGMENT||!1,Ze=T.RETURN_TRUSTED_TYPE||!1,vt=T.FORCE_BODY||!1,dt=T.SANITIZE_DOM!==!1,fi=T.SANITIZE_NAMED_PROPS||!1,Zt=T.KEEP_CONTENT!==!1,vr=T.IN_PLACE||!1,q=T.ALLOWED_URI_REGEXP||Uk,xs=T.NAMESPACE||Ur,du=T.MATHML_TEXT_INTEGRATION_POINTS||du,fu=T.HTML_INTEGRATION_POINTS||fu,ue=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&j0(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ue.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&j0(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ue.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ue.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Q&&(Te=!1),He&&(Qe=!0),Br&&($=ve({},Nk),H=[],Br.html===!0&&(ve($,Ok),ve(H,Mk)),Br.svg===!0&&(ve($,Nv),ve(H,Fv),ve(H,yp)),Br.svgFilters===!0&&(ve($,Mv),ve(H,Fv),ve(H,yp)),Br.mathMl===!0&&(ve($,Dv),ve(H,Dk),ve(H,yp))),T.ADD_TAGS&&($===K&&($=es($)),ve($,T.ADD_TAGS,ft)),T.ADD_ATTR&&(H===de&&(H=es(H)),ve(H,T.ADD_ATTR,ft)),T.ADD_URI_SAFE_ATTR&&ve(pm,T.ADD_URI_SAFE_ATTR,ft),T.FORBID_CONTENTS&&(vs===B0&&(vs=es(vs)),ve(vs,T.FORBID_CONTENTS,ft)),Zt&&($["#text"]=!0),pe&&ve($,["html","head","body"]),$.table&&(ve($,["tbody"]),delete Se.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw zc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=T.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else w===void 0&&(w=p3(p,o)),w!==null&&typeof E=="string"&&(E=w.createHTML(""));Wt&&Wt(T),ws=T}},K0=ve({},[...Nv,...Mv,...n3]),W0=ve({},[...Dv,...r3]),$A=function(T){let B=h(T);(!B||!B.tagName)&&(B={namespaceURI:xs,tagName:"template"});let J=vp(T.tagName),Be=vp(B.tagName);return gm[T.namespaceURI]?T.namespaceURI===uu?B.namespaceURI===Ur?J==="svg":B.namespaceURI===cu?J==="svg"&&(Be==="annotation-xml"||du[Be]):!!K0[J]:T.namespaceURI===cu?B.namespaceURI===Ur?J==="math":B.namespaceURI===uu?J==="math"&&fu[Be]:!!W0[J]:T.namespaceURI===Ur?B.namespaceURI===uu&&!fu[Be]||B.namespaceURI===cu&&!du[Be]?!1:!W0[J]&&(HA[J]||!K0[J]):!!(Ka==="application/xhtml+xml"&&gm[T.namespaceURI]):!1},xr=function(T){Dc(t.removed,{element:T});try{h(T).removeChild(T)}catch(B){x(T)}},pu=function(T,B){try{Dc(t.removed,{attribute:B.getAttributeNode(T),from:B})}catch(J){Dc(t.removed,{attribute:null,from:B})}if(B.removeAttribute(T),T==="is")if(Qe||He)try{xr(B)}catch(J){}else try{B.setAttribute(T,"")}catch(J){}},q0=function(T){let B=null,J=null;if(vt)T="<remove></remove>"+T;else{let xt=_k(T,/^[\r\n\t ]+/);J=xt&&xt[0]}Ka==="application/xhtml+xml"&&xs===Ur&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let Be=w?w.createHTML(T):T;if(xs===Ur)try{B=new f().parseFromString(Be,Ka)}catch(xt){}if(!B||!B.documentElement){B=C.createDocument(xs,"template",null);try{B.documentElement.innerHTML=mm?E:Be}catch(xt){}}let kt=B.body||B.documentElement;return T&&J&&kt.insertBefore(n.createTextNode(J),kt.childNodes[0]||null),xs===Ur?F.call(B,pe?"html":"body")[0]:pe?B.documentElement:kt},G0=function(T){return k.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ym=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},Y0=function(T){return typeof a=="function"&&T instanceof a};function Vr(ne,T,B){hp(ne,J=>{J.call(t,T,B,ws)})}let X0=function(T){let B=null;if(Vr(O.beforeSanitizeElements,T,null),ym(T))return xr(T),!0;let J=ft(T.nodeName);if(Vr(O.uponSanitizeElement,T,{tagName:J,allowedTags:$}),T.hasChildNodes()&&!Y0(T.firstElementChild)&&Kt(/<[/\w!]/g,T.innerHTML)&&Kt(/<[/\w!]/g,T.textContent)||T.nodeType===Bc.progressingInstruction||ae&&T.nodeType===Bc.comment&&Kt(/<[/\w]/g,T.data))return xr(T),!0;if(!$[J]||Se[J]){if(!Se[J]&&Z0(J)&&(ue.tagNameCheck instanceof RegExp&&Kt(ue.tagNameCheck,J)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(J)))return!1;if(Zt&&!vs[J]){let Be=h(T)||T.parentNode,kt=g(T)||T.childNodes;if(kt&&Be){let xt=kt.length;for(let Jt=xt-1;Jt>=0;--Jt){let wr=m(kt[Jt],!0);wr.__removalCount=(T.__removalCount||0)+1,Be.insertBefore(wr,y(T))}}}return xr(T),!0}return T instanceof l&&!$A(T)||(J==="noscript"||J==="noembed"||J==="noframes")&&Kt(/<\/no(script|embed|frames)/i,T.innerHTML)?(xr(T),!0):(Q&&T.nodeType===Bc.text&&(B=T.textContent,hp([G,W,L],Be=>{B=Fc(B,Be," ")}),T.textContent!==B&&(Dc(t.removed,{element:T.cloneNode()}),T.textContent=B)),Vr(O.afterSanitizeElements,T,null),!1)},Q0=function(T,B,J){if(dt&&(B==="id"||B==="name")&&(J in n||J in VA))return!1;if(!(Te&&!me[B]&&Kt(z,B))){if(!(re&&Kt(ie,B))){if(!H[B]||me[B]){if(!(Z0(T)&&(ue.tagNameCheck instanceof RegExp&&Kt(ue.tagNameCheck,T)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(T))&&(ue.attributeNameCheck instanceof RegExp&&Kt(ue.attributeNameCheck,B)||ue.attributeNameCheck instanceof Function&&ue.attributeNameCheck(B))||B==="is"&&ue.allowCustomizedBuiltInElements&&(ue.tagNameCheck instanceof RegExp&&Kt(ue.tagNameCheck,J)||ue.tagNameCheck instanceof Function&&ue.tagNameCheck(J))))return!1}else if(!pm[B]){if(!Kt(q,Fc(J,V,""))){if(!((B==="src"||B==="xlink:href"||B==="href")&&T!=="script"&&ZD(J,"data:")===0&&U0[T])){if(!(rt&&!Kt(Y,Fc(J,V,"")))){if(J)return!1}}}}}}return!0},Z0=function(T){return T!=="annotation-xml"&&_k(T,U)},J0=function(T){Vr(O.beforeSanitizeAttributes,T,null);let{attributes:B}=T;if(!B||ym(T))return;let J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0},Be=B.length;for(;Be--;){let kt=B[Be],{name:xt,namespaceURI:Jt,value:wr}=kt,Wa=ft(xt),Dt=xt==="value"?wr:JD(wr);if(J.attrName=Wa,J.attrValue=Dt,J.keepAttr=!0,J.forceKeepAttr=void 0,Vr(O.uponSanitizeAttribute,T,J),Dt=J.attrValue,fi&&(Wa==="id"||Wa==="name")&&(pu(xt,T),Dt=pi+Dt),ae&&Kt(/((--!?|])>)|<\/(style|title)/i,Dt)){pu(xt,T);continue}if(J.forceKeepAttr||(pu(xt,T),!J.keepAttr))continue;if(!se&&Kt(/\/>/i,Dt)){pu(xt,T);continue}Q&&hp([G,W,L],tx=>{Dt=Fc(Dt,tx," ")});let ex=ft(T.nodeName);if(Q0(ex,Wa,Dt)){if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Jt)switch(p.getAttributeType(ex,Wa)){case"TrustedHTML":{Dt=w.createHTML(Dt);break}case"TrustedScriptURL":{Dt=w.createScriptURL(Dt);break}}try{Jt?T.setAttributeNS(Jt,xt,Dt):T.setAttribute(xt,Dt),ym(T)?xr(T):Lk(t.removed)}catch(tx){}}}Vr(O.afterSanitizeAttributes,T,null)},jA=function ne(T){let B=null,J=G0(T);for(Vr(O.beforeSanitizeShadowDOM,T,null);B=J.nextNode();)Vr(O.uponSanitizeShadowNode,B,null),X0(B),J0(B),B.content instanceof i&&ne(B.content);Vr(O.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(ne){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},B=null,J=null,Be=null,kt=null;if(mm=!ne,mm&&(ne="<!-->"),typeof ne!="string"&&!Y0(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw zc("dirty is not a string, aborting")}else throw zc("toString is not a function");if(!t.isSupported)return ne;if(je||hm(T),t.removed=[],typeof ne=="string"&&(vr=!1),vr){if(ne.nodeName){let wr=ft(ne.nodeName);if(!$[wr]||Se[wr])throw zc("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof a)B=q0("<!---->"),J=B.ownerDocument.importNode(ne,!0),J.nodeType===Bc.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?B=J:B.appendChild(J);else{if(!Qe&&!Q&&!pe&&ne.indexOf("<")===-1)return w&&Ze?w.createHTML(ne):ne;if(B=q0(ne),!B)return Qe?null:Ze?E:""}B&&vt&&xr(B.firstChild);let xt=G0(vr?ne:B);for(;Be=xt.nextNode();)X0(Be),J0(Be),Be.content instanceof i&&jA(Be.content);if(vr)return ne;if(Qe){if(He)for(kt=A.call(B.ownerDocument);B.firstChild;)kt.appendChild(B.firstChild);else kt=B;return(H.shadowroot||H.shadowrootmode)&&(kt=N.call(r,kt,!0)),kt}let Jt=pe?B.outerHTML:B.innerHTML;return pe&&$["!doctype"]&&B.ownerDocument&&B.ownerDocument.doctype&&B.ownerDocument.doctype.name&&Kt(Vk,B.ownerDocument.doctype.name)&&(Jt="<!DOCTYPE "+B.ownerDocument.doctype.name+`>
20
- `+Jt),Q&&hp([G,W,L],wr=>{Jt=Fc(Jt,wr," ")}),w&&Ze?w.createHTML(Jt):Jt},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};hm(ne),je=!0},t.clearConfig=function(){ws=null,je=!1},t.isValidAttribute=function(ne,T,B){ws||hm({});let J=ft(ne),Be=ft(T);return Q0(J,Be,B)},t.addHook=function(ne,T){typeof T=="function"&&Dc(O[ne],T)},t.removeHook=function(ne,T){if(T!==void 0){let B=XD(O[ne],T);return B===-1?void 0:QD(O[ne],B,1)[0]}return Lk(O[ne])},t.removeHooks=function(ne){O[ne]=[]},t.removeAllHooks=function(){O=zk()},t}var jk=$k();var ho=b(Z());var Uv=b(Ne()),Un=b(Z());var xp=b(Z()),m3=["bottom","height","left","right","top","width"],g3=(e={},t={})=>m3.some(n=>e[n]!==t[n]),go=new Map,Kk,Wk=()=>{let e=[],t=[];go.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();g3(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{go.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Kk=window.requestAnimationFrame(Wk)};function h3(e,t){return{observe(){let n=go.size===0;if(go.has(e)){let r=go.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else go.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&Wk()},unobserve(){let n=go.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||go.delete(e),go.size||cancelAnimationFrame(Kk)}}}}function Bv(e){let[t,n]=(0,xp.useState)(null);return(0,xp.useLayoutEffect)(()=>{if(!e.current)return;let r=h3(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Aa=b(Z()),Yk=b(Ul());var qk=b(Z());function ri(e){(0,qk.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ts(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var Gk={root:"dd-r-dgo"};var Xk=({children:e,parentNode:t})=>{let[n,r]=(0,Aa.useState)(null),o=(0,Aa.useContext)(Ya);return(0,Aa.useLayoutEffect)(()=>{let i=document.createElement("div");return ts(i),i.classList.add(Gk.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,Yk.createPortal)(e,n):null};var Or={ref:"dd-iz-KP",root:"dd-vEMon",positionAbove:"dd-mUCxM",positionBelow:"dd-7oZI7",positionLeft:"dd-BiWvD",positionRight:"dd-JIWea",alignStart:"dd-5ivu6",alignCenter:"dd-rnVkP",alignEnd:"dd-gZBp4"};var wp=b(R()),Sp=(e=!1)=>{let[t,n]=(0,Un.useState)(e),r=(0,Un.useCallback)(()=>n(!0),[]),o=(0,Un.useCallback)(()=>n(!1),[]),i=(0,Un.useCallback)(()=>n(a=>!a),[]),s=(0,Un.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Vv(e,t=null,n=0){if(!e)return{display:"none"};let r=t?e.top-t.top<0||e.top<t.top-n?t.top-n:e.top+e.height>t.top+t.height+n?t.top+t.height+n-e.height:e.top:e.top,o=t?e.left<t.left-n?t.left-n:e.left+e.width>t.left+t.width+n?t.left+t.width+n-e.width:e.left:e.left;return{top:r,left:o,height:e.height,width:e.width}}var Ia=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Un.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Vv,parentNode:a}=u,l=oe(u,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let d=Bv(t),f=Bv(n),p=(0,Un.useMemo)(()=>s(d,f,0),[d,f]);return(0,wp.jsx)(Xk,{parentNode:a,children:(0,wp.jsx)("div",P(S({className:(0,Uv.default)(Or.ref,{[Or.positionAbove]:r==="above",[Or.positionBelow]:r==="below",[Or.positionLeft]:r==="left",[Or.positionRight]:r==="right",[Or.alignStart]:o==="start",[Or.alignCenter]:o==="center",[Or.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,wp.jsx)("div",{className:(0,Uv.default)(e,Or.root),children:i})}))})};var Qk={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};function Kv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var os=Kv();function rR(e){os=e}var $c={exec:()=>null};function Pe(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Gt.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,t)};return r}var Gt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},y3=/^(?:[ \t]*(?:\n|$))+/,v3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,x3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Kc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,w3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Wv=/(?:[*+-]|\d{1,9}[.)])/,oR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iR=Pe(oR).replace(/bull/g,Wv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),S3=Pe(oR).replace(/bull/g,Wv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),qv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b3=/^[^\n]+/,Gv=/(?!\s*\])(?:\\.|[^\[\]\\])+/,E3=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Gv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),T3=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Wv).getRegex(),Tp="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Yv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,C3=Pe("^ {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|$))","i").replace("comment",Yv).replace("tag",Tp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sR=Pe(qv).replace("hr",Kc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",Tp).getRegex(),k3=Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sR).getRegex(),Xv={blockquote:k3,code:v3,def:E3,fences:x3,heading:w3,hr:Kc,html:C3,lheading:iR,list:T3,newline:y3,paragraph:sR,table:$c,text:b3},Zk=Pe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Kc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\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",Tp).getRegex(),R3=P(S({},Xv),{lheading:S3,table:Zk,paragraph:Pe(qv).replace("hr",Kc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zk).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",Tp).getRegex()}),P3=P(S({},Xv),{html:Pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Yv).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:$c,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Pe(qv).replace("hr",Kc).replace("heading",` *#{1,6} *[^
21
- ]`).replace("lheading",iR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),A3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,I3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,aR=/^( {2,}|\\)\n(?!\s*$)/,L3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Cp=/[\p{P}\p{S}]/u,Qv=/[\s\p{P}\p{S}]/u,lR=/[^\s\p{P}\p{S}]/u,_3=Pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Qv).getRegex(),cR=/(?!~)[\p{P}\p{S}]/u,O3=/(?!~)[\s\p{P}\p{S}]/u,N3=/(?:[^\s\p{P}\p{S}]|~)/u,M3=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,uR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,D3=Pe(uR,"u").replace(/punct/g,Cp).getRegex(),F3=Pe(uR,"u").replace(/punct/g,cR).getRegex(),dR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",z3=Pe(dR,"gu").replace(/notPunctSpace/g,lR).replace(/punctSpace/g,Qv).replace(/punct/g,Cp).getRegex(),H3=Pe(dR,"gu").replace(/notPunctSpace/g,N3).replace(/punctSpace/g,O3).replace(/punct/g,cR).getRegex(),B3=Pe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,lR).replace(/punctSpace/g,Qv).replace(/punct/g,Cp).getRegex(),U3=Pe(/\\(punct)/,"gu").replace(/punct/g,Cp).getRegex(),V3=Pe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),$3=Pe(Yv).replace("(?:-->|$)","-->").getRegex(),j3=Pe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",$3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ep=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,K3=Pe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Ep).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fR=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",Ep).replace("ref",Gv).getRegex(),pR=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Gv).getRegex(),W3=Pe("reflink|nolink(?!\\()","g").replace("reflink",fR).replace("nolink",pR).getRegex(),Zv={_backpedal:$c,anyPunctuation:U3,autolink:V3,blockSkip:M3,br:aR,code:I3,del:$c,emStrongLDelim:D3,emStrongRDelimAst:z3,emStrongRDelimUnd:B3,escape:A3,link:K3,nolink:pR,punctuation:_3,reflink:fR,reflinkSearch:W3,tag:j3,text:L3,url:$c},q3=P(S({},Zv),{link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",Ep).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ep).getRegex()}),$v=P(S({},Zv),{emStrongRDelimAst:H3,emStrongLDelim:F3,url:Pe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),G3=P(S({},$v),{br:Pe(aR).replace("{2,}","*").getRegex(),text:Pe($v.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),bp={normal:Xv,gfm:R3,pedantic:P3},Uc={normal:Zv,gfm:$v,breaks:G3,pedantic:q3},Y3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jk=e=>Y3[e];function Nr(e,t){if(t){if(Gt.escapeTest.test(e))return e.replace(Gt.escapeReplace,Jk)}else if(Gt.escapeTestNoEncode.test(e))return e.replace(Gt.escapeReplaceNoEncode,Jk);return e}function eR(e){try{e=encodeURI(e).replace(Gt.percentDecode,"%")}catch(t){return null}return e}function tR(e,t){var i;let n=e.replace(Gt.findPipe,(s,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Gt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Gt.slashPipe,"|");return r}function Vc(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function X3(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function nR(e,t,n,r,o){let i=t.href,s=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let l={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:i,title:s,text:a}}function Q3(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
19
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||t2)();if(!o)return;let i=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",s=i==="body"||i==="fragment"?o.body:o.createElement(i);return t.match(Z_)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,BT.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==HT||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),c=Uf[l]||Uf[s];if(!this.isSafe(t)||!l.match(J_)&&(!n&&(!c||c===Gy)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let u=l==="style"?this.extractStyleAttribute(t):a;c===Jo?u=!0:c===$i?u=Number.parseFloat(String(u)):c!==Bf&&(u=String(u)),r[qy[l]||l]=this.applyAttributeFilters(l,u),o+=1}),o===0)?null:r}extractStyleAttribute(t){let n={};return Array.from(t.style).forEach(r=>{let o=t.style[r];(typeof o=="string"||typeof o=="number")&&(n[r.replace(/-([a-z])/g,(i,s)=>String(s).toUpperCase())]=o)}),n}getTagConfig(t){let n={children:[],content:0,invalid:[],parent:[],self:!0,tagName:"",type:0,void:!1};return xc[t]?P(S(S({},n),xc[t]),{tagName:t}):n}isSafe(t){if(typeof HTMLAnchorElement!="undefined"&&t instanceof HTMLAnchorElement){let n=t.getAttribute("href");if(n!=null&&n.startsWith("#"))return!0;let r=t.protocol.toLowerCase();return r===":"||r==="http:"||r==="https:"||r==="mailto:"||r==="tel:"}return!0}isTagAllowed(t){return this.banned.has(t)||this.blocked.has(t)?!1:this.props.allowElements||this.allowed.has(t)}parse(){return this.container?this.parseNode(this.container,this.getTagConfig(this.container.nodeName.toLowerCase())):[]}parseNode(t,n){let{noHtml:r,noHtmlExceptMatchers:o,allowElements:i,transform:s,transformOnlyAllowList:a}=this.props,l=[],c="";return[...t.childNodes].forEach(u=>{if(u.nodeType===HT){let f=u.nodeName.toLowerCase(),p=this.getTagConfig(f);c&&(l.push(c),c="");let v=this.applyNodeFilters(f,u);if(!v)return;let g;if(s&&!(a&&!this.isTagAllowed(f))){this.keyIndex+=1;let x=this.keyIndex;g=this.parseNode(v,p);let y=s(v,g,p);if(y===null)return;if(typeof y!="undefined"){l.push(Wi.default.cloneElement(y,{key:x}));return}this.keyIndex=x-1}if(this.banned.has(f))return;if(!(r||o&&f!=="br")&&this.isTagAllowed(f)&&(i||this.canRenderChild(n,p))){var d;this.keyIndex+=1;let x=this.extractAttributes(v),y={tagName:f};x&&(y.attributes=x),p.void&&(y.selfClose=p.void),l.push(Wi.default.createElement(Vf,P(S({},y),{key:this.keyIndex}),(d=g)!==null&&d!==void 0?d:this.parseNode(v,p)))}else l=[...l,...this.parseNode(v,p.tagName?p:n)]}else if(u.nodeType===Q_){let f=r&&!o?u.textContent:this.applyMatchers(u.textContent||"",n);Array.isArray(f)?l=[...l,...f]:c+=f}}),c&&l.push(c),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(e2);){let[s,a]=i,l=i.index,c=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:u,matcher:d,props:f}=n[a],p;if(c)p=s.length,r.push(d.createElement(u,f));else{let v=o.match(new RegExp(`{{{/${a}}}}`));p=v.index+v[0].length,r.push(d.createElement(this.replaceTokens(o.slice(s.length,v.index),n),f))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function n2(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:c}=e,u=(t=o!=null?o:l)!==null&&t!==void 0?t:"span",d=u==="fragment"?!0:c,f;if(a)f=a;else{let p=new $f(i!=null?i:"",e).parse();p.length>0&&(f=p)}return f||(f=s),d?Wi.default.createElement(Wi.default.Fragment,null,f):Wi.default.createElement(Vf,{attributes:n,className:r,tagName:u},f)}function Ki(e){let E=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:c=null,onBeforeParse:u=null,tagName:d="span",noWrap:f=!1}=E,p=oe(E,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),v=i?[]:l,g=o?[]:a,x=u?[u]:[],y=c?[c]:[];v.forEach(C=>{C.onBeforeParse&&x.push(C.onBeforeParse.bind(C)),C.onAfterParse&&y.push(C.onAfterParse.bind(C))});let m=x.reduce((C,k)=>k(C,e),r!=null?r:""),h=new $f(m,p,v,g),w=y.reduce((C,k)=>k(C,e),h.parse());return Wi.default.createElement(n2,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:f,parsedContent:w.length===0?void 0:w,tagName:d})}var Ic=b(Q());var r2=/[.*+?^${}()|[\]\\]/g,o2=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function i2(e){return e.replace(r2,"\\$&")}function s2(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function a2(e){return e.search(o2)}function UT(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${i2(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function VT(e){return e.replace(Pu,'<mark data-type="placeholder">$1</mark>')}function fa(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function l2(e,t){return e.split("").map((s,a)=>({char:s,index:a})).filter(({char:s,index:a})=>/\s/.test(s)&&a<=t).map(({index:s})=>s).reverse()[0]}function Xy(e,t,n={}){if(t){let r=s2(t.toLowerCase(),e.toLowerCase()),o=fa(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),c=a2(l);return`<span style="opacity: 0.5">${l.substring(c+1)}</span>${o}`}let s=t.split(Ux).length>3||t.length>30?l2(t.trim(),r):0;return`${`${s>0?"\u2026":""}${fa(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var c2=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function jf(e){return c2.test(e)}function $T(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var Wf=b(Q()),KT=b(R()),jT=Wf.default.createContext(void 0);function ei(){let e=Wf.default.useContext(jT);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var WT=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Wf.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,KT.jsx)(jT.Provider,{value:s,children:e})};var Lr=b(Q());var L=b(Q(),1),Ta=b(Q(),1);function Gf(){return typeof window!="undefined"}function Ir(e){return GT(e)?(e.nodeName||"").toLowerCase():"#document"}function jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ir(e){var t;return(t=(GT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function GT(e){return Gf()?e instanceof Node||e instanceof jt(e).Node:!1}function Ne(e){return Gf()?e instanceof Element||e instanceof jt(e).Element:!1}function Xe(e){return Gf()?e instanceof HTMLElement||e instanceof jt(e).HTMLElement:!1}function Kf(e){return!Gf()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof jt(e).ShadowRoot}function pa(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=dn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function qT(e){return["table","td","th"].includes(Ir(e))}function wc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function qf(e){let t=ma(),n=Ne(e)?dn(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function YT(e){let t=or(e);for(;Xe(t)&&!sr(t);){if(qf(t))return t;if(wc(t))return null;t=or(t)}return null}function ma(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sr(e){return["html","body","#document"].includes(Ir(e))}function dn(e){return jt(e).getComputedStyle(e)}function Sc(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function or(e){if(Ir(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Kf(e)&&e.host||ir(e);return Kf(t)?t.host:t}function XT(e){let t=or(e);return sr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&pa(t)?t:XT(t)}function Cn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=XT(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=jt(o);if(i){let a=Yf(s);return t.concat(s,s.visualViewport||[],pa(o)?o:[],a&&n?Cn(a):[])}return t.concat(o,Cn(o,[],n))}function Yf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ti(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function gt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Kf(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function QT(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Zy(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function ZT(e){return e.mozInputSource===0&&e.isTrusted?!0:Qy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function JT(e){return u2()?!1:!Qy()&&e.width===0&&e.height===0||Qy()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function eC(){return/apple/i.test(navigator.vendor)}function Qy(){let e=/android/i;return e.test(QT())||e.test(Zy())}function u2(){return Zy().includes("jsdom/")}function ga(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function tC(e){return"nativeEvent"in e}function nC(e){return e.matches("html,body")}function ht(e){return(e==null?void 0:e.ownerDocument)||document}function Xf(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function lo(e){return"composedPath"in e?e.composedPath()[0]:e.target}var d2="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Jy(e){return Xe(e)&&e.matches(d2)}function Qf(e){e.preventDefault(),e.stopPropagation()}function ev(e){return e?e.getAttribute("role")==="combobox"&&Jy(e):!1}var ha=Math.min,co=Math.max,Ec=Math.round,Tc=Math.floor,ar=e=>({x:e,y:e}),f2={left:"right",right:"left",bottom:"top",top:"bottom"},p2={start:"end",end:"start"};function tv(e,t,n){return co(e,ha(t,n))}function Cc(e,t){return typeof e=="function"?e(t):e}function ni(e){return e.split("-")[0]}function kc(e){return e.split("-")[1]}function nv(e){return e==="x"?"y":"x"}function rv(e){return e==="y"?"height":"width"}function Gi(e){return["top","bottom"].includes(ni(e))?"y":"x"}function ov(e){return nv(Gi(e))}function rC(e,t,n){n===void 0&&(n=!1);let r=kc(e),o=ov(e),i=rv(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=bc(s)),[s,bc(s)]}function oC(e){let t=bc(e);return[Zf(e),t,Zf(t)]}function Zf(e){return e.replace(/start|end/g,t=>p2[t])}function m2(e,t,n){let r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function iC(e,t,n,r){let o=kc(e),i=m2(ni(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Zf)))),i}function bc(e){return e.replace(/left|right|bottom|top/g,t=>f2[t])}function g2(e){return S({top:0,right:0,bottom:0,left:0},e)}function sC(e){return typeof e!="number"?g2(e):{top:e,right:e,bottom:e,left:e}}function qi(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var pn=b(R(),1);var h2=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Jf=h2.join(","),lC=typeof Element=="undefined",ya=lC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ep=!lC&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},tp=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",s=i||n&&t&&e(t.parentNode);return s},y2=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},v2=function(t,n,r){if(tp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Jf));return n&&ya.call(t,Jf)&&o.unshift(t),o=o.filter(r),o},x2=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!tp(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:s,candidates:c})}else{var u=ya.call(s,Jf);u&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var d=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),f=!tp(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(d&&f){var p=e(d===!0?s.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},cC=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},uC=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||y2(t))&&!cC(t)?0:t.tabIndex},w2=function(t,n){var r=uC(t);return r<0&&n&&!cC(t)?0:r},S2=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},dC=function(t){return t.tagName==="INPUT"},b2=function(t){return dC(t)&&t.type==="hidden"},E2=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},T2=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},C2=function(t){if(!t.name)return!0;var n=t.form||ep(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window!="undefined"&&typeof window.CSS!="undefined"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=T2(o,t.form);return!i||i===t},k2=function(t){return dC(t)&&t.type==="radio"},R2=function(t){return k2(t)&&!C2(t)},P2=function(t){var n,r=t&&ep(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var s,a,l;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,d;r=ep(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},aC=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},A2=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ya.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(ya.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var a=t;t;){var l=t.parentElement,c=ep(t);if(l&&!l.shadowRoot&&o(l)===!0)return aC(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=a}if(P2(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return aC(t);return!1},I2=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return ya.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},L2=function(t,n){return!(n.disabled||tp(n)||b2(n)||A2(n,t)||E2(n)||I2(n))},iv=function(t,n){return!(R2(n)||uC(n)<0||!L2(t,n))},O2=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},N2=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=w2(a,s),c=s?e(o.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:c})}),r.sort(S2).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Rc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=x2([t],n.includeContainer,{filter:iv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:O2}):r=v2(t,n.includeContainer,iv.bind(null,n)),N2(r)};var fC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ya.call(t,Jf)===!1?!1:iv(n,t)};var wv=b(Ul(),1);function pC(e,t,n){let{reference:r,floating:o}=e,i=Gi(t),s=ov(t),a=rv(s),l=ni(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(kc(t)){case"start":p[s]-=f*(n&&c?-1:1);break;case"end":p[s]+=f*(n&&c?-1:1);break}return p}var mC=(e,t,n)=>I(void 0,null,function*(){let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=yield s.isRTL==null?void 0:s.isRTL(t),c=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=pC(c,r,l),f=r,p={},v=0;for(let g=0;g<a.length;g++){let{name:x,fn:y}=a[g],{x:m,y:h,data:w,reset:E}=yield y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=m!=null?m:u,d=h!=null?h:d,p=P(S({},p),{[x]:S(S({},p[x]),w)}),E&&v<=50&&(v++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=pC(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}});function sv(e,t){return I(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Cc(t,e),v=sC(p),x=a[f?d==="floating"?"reference":"floating":d],y=qi(yield i.getClippingRect({element:(n=yield i.isElement==null?void 0:i.isElement(x))==null||n?x:x.contextElement||(yield i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),m=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,h=yield i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating),w=(yield i.isElement==null?void 0:i.isElement(h))?(yield i.getScale==null?void 0:i.getScale(h))||{x:1,y:1}:{x:1,y:1},E=qi(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:m,offsetParent:h,strategy:l}):m);return{top:(y.top-E.top+v.top)/w.y,bottom:(E.bottom-y.bottom+v.bottom)/w.y,left:(y.left-E.left+v.left)/w.x,right:(E.right-y.right+v.right)/w.x}})}var gC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return I(this,null,function*(){var r,o;let{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:c,elements:u}=n,F=Cc(e,n),{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:x=!0}=F,y=oe(F,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=s.arrow)!=null&&r.alignmentOffset)return{};let m=ni(i),h=Gi(l),w=ni(l)===l,E=yield c.isRTL==null?void 0:c.isRTL(u.floating),C=p||(w||!x?[bc(l)]:oC(l)),k=g!=="none";!p&&k&&C.push(...iC(l,x,g,E));let A=[l,...C],B=yield sv(n,y),M=[],N=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&M.push(B[m]),f){let ie=rC(i,a,E);M.push(B[ie[0]],B[ie[1]])}if(N=[...N,{placement:i,overflows:M}],!M.every(ie=>ie<=0)){var Z,Y;let ie=(((Z=s.flip)==null?void 0:Z.index)||0)+1,G=A[ie];if(G)return{data:{index:ie,overflows:N},reset:{placement:G}};let V=(Y=N.filter(U=>U.overflows[0]<=0).sort((U,K)=>U.overflows[1]-K.overflows[1])[0])==null?void 0:Y.placement;if(!V)switch(v){case"bestFit":{var O;let U=(O=N.filter(K=>{if(k){let $=Gi(K.placement);return $===h||$==="y"}return!0}).map(K=>[K.placement,K.overflows.filter($=>$>0).reduce(($,W)=>$+W,0)]).sort((K,$)=>K[1]-$[1])[0])==null?void 0:O[0];U&&(V=U);break}case"initialPlacement":V=l;break}if(i!==V)return{reset:{placement:V}}}return{}})}}};function M2(e,t){return I(this,null,function*(){let{placement:n,platform:r,elements:o}=e,i=yield r.isRTL==null?void 0:r.isRTL(o.floating),s=ni(n),a=kc(n),l=Gi(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=Cc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:v}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof v=="number"&&(p=a==="end"?v*-1:v),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}})}var hC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return I(this,null,function*(){var r,o;let{x:i,y:s,placement:a,middlewareData:l}=n,c=yield M2(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:P(S({},c),{placement:a})}})}}},yC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return I(this,null,function*(){let{x:r,y:o,placement:i}=n,y=Cc(e,n),{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:m=>{let{x:h,y:w}=m;return{x:h,y:w}}}}=y,c=oe(y,["mainAxis","crossAxis","limiter"]),u={x:r,y:o},d=yield sv(n,c),f=Gi(ni(i)),p=nv(f),v=u[p],g=u[f];if(s){let m=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=v+d[m],E=v-d[h];v=tv(w,v,E)}if(a){let m=f==="y"?"top":"left",h=f==="y"?"bottom":"right",w=g+d[m],E=g-d[h];g=tv(w,g,E)}let x=l.fn(P(S({},n),{[p]:v,[f]:g}));return P(S({},x),{data:{x:x.x-r,y:x.y-o,enabled:{[p]:s,[f]:a}}})})}}};function wC(e){let t=dn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Xe(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Ec(n)!==i||Ec(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function lv(e){return Ne(e)?e:e.contextElement}function va(e){let t=lv(e);if(!Xe(t))return ar(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wC(t),s=(i?Ec(n.width):n.width)/r,a=(i?Ec(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var _2=ar(0);function SC(e){let t=jt(e);return!ma()||!t.visualViewport?_2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function D2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jt(e)?!1:t}function Yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=lv(e),s=ar(1);t&&(r?Ne(r)&&(s=va(r)):s=va(e));let a=D2(i,n,r)?SC(i):ar(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){let f=jt(i),p=r&&Ne(r)?jt(r):r,v=f,g=Yf(v);for(;g&&r&&p!==v;){let x=va(g),y=g.getBoundingClientRect(),m=dn(g),h=y.left+(g.clientLeft+parseFloat(m.paddingLeft))*x.x,w=y.top+(g.clientTop+parseFloat(m.paddingTop))*x.y;l*=x.x,c*=x.y,u*=x.x,d*=x.y,l+=h,c+=w,v=jt(g),g=Yf(v)}}return qi({width:u,height:d,x:l,y:c})}function cv(e,t){let n=Sc(e).scrollLeft;return t?t.left+n:Yi(ir(e)).left+n}function bC(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:cv(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function F2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=ir(r),a=t?wc(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1),u=ar(0),d=Xe(r);if((d||!d&&!i)&&((Ir(r)!=="body"||pa(s))&&(l=Sc(r)),Xe(r))){let p=Yi(r);c=va(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let f=s&&!d&&!i?bC(s,l,!0):ar(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function z2(e){return Array.from(e.getClientRects())}function H2(e){let t=ir(e),n=Sc(e),r=e.ownerDocument.body,o=co(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=co(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+cv(e),a=-n.scrollTop;return dn(r).direction==="rtl"&&(s+=co(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function B2(e,t){let n=jt(e),r=ir(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let c=ma();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function U2(e,t){let n=Yi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Xe(e)?va(e):ar(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function vC(e,t,n){let r;if(t==="viewport")r=B2(e,n);else if(t==="document")r=H2(ir(e));else if(Ne(t))r=U2(t,n);else{let o=SC(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return qi(r)}function EC(e,t){let n=or(e);return n===t||!Ne(n)||sr(n)?!1:dn(n).position==="fixed"||EC(n,t)}function V2(e,t){let n=t.get(e);if(n)return n;let r=Cn(e,[],!1).filter(a=>Ne(a)&&Ir(a)!=="body"),o=null,i=dn(e).position==="fixed",s=i?or(e):e;for(;Ne(s)&&!sr(s);){let a=dn(s),l=qf(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||pa(s)&&!l&&EC(e,s))?r=r.filter(u=>u!==s):o=a,s=or(s)}return t.set(e,r),r}function $2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?wc(t)?[]:V2(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{let d=vC(t,u,o);return c.top=co(d.top,c.top),c.right=ha(d.right,c.right),c.bottom=ha(d.bottom,c.bottom),c.left=co(d.left,c.left),c},vC(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function j2(e){let{width:t,height:n}=wC(e);return{width:t,height:n}}function W2(e,t,n){let r=Xe(t),o=ir(t),i=n==="fixed",s=Yi(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=ar(0);if(r||!r&&!i)if((Ir(t)!=="body"||pa(o))&&(a=Sc(t)),r){let f=Yi(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=cv(o));let c=o&&!r&&!i?bC(o,a):ar(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function av(e){return dn(e).position==="static"}function xC(e,t){if(!Xe(e)||dn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ir(e)===n&&(n=n.ownerDocument.body),n}function TC(e,t){let n=jt(e);if(wc(e))return n;if(!Xe(e)){let o=or(e);for(;o&&!sr(o);){if(Ne(o)&&!av(o))return o;o=or(o)}return n}let r=xC(e,t);for(;r&&qT(r)&&av(r);)r=xC(r,t);return r&&sr(r)&&av(r)&&!qf(r)?n:r||YT(e)||n}var K2=function(e){return I(this,null,function*(){let t=this.getOffsetParent||TC,n=this.getDimensions,r=yield n(e.floating);return{reference:W2(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function G2(e){return dn(e).direction==="rtl"}var uv={convertOffsetParentRelativeRectToViewportRelativeRect:F2,getDocumentElement:ir,getClippingRect:$2,getOffsetParent:TC,getElementRects:K2,getClientRects:z2,getDimensions:j2,getScale:va,isElement:Ne,isRTL:G2};function CC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function q2(e,t){let n=null,r,o=ir(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let v=Tc(d),g=Tc(o.clientWidth-(u+f)),x=Tc(o.clientHeight-(d+p)),y=Tc(u),h={rootMargin:-v+"px "+-g+"px "+-x+"px "+-y+"px",threshold:co(0,ha(1,l))||1},w=!0;function E(C){let k=C[0].intersectionRatio;if(k!==l){if(!w)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!CC(c,e.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(E,P(S({},h),{root:o.ownerDocument}))}catch(C){n=new IntersectionObserver(E,h)}n.observe(e)}return s(!0),i}function np(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=lv(e),u=o||i?[...c?Cn(c):[],...Cn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});let d=c&&a?q2(c,n):null,f=-1,p=null;s&&(p=new ResizeObserver(y=>{let[m]=y;m&&m.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var h;(h=p)==null||h.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let v,g=l?Yi(e):null;l&&x();function x(){let y=Yi(e);g&&!CC(g,y)&&n(),g=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(m=>{o&&m.removeEventListener("scroll",n),i&&m.removeEventListener("resize",n)}),d==null||d(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(v)}}var kC=hC;var RC=yC,PC=gC;var rp=(e,t,n)=>{let r=new Map,o=S({platform:uv},n),i=P(S({},o.platform),{_c:r});return mC(e,t,P(S({},o),{platform:i}))};var nt=b(Q(),1),sp=b(Q(),1),LC=b(Ul(),1);var op=typeof document!="undefined"?sp.useLayoutEffect:sp.useEffect;function ip(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ip(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){let i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ip(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function OC(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function AC(e,t){let n=OC(e);return Math.round(t*n)/n}function dv(e){let t=nt.useRef(e);return op(()=>{t.current=e}),t}function NC(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=nt.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=nt.useState(r);ip(f,r)||p(r);let[v,g]=nt.useState(null),[x,y]=nt.useState(null),m=nt.useCallback(V=>{V!==C.current&&(C.current=V,g(V))},[]),h=nt.useCallback(V=>{V!==k.current&&(k.current=V,y(V))},[]),w=i||v,E=s||x,C=nt.useRef(null),k=nt.useRef(null),A=nt.useRef(u),B=l!=null,M=dv(l),N=dv(o),Z=dv(c),Y=nt.useCallback(()=>{if(!C.current||!k.current)return;let V={placement:t,strategy:n,middleware:f};N.current&&(V.platform=N.current),rp(C.current,k.current,V).then(U=>{let K=P(S({},U),{isPositioned:Z.current!==!1});O.current&&!ip(A.current,K)&&(A.current=K,LC.flushSync(()=>{d(K)}))})},[f,t,n,N,Z]);op(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(V=>P(S({},V),{isPositioned:!1})))},[c]);let O=nt.useRef(!1);op(()=>(O.current=!0,()=>{O.current=!1}),[]),op(()=>{if(w&&(C.current=w),E&&(k.current=E),w&&E){if(M.current)return M.current(w,E,Y);Y()}},[w,E,Y,M,B]);let F=nt.useMemo(()=>({reference:C,floating:k,setReference:m,setFloating:h}),[m,h]),ie=nt.useMemo(()=>({reference:w,floating:E}),[w,E]),G=nt.useMemo(()=>{let V={position:n,left:0,top:0};if(!ie.floating)return V;let U=AC(ie.floating,u.x),K=AC(ie.floating,u.y);return a?S(P(S({},V),{transform:"translate("+U+"px, "+K+"px)"}),OC(ie.floating)>=1.5&&{willChange:"transform"}):{position:n,left:U,top:K}},[n,a,ie.floating,u.x,u.y]);return nt.useMemo(()=>P(S({},u),{update:Y,refs:F,elements:ie,floatingStyles:G}),[u,Y,F,ie,G])}var ap=(e,t)=>P(S({},kC(e)),{options:[e,t]}),fv=(e,t)=>P(S({},RC(e)),{options:[e,t]});var pv=(e,t)=>P(S({},PC(e)),{options:[e,t]});function Sv(e){let t=L.useRef(void 0),n=L.useCallback(r=>{let o=e.map(i=>{if(i!=null){if(typeof i=="function"){let s=i,a=s(r);return typeof a=="function"?a:()=>{s(null)}}return i.current=r,()=>{i.current=null}}});return()=>{o.forEach(i=>i==null?void 0:i())}},e);return L.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}var YC=S({},L),Y2=YC.useInsertionEffect,X2=Y2||(e=>e());function kn(e){let t=L.useRef(()=>{});return X2(()=>{t.current=e}),L.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}var Q2="ArrowUp",Z2="ArrowDown",J2="ArrowLeft",eD="ArrowRight";var fn=typeof document!="undefined"?Ta.useLayoutEffect:Ta.useEffect;var tD=[J2,eD],nD=[Q2,Z2],D7=[...tD,...nD];var MC=!1,rD=0,_C=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+rD++;function oD(){let[e,t]=L.useState(()=>MC?_C():void 0);return fn(()=>{e==null&&t(_C())},[]),L.useEffect(()=>{MC=!0},[]),e}var iD=YC.useId,bv=iD||oD;function sD(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}var aD=L.createContext(null),lD=L.createContext(null),Ev=()=>{var e;return((e=L.useContext(aD))==null?void 0:e.id)||null},dp=()=>L.useContext(lD);function Ea(e){return"data-floating-ui-"+e}function lr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}function Sa(e){let t=(0,Ta.useRef)(e);return fn(()=>{t.current=e}),t}var DC=Ea("safe-polygon");function mv(e,t,n){return n&&!ga(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function XC(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,events:i,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=dp(),v=Ev(),g=Sa(c),x=Sa(l),y=Sa(n),m=L.useRef(),h=L.useRef(-1),w=L.useRef(),E=L.useRef(-1),C=L.useRef(!0),k=L.useRef(!1),A=L.useRef(()=>{}),B=L.useRef(!1),M=L.useCallback(()=>{var G;let V=(G=o.current.openEvent)==null?void 0:G.type;return(V==null?void 0:V.includes("mouse"))&&V!=="mousedown"},[o]);L.useEffect(()=>{if(!a)return;function G(V){let{open:U}=V;U||(lr(h),lr(E),C.current=!0,B.current=!1)}return i.on("openchange",G),()=>{i.off("openchange",G)}},[a,i]),L.useEffect(()=>{if(!a||!g.current||!n)return;function G(U){M()&&r(!1,U,"hover")}let V=ht(s.floating).documentElement;return V.addEventListener("mouseleave",G),()=>{V.removeEventListener("mouseleave",G)}},[s.floating,n,r,a,g,M]);let N=L.useCallback(function(G,V,U){V===void 0&&(V=!0),U===void 0&&(U="hover");let K=mv(x.current,"close",m.current);K&&!w.current?(lr(h),h.current=window.setTimeout(()=>r(!1,G,U),K)):V&&(lr(h),r(!1,G,U))},[x,r]),Z=kn(()=>{A.current(),w.current=void 0}),Y=kn(()=>{if(k.current){let G=ht(s.floating).body;G.style.pointerEvents="",G.removeAttribute(DC),k.current=!1}}),O=kn(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);L.useEffect(()=>{if(!a)return;function G($){if(lr(h),C.current=!1,u&&!ga(m.current)||d>0&&!mv(x.current,"open"))return;let W=mv(x.current,"open",m.current);W?h.current=window.setTimeout(()=>{y.current||r(!0,$,"hover")},W):n||r(!0,$,"hover")}function V($){if(O())return;A.current();let W=ht(s.floating);if(lr(E),B.current=!1,g.current&&o.current.floatingContext){n||lr(h),w.current=g.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){Y(),Z(),O()||N($,!0,"safe-polygon")}}));let fe=w.current;W.addEventListener("mousemove",fe),A.current=()=>{W.removeEventListener("mousemove",fe)};return}(m.current==="touch"?!gt(s.floating,$.relatedTarget):!0)&&N($)}function U($){O()||o.current.floatingContext&&(g.current==null||g.current(P(S({},o.current.floatingContext),{tree:p,x:$.clientX,y:$.clientY,onClose(){Y(),Z(),O()||N($)}}))($))}if(Ne(s.domReference)){var K;let $=s.domReference;return n&&$.addEventListener("mouseleave",U),(K=s.floating)==null||K.addEventListener("mouseleave",U),f&&$.addEventListener("mousemove",G,{once:!0}),$.addEventListener("mouseenter",G),$.addEventListener("mouseleave",V),()=>{var W;n&&$.removeEventListener("mouseleave",U),(W=s.floating)==null||W.removeEventListener("mouseleave",U),f&&$.removeEventListener("mousemove",G),$.removeEventListener("mouseenter",G),$.removeEventListener("mouseleave",V)}}},[s,a,e,u,d,f,N,Z,Y,r,n,y,p,x,g,o,O]),fn(()=>{var G;if(a&&n&&(G=g.current)!=null&&G.__options.blockPointerEvents&&M()){k.current=!0;let U=s.floating;if(Ne(s.domReference)&&U){var V;let K=ht(s.floating).body;K.setAttribute(DC,"");let $=s.domReference,W=p==null||(V=p.nodesRef.current.find(z=>z.id===v))==null||(V=V.context)==null?void 0:V.elements.floating;return W&&(W.style.pointerEvents=""),K.style.pointerEvents="none",$.style.pointerEvents="auto",U.style.pointerEvents="auto",()=>{K.style.pointerEvents="",$.style.pointerEvents="",U.style.pointerEvents=""}}}},[a,n,v,s,p,g,M]),fn(()=>{n||(m.current=void 0,B.current=!1,Z(),Y())},[n,Z,Y]),L.useEffect(()=>()=>{Z(),lr(h),lr(E),Y()},[a,s.domReference,Z,Y]);let F=L.useMemo(()=>{function G(V){m.current=V.pointerType}return{onPointerDown:G,onPointerEnter:G,onMouseMove(V){let{nativeEvent:U}=V;function K(){!C.current&&!y.current&&r(!0,U,"hover")}u&&!ga(m.current)||n||d===0||B.current&&bm(V.movementX,2)+bm(V.movementY,2)<2||(lr(E),m.current==="touch"?K():(B.current=!0,E.current=window.setTimeout(K,d)))}}},[u,r,n,y,d]),ie=L.useMemo(()=>({onMouseEnter(){lr(h)},onMouseLeave(G){O()||N(G.nativeEvent,!1)}}),[N,O]);return L.useMemo(()=>a?{reference:F,floating:ie}:{},[a,F,ie])}var FC=0;function xa(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(FC);let i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():FC=requestAnimationFrame(i)}function zC(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){let i=e.find(s=>s.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function ba(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(s=>{var a;return o.parentId===s.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}var wa=new WeakMap,lp=new WeakSet,cp={},gv=0,cD=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype,QC=e=>e&&(e.host||QC(e.parentNode)),uD=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=QC(n);return e.contains(r)?r:null}).filter(n=>n!=null);function dD(e,t,n,r){let o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,s=uD(t,e),a=new Set,l=new Set(s),c=[];cp[o]||(cp[o]=new WeakMap);let u=cp[o];s.forEach(d),f(t),a.clear();function d(p){!p||a.has(p)||(a.add(p),p.parentNode&&d(p.parentNode))}function f(p){!p||l.has(p)||[].forEach.call(p.children,v=>{if(Ir(v)!=="script")if(a.has(v))f(v);else{let g=i?v.getAttribute(i):null,x=g!==null&&g!=="false",y=wa.get(v)||0,m=i?y+1:y,h=(u.get(v)||0)+1;wa.set(v,m),u.set(v,h),c.push(v),m===1&&x&&lp.add(v),h===1&&v.setAttribute(o,""),!x&&i&&v.setAttribute(i,i==="inert"?"":"true")}})}return gv++,()=>{c.forEach(p=>{let v=wa.get(p)||0,g=i?v-1:v,x=(u.get(p)||0)-1;wa.set(p,g),u.set(p,x),g||(!lp.has(p)&&i&&p.removeAttribute(i),lp.delete(p)),x||p.removeAttribute(o)}),gv--,gv||(wa=new WeakMap,wa=new WeakMap,lp=new WeakSet,cp={})}}function HC(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=ht(e[0]).body;return dD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}var fp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ZC(e,t){let n=Rc(e,fp());t==="prev"&&n.reverse();let r=n.indexOf(ti(ht(e)));return n.slice(r+1)[0]}function JC(e){return ZC(ht(e).body,"next")||e}function ek(e){return ZC(ht(e).body,"prev")||e}function Pc(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!gt(n,r)}function fD(e){Rc(e,fp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function BC(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{let r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var pp={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},up=L.forwardRef(function(t,n){let[r,o]=L.useState();fn(()=>{eC()&&o("button")},[]);let i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ea("focus-guard")]:"",style:pp};return(0,pn.jsx)("span",S(S({},t),i))}),tk=L.createContext(null),UC=Ea("portal");function pD(e){e===void 0&&(e={});let{id:t,root:n}=e,r=bv(),o=rk(),[i,s]=L.useState(null),a=L.useRef(null);return fn(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),fn(()=>{if(!r||a.current)return;let l=t?document.getElementById(t):null;if(!l)return;let c=document.createElement("div");c.id=r,c.setAttribute(UC,""),l.appendChild(c),a.current=c,s(c)},[t,r]),fn(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!Ne(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));let u=document.createElement("div");u.id=r,u.setAttribute(UC,""),l=c||l,l.appendChild(u),a.current=u,s(u)},[t,n,r,o]),i}function nk(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=pD({id:n,root:r}),[s,a]=L.useState(null),l=L.useRef(null),c=L.useRef(null),u=L.useRef(null),d=L.useRef(null),f=s==null?void 0:s.modal,p=s==null?void 0:s.open,v=!!s&&!s.modal&&s.open&&o&&!!(r||i);return L.useEffect(()=>{if(!i||!o||f)return;function g(x){i&&Pc(x)&&(x.type==="focusin"?BC:fD)(i)}return i.addEventListener("focusin",g,!0),i.addEventListener("focusout",g,!0),()=>{i.removeEventListener("focusin",g,!0),i.removeEventListener("focusout",g,!0)}},[i,o,f]),L.useEffect(()=>{i&&(p||BC(i))},[p,i]),(0,pn.jsxs)(tk.Provider,{value:L.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:a}),[o,i]),children:[v&&i&&(0,pn.jsx)(up,{"data-type":"outside",ref:l,onFocus:g=>{if(Pc(g,i)){var x;(x=u.current)==null||x.focus()}else{let y=s?s.domReference:null,m=ek(y);m==null||m.focus()}}}),v&&i&&(0,pn.jsx)("span",{"aria-owns":i.id,style:pp}),i&&wv.createPortal(t,i),v&&i&&(0,pn.jsx)(up,{"data-type":"outside",ref:c,onFocus:g=>{if(Pc(g,i)){var x;(x=d.current)==null||x.focus()}else{let y=s?s.domReference:null,m=JC(y);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,g.nativeEvent,"focus-out"))}}})]})}var rk=()=>L.useContext(tk),xv="data-floating-ui-focusable";function VC(e){return e?e.hasAttribute(xv)?e:e.querySelector("["+xv+"]")||e:null}function $C(e){return L.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var mD=20,Xi=[];function gD(e){Xi=Xi.filter(t=>t.isConnected),e&&Ir(e)!=="body"&&(Xi.push(e),Xi.length>mD&&(Xi=Xi.slice(-20)))}function jC(){return Xi.slice().reverse().find(e=>e.isConnected)}function hD(e){let t=fp();return fC(e,t)?e:Rc(e,t)[0]||e}var yD=L.forwardRef(function(t,n){return(0,pn.jsx)("button",P(S({},t),{type:"button",ref:n,tabIndex:-1,style:pp}))});function ok(e){let{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:s=0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0,outsideElementsInert:f=!1,getInsideElements:p=()=>[]}=e,{open:v,onOpenChange:g,events:x,dataRef:y,elements:{domReference:m,floating:h}}=t,w=kn(()=>{var se;return(se=y.current.floatingContext)==null?void 0:se.nodeId}),E=kn(p),C=typeof s=="number"&&s<0,k=ev(m)&&C,A=cD(),B=A?i:!0,M=!B||A&&f,N=Sa(o),Z=Sa(s),Y=Sa(a),O=dp(),F=rk(),ie=L.useRef(null),G=L.useRef(null),V=L.useRef(!1),U=L.useRef(!1),K=L.useRef(-1),$=F!=null,W=VC(h),z=kn(function(se){return se===void 0&&(se=W),se?Rc(se,fp()):[]}),fe=kn(se=>{let X=z(se);return N.current.map(ae=>m&&ae==="reference"?m:W&&ae==="floating"?W:X).filter(Boolean).flat()});L.useEffect(()=>{if(r||!c)return;function se(ae){if(ae.key==="Tab"){gt(W,ti(ht(W)))&&z().length===0&&!k&&Qf(ae);let pe=fe(),je=lo(ae);N.current[0]==="reference"&&je===m&&(Qf(ae),ae.shiftKey?xa(pe[pe.length-1]):xa(pe[1])),N.current[1]==="floating"&&je===W&&ae.shiftKey&&(Qf(ae),xa(pe[0]))}}let X=ht(W);return X.addEventListener("keydown",se),()=>{X.removeEventListener("keydown",se)}},[r,m,W,c,N,k,z,fe]),L.useEffect(()=>{if(r||!h)return;function se(X){let ae=lo(X),je=z().indexOf(ae);je!==-1&&(K.current=je)}return h.addEventListener("focusin",se),()=>{h.removeEventListener("focusin",se)}},[r,h,z]),L.useEffect(()=>{if(r||!d)return;function se(){U.current=!0,setTimeout(()=>{U.current=!1})}function X(ae){let pe=ae.relatedTarget;queueMicrotask(()=>{let je=w(),vt=!(gt(m,pe)||gt(h,pe)||gt(pe,h)||gt(F==null?void 0:F.portalNode,pe)||pe!=null&&pe.hasAttribute(Ea("focus-guard"))||O&&(ba(O.nodesRef.current,je).find(Qe=>{var He,Ze;return gt((He=Qe.context)==null?void 0:He.elements.floating,pe)||gt((Ze=Qe.context)==null?void 0:Ze.elements.domReference,pe)})||zC(O.nodesRef.current,je).find(Qe=>{var He,Ze,dt;return[(He=Qe.context)==null?void 0:He.elements.floating,VC((Ze=Qe.context)==null?void 0:Ze.elements.floating)].includes(pe)||((dt=Qe.context)==null?void 0:dt.elements.domReference)===pe})));if(l&&vt&&ti(ht(W))===ht(W).body){Xe(W)&&W.focus();let Qe=K.current,He=z(),Ze=He[Qe]||He[He.length-1]||W;Xe(Ze)&&Ze.focus()}(k||!c)&&pe&&vt&&!U.current&&pe!==jC()&&(V.current=!0,g(!1,ae,"focus-out"))})}if(h&&Xe(m))return m.addEventListener("focusout",X),m.addEventListener("pointerdown",se),h.addEventListener("focusout",X),()=>{m.removeEventListener("focusout",X),m.removeEventListener("pointerdown",se),h.removeEventListener("focusout",X)}},[r,m,h,W,c,O,F,g,d,l,z,k,w]);let de=L.useRef(null),be=L.useRef(null),me=$C([de,F==null?void 0:F.beforeInsideRef]),re=$C([be,F==null?void 0:F.afterInsideRef]);L.useEffect(()=>{var se,X;if(r||!h)return;let ae=Array.from((F==null||(se=F.portalNode)==null?void 0:se.querySelectorAll("["+Ea("portal")+"]"))||[]),pe=O?zC(O.nodesRef.current,w()):[],je=O&&!c?pe.map(Ze=>{var dt;return(dt=Ze.context)==null?void 0:dt.elements.floating}):[],vt=(X=pe.find(Ze=>{var dt;return ev(((dt=Ze.context)==null?void 0:dt.elements.domReference)||null)}))==null||(X=X.context)==null?void 0:X.elements.domReference,Qe=[h,vt,...ae,...je,...E(),ie.current,G.current,de.current,be.current,F==null?void 0:F.beforeOutsideRef.current,F==null?void 0:F.afterOutsideRef.current,N.current.includes("reference")||k?m:null].filter(Ze=>Ze!=null),He=c||k?HC(Qe,!M,M):HC(Qe);return()=>{He()}},[r,m,h,c,N,F,k,B,M,O,w,E]),fn(()=>{if(r||!Xe(W))return;let se=ht(W),X=ti(se);queueMicrotask(()=>{let ae=fe(W),pe=Z.current,je=(typeof pe=="number"?ae[pe]:pe.current)||W,vt=gt(W,X);!C&&!vt&&v&&xa(je,{preventScroll:je===W})})},[r,v,W,C,fe,Z]),fn(()=>{if(r||!W)return;let se=!1,X=!1,ae=ht(W),pe=ti(ae),vt=y.current.openEvent;gD(pe);function Qe(dt){let{open:pi,reason:mi,event:Jt,nested:yr}=dt;if(pi&&(vt=Jt),mi==="escape-key"&&(X=!0),["hover","safe-polygon"].includes(mi)&&Jt.type==="mouseleave"&&(V.current=!0),mi==="outside-press")if(yr)V.current=!1,se=!0;else if(ZT(Jt)||JT(Jt))V.current=!1;else{let Hr=!1;document.createElement("div").focus({get preventScroll(){return Hr=!0,!1}}),Hr?(V.current=!1,se=!0):V.current=!0}}x.on("openchange",Qe);let He=ae.createElement("span");He.setAttribute("tabindex","-1"),He.setAttribute("aria-hidden","true"),Object.assign(He.style,pp),$&&m&&m.insertAdjacentElement("afterend",He);function Ze(){return typeof Y.current=="boolean"?X&&m?m:jC()||He:Y.current.current||He}return()=>{x.off("openchange",Qe);let dt=ti(ae),pi=gt(h,dt)||O&&ba(O.nodesRef.current,w()).some(Jt=>{var yr;return gt((yr=Jt.context)==null?void 0:yr.elements.floating,dt)});(pi||vt&&["click","mousedown"].includes(vt.type))&&(X=!0);let mi=Ze();queueMicrotask(()=>{let Jt=hD(mi);Y.current&&!V.current&&Xe(Jt)&&(!(Jt!==dt&&dt!==ae.body)||pi)&&Jt.focus({preventScroll:se}),He.remove()})}},[r,h,W,Y,y,x,O,$,m,w]),L.useEffect(()=>{queueMicrotask(()=>{V.current=!1})},[r]),fn(()=>{if(!r&&F)return F.setFocusManagerState({modal:c,closeOnFocusOut:d,open:v,onOpenChange:g,domReference:m}),()=>{F.setFocusManagerState(null)}},[r,F,c,v,g,d,m]),fn(()=>{if(r||!W||typeof MutationObserver!="function"||C)return;let se=()=>{let ae=W.getAttribute("tabindex"),pe=z(),je=ti(ht(h)),vt=pe.indexOf(je);vt!==-1&&(K.current=vt),N.current.includes("floating")||je!==m&&pe.length===0?ae!=="0"&&W.setAttribute("tabindex","0"):ae!=="-1"&&W.setAttribute("tabindex","-1")};se();let X=new MutationObserver(se);return X.observe(W,{childList:!0,subtree:!0,attributes:!0}),()=>{X.disconnect()}},[r,h,W,m,N,z,C]);function Ce(se){return r||!u||!c?null:(0,pn.jsx)(yD,{ref:se==="start"?ie:G,onClick:X=>g(!1,X.nativeEvent),children:typeof u=="string"?u:"Dismiss"})}let rt=!r&&B&&(c?!k:!0)&&($||c);return(0,pn.jsxs)(pn.Fragment,{children:[rt&&(0,pn.jsx)(up,{"data-type":"inside",ref:me,onFocus:se=>{if(c){let ae=fe();xa(o[0]==="reference"?ae[0]:ae[ae.length-1])}else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(V.current=!1,Pc(se,F.portalNode)){let ae=JC(m);ae==null||ae.focus()}else{var X;(X=F.beforeOutsideRef.current)==null||X.focus()}}}),!k&&Ce("start"),n,Ce("end"),rt&&(0,pn.jsx)(up,{"data-type":"inside",ref:re,onFocus:se=>{if(c)xa(fe()[0]);else if(F!=null&&F.preserveTabOrder&&F.portalNode)if(d&&(V.current=!0),Pc(se,F.portalNode)){let ae=ek(m);ae==null||ae.focus()}else{var X;(X=F.afterOutsideRef.current)==null||X.focus()}}})]})}function WC(e){return Xe(e.target)&&e.target.tagName==="BUTTON"}function vD(e){return Xe(e.target)&&e.target.tagName==="A"}function KC(e){return Jy(e)}function ik(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:s=!0,event:a="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=L.useRef(),p=L.useRef(!1),v=L.useMemo(()=>({onPointerDown(g){f.current=g.pointerType},onMouseDown(g){let x=f.current;g.button===0&&a!=="click"&&(ga(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="mousedown")?r(!1,g.nativeEvent,"click"):(g.preventDefault(),r(!0,g.nativeEvent,"click"))))},onClick(g){let x=f.current;if(a==="mousedown"&&f.current){f.current=void 0;return}ga(x,!0)&&c||(n&&l&&(!(o.current.openEvent&&d)||o.current.openEvent.type==="click")?r(!1,g.nativeEvent,"click"):r(!0,g.nativeEvent,"click"))},onKeyDown(g){f.current=void 0,!(g.defaultPrevented||!u||WC(g))&&(g.key===" "&&!KC(i)&&(g.preventDefault(),p.current=!0),!vD(g)&&g.key==="Enter"&&r(!(n&&l),g.nativeEvent,"click"))},onKeyUp(g){g.defaultPrevented||!u||WC(g)||KC(i)||g.key===" "&&p.current&&(p.current=!1,r(!(n&&l),g.nativeEvent,"click"))}}),[o,i,a,c,u,r,n,d,l]);return L.useMemo(()=>s?{reference:v}:{},[s,v])}var xD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},wD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},GC=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function sk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:v}=t,g=dp(),x=kn(typeof l=="function"?l:()=>!1),y=typeof l=="function"?x:l,m=L.useRef(!1),h=L.useRef(!1),{escapeKey:w,outsidePress:E}=GC(p),{escapeKey:C,outsidePress:k}=GC(v),A=L.useRef(!1),B=kn(F=>{var ie;if(!n||!s||!a||F.key!=="Escape"||A.current)return;let G=(ie=i.current.floatingContext)==null?void 0:ie.nodeId,V=g?ba(g.nodesRef.current,G):[];if(!w&&(F.stopPropagation(),V.length>0)){let U=!0;if(V.forEach(K=>{var $;if(($=K.context)!=null&&$.open&&!K.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}r(!1,tC(F)?F.nativeEvent:F,"escape-key")}),M=kn(F=>{var ie;let G=()=>{var V;B(F),(V=lo(F))==null||V.removeEventListener("keydown",G)};(ie=lo(F))==null||ie.addEventListener("keydown",G)}),N=kn(F=>{var ie;let G=m.current;m.current=!1;let V=h.current;if(h.current=!1,c==="click"&&V||G||typeof y=="function"&&!y(F))return;let U=lo(F),K="["+Ea("inert")+"]",$=ht(o.floating).querySelectorAll(K),W=Ne(U)?U:null;for(;W&&!sr(W);){let be=or(W);if(sr(be)||!Ne(be))break;W=be}if($.length&&Ne(U)&&!nC(U)&&!gt(U,o.floating)&&Array.from($).every(be=>!gt(W,be)))return;if(Xe(U)&&O){let be=sr(U),me=dn(U),re=/auto|scroll/,Ce=be||re.test(me.overflowX),rt=be||re.test(me.overflowY),se=Ce&&U.clientWidth>0&&U.scrollWidth>U.clientWidth,X=rt&&U.clientHeight>0&&U.scrollHeight>U.clientHeight,ae=me.direction==="rtl",pe=X&&(ae?F.offsetX<=U.offsetWidth-U.clientWidth:F.offsetX>U.clientWidth),je=se&&F.offsetY>U.clientHeight;if(pe||je)return}let z=(ie=i.current.floatingContext)==null?void 0:ie.nodeId,fe=g&&ba(g.nodesRef.current,z).some(be=>{var me;return Xf(F,(me=be.context)==null?void 0:me.elements.floating)});if(Xf(F,o.floating)||Xf(F,o.domReference)||fe)return;let de=g?ba(g.nodesRef.current,z):[];if(de.length>0){let be=!0;if(de.forEach(me=>{var re;if((re=me.context)!=null&&re.open&&!me.context.dataRef.current.__outsidePressBubbles){be=!1;return}}),!be)return}r(!1,F,"outside-press")}),Z=kn(F=>{var ie;let G=()=>{var V;N(F),(V=lo(F))==null||V.removeEventListener(c,G)};(ie=lo(F))==null||ie.addEventListener(c,G)});L.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=E;let F=-1;function ie($){r(!1,$,"ancestor-scroll")}function G(){window.clearTimeout(F),A.current=!0}function V(){F=window.setTimeout(()=>{A.current=!1},ma()?5:0)}let U=ht(o.floating);a&&(U.addEventListener("keydown",C?M:B,C),U.addEventListener("compositionstart",G),U.addEventListener("compositionend",V)),y&&U.addEventListener(c,k?Z:N,k);let K=[];return f&&(Ne(o.domReference)&&(K=Cn(o.domReference)),Ne(o.floating)&&(K=K.concat(Cn(o.floating))),!Ne(o.reference)&&o.reference&&o.reference.contextElement&&(K=K.concat(Cn(o.reference.contextElement)))),K=K.filter($=>{var W;return $!==((W=U.defaultView)==null?void 0:W.visualViewport)}),K.forEach($=>{$.addEventListener("scroll",ie,{passive:!0})}),()=>{a&&(U.removeEventListener("keydown",C?M:B,C),U.removeEventListener("compositionstart",G),U.removeEventListener("compositionend",V)),y&&U.removeEventListener(c,k?Z:N,k),K.forEach($=>{$.removeEventListener("scroll",ie)}),window.clearTimeout(F)}},[i,o,a,y,c,n,r,f,s,w,E,B,C,M,N,k,Z]),L.useEffect(()=>{m.current=!1},[y,c]);let Y=L.useMemo(()=>S({onKeyDown:B},u&&S({[xD[d]]:F=>{r(!1,F.nativeEvent,"reference-press")}},d!=="click"&&{onClick(F){r(!1,F.nativeEvent,"reference-press")}})),[B,r,u,d]),O=L.useMemo(()=>({onKeyDown:B,onMouseDown(){h.current=!0},onMouseUp(){h.current=!0},[wD[c]]:()=>{m.current=!0}}),[B,c]);return L.useMemo(()=>s?{reference:Y,floating:O}:{},[s,Y,O])}function SD(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=bv(),i=L.useRef({}),[s]=L.useState(()=>sD()),a=Ev()!=null,[l,c]=L.useState(r.reference),u=kn((p,v,g)=>{i.current.openEvent=p?v:void 0,s.emit("openchange",{open:p,event:v,reason:g,nested:a}),n==null||n(p,v,g)}),d=L.useMemo(()=>({setPositionReference:c}),[]),f=L.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return L.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function ak(e){e===void 0&&(e={});let{nodeId:t}=e,n=SD(P(S({},e),{elements:S({reference:null,floating:null},e.elements)})),r=e.rootContext||n,o=r.elements,[i,s]=L.useState(null),[a,l]=L.useState(null),u=(o==null?void 0:o.domReference)||i,d=L.useRef(null),f=dp();fn(()=>{u&&(d.current=u)},[u]);let p=NC(P(S({},e),{elements:S(S({},o),a&&{reference:a})})),v=L.useCallback(h=>{let w=Ne(h)?{getBoundingClientRect:()=>h.getBoundingClientRect(),getClientRects:()=>h.getClientRects(),contextElement:h}:h;l(w),p.refs.setReference(w)},[p.refs]),g=L.useCallback(h=>{(Ne(h)||h===null)&&(d.current=h,s(h)),(Ne(p.refs.reference.current)||p.refs.reference.current===null||h!==null&&!Ne(h))&&p.refs.setReference(h)},[p.refs]),x=L.useMemo(()=>P(S({},p.refs),{setReference:g,setPositionReference:v,domReference:d}),[p.refs,g,v]),y=L.useMemo(()=>P(S({},p.elements),{domReference:u}),[p.elements,u]),m=L.useMemo(()=>P(S(S({},p),r),{refs:x,elements:y,nodeId:t}),[p,x,y,t,r]);return fn(()=>{r.dataRef.current.floatingContext=m;let h=f==null?void 0:f.nodesRef.current.find(w=>w.id===t);h&&(h.context=m)}),L.useMemo(()=>P(S({},p),{context:m,refs:x,elements:y}),[p,x,y,m])}var hv="active",yv="selected";function vv(e,t,n){let r=new Map,o=n==="item",i=e;if(o&&e){let s=e,{[hv]:a,[yv]:l}=s;i=oe(s,[Em(hv),Em(yv)])}return S(S(S({},n==="floating"&&{tabIndex:-1,[xv]:""}),i),t.map(a=>{let l=a?a[n]:null;return typeof l=="function"?e?l(e):null:l}).concat(e).reduce((a,l)=>(l&&Object.entries(l).forEach(c=>{let[u,d]=c;if(!(o&&[hv,yv].includes(u)))if(u.indexOf("on")===0){if(r.has(u)||r.set(u,[]),typeof d=="function"){var f;(f=r.get(u))==null||f.push(d),a[u]=function(){for(var p,v=arguments.length,g=new Array(v),x=0;x<v;x++)g[x]=arguments[x];return(p=r.get(u))==null?void 0:p.map(y=>y(...g)).find(y=>y!==void 0)}}}else a[u]=d}),a),{}))}function lk(e){e===void 0&&(e=[]);let t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),o=L.useCallback(a=>vv(a,e,"reference"),t),i=L.useCallback(a=>vv(a,e,"floating"),n),s=L.useCallback(a=>vv(a,e,"item"),r);return L.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}var bD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function ck(e,t){var n;t===void 0&&(t={});let{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=bD.get(s))!=null?n:s,l=bv(),u=Ev()!=null,d=L.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:S(S(S(S(S({"aria-expanded":r?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":r?o: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,o,u,r,l,s]),f=L.useMemo(()=>{let v=S({id:o},a&&{role:a});return a==="tooltip"||s==="label"?v:S(S({},v),a==="menu"&&{"aria-labelledby":l})},[a,o,l,s]),p=L.useCallback(v=>{let{active:g,selected:x}=v,y=S({role:"option"},g&&{id:o+"-option"});switch(s){case"select":return P(S({},y),{"aria-selected":g&&x});case"combobox":return S(S({},y),g&&{"aria-selected":!0})}return{}},[o,s]);return L.useMemo(()=>i?{reference:d,floating:f,item:p}:{},[i,d,f,p])}function qC(e,t){let[n,r]=e,o=!1,i=t.length;for(let s=0,a=i-1;s<i;a=s++){let[l,c]=t[s]||[0,0],[u,d]=t[a]||[0,0];c>=r!=d>=r&&n<=(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}function ED(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function uk(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,o,i=!1,s=null,a=null,l=performance.now();function c(d,f){let p=performance.now(),v=p-l;if(s===null||a===null||v===0)return s=d,a=f,l=p,null;let g=d-s,x=f-a,m=Math.sqrt(g*g+x*x)/v;return s=d,a=f,l=p,m}let u=d=>{let{x:f,y:p,placement:v,elements:g,onClose:x,nodeId:y,tree:m}=d;return function(w){function E(){clearTimeout(o),x()}if(clearTimeout(o),!g.domReference||!g.floating||v==null||f==null||p==null)return;let{clientX:C,clientY:k}=w,A=[C,k],B=lo(w),M=w.type==="mouseleave",N=gt(g.floating,B),Z=gt(g.domReference,B),Y=g.domReference.getBoundingClientRect(),O=g.floating.getBoundingClientRect(),F=v.split("-")[0],ie=f>O.right-O.width/2,G=p>O.bottom-O.height/2,V=ED(A,Y),U=O.width>Y.width,K=O.height>Y.height,$=(U?Y:O).left,W=(U?Y:O).right,z=(K?Y:O).top,fe=(K?Y:O).bottom;if(N&&(i=!0,!M))return;if(Z&&(i=!1),Z&&!M){i=!0;return}if(M&&Ne(w.relatedTarget)&&gt(g.floating,w.relatedTarget)||m&&ba(m.nodesRef.current,y).some(me=>{let{context:re}=me;return re==null?void 0:re.open}))return;if(F==="top"&&p>=Y.bottom-1||F==="bottom"&&p<=Y.top+1||F==="left"&&f>=Y.right-1||F==="right"&&f<=Y.left+1)return E();let de=[];switch(F){case"top":de=[[$,Y.top+1],[$,O.bottom-1],[W,O.bottom-1],[W,Y.top+1]];break;case"bottom":de=[[$,O.top+1],[$,Y.bottom-1],[W,Y.bottom-1],[W,O.top+1]];break;case"left":de=[[O.right-1,fe],[O.right-1,z],[Y.left+1,z],[Y.left+1,fe]];break;case"right":de=[[Y.right-1,fe],[Y.right-1,z],[O.left+1,z],[O.left+1,fe]];break}function be(me){let[re,Ce]=me;switch(F){case"top":{let rt=[U?re+t/2:ie?re+t*4:re-t*4,Ce+t+1],se=[U?re-t/2:ie?re+t*4:re-t*4,Ce+t+1],X=[[O.left,ie||U?O.bottom-t:O.top],[O.right,ie?U?O.bottom-t:O.top:O.bottom-t]];return[rt,se,...X]}case"bottom":{let rt=[U?re+t/2:ie?re+t*4:re-t*4,Ce-t],se=[U?re-t/2:ie?re+t*4:re-t*4,Ce-t],X=[[O.left,ie||U?O.top+t:O.bottom],[O.right,ie?U?O.top+t:O.bottom:O.top+t]];return[rt,se,...X]}case"left":{let rt=[re+t+1,K?Ce+t/2:G?Ce+t*4:Ce-t*4],se=[re+t+1,K?Ce-t/2:G?Ce+t*4:Ce-t*4];return[...[[G||K?O.right-t:O.left,O.top],[G?K?O.right-t:O.left:O.right-t,O.bottom]],rt,se]}case"right":{let rt=[re-t,K?Ce+t/2:G?Ce+t*4:Ce-t*4],se=[re-t,K?Ce-t/2:G?Ce+t*4:Ce-t*4],X=[[G||K?O.left+t:O.right,O.top],[G?K?O.left+t:O.right:O.left+t,O.bottom]];return[rt,se,...X]}}}if(!qC([C,k],de)){if(i&&!V)return E();if(!M&&r){let me=c(w.clientX,w.clientY);if(me!==null&&me<.1)return E()}qC([C,k],be([f,p]))?!i&&r&&(o=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}var mp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var Hn=b(R());function TD({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:i}={}){let[s,a]=Lr.useState(e),l=o!=null?o:s,c=i!=null?i:a,u=ak({placement:t,open:l,onOpenChange:c,whileElementsMounted:np,middleware:[ap(5),pv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),fv({padding:10})]}),d=u.context,f=ik(d,{enabled:o==null}),p=sk(d),v=ck(d),g=XC(d,{enabled:r!=null?r:!1,handleClose:uk()}),x=lk([f,p,v,g]);return Lr.useMemo(()=>P(S(S({open:l,setOpen:c},x),u),{modal:n}),[l,c,x,u,n])}var dk=Lr.createContext(null),Tv=()=>{let e=Lr.useContext(dk);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},Qi=r=>{var o=r,{children:e,modal:t=!1}=o,n=oe(o,["children","modal"]);let i=TD(S({modal:t},n));return(0,Hn.jsx)(dk.Provider,{value:i,children:e})};function CD(r){var o=r,{as:e,children:t}=o,n=oe(o,["as","children"]);let i=Tv(),s=e||"button",a=t.ref,l=Sv([i.refs.setReference,a]);return(0,Hn.jsx)(s,P(S({ref:l,type:"button"},i.getReferenceProps(n)),{children:t}))}var kD=Lr.forwardRef(function(o,r){var i=o,{style:t}=i,n=oe(i,["style"]);let c=Tv(),{context:s}=c,a=oe(c,["context"]),l=Sv([a.refs.setFloating,r]);return s.open?(0,Hn.jsx)(nk,{children:(0,Hn.jsx)(ok,{context:s,modal:a.modal,children:(0,Hn.jsx)("div",P(S({ref:l,style:S(P(S({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function RD(o){var i=o,{as:e,children:t,onClick:n}=i,r=oe(i,["as","children","onClick"]);let{setOpen:s}=Tv();return(0,Hn.jsx)(e||"button",P(S({type:"button",onClick:c=>{n(c),s(!1),c.stopPropagation()}},r),{children:t}))}function fk({trigger:e,children:t,placement:n="top"}){return(0,Hn.jsxs)(Qi,{tooltip:!0,placement:n,children:[(0,Hn.jsxs)(Qi.Content,{className:mp.tooltip,children:[t,(0,Hn.jsx)("div",{className:mp.arrow})]}),(0,Hn.jsx)(Qi.Trigger,{className:mp.tooltipTrigger,children:e})]})}Qi.Trigger=CD;Qi.Content=kD;Qi.Button=RD;var yt=Qi;var Wt=b(R()),PD=3,AD=90,pk=({children:e})=>{let t=_("CommandPalette",Tn);return(0,Wt.jsx)("div",{className:t.listItemActions,children:e})};function Cv(p){var v=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:i,onSourceClick:s,description:a,sources:l,id:c,styles:u,defaultSourcesAmount:d=PD}=v,f=oe(v,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var A;let g=ue(io),[x,y]=(0,Ic.useState)(!1),{selected:m,onChangeOpen:h}=ei(),[w,E]=(0,Ic.useState)(!1),C=_("CommandPalette",Tn);function k(B){o(B),e&&h(!1)}return(0,Ic.useEffect)(()=>{E(m===c)},[m]),(0,Wt.jsxs)("div",{className:(0,Ac.default)(C.listItem,c===m&&C.listItemSelected),children:[(0,Wt.jsxs)(yt,{placement:"right-start",tooltip:!0,onOpenChange:E,open:w,children:[(0,Wt.jsx)(yt.Trigger,P(S({className:C.listItemAction,"aria-disabled":(A=f.disabled)!=null?A:!1,onClick:k,"data-command-palette-item":!0,"data-item-id":c},f),{children:(0,Wt.jsxs)("div",{className:C.listItemContent,children:[typeof r=="string"?(0,Wt.jsx)("p",{className:(0,Ac.default)(C.listItemText,C.truncate,u==null?void 0:u.title),children:r}):r,a&&typeof a=="string"?(0,Wt.jsx)(Ki,{tagName:"p",allowList:[],content:jf(a)?$T(a):a,className:(0,Ac.default)(C.listItemDescription,u==null?void 0:u.description,t?C.lineClamp:C.truncate)}):a]})})),n&&n.toString().length>AD&&(0,Wt.jsx)(yt.Content,{className:C.listItemTooltip,children:(0,Wt.jsx)(Ki,{className:C.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p"],tagName:"div",content:n})})]}),c===m&&i,l&&l.length>0&&(0,Wt.jsxs)("div",{className:C.sources,children:[(0,Wt.jsx)("span",{className:C.sourcesTitle,children:g("sources")}),l.slice(0,x?l.length:d).map(B=>(0,Wt.jsx)("a",{className:C.source,href:B.url,target:"_blank",title:B.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>s==null?void 0:s(B),children:B.name},B.url)),!x&&l.length>d&&(0,Wt.jsx)("button",{className:(0,Ac.default)(C.source,C.sourceShowMore),type:"button",onClick:()=>y(!0),children:g("showMore",{amount:l.length-d})})]})]})}var Lc=b(R()),mk=()=>(0,Lc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Lc.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Lc.jsx)("path",{d:"M192 448c-8.188 0-16.38-3.125-22.62-9.375l-160-160c-12.5-12.5-12.5-32.75 0-45.25l160-160c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l137.4 137.4c12.5 12.5 12.5 32.75 0 45.25C208.4 444.9 200.2 448 192 448z"})]});var Zi=b(R());function kv({children:e,title:t,id:n,onDismiss:r}){let o=ue(io),i=_("CommandPalette",Tn),{page:s}=ei();return s!==n?null:(0,Zi.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Zi.jsxs)("div",{className:i.pageNav,children:[(0,Zi.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,Zi.jsx)(mk,{}),o("back")]}),t&&(0,Zi.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var gk=b(Q());var Oc=b(R()),Ca=()=>(0,Oc.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Oc.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Oc.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})]});var cr=b(R());function ID({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=_("CommandPalette",Tn);return(0,cr.jsxs)("div",{className:l.search,children:[(0,cr.jsx)("div",{className:l.searchIcon,children:(0,cr.jsx)(Ca,{})}),(0,cr.jsxs)("div",{className:l.searchInputWrapper,children:[(0,cr.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:c=>{e(c.currentTarget.value)},onFocus:c=>{c.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,cr.jsx)("div",{className:l.selectWrapper,children:(0,cr.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:c=>t(c.target.value===r?void 0:c.target.value),value:s||r,children:[r&&(0,cr.jsx)("option",{children:r}),o.map(c=>(0,cr.jsx)("option",{value:c.value,children:c.label},c.value))]})})]})]})}var hk=(0,gk.forwardRef)(ID);var Rv=b(Me());var gp=b(R()),LD=o=>{var i=o,{onClick:e,shortKeys:t,children:n}=i,r=oe(i,["onClick","shortKeys","children"]);let s=_("CommandPalette",Tn);return(0,gp.jsxs)("button",P(S({type:"button"},r),{onClick:e,className:(0,Rv.default)(s.actionButton,r.className,{[s.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,gp.jsx)("span",{className:(0,Rv.default)(s.actionShortcut,a===8629&&s.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},yk=LD;var Nc=b(R()),OD="[data-command-palette-item]";function Ji({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:c,children:u,isOpen:d,search:f,updateDeps:p=[]}){let[v,g]=(0,uo.useState)(),x=(0,uo.useRef)(null),y=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var N;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(N=x.current)==null||N.focus();return}if(f.length>0){i("");return}a(!1)},h=()=>{let N=w();N.length!==0&&g(N[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(OD)||[]),E=N=>document.querySelector(`[data-item-id=${N}]`),C=N=>{let Z=E(N);Z&&g(Z.dataset.itemId)},k=N=>{let Z=E(N);Z&&Z.scrollIntoView({behavior:"smooth"})},A=()=>{if(!v)return;let N=w(),Z=E(v);if(!Z)return;let Y=N.indexOf(Z),O=N[Y+1];O!=null&&O.dataset.itemId?C(O.dataset.itemId):h()},B=()=>{if(!v)return;let N=w(),Z=E(v);if(!Z)return;let Y=N.indexOf(Z),O=N[Y-1];O!=null&&O.dataset.itemId?C(O.dataset.itemId):C(N[N.length-1].dataset.itemId)},M=(0,uo.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),A();break}case"ArrowUp":{N.preventDefault(),B();break}case"Enter":{if(v){let Z=E(v);Z==null||Z.click()}break}}},[v]);return(0,uo.useEffect)(()=>{h()},[f,r,l,d,...p]),(0,uo.useEffect)(()=>{v&&k(v)},[v]),(0,Nc.jsx)(Lf,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:d,onBack:m,onClose:y,onKeyDown:M,children:(0,Nc.jsxs)(WT,{selected:v,setSelected:g,isOpen:d,onChangeOpen:a,page:r,children:[r===n&&(0,Nc.jsx)(hk,{ref:x,onChange:i,onChangeType:s,placeholder:e,value:f,selectedType:l,types:c,typePlaceholder:t}),u]})})}Ji.Page=kv;Ji.List=Uy;Ji.Image=NT;Ji.ListItem=Cv;Ji.ListItemActions=pk;Ji.Button=yk;var qe=Ji;var vk=b(Q());function xk(e,t){(0,vk.useEffect)(()=>{let n=r=>{var o;((o=navigator==null?void 0:navigator.platform)!=null&&o.toLowerCase().includes("mac")?r.metaKey:r.ctrlKey)&&r.key===e&&(r.preventDefault(),r.stopPropagation(),t())};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[])}var Mc=b(Q());var wk={data:null,fetchState:"idle"},ND=e=>{var t;return(t=e.entities.data)!=null?t:null},hp=Dn([ND,ca,B1],(e,t,n)=>{var a;let r=[],{visitorName:o}=n!=null?n:{},{agentName:i,agentNickname:s}=t!=null?t:{};return i&&i!==o&&r.push(i),s&&s!==o&&r.push(s),(a=e==null?void 0:e.filter(l=>!r.includes(l.text)))!=null?a:null}),ur=ge("entities/getEntities",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=yield o();return i.length===0?Promise.resolve([]):n.getEntities(i)})),MD=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),_D=ke({name:"entities",initialState:wk,reducers:{},extraReducers:e=>{e.addCase(ur.pending,t=>{t.fetchState="loading"}).addCase(ur.rejected,t=>{t.fetchState="error"}).addCase(ur.fulfilled,(t,n)=>{t.fetchState="done",t.data=MD(t.data?[...t.data,...n.payload]:n.payload)}).addCase(at,()=>wk)}}),Sk=_D.reducer;var Pv={};kt(Pv,{enUS:()=>DD,nlNL:()=>FD});var DD={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},FD={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var bk={root:"dd-TYTKs",empty:"dd-AU7uT"};var ka=b(R()),zD=({onCopy:e})=>{let t=(0,Mc.useRef)(null),n=_("EntitiesList",bk),r=j(hp),{setSelected:o}=ei(),i=ue(Pv),s=ve();return(0,Mc.useEffect)(()=>{s(ur())},[]),(0,Mc.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,ka.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,ka.jsx)(qe.List,{children:r.map((a,l)=>(0,ka.jsx)(qe.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,ka.jsx)("p",{className:n.empty,children:i("noResults")})]})},Ek=zD;var as=b(Q());var Ra=b(Q());function es(e,t){let n=(0,Ra.useRef)(e);n.current=e;let[r,o]=(0,Ra.useState)(void 0),[i,s]=(0,Ra.useState)(void 0),[a,l]=(0,Ra.useState)("idle"),c=ve();return{error:i,state:a,data:r,call:f=>I(this,null,function*(){l("loading"),yield c(n.current(f)).unwrap().then(p=>{o(p),l("done"),t!=null&&t.onSuccess&&(t==null||t.onSuccess(p))}).catch(p=>{s(p),l("error"),t!=null&&t.onError&&(t==null||t.onError(p))})}),reset:()=>{l("idle"),o(void 0),s(void 0)}}}var yp=b(Me()),Rk=b(Q());var Av=b(R()),Iv=e=>(0,Av.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Av.jsx)("path",{fillRule:"evenodd",d:"M6.57086468,14.9173453 C6.38997052,14.9711236 6.19835748,15 6,15 L4,15 C2.8954305,15 2,14.1045695 2,13 L2,4 C2,2.8954305 2.8954305,2 4,2 L6,2 C6.68685475,2 7.29284112,2.34623869 7.65294381,2.87370078 C7.95642355,2.67736738 8.29504785,2.51351337 8.66312366,2.3818197 C9.50544052,2.08044754 10.3408482,1.9879107 10.9989281,1.99971266 C11.0150698,2.00005426 13.3487605,2.00015005 18,2 C20.7551411,2 22,6.05643086 22,12 C22,13.6824804 20.8695981,15 19,15 L15.9269768,15 C15.9359266,15.0245465 15.9451954,15.0497804 15.9547911,15.0757271 C16.007193,15.2174219 16.2391583,15.8256341 16.2970775,15.9810953 C16.4872151,16.4914441 16.6259612,16.9026411 16.7382242,17.3098712 C16.9079007,17.9253665 17,18.4798886 17,19 C17,20.4720069 16.091867,21.3862822 14.748281,21.777514 C14.1422801,21.9539723 13.6147967,22.0000922 13.0076976,22.0000008 L12.5204954,22 L12.2202699,21.6261158 C11.2556275,20.4248034 7.64562469,16.4822788 6.57086468,14.9173453 Z M8,13 C8,13.2401953 8.04443154,13.4528921 8.14171093,13.6800176 C8.40663864,14.2985643 11.914268,18.1371493 13.4599624,19.9848695 C13.7113931,19.9660111 13.9483736,19.9273712 14.1891338,19.8572655 C14.7621788,19.6904035 15,19.4509737 15,19 C15,18.6834183 14.9359344,18.2976852 14.8101464,17.8413935 C14.7161494,17.500423 14.5944107,17.1396301 14.4229225,16.6793379 C14.3689242,16.5344009 14.1358033,15.923159 14.0789589,15.7694517 C13.9489218,15.4178313 13.8632547,15.1589343 13.8046536,14.9236885 C13.5555377,13.9236468 13.8054549,13 15,13 L19,13 C19.6912225,13 20,12.6401099 20,12 C20,7.20925475 19.015127,4 18,4 C15.9322103,4 15.9322103,4 10.9655994,3.99940813 C10.5253746,3.99154158 9.91062406,4.05963657 9.33687634,4.2649175 C8.45196659,4.58152894 8,5.09776992 8,6 L8,13 Z M4,4 L4,13 L6,13 L6,4 L4,4 Z"})}));var Lv=b(R()),Tk=e=>(0,Lv.jsx)("svg",P(S({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Lv.jsx)("path",{fillRule:"evenodd",d:"M7.65336736,21.1256786 C7.2933164,21.6534897 6.68712411,22 6,22 L4,22 C2.8954305,22 2,21.1045695 2,20 L2,11 C2,9.8954305 2.8954305,9 4,9 L6,9 C6.198171,9 6.38961023,9.02882212 6.57035446,9.08250314 C7.6444817,7.51807482 11.2554748,3.57449216 12.2202699,2.37298955 L12.5204954,1.99910538 L13,1.99910538 C13.6147967,1.99901314 14.1422801,2.04513312 14.748281,2.22159137 C16.091867,2.61282321 17,3.52709845 17,4.99910538 C17,5.51921677 16.9079007,6.07373891 16.7382242,6.68923415 C16.6259612,7.09646424 16.4872151,7.50766133 16.2970775,8.01801005 C16.2391583,8.17347129 16.007193,8.78168345 15.9547911,8.92337824 C15.9451954,8.94932503 15.9359266,8.9745589 15.9269768,8.99910538 L19,8.99910538 C20.8695981,8.99910538 22,10.316625 22,11.9991054 C22,17.9426745 20.7551411,21.9991054 18,21.9991054 L11.0344006,21.9985135 C10.3408482,22.0111947 9.50544052,21.9186578 8.66312366,21.6172857 C8.29521907,21.4856533 7.9567386,21.3218904 7.65336736,21.1256786 Z M8,17.9991054 C8,18.9013355 8.45196659,19.4175764 9.33687634,19.7341879 C9.91062406,19.9394688 10.5253746,20.0075638 10.963066,19.9997143 C10.9703499,19.9995545 10.9703499,19.9995545 11,19.9991054 L18,19.9991054 C19.015127,19.9991054 20,16.7898506 20,11.9991054 C20,11.3589955 19.6912225,10.9991054 19,10.9991054 L15,10.9991054 C13.8054549,10.9991054 13.5555377,10.0754586 13.8046536,9.07541689 C13.8632547,8.84017106 13.9489218,8.5812741 14.0789589,8.22965366 C14.1358033,8.07594642 14.3689242,7.46470447 14.4229225,7.31976744 C14.5944107,6.85947528 14.7161494,6.4986824 14.8101464,6.1577119 C14.9359344,5.70142019 15,5.31568707 15,4.99910538 C15,4.54813166 14.7621788,4.30870189 14.1891338,4.1418399 C13.9483736,4.07173418 13.7113931,4.0330943 13.4599624,4.01423587 C11.914268,5.86195611 8.40663864,9.70054105 8.14171093,10.3190878 C8.04443154,10.5462133 8,10.7589101 8,10.9991054 L8,17.9991054 Z M4,11 L4,20 L6,20 L6,11 L4,11 Z"})}));function Pa(e,t){var o;let n=e.cloneNode(!0);n.style.top=`${e.offsetTop}px`,n.style.left=`${e.offsetLeft}px`,n.style.position="absolute",t.split(" ").forEach(i=>{n.classList.add(i)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var Ov={};kt(Ov,{enUS:()=>HD,nlNL:()=>BD});var HD={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},BD={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function Ck(e){return ge("analytics/logEvent",(t,n)=>{var i,s,a;let r=(s=(i=n.getState())==null?void 0:i.conversation.current)==null?void 0:s.id,o=(a=n.getState())==null?void 0:a.info.agentInfo;return n.extra.deepdeskAPI.sendEvent(t.name,P(S({conversationId:r},o),{data:t.data}))})(e)}function ct(){let e=ve();return(t,n)=>I(this,null,function*(){yield e(Ck({name:t,data:n}))})}var kk={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Aa=e=>t=>{let{passwordlessToken:{token:n},settings:{isEmbedded:r,adminUrl:o}}=t,i=o||window.location.origin;return r&&!n?null:r&&n?`${i}/apis/admin/session/passwordless/login/?token=${n}&redirect=${encodeURIComponent(e)}`:`${i}${e}`};var fo=b(R()),UD=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=_("FeedbackThumbs",kk),i=te("enableFeedbackForm"),s=j(Rr),a=j(Aa(`/admin/feedback?conversationId=${s}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=ue(Ov),c=ct(),[u,d]=(0,Rk.useState)(null),f=v=>{v.stopPropagation(),Pa(v.target,o.fadeup),d("up"),c(e,P(S({},t),{rating:"up"}))},p=v=>{v.stopPropagation(),Pa(v.target,o.fadedown),d("down"),c(e,P(S({},t),{rating:"down"}))};return(0,fo.jsxs)("div",{className:o.thumbs,children:[(0,fo.jsx)(ye.Button,{title:l("thumbsUp"),onClick:f,icon:(0,fo.jsx)(Tk,{}),className:(0,yp.default)(o.thumbsUp,u==="up"&&o.selected),disabled:!!u}),i&&a?(0,fo.jsx)(ye.Button,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:p,icon:(0,fo.jsx)(Iv,{}),className:(0,yp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u}):(0,fo.jsx)(ye.Button,{title:l("thumbsDown"),onClick:p,icon:(0,fo.jsx)(Iv,{}),className:(0,yp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u})]})},ts=UD;var _c=b(R()),Pk=()=>(0,_c.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,_c.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,_c.jsx)("path",{d:"M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480V396.4c0-4 1.5-7.8 4.2-10.7L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"})]});var Nv={};kt(Nv,{enUS:()=>VD,nlNL:()=>$D});var VD={use:[{type:0,value:"Use"}],loading:[{type:0,value:"Loading..."}],error:[{type:0,value:"Something went wrong, please try again later."}],anotherQuestion:[{type:0,value:"Send a message..."}],reset:[{type:0,value:"Reset conversation"}]},$D={use:[{type:0,value:"Gebruik"}],loading:[{type:0,value:"Laden..."}],error:[{type:0,value:"Er ging iets mis, probeer het later opnieuw."}],anotherQuestion:[{type:0,value:"Stuur een bericht..."}],reset:[{type:0,value:"Reset gesprek"}]};var Ak={root:"dd-fxP4c",title:"dd-vDbMh",empty:"dd-sB0lz",status:"dd--oZ1C",form:"dd-t0hnD",input:"dd-i1v3W",submit:"dd-oo2Oa",question:"dd-WvK17",answer:"dd-HAHcU",alignRight:"dd-oxrX3",listItemFeedback:"dd-POUal"};var{entries:Hk,setPrototypeOf:Ik,isFrozen:jD,getPrototypeOf:WD,getOwnPropertyDescriptor:KD}=Object,{freeze:Gt,seal:Bn,create:Bk}=Object,{apply:Hv,construct:Bv}=typeof Reflect!="undefined"&&Reflect;Gt||(Gt=function(t){return t});Bn||(Bn=function(t){return t});Hv||(Hv=function(t,n,r){return t.apply(n,r)});Bv||(Bv=function(t,n){return new t(...n)});var vp=qt(Array.prototype.forEach),GD=qt(Array.prototype.lastIndexOf),Lk=qt(Array.prototype.pop),Dc=qt(Array.prototype.push),qD=qt(Array.prototype.splice),wp=qt(String.prototype.toLowerCase),Mv=qt(String.prototype.toString),Ok=qt(String.prototype.match),Fc=qt(String.prototype.replace),YD=qt(String.prototype.indexOf),XD=qt(String.prototype.trim),dr=qt(Object.prototype.hasOwnProperty),Kt=qt(RegExp.prototype.test),zc=QD(TypeError);function qt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Hv(e,t,r)}}function QD(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bv(e,n)}}function xe(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wp;Ik&&Ik(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(jD(t)||(t[r]=i),o=i)}e[o]=!0}return e}function ZD(e){for(let t=0;t<e.length;t++)dr(e,t)||(e[t]=null);return e}function ns(e){let t=Bk(null);for(let[n,r]of Hk(e))dr(e,n)&&(Array.isArray(r)?t[n]=ZD(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=ns(r):t[n]=r);return t}function Hc(e,t){for(;e!==null;){let r=KD(e,t);if(r){if(r.get)return qt(r.get);if(typeof r.value=="function")return qt(r.value)}e=WD(e)}function n(){return null}return n}var Nk=Gt(["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"]),_v=Gt(["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"]),Dv=Gt(["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"]),JD=Gt(["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"]),Fv=Gt(["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"]),e3=Gt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Mk=Gt(["#text"]),_k=Gt(["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","popover","popovertarget","popovertargetaction","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","wrap","xmlns","slot"]),zv=Gt(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","slope","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","tablevalues","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"]),Dk=Gt(["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"]),xp=Gt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),t3=Bn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),n3=Bn(/<%[\w\W]*|[\w\W]*%>/gm),r3=Bn(/\$\{[\w\W]*/gm),o3=Bn(/^data-[\-\w.\u00B7-\uFFFF]+$/),i3=Bn(/^aria-[\-\w]+$/),Uk=Bn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),s3=Bn(/^(?:\w+script|data):/i),a3=Bn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vk=Bn(/^html$/i),l3=Bn(/^[a-z][.\w]*(-[.\w]+)+$/i),Fk=Object.freeze({__proto__:null,ARIA_ATTR:i3,ATTR_WHITESPACE:a3,CUSTOM_ELEMENT:l3,DATA_ATTR:o3,DOCTYPE_NAME:Vk,ERB_EXPR:n3,IS_ALLOWED_URI:Uk,IS_SCRIPT_OR_DATA:s3,MUSTACHE_EXPR:t3,TMPLIT_EXPR:r3}),Bc={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},c3=function(){return typeof window=="undefined"?null:window},u3=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch(s){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},zk=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function $k(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c3(),t=ne=>$k(ne);if(t.version="3.2.5",t.removed=[],!e||!e.document||e.document.nodeType!==Bc.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:c,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,v=l.prototype,g=Hc(v,"cloneNode"),x=Hc(v,"remove"),y=Hc(v,"nextSibling"),m=Hc(v,"childNodes"),h=Hc(v,"parentNode");if(typeof s=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let w,E="",{implementation:C,createNodeIterator:k,createDocumentFragment:A,getElementsByTagName:B}=n,{importNode:M}=r,N=zk();t.isSupported=typeof Hk=="function"&&typeof h=="function"&&C&&C.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Z,ERB_EXPR:Y,TMPLIT_EXPR:O,DATA_ATTR:F,ARIA_ATTR:ie,IS_SCRIPT_OR_DATA:G,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:U}=Fk,{IS_ALLOWED_URI:K}=Fk,$=null,W=xe({},[...Nk,..._v,...Dv,...Fv,...Mk]),z=null,fe=xe({},[..._k,...zv,...Dk,...xp]),de=Object.seal(Bk(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}})),be=null,me=null,re=!0,Ce=!0,rt=!1,se=!0,X=!1,ae=!0,pe=!1,je=!1,vt=!1,Qe=!1,He=!1,Ze=!1,dt=!0,pi=!1,mi="user-content-",Jt=!0,yr=!1,Hr={},xs=null,H0=xe({},["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"]),B0=null,U0=xe({},["audio","video","img","source","image","track"]),gm=null,V0=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),du="http://www.w3.org/1998/Math/MathML",fu="http://www.w3.org/2000/svg",Br="http://www.w3.org/1999/xhtml",ws=Br,hm=!1,ym=null,_A=xe({},[du,fu,Br],Mv),pu=xe({},["mi","mo","mn","ms","mtext"]),mu=xe({},["annotation-xml"]),DA=xe({},["title","style","font","a","script"]),Wa=null,FA=["application/xhtml+xml","text/html"],zA="text/html",ft=null,Ss=null,HA=n.createElement("form"),$0=function(T){return T instanceof RegExp||T instanceof Function},vm=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ss&&Ss===T)){if((!T||typeof T!="object")&&(T={}),T=ns(T),Wa=FA.indexOf(T.PARSER_MEDIA_TYPE)===-1?zA:T.PARSER_MEDIA_TYPE,ft=Wa==="application/xhtml+xml"?Mv:wp,$=dr(T,"ALLOWED_TAGS")?xe({},T.ALLOWED_TAGS,ft):W,z=dr(T,"ALLOWED_ATTR")?xe({},T.ALLOWED_ATTR,ft):fe,ym=dr(T,"ALLOWED_NAMESPACES")?xe({},T.ALLOWED_NAMESPACES,Mv):_A,gm=dr(T,"ADD_URI_SAFE_ATTR")?xe(ns(V0),T.ADD_URI_SAFE_ATTR,ft):V0,B0=dr(T,"ADD_DATA_URI_TAGS")?xe(ns(U0),T.ADD_DATA_URI_TAGS,ft):U0,xs=dr(T,"FORBID_CONTENTS")?xe({},T.FORBID_CONTENTS,ft):H0,be=dr(T,"FORBID_TAGS")?xe({},T.FORBID_TAGS,ft):{},me=dr(T,"FORBID_ATTR")?xe({},T.FORBID_ATTR,ft):{},Hr=dr(T,"USE_PROFILES")?T.USE_PROFILES:!1,re=T.ALLOW_ARIA_ATTR!==!1,Ce=T.ALLOW_DATA_ATTR!==!1,rt=T.ALLOW_UNKNOWN_PROTOCOLS||!1,se=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=T.SAFE_FOR_TEMPLATES||!1,ae=T.SAFE_FOR_XML!==!1,pe=T.WHOLE_DOCUMENT||!1,Qe=T.RETURN_DOM||!1,He=T.RETURN_DOM_FRAGMENT||!1,Ze=T.RETURN_TRUSTED_TYPE||!1,vt=T.FORCE_BODY||!1,dt=T.SANITIZE_DOM!==!1,pi=T.SANITIZE_NAMED_PROPS||!1,Jt=T.KEEP_CONTENT!==!1,yr=T.IN_PLACE||!1,K=T.ALLOWED_URI_REGEXP||Uk,ws=T.NAMESPACE||Br,pu=T.MATHML_TEXT_INTEGRATION_POINTS||pu,mu=T.HTML_INTEGRATION_POINTS||mu,de=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&$0(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(de.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&$0(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(de.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(Ce=!1),He&&(Qe=!0),Hr&&($=xe({},Mk),z=[],Hr.html===!0&&(xe($,Nk),xe(z,_k)),Hr.svg===!0&&(xe($,_v),xe(z,zv),xe(z,xp)),Hr.svgFilters===!0&&(xe($,Dv),xe(z,zv),xe(z,xp)),Hr.mathMl===!0&&(xe($,Fv),xe(z,Dk),xe(z,xp))),T.ADD_TAGS&&($===W&&($=ns($)),xe($,T.ADD_TAGS,ft)),T.ADD_ATTR&&(z===fe&&(z=ns(z)),xe(z,T.ADD_ATTR,ft)),T.ADD_URI_SAFE_ATTR&&xe(gm,T.ADD_URI_SAFE_ATTR,ft),T.FORBID_CONTENTS&&(xs===H0&&(xs=ns(xs)),xe(xs,T.FORBID_CONTENTS,ft)),Jt&&($["#text"]=!0),pe&&xe($,["html","head","body"]),$.table&&(xe($,["tbody"]),delete be.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw zc('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zc('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=T.TRUSTED_TYPES_POLICY,E=w.createHTML("")}else w===void 0&&(w=u3(p,o)),w!==null&&typeof E=="string"&&(E=w.createHTML(""));Gt&&Gt(T),Ss=T}},j0=xe({},[..._v,...Dv,...JD]),W0=xe({},[...Fv,...e3]),BA=function(T){let H=h(T);(!H||!H.tagName)&&(H={namespaceURI:ws,tagName:"template"});let J=wp(T.tagName),Be=wp(H.tagName);return ym[T.namespaceURI]?T.namespaceURI===fu?H.namespaceURI===Br?J==="svg":H.namespaceURI===du?J==="svg"&&(Be==="annotation-xml"||pu[Be]):!!j0[J]:T.namespaceURI===du?H.namespaceURI===Br?J==="math":H.namespaceURI===fu?J==="math"&&mu[Be]:!!W0[J]:T.namespaceURI===Br?H.namespaceURI===fu&&!mu[Be]||H.namespaceURI===du&&!pu[Be]?!1:!W0[J]&&(DA[J]||!j0[J]):!!(Wa==="application/xhtml+xml"&&ym[T.namespaceURI]):!1},vr=function(T){Dc(t.removed,{element:T});try{h(T).removeChild(T)}catch(H){x(T)}},gu=function(T,H){try{Dc(t.removed,{attribute:H.getAttributeNode(T),from:H})}catch(J){Dc(t.removed,{attribute:null,from:H})}if(H.removeAttribute(T),T==="is")if(Qe||He)try{vr(H)}catch(J){}else try{H.setAttribute(T,"")}catch(J){}},K0=function(T){let H=null,J=null;if(vt)T="<remove></remove>"+T;else{let xt=Ok(T,/^[\r\n\t ]+/);J=xt&&xt[0]}Wa==="application/xhtml+xml"&&ws===Br&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let Be=w?w.createHTML(T):T;if(ws===Br)try{H=new f().parseFromString(Be,Wa)}catch(xt){}if(!H||!H.documentElement){H=C.createDocument(ws,"template",null);try{H.documentElement.innerHTML=hm?E:Be}catch(xt){}}let Ct=H.body||H.documentElement;return T&&J&&Ct.insertBefore(n.createTextNode(J),Ct.childNodes[0]||null),ws===Br?B.call(H,pe?"html":"body")[0]:pe?H.documentElement:Ct},G0=function(T){return k.call(T.ownerDocument||T,T,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},xm=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof u)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},q0=function(T){return typeof a=="function"&&T instanceof a};function Ur(ne,T,H){vp(ne,J=>{J.call(t,T,H,Ss)})}let Y0=function(T){let H=null;if(Ur(N.beforeSanitizeElements,T,null),xm(T))return vr(T),!0;let J=ft(T.nodeName);if(Ur(N.uponSanitizeElement,T,{tagName:J,allowedTags:$}),T.hasChildNodes()&&!q0(T.firstElementChild)&&Kt(/<[/\w!]/g,T.innerHTML)&&Kt(/<[/\w!]/g,T.textContent)||T.nodeType===Bc.progressingInstruction||ae&&T.nodeType===Bc.comment&&Kt(/<[/\w]/g,T.data))return vr(T),!0;if(!$[J]||be[J]){if(!be[J]&&Q0(J)&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,J)||de.tagNameCheck instanceof Function&&de.tagNameCheck(J)))return!1;if(Jt&&!xs[J]){let Be=h(T)||T.parentNode,Ct=m(T)||T.childNodes;if(Ct&&Be){let xt=Ct.length;for(let en=xt-1;en>=0;--en){let xr=g(Ct[en],!0);xr.__removalCount=(T.__removalCount||0)+1,Be.insertBefore(xr,y(T))}}}return vr(T),!0}return T instanceof l&&!BA(T)||(J==="noscript"||J==="noembed"||J==="noframes")&&Kt(/<\/no(script|embed|frames)/i,T.innerHTML)?(vr(T),!0):(X&&T.nodeType===Bc.text&&(H=T.textContent,vp([Z,Y,O],Be=>{H=Fc(H,Be," ")}),T.textContent!==H&&(Dc(t.removed,{element:T.cloneNode()}),T.textContent=H)),Ur(N.afterSanitizeElements,T,null),!1)},X0=function(T,H,J){if(dt&&(H==="id"||H==="name")&&(J in n||J in HA))return!1;if(!(Ce&&!me[H]&&Kt(F,H))){if(!(re&&Kt(ie,H))){if(!z[H]||me[H]){if(!(Q0(T)&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,T)||de.tagNameCheck instanceof Function&&de.tagNameCheck(T))&&(de.attributeNameCheck instanceof RegExp&&Kt(de.attributeNameCheck,H)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(H))||H==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&Kt(de.tagNameCheck,J)||de.tagNameCheck instanceof Function&&de.tagNameCheck(J))))return!1}else if(!gm[H]){if(!Kt(K,Fc(J,V,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&T!=="script"&&YD(J,"data:")===0&&B0[T])){if(!(rt&&!Kt(G,Fc(J,V,"")))){if(J)return!1}}}}}}return!0},Q0=function(T){return T!=="annotation-xml"&&Ok(T,U)},Z0=function(T){Ur(N.beforeSanitizeAttributes,T,null);let{attributes:H}=T;if(!H||xm(T))return;let J={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:z,forceKeepAttr:void 0},Be=H.length;for(;Be--;){let Ct=H[Be],{name:xt,namespaceURI:en,value:xr}=Ct,Ka=ft(xt),Dt=xt==="value"?xr:XD(xr);if(J.attrName=Ka,J.attrValue=Dt,J.keepAttr=!0,J.forceKeepAttr=void 0,Ur(N.uponSanitizeAttribute,T,J),Dt=J.attrValue,pi&&(Ka==="id"||Ka==="name")&&(gu(xt,T),Dt=mi+Dt),ae&&Kt(/((--!?|])>)|<\/(style|title)/i,Dt)){gu(xt,T);continue}if(J.forceKeepAttr||(gu(xt,T),!J.keepAttr))continue;if(!se&&Kt(/\/>/i,Dt)){gu(xt,T);continue}X&&vp([Z,Y,O],ex=>{Dt=Fc(Dt,ex," ")});let J0=ft(T.nodeName);if(X0(J0,Ka,Dt)){if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!en)switch(p.getAttributeType(J0,Ka)){case"TrustedHTML":{Dt=w.createHTML(Dt);break}case"TrustedScriptURL":{Dt=w.createScriptURL(Dt);break}}try{en?T.setAttributeNS(en,xt,Dt):T.setAttribute(xt,Dt),xm(T)?vr(T):Lk(t.removed)}catch(ex){}}}Ur(N.afterSanitizeAttributes,T,null)},UA=function ne(T){let H=null,J=G0(T);for(Ur(N.beforeSanitizeShadowDOM,T,null);H=J.nextNode();)Ur(N.uponSanitizeShadowNode,H,null),Y0(H),Z0(H),H.content instanceof i&&ne(H.content);Ur(N.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(ne){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,J=null,Be=null,Ct=null;if(hm=!ne,hm&&(ne="<!-->"),typeof ne!="string"&&!q0(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw zc("dirty is not a string, aborting")}else throw zc("toString is not a function");if(!t.isSupported)return ne;if(je||vm(T),t.removed=[],typeof ne=="string"&&(yr=!1),yr){if(ne.nodeName){let xr=ft(ne.nodeName);if(!$[xr]||be[xr])throw zc("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof a)H=K0("<!---->"),J=H.ownerDocument.importNode(ne,!0),J.nodeType===Bc.element&&J.nodeName==="BODY"||J.nodeName==="HTML"?H=J:H.appendChild(J);else{if(!Qe&&!X&&!pe&&ne.indexOf("<")===-1)return w&&Ze?w.createHTML(ne):ne;if(H=K0(ne),!H)return Qe?null:Ze?E:""}H&&vt&&vr(H.firstChild);let xt=G0(yr?ne:H);for(;Be=xt.nextNode();)Y0(Be),Z0(Be),Be.content instanceof i&&UA(Be.content);if(yr)return ne;if(Qe){if(He)for(Ct=A.call(H.ownerDocument);H.firstChild;)Ct.appendChild(H.firstChild);else Ct=H;return(z.shadowroot||z.shadowrootmode)&&(Ct=M.call(r,Ct,!0)),Ct}let en=pe?H.outerHTML:H.innerHTML;return pe&&$["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&Kt(Vk,H.ownerDocument.doctype.name)&&(en="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
20
+ `+en),X&&vp([Z,Y,O],xr=>{en=Fc(en,xr," ")}),w&&Ze?w.createHTML(en):en},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};vm(ne),je=!0},t.clearConfig=function(){Ss=null,je=!1},t.isValidAttribute=function(ne,T,H){Ss||vm({});let J=ft(ne),Be=ft(T);return X0(J,Be,H)},t.addHook=function(ne,T){typeof T=="function"&&Dc(N[ne],T)},t.removeHook=function(ne,T){if(T!==void 0){let H=GD(N[ne],T);return H===-1?void 0:qD(N[ne],H,1)[0]}return Lk(N[ne])},t.removeHooks=function(ne){N[ne]=[]},t.removeAllHooks=function(){N=zk()},t}var jk=$k();var mo=b(Q());var Vv=b(Me()),Un=b(Q());var Sp=b(Q()),d3=["bottom","height","left","right","top","width"],f3=(e={},t={})=>d3.some(n=>e[n]!==t[n]),po=new Map,Wk,Kk=()=>{let e=[],t=[];po.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();f3(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{po.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Wk=window.requestAnimationFrame(Kk)};function p3(e,t){return{observe(){let n=po.size===0;if(po.has(e)){let r=po.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else po.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&Kk()},unobserve(){let n=po.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||po.delete(e),po.size||cancelAnimationFrame(Wk)}}}}function Uv(e){let[t,n]=(0,Sp.useState)(null);return(0,Sp.useLayoutEffect)(()=>{if(!e.current)return;let r=p3(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ia=b(Q()),Yk=b(Ul());var Gk=b(Q());function ri(e){(0,Gk.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function rs(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var qk={root:"dd-r-dgo"};var Xk=({children:e,parentNode:t})=>{let[n,r]=(0,Ia.useState)(null),o=(0,Ia.useContext)(Ya);return(0,Ia.useLayoutEffect)(()=>{let i=document.createElement("div");return rs(i),i.classList.add(qk.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,Yk.createPortal)(e,n):null};var Or={ref:"dd-iz-KP",root:"dd-vEMon",positionAbove:"dd-mUCxM",positionBelow:"dd-7oZI7",positionLeft:"dd-BiWvD",positionRight:"dd-JIWea",alignStart:"dd-5ivu6",alignCenter:"dd-rnVkP",alignEnd:"dd-gZBp4"};var bp=b(R()),Ep=(e=!1)=>{let[t,n]=(0,Un.useState)(e),r=(0,Un.useCallback)(()=>n(!0),[]),o=(0,Un.useCallback)(()=>n(!1),[]),i=(0,Un.useCallback)(()=>n(a=>!a),[]),s=(0,Un.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function $v(e,t=null,n=0){if(!e)return{display:"none"};let r=t?e.top-t.top<0||e.top<t.top-n?t.top-n:e.top+e.height>t.top+t.height+n?t.top+t.height+n-e.height:e.top:e.top,o=t?e.left<t.left-n?t.left-n:e.left+e.width>t.left+t.width+n?t.left+t.width+n-e.width:e.left:e.left;return{top:r,left:o,height:e.height,width:e.width}}var La=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Un.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=$v,parentNode:a}=u,l=oe(u,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let d=Uv(t),f=Uv(n),p=(0,Un.useMemo)(()=>s(d,f,0),[d,f]);return(0,bp.jsx)(Xk,{parentNode:a,children:(0,bp.jsx)("div",P(S({className:(0,Vv.default)(Or.ref,{[Or.positionAbove]:r==="above",[Or.positionBelow]:r==="below",[Or.positionLeft]:r==="left",[Or.positionRight]:r==="right",[Or.alignStart]:o==="start",[Or.alignCenter]:o==="center",[Or.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,bp.jsx)("div",{className:(0,Vv.default)(e,Or.root),children:i})}))})};var Qk={root:"dd-L7b3z",popover:"dd-OQOTB",options:"dd-Y12RE",arrow:"dd-cv33T",copyIcon:"dd-6xOsH",option:"dd-9oFX4",divider:"dd-aiZf8",fadeup:"dd-Jq9pd"};function Kv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ss=Kv();function rR(e){ss=e}var $c={exec:()=>null};function Ae(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Yt.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,t)};return r}var Yt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},m3=/^(?:[ \t]*(?:\n|$))+/,g3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,h3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Wc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,y3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Gv=/(?:[*+-]|\d{1,9}[.)])/,oR=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,iR=Ae(oR).replace(/bull/g,Gv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),v3=Ae(oR).replace(/bull/g,Gv).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),qv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,x3=/^[^\n]+/,Yv=/(?!\s*\])(?:\\.|[^\[\]\\])+/,w3=Ae(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),S3=Ae(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Gv).getRegex(),kp="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Xv=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,b3=Ae("^ {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|$))","i").replace("comment",Xv).replace("tag",kp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),sR=Ae(qv).replace("hr",Wc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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",kp).getRegex(),E3=Ae(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",sR).getRegex(),Qv={blockquote:E3,code:g3,def:w3,fences:h3,heading:y3,hr:Wc,html:b3,lheading:iR,list:S3,newline:m3,paragraph:sR,table:$c,text:x3},Zk=Ae("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Wc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\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",kp).getRegex(),T3=P(S({},Qv),{lheading:v3,table:Zk,paragraph:Ae(qv).replace("hr",Wc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Zk).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",kp).getRegex()}),C3=P(S({},Qv),{html:Ae(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Xv).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:$c,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ae(qv).replace("hr",Wc).replace("heading",` *#{1,6} *[^
21
+ ]`).replace("lheading",iR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),k3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,R3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,aR=/^( {2,}|\\)\n(?!\s*$)/,P3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rp=/[\p{P}\p{S}]/u,Zv=/[\s\p{P}\p{S}]/u,lR=/[^\s\p{P}\p{S}]/u,A3=Ae(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zv).getRegex(),cR=/(?!~)[\p{P}\p{S}]/u,I3=/(?!~)[\s\p{P}\p{S}]/u,L3=/(?:[^\s\p{P}\p{S}]|~)/u,O3=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,uR=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,N3=Ae(uR,"u").replace(/punct/g,Rp).getRegex(),M3=Ae(uR,"u").replace(/punct/g,cR).getRegex(),dR="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_3=Ae(dR,"gu").replace(/notPunctSpace/g,lR).replace(/punctSpace/g,Zv).replace(/punct/g,Rp).getRegex(),D3=Ae(dR,"gu").replace(/notPunctSpace/g,L3).replace(/punctSpace/g,I3).replace(/punct/g,cR).getRegex(),F3=Ae("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,lR).replace(/punctSpace/g,Zv).replace(/punct/g,Rp).getRegex(),z3=Ae(/\\(punct)/,"gu").replace(/punct/g,Rp).getRegex(),H3=Ae(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),B3=Ae(Xv).replace("(?:-->|$)","-->").getRegex(),U3=Ae("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",B3).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Cp=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V3=Ae(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Cp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fR=Ae(/^!?\[(label)\]\[(ref)\]/).replace("label",Cp).replace("ref",Yv).getRegex(),pR=Ae(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yv).getRegex(),$3=Ae("reflink|nolink(?!\\()","g").replace("reflink",fR).replace("nolink",pR).getRegex(),Jv={_backpedal:$c,anyPunctuation:z3,autolink:H3,blockSkip:O3,br:aR,code:R3,del:$c,emStrongLDelim:N3,emStrongRDelimAst:_3,emStrongRDelimUnd:F3,escape:k3,link:V3,nolink:pR,punctuation:A3,reflink:fR,reflinkSearch:$3,tag:U3,text:P3,url:$c},j3=P(S({},Jv),{link:Ae(/^!?\[(label)\]\((.*?)\)/).replace("label",Cp).getRegex(),reflink:Ae(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Cp).getRegex()}),jv=P(S({},Jv),{emStrongRDelimAst:D3,emStrongLDelim:M3,url:Ae(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),W3=P(S({},jv),{br:Ae(aR).replace("{2,}","*").getRegex(),text:Ae(jv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Tp={normal:Qv,gfm:T3,pedantic:C3},Uc={normal:Jv,gfm:jv,breaks:W3,pedantic:j3},K3={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jk=e=>K3[e];function Nr(e,t){if(t){if(Yt.escapeTest.test(e))return e.replace(Yt.escapeReplace,Jk)}else if(Yt.escapeTestNoEncode.test(e))return e.replace(Yt.escapeReplaceNoEncode,Jk);return e}function eR(e){try{e=encodeURI(e).replace(Yt.percentDecode,"%")}catch(t){return null}return e}function tR(e,t){var i;let n=e.replace(Yt.findPipe,(s,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Yt.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Yt.slashPipe,"|");return r}function Vc(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function G3(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function nR(e,t,n,r,o){let i=t.href,s=t.title||null,a=e[1].replace(o.other.outputLinkReplace,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;let l={type:"link",raw:n,href:i,title:s,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:i,title:s,text:a}}function q3(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
22
22
  `).map(i=>{let s=i.match(n.other.beginningSpace);if(s===null)return i;let[a]=s;return a.length>=o.length?i.slice(o.length):i}).join(`
23
- `)}var La=class{constructor(t){be(this,"options");be(this,"rules");be(this,"lexer");this.options=t||os}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Vc(r,`
24
- `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=Q3(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let o=Vc(r,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:Vc(n[0],`
23
+ `)}var Oa=class{constructor(t){Ee(this,"options");Ee(this,"rules");Ee(this,"lexer");this.options=t||ss}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Vc(r,`
24
+ `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=q3(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:o}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let o=Vc(r,"#");(this.options.pedantic||!o||this.rules.other.endingSpaceChar.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:Vc(n[0],`
25
25
  `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=Vc(n[0],`
26
26
  `).split(`
27
27
  `),o="",i="",s=[];for(;r.length>0;){let a=!1,l=[],c;for(c=0;c<r.length;c++)if(this.rules.other.blockquoteStart.test(r[c]))l.push(r[c]),a=!0;else if(!a)l.push(r[c]);else break;r=r.slice(c);let u=l.join(`
28
28
  `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
29
29
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
30
30
  ${u}`:u,i=i?`${i}
31
- ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=f,r.length===0)break;let p=s.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let v=p,m=v.raw+`
31
+ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=f,r.length===0)break;let p=s.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){let v=p,g=v.raw+`
32
32
  `+r.join(`
33
- `),x=this.blockquote(m);s[s.length-1]=x,o=o.substring(0,o.length-v.raw.length)+x.raw,i=i.substring(0,i.length-v.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){let v=p,m=v.raw+`
33
+ `),x=this.blockquote(g);s[s.length-1]=x,o=o.substring(0,o.length-v.raw.length)+x.raw,i=i.substring(0,i.length-v.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){let v=p,g=v.raw+`
34
34
  `+r.join(`
35
- `),x=this.list(m);s[s.length-1]=x,o=o.substring(0,o.length-p.raw.length)+x.raw,i=i.substring(0,i.length-v.raw.length)+x.raw,r=m.substring(s.at(-1).raw.length).split(`
35
+ `),x=this.list(g);s[s.length-1]=x,o=o.substring(0,o.length-p.raw.length)+x.raw,i=i.substring(0,i.length-v.raw.length)+x.raw,r=g.substring(s.at(-1).raw.length).split(`
36
36
  `);continue}}return{type:"blockquote",raw:o,tokens:s,text:i}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim(),o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");let s=this.rules.other.listItemRegex(r),a=!1;for(;t;){let c=!1,u="",d="";if(!(n=s.exec(t))||this.rules.block.hr.test(t))break;u=n[0],t=t.substring(u.length);let f=n[2].split(`
37
- `,1)[0].replace(this.rules.other.listReplaceTabs,g=>" ".repeat(3*g.length)),p=t.split(`
38
- `,1)[0],v=!f.trim(),m=0;if(this.options.pedantic?(m=2,d=f.trimStart()):v?m=n[1].length+1:(m=n[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=f.slice(m),m+=n[1].length),v&&this.rules.other.blankLine.test(p)&&(u+=p+`
39
- `,t=t.substring(p.length+1),c=!0),!c){let g=this.rules.other.nextBulletRegex(m),h=this.rules.other.hrRegex(m),w=this.rules.other.fencesBeginRegex(m),E=this.rules.other.headingBeginRegex(m),C=this.rules.other.htmlBeginRegex(m);for(;t;){let k=t.split(`
40
- `,1)[0],A;if(p=k,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),A=p):A=p.replace(this.rules.other.tabCharGlobal," "),w.test(p)||E.test(p)||C.test(p)||g.test(p)||h.test(p))break;if(A.search(this.rules.other.nonSpaceChar)>=m||!p.trim())d+=`
41
- `+A.slice(m);else{if(v||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||E.test(f)||h.test(f))break;d+=`
37
+ `,1)[0].replace(this.rules.other.listReplaceTabs,m=>" ".repeat(3*m.length)),p=t.split(`
38
+ `,1)[0],v=!f.trim(),g=0;if(this.options.pedantic?(g=2,d=f.trimStart()):v?g=n[1].length+1:(g=n[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=f.slice(g),g+=n[1].length),v&&this.rules.other.blankLine.test(p)&&(u+=p+`
39
+ `,t=t.substring(p.length+1),c=!0),!c){let m=this.rules.other.nextBulletRegex(g),h=this.rules.other.hrRegex(g),w=this.rules.other.fencesBeginRegex(g),E=this.rules.other.headingBeginRegex(g),C=this.rules.other.htmlBeginRegex(g);for(;t;){let k=t.split(`
40
+ `,1)[0],A;if(p=k,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),A=p):A=p.replace(this.rules.other.tabCharGlobal," "),w.test(p)||E.test(p)||C.test(p)||m.test(p)||h.test(p))break;if(A.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=`
41
+ `+A.slice(g);else{if(v||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(f)||E.test(f)||h.test(f))break;d+=`
42
42
  `+p}!v&&!p.trim()&&(v=!0),u+=k+`
43
- `,t=t.substring(k.length+1),f=A.slice(m)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0));let x=null,y;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(y=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!x,checked:y,loose:!1,text:d,tokens:[]}),i.raw+=u}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){let u=i.items[c].tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=d}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){var a;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=tR(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(a=n[3])!=null&&a.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
43
+ `,t=t.substring(k.length+1),f=A.slice(g)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0));let x=null,y;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(y=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:u,task:!!x,checked:y,loose:!1,text:d,tokens:[]}),i.raw+=u}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){let u=i.items[c].tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=d}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),o=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){var a;let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=tR(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(a=n[3])!=null&&a.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
44
44
  `):[],s={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let l of o)this.rules.other.tableAlignRight.test(l)?s.align.push("right"):this.rules.other.tableAlignCenter.test(l)?s.align.push("center"):this.rules.other.tableAlignLeft.test(l)?s.align.push("left"):s.align.push(null);for(let l=0;l<r.length;l++)s.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:s.align[l]});for(let l of i)s.rows.push(tR(l,s.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:s.align[u]})));return s}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===`
45
- `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=Vc(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=X3(n[2],"()");if(s>-1){let l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?o=o.slice(1):o=o.slice(1,-1)),nR(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=n[o.toLowerCase()];if(!i){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return nR(r,i,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let s=[...o[0]].length-1,a,l,c=s,u=0,d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(o=d.exec(n))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);let f=[...o[0]][0].length,p=t.slice(0,s+o.index+f+l);if(Math.min(s,l)%2){let m=p.slice(1,-1);return{type:"em",raw:p,text:m,tokens:this.lexer.inlineTokens(m)}}let v=p.slice(2,-2);return{type:"strong",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return o&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=n[1],o="mailto:"+r):(r=n[1],o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r,o;let n;if(n=this.rules.inline.url.exec(t)){let i,s;if(n[2]==="@")i=n[0],s="mailto:"+i;else{let a;do a=n[0],n[0]=(o=(r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])!=null?o:"";while(a!==n[0]);i=n[0],n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},pr=class e{constructor(t){be(this,"tokens");be(this,"options");be(this,"state");be(this,"tokenizer");be(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||os,this.options.tokenizer=this.options.tokenizer||new La,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Gt,block:bp.normal,inline:Uc.normal};this.options.pedantic?(n.block=bp.pedantic,n.inline=Uc.pedantic):this.options.gfm&&(n.block=bp.gfm,this.options.breaks?n.inline=Uc.breaks:n.inline=Uc.gfm),this.tokenizer.rules=n}static get rules(){return{block:bp,inline:Uc}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(t){t=t.replace(Gt.carriageReturn,`
46
- `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var o,i,s;for(this.options.pedantic&&(t=t.replace(Gt.tabCharGlobal," ").replace(Gt.spaceLine,""));t;){let a;if((i=(o=this.options.extensions)==null?void 0:o.block)!=null&&i.some(c=>(a=c.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let c=n.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
45
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let s=Vc(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=G3(n[2],"()");if(s>-1){let l=(n[0].indexOf("!")===0?5:4)+n[1].length+s;n[2]=n[2].substring(0,s),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(o);s&&(o=s[1],i=s[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),this.rules.other.startAngleBracket.test(o)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?o=o.slice(1):o=o.slice(1,-1)),nR(n,{href:o&&o.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=n[o.toLowerCase()];if(!i){let s=r[0].charAt(0);return{type:"text",raw:s,text:s}}return nR(r,i,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrongLDelim.exec(t);if(!o||o[3]&&r.match(this.rules.other.unicodeAlphaNumeric))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){let s=[...o[0]].length-1,a,l,c=s,u=0,d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+s);(o=d.exec(n))!=null;){if(a=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!a)continue;if(l=[...a].length,o[3]||o[4]){c+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){u+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+u);let f=[...o[0]][0].length,p=t.slice(0,s+o.index+f+l);if(Math.min(s,l)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let v=p.slice(2,-2);return{type:"strong",raw:p,text:v,tokens:this.lexer.inlineTokens(v)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),o=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return o&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){let n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=n[1],o="mailto:"+r):(r=n[1],o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){var r,o;let n;if(n=this.rules.inline.url.exec(t)){let i,s;if(n[2]==="@")i=n[0],s="mailto:"+i;else{let a;do a=n[0],n[0]=(o=(r=this.rules.inline._backpedal.exec(n[0]))==null?void 0:r[0])!=null?o:"";while(a!==n[0]);i=n[0],n[1]==="www."?s="http://"+n[0]:s=n[0]}return{type:"link",raw:n[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},fr=class e{constructor(t){Ee(this,"tokens");Ee(this,"options");Ee(this,"state");Ee(this,"tokenizer");Ee(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ss,this.options.tokenizer=this.options.tokenizer||new Oa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Yt,block:Tp.normal,inline:Uc.normal};this.options.pedantic?(n.block=Tp.pedantic,n.inline=Uc.pedantic):this.options.gfm&&(n.block=Tp.gfm,this.options.breaks?n.inline=Uc.breaks:n.inline=Uc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Tp,inline:Uc}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(t){t=t.replace(Yt.carriageReturn,`
46
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var o,i,s;for(this.options.pedantic&&(t=t.replace(Yt.tabCharGlobal," ").replace(Yt.spaceLine,""));t;){let a;if((i=(o=this.options.extensions)==null?void 0:o.block)!=null&&i.some(c=>(a=c.call({lexer:this},t,n))?(t=t.substring(a.raw.length),n.push(a),!0):!1))continue;if(a=this.tokenizer.space(t)){t=t.substring(a.raw.length);let c=n.at(-1);a.raw.length===1&&c!==void 0?c.raw+=`
47
47
  `:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
48
48
  `+a.raw,c.text+=`
49
49
  `+a.text,this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(a=this.tokenizer.fences(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.heading(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.hr(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.blockquote(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.list(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.html(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.def(t)){t=t.substring(a.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
@@ -52,7 +52,7 @@ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
52
52
  `+a.raw,c.text+=`
53
53
  `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a),r=l.length!==t.length,t=t.substring(a.raw.length);continue}if(a=this.tokenizer.text(t)){t=t.substring(a.raw.length);let c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
54
54
  `+a.raw,c.text+=`
55
- `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var a,l,c;let r=t,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,s="";for(;t;){i||(s=""),i=!1;let u;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(f=>(u=f.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let f=n.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,s)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let d=t;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0,p=t.slice(1),v;this.options.extensions.startInline.forEach(m=>{v=m.call({lexer:this},p),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(d=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(d)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),i=!0;let f=n.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}},_a=class{constructor(t){be(this,"options");be(this,"parser");this.options=t||os}space(t){return""}code({text:t,lang:n,escaped:r}){var s;let o=(s=(n||"").match(Gt.notSpaceStart))==null?void 0:s[0],i=t.replace(Gt.endingNewline,"")+`
55
+ `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(a);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var a,l,c;let r=t,o=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)u.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,o.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let i=!1,s="";for(;t;){i||(s=""),i=!1;let u;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(f=>(u=f.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let f=n.at(-1);u.type==="text"&&(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,r,s)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let d=t;if((c=this.options.extensions)!=null&&c.startInline){let f=1/0,p=t.slice(1),v;this.options.extensions.startInline.forEach(g=>{v=g.call({lexer:this},p),typeof v=="number"&&v>=0&&(f=Math.min(f,v))}),f<1/0&&f>=0&&(d=t.substring(0,f+1))}if(u=this.tokenizer.inlineText(d)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(s=u.raw.slice(-1)),i=!0;let f=n.at(-1);(f==null?void 0:f.type)==="text"?(f.raw+=u.raw,f.text+=u.text):n.push(u);continue}if(t){let f="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(f);break}else throw new Error(f)}}return n}},Na=class{constructor(t){Ee(this,"options");Ee(this,"parser");this.options=t||ss}space(t){return""}code({text:t,lang:n,escaped:r}){var s;let o=(s=(n||"").match(Yt.notSpaceStart))==null?void 0:s[0],i=t.replace(Yt.endingNewline,"")+`
56
56
  `;return o?'<pre><code class="language-'+Nr(o)+'">'+(r?i:Nr(i,!0))+`</code></pre>
57
57
  `:"<pre><code>"+(r?i:Nr(i,!0))+`</code></pre>
58
58
  `}blockquote({tokens:t}){return`<blockquote>
@@ -70,18 +70,18 @@ ${this.parser.parse(t)}</blockquote>
70
70
  `}tablerow({text:t}){return`<tr>
71
71
  ${t}</tr>
72
72
  `}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
73
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Nr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let o=this.parser.parseInline(r),i=eR(t);if(i===null)return o;t=i;let s='<a href="'+t+'"';return n&&(s+=' title="'+Nr(n)+'"'),s+=">"+o+"</a>",s}image({href:t,title:n,text:r}){let o=eR(t);if(o===null)return Nr(r);t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${Nr(n)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Nr(t.text)}},jc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},mr=class e{constructor(t){be(this,"options");be(this,"renderer");be(this,"textRenderer");this.options=t||os,this.options.renderer=this.options.renderer||new _a,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new jc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(t,n=!0){var o,i;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=a,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){r+=u||"";continue}}let l=a;switch(l.type){case"space":{r+=this.renderer.space(l);continue}case"hr":{r+=this.renderer.hr(l);continue}case"heading":{r+=this.renderer.heading(l);continue}case"code":{r+=this.renderer.code(l);continue}case"table":{r+=this.renderer.table(l);continue}case"blockquote":{r+=this.renderer.blockquote(l);continue}case"list":{r+=this.renderer.list(l);continue}case"html":{r+=this.renderer.html(l);continue}case"paragraph":{r+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;s+1<t.length&&t[s+1].type==="text";)c=t[++s],u+=`
74
- `+this.renderer.text(c);n?r+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):r+=u;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(t,n=this.renderer){var o,i;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=c||"";continue}}let l=a;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},ns=class{constructor(t){be(this,"options");be(this,"block");this.options=t||os}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?pr.lex:pr.lexInline}provideParser(){return this.block?mr.parse:mr.parseInline}};be(ns,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var jv=class{constructor(...t){be(this,"defaults",Kv());be(this,"options",this.setOptions);be(this,"parse",this.parseMarkdown(!0));be(this,"parseInline",this.parseMarkdown(!1));be(this,"Parser",mr);be(this,"Renderer",_a);be(this,"TextRenderer",jc);be(this,"Lexer",pr);be(this,"Tokenizer",La);be(this,"Hooks",ns);this.use(...t)}walkTokens(t,n){var o,i;let r=[];for(let s of t)switch(r=r.concat(n.call(this,s)),s.type){case"table":{let a=s;for(let l of a.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of a.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let a=s;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=s;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{let c=a[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let o=S({},r);if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=n.renderers[i.name];s?n.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){let i=this.defaults.renderer||new _a(this.defaults);for(let s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,l=r.renderer[a],c=i[a];i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d||""}}o.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new La(this.defaults);for(let s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,l=r.tokenizer[a],c=i[a];i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}o.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new ns;for(let s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,l=r.hooks[a],c=i[a];ns.passThroughHooks.has(s)?i[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(i,u)).then(f=>c.call(i,f));let d=l.call(i,u);return c.call(i,d)}:i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}o.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,s=r.walkTokens;o.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),i&&(l=l.concat(i.call(this,a))),l}}this.defaults=S(S({},this.defaults),o)}),this}setOptions(t){return this.defaults=S(S({},this.defaults),t),this}lexer(t,n){return pr.lex(t,n!=null?n:this.defaults)}parser(t,n){return mr.parse(t,n!=null?n:this.defaults)}parseMarkdown(t){return(r,o)=>{let i=S({},o),s=S(S({},this.defaults),i),a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r=="undefined"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=t);let l=s.hooks?s.hooks.provideLexer():t?pr.lex:pr.lexInline,c=s.hooks?s.hooks.provideParser():t?mr.parse:mr.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(u=>l(u,s)).then(u=>s.hooks?s.hooks.processAllTokens(u):u).then(u=>s.walkTokens?Promise.all(this.walkTokens(u,s.walkTokens)).then(()=>u):u).then(u=>c(u,s)).then(u=>s.hooks?s.hooks.postprocess(u):u).catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let u=l(r,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let d=c(u,s);return s.hooks&&(d=s.hooks.postprocess(d)),d}catch(u){return a(u)}}}onError(t,n){return r=>{if(r.message+=`
75
- Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Nr(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},rs=new jv;function Re(e,t){return rs.parse(e,t)}Re.options=Re.setOptions=function(e){return rs.setOptions(e),Re.defaults=rs.defaults,rR(Re.defaults),Re};Re.getDefaults=Kv;Re.defaults=os;Re.use=function(...e){return rs.use(...e),Re.defaults=rs.defaults,rR(Re.defaults),Re};Re.walkTokens=function(e,t){return rs.walkTokens(e,t)};Re.parseInline=rs.parseInline;Re.Parser=mr;Re.parser=mr.parse;Re.Renderer=_a;Re.TextRenderer=jc;Re.Lexer=pr;Re.lexer=pr.lex;Re.Tokenizer=La;Re.Hooks=ns;Re.parse=Re;var CV=Re.options,kV=Re.setOptions,RV=Re.use,PV=Re.walkTokens,AV=Re.parseInline;var IV=mr.parse,LV=pr.lex;var gr=b(R());function Z3(e){return`<button type="button" data-copy-icon class=${e}><svg version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg></button>`}function Jv(e){var n,r;let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(o=>o.remove()),(r=(n=t.textContent)==null?void 0:n.trim())!=null?r:""}function J3(e){return e.replace(/\r\n/g,`
76
- `)}var e4=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=M("Markdown",Qk),s=(0,ho.useRef)(null),[a,l]=(0,ho.useState)(null),c=(0,ho.useMemo)(()=>{let m=Re.parse(J3(e));return jk.sanitize(m.toString()).replaceAll("</code>",`${Z3(i.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=m=>{var g;let x=m.target,y=!!((g=s.current)!=null&&g.querySelector("code"));if(["A","BUTTON"].includes(x.tagName)){l(null);return}a||y&&x.tagName!=="CODE"||!y&&x!==s.current||(x.addEventListener("mouseleave",()=>l(null),{once:!0}),l(x))},d=()=>{if(!a)return;l(null);let m=a.querySelector("button");m&&(Ra(m,i.fadeup),r==null||r(Jv(a)))},f=m=>{let x=m.target;if(x.tagName==="A"){m.stopPropagation();return}"copyIcon"in x.dataset&&(Ra(x,i.fadeup),r==null||r(Jv(x.parentElement)))},p=()=>{!a||!o||(l(null),o(Jv(a)))},v=m=>{if(m===null)return;let x=m.getBoundingClientRect();x.left<0?m.style.transform=`translateX(${-x.left+2}px)`:x.right>window.innerWidth&&(m.style.transform=`translateX(${window.innerWidth-x.right-2}px)`)};return(0,gr.jsxs)(ho.Fragment,{children:[a&&(r||o)&&(0,gr.jsxs)(Ia,{triggerRef:{current:a},className:i.popover,parentNode:a,children:[(0,gr.jsxs)("div",{className:i.options,ref:v,children:[r&&(0,gr.jsx)("button",{type:"button",className:i.option,onClick:d,children:n}),o&&(0,gr.jsxs)(ho.Fragment,{children:[(0,gr.jsx)("div",{className:i.divider}),(0,gr.jsx)("button",{type:"button",className:i.option,onClick:p,children:t})]})]}),(0,gr.jsx)("div",{className:i.arrow})]}),(0,gr.jsx)("div",{ref:s,"data-testid":"widget-markdown-content",className:i.root,dangerouslySetInnerHTML:{__html:c},onMouseOver:u,onClick:f})]})},is=e4;var Nt=b(R()),t4=({threadId:e,onEvaluate:t,onUse:n,onResetQuestion:r,question:o})=>{var x;let[i,s]=ss.default.useState(""),{setSelected:a}=ei(),l=(0,ss.useRef)(null),c=M("KnowledgeSearchStyles",Ak),u=ce(_v),d=ct(),f=(x=j(fc(e!=null?e:-1)))!=null?x:[],p=po(t,{onSuccess(y){d("knowledge assist question answered",{question:i||o||"",sources:y.answer.sources,answer:y.answer.answer,isFollowUpQuestion:f.length>=1,isAutoInitiated:!i&&!!o}),a(`knowledge-assist-${f.length}`),s("")}}),v=y=>I(void 0,null,function*(){y.preventDefault(),y.stopPropagation(),i!==""&&p.call(i)}),m=(y,g)=>{d("knowledge assist source viewed",{question:g,sourceViewed:y.url||y.name})};return(0,ss.useEffect)(()=>{var y;o&&p.state==="idle"?p.call(o):(y=l.current)==null||y.focus()},[l,p.state]),(0,ss.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,f]),(0,Nt.jsxs)("div",{className:c.root,children:[f.length>0&&(0,Nt.jsx)("div",{className:c.alignRight,children:(0,Nt.jsx)(Ge.Button,{onClick:r,children:u("reset")})}),f.map(({question:y,answer:g},h)=>(0,Nt.jsx)(Ge.List,{children:(0,Nt.jsx)(Ge.ListItem,{id:`knowledge-assist-${h}`,"data-testid":"knowledge-search-answer",description:(0,Nt.jsx)(is,{content:g.answer}),closeOnSelect:!0,onClick:()=>n(g.answer),onSourceClick:w=>m(w,y),sources:g.sources,styles:{title:c.question,description:c.answer},extra:(0,Nt.jsx)("div",{className:c.listItemFeedback,children:(0,Nt.jsx)(Ji,{feedbackText:g.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:S({question:y,isAgent:o!==y,isFollowUpQuestion:f.length>1},g)})}),children:y})},`${g.answer}_${h}`)),p.state==="loading"&&(0,Nt.jsx)("p",{className:c.status,children:u("loading")}),p.state==="error"&&(0,Nt.jsx)("p",{className:c.status,children:u("error")}),(0,Nt.jsxs)("form",{className:c.form,onSubmit:v,children:[(0,Nt.jsx)("input",{ref:l,placeholder:u("anotherQuestion"),className:c.input,type:"text",value:i,onFocus:()=>{a(void 0)},onChange:y=>{a(void 0),s(y.target.value)}}),(0,Nt.jsx)("button",{type:"submit",className:c.submit,disabled:p.state==="loading",children:(0,Nt.jsx)(Pk,{})})]})]})},mR=t4;var e0=b(R()),kp=e=>(0,e0.jsx)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,e0.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})}));var Wc={};Rt(Wc,{enUS:()=>n4,nlNL:()=>r4});var n4={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},r4={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Rp={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var as=b(R()),o4=({suggestion:e,source:t,context:n})=>{let r=ce(Wc),o=j(Pr),i=ye(),s=ee("enableSuggestionFeedback"),a=`${e.text}`,l=j(Pa(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{i(oo({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!s||!l?null:(0,as.jsxs)(yt,{placement:"top-end",children:[(0,as.jsx)(yt.Trigger,{className:Rp.trigger,children:(0,as.jsx)(kp,{"data-testid":"feedback-dropdown-trigger"})}),(0,as.jsx)(yt.Content,{className:Rp.content,children:(0,as.jsx)(yt.Button,{className:Rp.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},Pp=o4;var qc={};Rt(qc,{enUS:()=>i4,nlNL:()=>s4});var i4={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"URL suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},s4={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"URL suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var ER=b(Z());var a4=["{amount}"," {amount}","{date}","{email}","{iban}","{name}","{postal_code}","{street}","{tarif}","{usage}","{3_digits}","{4_digits}","{5_digits}","{6_digits}","{7_digits}","{8_digits}","{9_digits}","{10_digits}"],l4=new RegExp(a4.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function gR(e,t){let n=e.split(l4),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let c=r;if(l){let d=a.charAt(0),f=0;do c=d?t.indexOf(d,c+1):-1,f+=1;while(c!==-1&&a.indexOf(t.slice(c))!==0);if(c===-1&&f>2)return e}else c=a&&a!==""?t.indexOf(a,r):-1;let u=c===-1?t.slice(r):t.slice(r,c);o.push(u),r=c}return o.join("")}function hR(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var vR={suggestions:[],fetchState:"idle"},yR={default:vR},xR=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},Ap=e=>e.textSuggestions,wR=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Ip=st("textSuggestions/refresh"),hr=ge("textSuggestions/recommendations",(e,t)=>I(void 0,null,function*(){var c,u;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=sa(r),l=[];if(e==="sticky-messages"){let d=(c=r.profile.data)==null?void 0:c.code;if(!d)throw new Error("No current profile to fetch pinned messages");l=yield n.getPinnedMessages(d)}else{let d=(u=r.conversation.current)==null?void 0:u.id;if(!d)throw new Error("No current conversation to fetch text suggestions");l=yield n.getTextSuggestions(d,Ql(r),e)}if(o&&(l=l.map(d=>S(P(S({},d),{text:un(d.text,o)}),d.title?{title:un(d.title,o)}:{}))),e==="default"){let d=s?l.filter(wR(a)):l;t.dispatch(Xo(d.slice(0,i)))}return l})),Gc=ge("textSuggestions/autocompletions",(e,t)=>I(void 0,null,function*(){var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{platformVariables:i}=r.info,{textSuggestionsCount:s,deanonymize:a,inlineSuggestions:l}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let c=yield n.getAutocompleteSuggestions(o,P(S({},Ql(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(c=c.filter(wR(e))),i&&(c=c.map(d=>P(S({},d),{text:un(d.text,i)}))),a&&(c=c.map(d=>P(S({},d),{text:d.source!=="trie-with-typos"?gR(d.text,e):d.text}))),c=hR(c,s),t.dispatch(Xo(c)),c})),SR=Ce({name:"textSuggestions",initialState:yR,reducers:{setTextSuggestions:{reducer(e,t){let{contentType:n}=t.payload;e[n].fetchState="done",e[n].suggestions=t.payload.suggestions},prepare(e,t){return{payload:{contentType:e,suggestions:t}}}}},extraReducers:e=>{e.addCase(hr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||vR;return P(S({},t),{[r]:P(S({},o),{fetchState:"loading"})})}).addCase(hr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(hr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Gc.pending,t=>{t.default.fetchState="loading"}).addCase(Gc.rejected,t=>{t.default.fetchState="error"}).addCase(Gc.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(at,()=>yR)}}),{setTextSuggestions:O$}=SR.actions,bR=SR.reducer;var ls=b(R()),c4=({types:e,commands:t,onClick:n})=>{let r=ye(),o=ce(qc),i=j(Ap);return(0,ER.useEffect)(()=>{e.forEach(({type:s})=>{(!i[s]||i[s].suggestions.length===0)&&r(hr(s))})},[]),(0,ls.jsxs)("div",{children:[t.length>0&&(0,ls.jsx)(Ge.List,{heading:o("commands"),children:t.map((s,a)=>(0,ls.jsx)(Ge.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:s.onClick,children:s.label},s.label))}),e.map(({type:s,title:a})=>{var l;return(0,ls.jsx)(Ge.List,{heading:a,orientation:"vertical",children:(l=i[s])==null?void 0:l.suggestions.map((c,u)=>(0,ls.jsx)(Ge.ListItem,{id:`${s}-${u}`,closeOnSelect:!1,description:c.title&&c.text,onClick:()=>n(c.text,c),"data-testid":"search-overlay-suggestion",children:c.title||c.text},`${c.id}-${c.text}`))},s)})]})},TR=c4;var Tt=b(R()),d4=200,f4=5,p4=4,t0=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?p4:f4),m4=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),g4=()=>{var q,$,K;let e=ye(),t=dn(),n=ce(qc),[r,o]=(0,Yt.useState)(!1),[i,s]=(0,Yt.useState)(""),[a,l]=(0,Yt.useState)(null),c=j(Y1),u=j(Bi),[d,f]=(0,Yt.useState)(),p=j(Vt),v=ee("showSearch"),m=ee("enableSuggestionFeedback"),x=ee("showEntitiesCommand"),y=ee("showKnowledgeSearch"),g=ee("showImageSearch"),h=ee("searchTriggerKey"),w=j(_f),E=j(Of),C=j(kT),k=j(by),A=j(X1),F=j(G1),N=((K=($=(q=u==null?void 0:u.uiConfig)==null?void 0:q.search)==null?void 0:$.initialTypes)==null?void 0:K.filter(({isActive:H})=>H))||[],O=ct(),G=(0,Yt.useMemo)(()=>{let H=me=>t0(k.filter(re=>re.type===me.toUpperCase()),me,d),de=(C==null?void 0:C.map(me=>({value:me.code.toUpperCase(),label:`${me.name}s`,list:H(me.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(de.push({value:"PERSONAL",label:n("personalSuggestions"),list:H("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:H("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:H("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),g&&de.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:H("IMAGE"),listOrientation:"horizontal"}),N.length===0)return de;let ue=N.map(me=>de.find(re=>re.value.toLowerCase()===me.type)).filter(me=>!!me),Se=de.filter(me=>!ue.find(re=>re.value===me.value));return[...ue,...Se]},[C,N,g,d]),W=[{label:n("entitiesClipboard"),onClick:()=>e(io("entities")),shouldShow:x&&m4(n("entitiesClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>{e(io("knowledgeAssist")),O("open knowledge assistant",{via:"search-command"})},shouldShow:y}].filter(H=>H.shouldShow).filter(()=>!d),L=(0,Yt.useCallback)((0,CR.default)((H,de)=>{e(Di({query:H,type:de,tags:["search-overlay"],size:d?50:20}))},d4),[d]),z=(0,Yt.useCallback)((H,de)=>{switch(de.type){case"IMAGE":t.send(Ty,{suggestion:de});break;default:t.send(Ar,{text:H,suggestion:de})}e(Fn(!1))},[e]),ie=H=>{Ir(H.text),e(oo({name:"entity copied",data:{entity:H,type:"copy"}})),e(Fn(!1))},Y=H=>{t.send(Ar,{text:H,suggestion:{source:"knowledge-assist",text:H}}),e(oo({name:"answer used",data:{originalText:H},options:{includeConversationData:!0}})),s(""),a&&e(ua(a)),e(io("search")),e(Fn(!1))},V=H=>{let de={input:H,threadId:a,onNewThreadId:ue=>l(ue)};if(E)return zi(S({assistantCode:E},de));if(w)return Hi(S({assistantCode:w},de))};function U(H){return de=>{r?window.confirm(n("warning"))&&(H(de),o(!1)):H(de)}}return(0,Yt.useEffect)(()=>{i?L(i,d):e(xf())},[i,d]),(0,Yt.useEffect)(()=>{p&&e(pc())},[p]),xk(h,()=>{e(Fn(!0)),O("open search",{via:"ctrl+k"})}),!v||!u?null:(0,Tt.jsxs)(Ge,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:U(H=>e(Fn(H))),onChangeType:H=>f(H),onChangePage:U(H=>e(io(H))),selectedType:d,search:i,page:c,isOpen:F,types:G,updateDeps:[k],children:[(0,Tt.jsxs)(Ge.Page,{id:"search",children:[i.length===0&&(0,Tt.jsx)(TR,{types:N,commands:W,onClick:z}),i.length>0&&(0,Tt.jsxs)(Yt.Fragment,{children:[W.length>0&&(0,Tt.jsx)(Ge.List,{heading:n("commands"),children:W.map((H,de)=>(0,Tt.jsx)(Ge.ListItem,{closeOnSelect:!1,onClick:H.onClick,id:`commands-${de}`,children:H.label},H.label))}),G.map(({value:H,label:de,list:ue,lineClamp:Se,listOrientation:me})=>(0,Tt.jsx)(Ge.List,{heading:de,orientation:me==="horizontal"?"horizontal":"vertical",onShowAll:()=>f(H),hasMore:!d&&A[H.toLowerCase()]>t0(ue,H,d).length,children:t0(ue,H,d).map(re=>(0,Tt.jsx)(Ge.ListItem,{id:`${H}-${re.id}`,closeOnSelect:!1,lineClamp:Se,onClick:()=>z(re.text,re),description:H!=="IMAGE"?re.title&&re.text:void 0,tooltip:re.text,extra:m&&(0,Tt.jsx)(Ge.ListItemActions,{children:(0,Tt.jsx)(Pp,{context:i,source:"search",suggestion:re})}),children:H==="IMAGE"?(0,Tt.jsx)(Ge.Image,{title:re.title||re.text,src:re.image}):re.title||re.text},`${re.id}-${re.text}`))},H))]})]}),(0,Tt.jsx)(Ge.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:U(()=>{e(io("search"))}),children:(0,Tt.jsx)(Ek,{onCopy:ie})}),(w!=null?w:E)&&(0,Tt.jsx)(Ge.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:U(()=>{a&&e(ua(a)),e(io("search"))}),children:(0,Tt.jsx)(mR,{threadId:a,onEvaluate:V,question:i,onUse:Y,onResetQuestion:()=>{a&&e(ua(a)),s(""),l(null)}})})]})},kR=g4;var Yc=b(R()),h4=()=>{let e=ee("showSearch"),t=ee("isEmbedded");return(0,Yc.jsxs)(RR.Fragment,{children:[e&&(0,Yc.jsx)(kR,{}),t&&(0,Yc.jsx)(hT,{})]})},PR=h4;var _R=b(Ne());var Lp=b(R()),AR=({className:e})=>(0,Lp.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Lp.jsx)("g",{children:(0,Lp.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
73
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Nr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let o=this.parser.parseInline(r),i=eR(t);if(i===null)return o;t=i;let s='<a href="'+t+'"';return n&&(s+=' title="'+Nr(n)+'"'),s+=">"+o+"</a>",s}image({href:t,title:n,text:r}){let o=eR(t);if(o===null)return Nr(r);t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${Nr(n)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Nr(t.text)}},jc=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},pr=class e{constructor(t){Ee(this,"options");Ee(this,"renderer");Ee(this,"textRenderer");this.options=t||ss,this.options.renderer=this.options.renderer||new Na,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new jc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(t,n=!0){var o,i;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=a,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){r+=u||"";continue}}let l=a;switch(l.type){case"space":{r+=this.renderer.space(l);continue}case"hr":{r+=this.renderer.hr(l);continue}case"heading":{r+=this.renderer.heading(l);continue}case"code":{r+=this.renderer.code(l);continue}case"table":{r+=this.renderer.table(l);continue}case"blockquote":{r+=this.renderer.blockquote(l);continue}case"list":{r+=this.renderer.list(l);continue}case"html":{r+=this.renderer.html(l);continue}case"paragraph":{r+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;s+1<t.length&&t[s+1].type==="text";)c=t[++s],u+=`
74
+ `+this.renderer.text(c);n?r+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):r+=u;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}parseInline(t,n=this.renderer){var o,i;let r="";for(let s=0;s<t.length;s++){let a=t[s];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[a.type]){let c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=c||"";continue}}let l=a;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},os=class{constructor(t){Ee(this,"options");Ee(this,"block");this.options=t||ss}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?fr.lex:fr.lexInline}provideParser(){return this.block?pr.parse:pr.parseInline}};Ee(os,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var Wv=class{constructor(...t){Ee(this,"defaults",Kv());Ee(this,"options",this.setOptions);Ee(this,"parse",this.parseMarkdown(!0));Ee(this,"parseInline",this.parseMarkdown(!1));Ee(this,"Parser",pr);Ee(this,"Renderer",Na);Ee(this,"TextRenderer",jc);Ee(this,"Lexer",fr);Ee(this,"Tokenizer",Oa);Ee(this,"Hooks",os);this.use(...t)}walkTokens(t,n){var o,i;let r=[];for(let s of t)switch(r=r.concat(n.call(this,s)),s.type){case"table":{let a=s;for(let l of a.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of a.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let a=s;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=s;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[a.type]?this.defaults.extensions.childTokens[a.type].forEach(l=>{let c=a[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):a.tokens&&(r=r.concat(this.walkTokens(a.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let o=S({},r);if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let s=n.renderers[i.name];s?n.renderers[i.name]=function(...a){let l=i.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=n[i.level];s?s.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){let i=this.defaults.renderer||new Na(this.defaults);for(let s in r.renderer){if(!(s in i))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,l=r.renderer[a],c=i[a];i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d||""}}o.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Oa(this.defaults);for(let s in r.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,l=r.tokenizer[a],c=i[a];i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}o.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new os;for(let s in r.hooks){if(!(s in i))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,l=r.hooks[a],c=i[a];os.passThroughHooks.has(s)?i[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(i,u)).then(f=>c.call(i,f));let d=l.call(i,u);return c.call(i,d)}:i[a]=(...u)=>{let d=l.apply(i,u);return d===!1&&(d=c.apply(i,u)),d}}o.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,s=r.walkTokens;o.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),i&&(l=l.concat(i.call(this,a))),l}}this.defaults=S(S({},this.defaults),o)}),this}setOptions(t){return this.defaults=S(S({},this.defaults),t),this}lexer(t,n){return fr.lex(t,n!=null?n:this.defaults)}parser(t,n){return pr.parse(t,n!=null?n:this.defaults)}parseMarkdown(t){return(r,o)=>{let i=S({},o),s=S(S({},this.defaults),i),a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r=="undefined"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=t);let l=s.hooks?s.hooks.provideLexer():t?fr.lex:fr.lexInline,c=s.hooks?s.hooks.provideParser():t?pr.parse:pr.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(u=>l(u,s)).then(u=>s.hooks?s.hooks.processAllTokens(u):u).then(u=>s.walkTokens?Promise.all(this.walkTokens(u,s.walkTokens)).then(()=>u):u).then(u=>c(u,s)).then(u=>s.hooks?s.hooks.postprocess(u):u).catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let u=l(r,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let d=c(u,s);return s.hooks&&(d=s.hooks.postprocess(d)),d}catch(u){return a(u)}}}onError(t,n){return r=>{if(r.message+=`
75
+ Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Nr(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},is=new Wv;function Pe(e,t){return is.parse(e,t)}Pe.options=Pe.setOptions=function(e){return is.setOptions(e),Pe.defaults=is.defaults,rR(Pe.defaults),Pe};Pe.getDefaults=Kv;Pe.defaults=ss;Pe.use=function(...e){return is.use(...e),Pe.defaults=is.defaults,rR(Pe.defaults),Pe};Pe.walkTokens=function(e,t){return is.walkTokens(e,t)};Pe.parseInline=is.parseInline;Pe.Parser=pr;Pe.parser=pr.parse;Pe.Renderer=Na;Pe.TextRenderer=jc;Pe.Lexer=fr;Pe.lexer=fr.lex;Pe.Tokenizer=Oa;Pe.Hooks=os;Pe.parse=Pe;var bV=Pe.options,EV=Pe.setOptions,TV=Pe.use,CV=Pe.walkTokens,kV=Pe.parseInline;var RV=pr.parse,PV=fr.lex;var mr=b(R());function Y3(e){return`<button type="button" data-copy-icon class=${e}><svg version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg></button>`}function e0(e){var n,r;let t=e.cloneNode(!0);return t.querySelectorAll("div,button").forEach(o=>o.remove()),(r=(n=t.textContent)==null?void 0:n.trim())!=null?r:""}function X3(e){return e.replace(/\r\n/g,`
76
+ `)}var Q3=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=_("Markdown",Qk),s=(0,mo.useRef)(null),[a,l]=(0,mo.useState)(null),c=(0,mo.useMemo)(()=>{let g=Pe.parse(X3(e));return jk.sanitize(g.toString()).replaceAll("</code>",`${Y3(i.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=g=>{var m;let x=g.target,y=!!((m=s.current)!=null&&m.querySelector("code"));if(["A","BUTTON"].includes(x.tagName)){l(null);return}a||y&&x.tagName!=="CODE"||!y&&x!==s.current||(x.addEventListener("mouseleave",()=>l(null),{once:!0}),l(x))},d=()=>{if(!a)return;l(null);let g=a.querySelector("button");g&&(Pa(g,i.fadeup),r==null||r(e0(a)))},f=g=>{let x=g.target;if(x.tagName==="A"){g.stopPropagation();return}"copyIcon"in x.dataset&&(Pa(x,i.fadeup),r==null||r(e0(x.parentElement)))},p=()=>{!a||!o||(l(null),o(e0(a)))},v=g=>{if(g===null)return;let x=g.getBoundingClientRect();x.left<0?g.style.transform=`translateX(${-x.left+2}px)`:x.right>window.innerWidth&&(g.style.transform=`translateX(${window.innerWidth-x.right-2}px)`)};return(0,mr.jsxs)(mo.Fragment,{children:[a&&(r||o)&&(0,mr.jsxs)(La,{triggerRef:{current:a},className:i.popover,parentNode:a,children:[(0,mr.jsxs)("div",{className:i.options,ref:v,children:[r&&(0,mr.jsx)("button",{type:"button",className:i.option,onClick:d,children:n}),o&&(0,mr.jsxs)(mo.Fragment,{children:[(0,mr.jsx)("div",{className:i.divider}),(0,mr.jsx)("button",{type:"button",className:i.option,onClick:p,children:t})]})]}),(0,mr.jsx)("div",{className:i.arrow})]}),(0,mr.jsx)("div",{ref:s,"data-testid":"widget-markdown-content",className:i.root,dangerouslySetInnerHTML:{__html:c},onMouseOver:u,onClick:f})]})},go=Q3;var Nt=b(R()),Z3=({threadId:e,onEvaluate:t,onUse:n,onResetQuestion:r,question:o})=>{var x;let[i,s]=as.default.useState(""),{setSelected:a}=ei(),l=(0,as.useRef)(null),c=_("KnowledgeSearchStyles",Ak),u=ue(Nv),d=ct(),f=(x=j(fc(e!=null?e:-1)))!=null?x:[],p=es(t,{onSuccess(y){d("knowledge assist question answered",{question:i||o||"",sources:y.answer.sources,answer:y.answer.answer,isFollowUpQuestion:f.length>=1,isAutoInitiated:!i&&!!o}),a(`knowledge-assist-${f.length}`),s("")}}),v=y=>I(void 0,null,function*(){y.preventDefault(),y.stopPropagation(),i!==""&&p.call(i)}),g=(y,m)=>{d("knowledge assist source viewed",{question:m,sourceViewed:y.url||y.name})};return(0,as.useEffect)(()=>{var y;o&&p.state==="idle"?p.call(o):(y=l.current)==null||y.focus()},[l,p.state]),(0,as.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,f]),(0,Nt.jsxs)("div",{className:c.root,children:[f.length>0&&(0,Nt.jsx)("div",{className:c.alignRight,children:(0,Nt.jsx)(qe.Button,{onClick:r,children:u("reset")})}),f.map(({question:y,answer:m},h)=>(0,Nt.jsx)(qe.List,{children:(0,Nt.jsx)(qe.ListItem,{id:`knowledge-assist-${h}`,"data-testid":"knowledge-search-answer",description:(0,Nt.jsx)(go,{content:m.answer}),closeOnSelect:!0,onClick:()=>n(m.answer),onSourceClick:w=>g(w,y),sources:m.sources,styles:{title:c.question,description:c.answer},extra:(0,Nt.jsx)("div",{className:c.listItemFeedback,children:(0,Nt.jsx)(ts,{feedbackText:m.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:S({question:y,isAgent:o!==y,isFollowUpQuestion:f.length>1},m)})}),children:y})},`${m.answer}_${h}`)),p.state==="loading"&&(0,Nt.jsx)("p",{className:c.status,children:u("loading")}),p.state==="error"&&(0,Nt.jsx)("p",{className:c.status,children:u("error")}),(0,Nt.jsxs)("form",{className:c.form,onSubmit:v,children:[(0,Nt.jsx)("input",{ref:l,placeholder:u("anotherQuestion"),className:c.input,type:"text",value:i,onFocus:()=>{a(void 0)},onChange:y=>{a(void 0),s(y.target.value)}}),(0,Nt.jsx)("button",{type:"submit",className:c.submit,disabled:p.state==="loading",children:(0,Nt.jsx)(Pk,{})})]})]})},mR=Z3;var t0=b(R()),Pp=e=>(0,t0.jsx)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,t0.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})}));var Kc={};kt(Kc,{enUS:()=>J3,nlNL:()=>e4});var J3={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},e4={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Ap={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var ls=b(R()),t4=({suggestion:e,source:t,context:n})=>{let r=ue(Kc),o=j(Rr),i=ve(),s=te("enableSuggestionFeedback"),a=`${e.text}`,l=j(Aa(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{i(no({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!s||!l?null:(0,ls.jsxs)(yt,{placement:"top-end",children:[(0,ls.jsx)(yt.Trigger,{className:Ap.trigger,children:(0,ls.jsx)(Pp,{"data-testid":"feedback-dropdown-trigger"})}),(0,ls.jsx)(yt.Content,{className:Ap.content,children:(0,ls.jsx)(yt.Button,{className:Ap.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},Ip=t4;var Gc={};kt(Gc,{enUS:()=>n4,nlNL:()=>r4});var n4={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"URL suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},r4={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"URL suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var ER=b(Q());var o4=["{amount}"," {amount}","{date}","{email}","{iban}","{name}","{postal_code}","{street}","{tarif}","{usage}","{3_digits}","{4_digits}","{5_digits}","{6_digits}","{7_digits}","{8_digits}","{9_digits}","{10_digits}"],i4=new RegExp(o4.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function gR(e,t){let n=e.split(i4),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let c=r;if(l){let d=a.charAt(0),f=0;do c=d?t.indexOf(d,c+1):-1,f+=1;while(c!==-1&&a.indexOf(t.slice(c))!==0);if(c===-1&&f>2)return e}else c=a&&a!==""?t.indexOf(a,r):-1;let u=c===-1?t.slice(r):t.slice(r,c);o.push(u),r=c}return o.join("")}function hR(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var vR={suggestions:[],fetchState:"idle"},yR={default:vR},xR=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},Lp=e=>e.textSuggestions,wR=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Op=st("textSuggestions/refresh"),gr=ge("textSuggestions/recommendations",(e,t)=>I(void 0,null,function*(){var c,u;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=aa(r),l=[];if(e==="sticky-messages"){let d=(c=r.profile.data)==null?void 0:c.code;if(!d)throw new Error("No current profile to fetch pinned messages");l=yield n.getPinnedMessages(d)}else{let d=(u=r.conversation.current)==null?void 0:u.id;if(!d)throw new Error("No current conversation to fetch text suggestions");l=yield n.getTextSuggestions(d,Ql(r),e)}if(o&&(l=l.map(d=>S(P(S({},d),{text:cn(d.text,o)}),d.title?{title:cn(d.title,o)}:{}))),e==="default"){let d=s?l.filter(wR(a)):l;t.dispatch(Xo(d.slice(0,i)))}return l})),qc=ge("textSuggestions/autocompletions",(e,t)=>I(void 0,null,function*(){var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{platformVariables:i}=r.info,{textSuggestionsCount:s,deanonymize:a,inlineSuggestions:l}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let c=yield n.getAutocompleteSuggestions(o,P(S({},Ql(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(c=c.filter(wR(e))),i&&(c=c.map(d=>P(S({},d),{text:cn(d.text,i)}))),a&&(c=c.map(d=>P(S({},d),{text:d.source!=="trie-with-typos"?gR(d.text,e):d.text}))),c=hR(c,s),t.dispatch(Xo(c)),c})),SR=ke({name:"textSuggestions",initialState:yR,reducers:{setTextSuggestions:{reducer(e,t){let{contentType:n}=t.payload;e[n].fetchState="done",e[n].suggestions=t.payload.suggestions},prepare(e,t){return{payload:{contentType:e,suggestions:t}}}}},extraReducers:e=>{e.addCase(gr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||vR;return P(S({},t),{[r]:P(S({},o),{fetchState:"loading"})})}).addCase(gr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(gr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(qc.pending,t=>{t.default.fetchState="loading"}).addCase(qc.rejected,t=>{t.default.fetchState="error"}).addCase(qc.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(at,()=>yR)}}),{setTextSuggestions:I$}=SR.actions,bR=SR.reducer;var cs=b(R()),s4=({types:e,commands:t,onClick:n})=>{let r=ve(),o=ue(Gc),i=j(Lp);return(0,ER.useEffect)(()=>{e.forEach(({type:s})=>{(!i[s]||i[s].suggestions.length===0)&&r(gr(s))})},[]),(0,cs.jsxs)("div",{children:[t.length>0&&(0,cs.jsx)(qe.List,{heading:o("commands"),children:t.map((s,a)=>(0,cs.jsx)(qe.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:s.onClick,children:s.label},s.label))}),e.map(({type:s,title:a})=>{var l;return(0,cs.jsx)(qe.List,{heading:a,orientation:"vertical",children:(l=i[s])==null?void 0:l.suggestions.map((c,u)=>(0,cs.jsx)(qe.ListItem,{id:`${s}-${u}`,closeOnSelect:!1,description:c.title&&c.text,onClick:()=>n(c.text,c),"data-testid":"search-overlay-suggestion",children:c.title||c.text},`${c.id}-${c.text}`))},s)})]})},TR=s4;var Tt=b(R()),l4=200,c4=5,u4=4,n0=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?u4:c4),d4=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),f4=()=>{var K,$,W;let e=ve(),t=un(),n=ue(Gc),[r,o]=(0,Xt.useState)(!1),[i,s]=(0,Xt.useState)(""),[a,l]=(0,Xt.useState)(null),c=j(q1),u=j(Ui),[d,f]=(0,Xt.useState)(),p=j($t),v=te("showSearch"),g=te("enableSuggestionFeedback"),x=te("showEntitiesCommand"),y=te("showKnowledgeSearch"),m=te("showImageSearch"),h=te("searchTriggerKey"),w=j(Mf),E=j(_f),C=j(CT),k=j(Ty),A=j(Y1),B=j(G1),M=((W=($=(K=u==null?void 0:u.uiConfig)==null?void 0:K.search)==null?void 0:$.initialTypes)==null?void 0:W.filter(({isActive:z})=>z))||[],N=ct(),Z=(0,Xt.useMemo)(()=>{let z=me=>n0(k.filter(re=>re.type===me.toUpperCase()),me,d),fe=(C==null?void 0:C.map(me=>({value:me.code.toUpperCase(),label:`${me.name}s`,list:z(me.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(fe.push({value:"PERSONAL",label:n("personalSuggestions"),list:z("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:z("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:z("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),m&&fe.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:z("IMAGE"),listOrientation:"horizontal"}),M.length===0)return fe;let de=M.map(me=>fe.find(re=>re.value.toLowerCase()===me.type)).filter(me=>!!me),be=fe.filter(me=>!de.find(re=>re.value===me.value));return[...de,...be]},[C,M,m,d]),Y=[{label:n("entitiesClipboard"),onClick:()=>e(ro("entities")),shouldShow:x&&d4(n("entitiesClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>{e(ro("knowledgeAssist")),N("open knowledge assistant",{via:"search-command"})},shouldShow:y}].filter(z=>z.shouldShow).filter(()=>!d),O=(0,Xt.useCallback)((0,CR.default)((z,fe)=>{e(Fi({query:z,type:fe,tags:["search-overlay"],size:d?50:20}))},l4),[d]),F=(0,Xt.useCallback)((z,fe)=>{switch(fe.type){case"IMAGE":t.send(ky,{suggestion:fe});break;default:t.send(Pr,{text:z,suggestion:fe})}e(Fn(!1))},[e]),ie=z=>{Ar(z.text),e(no({name:"entity copied",data:{entity:z,type:"copy"}})),e(Fn(!1))},G=z=>{t.send(Pr,{text:z,suggestion:{source:"knowledge-assist",text:z}}),e(no({name:"answer used",data:{originalText:z},options:{includeConversationData:!0}})),s(""),a&&e(da(a)),e(ro("search")),e(Fn(!1))},V=z=>{let fe={input:z,threadId:a,onNewThreadId:de=>l(de)};if(E)return Hi(S({assistantCode:E},fe));if(w)return Bi(S({assistantCode:w},fe))};function U(z){return fe=>{r?window.confirm(n("warning"))&&(z(fe),o(!1)):z(fe)}}return(0,Xt.useEffect)(()=>{i?O(i,d):e(Sf())},[i,d]),(0,Xt.useEffect)(()=>{p&&e(pc())},[p]),xk(h,()=>{e(Fn(!0)),N("open search",{via:"ctrl+k"})}),!v||!u?null:(0,Tt.jsxs)(qe,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:U(z=>e(Fn(z))),onChangeType:z=>f(z),onChangePage:U(z=>e(ro(z))),selectedType:d,search:i,page:c,isOpen:B,types:Z,updateDeps:[k],children:[(0,Tt.jsxs)(qe.Page,{id:"search",children:[i.length===0&&(0,Tt.jsx)(TR,{types:M,commands:Y,onClick:F}),i.length>0&&(0,Tt.jsxs)(Xt.Fragment,{children:[Y.length>0&&(0,Tt.jsx)(qe.List,{heading:n("commands"),children:Y.map((z,fe)=>(0,Tt.jsx)(qe.ListItem,{closeOnSelect:!1,onClick:z.onClick,id:`commands-${fe}`,children:z.label},z.label))}),Z.map(({value:z,label:fe,list:de,lineClamp:be,listOrientation:me})=>(0,Tt.jsx)(qe.List,{heading:fe,orientation:me==="horizontal"?"horizontal":"vertical",onShowAll:()=>f(z),hasMore:!d&&A[z.toLowerCase()]>n0(de,z,d).length,children:n0(de,z,d).map(re=>(0,Tt.jsx)(qe.ListItem,{id:`${z}-${re.id}`,closeOnSelect:!1,lineClamp:be,onClick:()=>F(re.text,re),description:z!=="IMAGE"?re.title&&re.text:void 0,tooltip:re.text,extra:g&&(0,Tt.jsx)(qe.ListItemActions,{children:(0,Tt.jsx)(Ip,{context:i,source:"search",suggestion:re})}),children:z==="IMAGE"?(0,Tt.jsx)(qe.Image,{title:re.title||re.text,src:re.image}):re.title||re.text},`${re.id}-${re.text}`))},z))]})]}),(0,Tt.jsx)(qe.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:U(()=>{e(ro("search"))}),children:(0,Tt.jsx)(Ek,{onCopy:ie})}),(w!=null?w:E)&&(0,Tt.jsx)(qe.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:U(()=>{a&&e(da(a)),e(ro("search"))}),children:(0,Tt.jsx)(mR,{threadId:a,onEvaluate:V,question:i,onUse:G,onResetQuestion:()=>{a&&e(da(a)),s(""),l(null)}})})]})},kR=f4;var Yc=b(R()),p4=()=>{let e=te("showSearch"),t=te("isEmbedded");return(0,Yc.jsxs)(RR.Fragment,{children:[e&&(0,Yc.jsx)(kR,{}),t&&(0,Yc.jsx)(gT,{})]})},PR=p4;var OR=b(Me());var Np=b(R()),AR=({className:e})=>(0,Np.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Np.jsx)("g",{children:(0,Np.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
77
77
  c-17.9,17.9-27.3,40.1-27.3,65.7C163.4,163,163.4,233,163.4,233z M465.5,267.9V477c0,9.4-3.4,17.9-10.2,24.7
78
78
  c-6.8,6.8-15.4,10.2-24.7,10.2h-349c-9.4,0-17.9-3.4-24.7-10.2c-6.8-6.8-10.2-15.4-10.2-24.7V267.9c0-9.4,3.4-17.9,10.2-24.7
79
79
  c6.8-6.8,15.4-10.2,24.7-10.2h11.9v-70c0-44.4,16.2-82.8,47.8-115.2S212.1,0,256.4,0s82.8,16.2,115.2,47.8
80
- c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var n0=b(R()),y4={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},IR=({className:e,color:t})=>(0,n0.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,n0.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:y4[t||"pink"]})});var LR={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var r0={};Rt(r0,{enUS:()=>v4,nlNL:()=>x4});var v4={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},x4={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var cs=b(R()),OR=({onLogIn:e})=>{let t=ce(r0),n=ee("floatingMenu"),r=ee("productName"),o=ye(),i=j(Vt),s=M("FloatingMenu",LR);if(i===null||n===!1)return null;let a=()=>{i===!0?o(Fn(!0)):e()};return(0,cs.jsxs)("button",{type:"button",className:(0,_R.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,cs.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,cs.jsxs)("div",{className:s.icon,children:[(0,cs.jsx)(IR,{className:s.logo,color:"pink"}),i===!1&&(0,cs.jsx)(AR,{className:s.lock})]})]})};var Mp=b(Z());function Mr(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input;return i.start!==i.end?!1:i.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(i.end))||r&&new RegExp(r).test(o.substring(0,i.end))?!0:n===!1&&r===!1:!1}var w4={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},_p=({ui:e})=>e.overlayCollapsed,NR=Ce({name:"ui",initialState:w4,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputFocus(e,t){e.overlayCollapsedUserOverwrite!==!0&&(t.payload===!0&&(e.overlayCollapsed=!1),e.inputHasFocus=t.payload)},setOverlayCollapsed(e,t){t.payload.collapse===!1&&(e.openOverlayWhenTyping=!1),!(t.payload.skipWhenInputFocus&&e.inputHasFocus)&&(e.overlayCollapsed=t.payload.collapse)},setOpenOverlayWhenTyping(e,t){e.openOverlayWhenTyping=t.payload},setOverlayCollapsedUserOverwrite(e,t){e.overlayCollapsedUserOverwrite=t.payload,e.overlayCollapsed=t.payload}}}),{setShowTabHint:Xc,setInputFocus:Op,setOverlayCollapsed:oi,setOpenOverlayWhenTyping:MR,setOverlayCollapsedUserOverwrite:DR}=NR.actions,FR=NR.reducer;var VR=b(Z());var ii=b(Z());var zR=b(Z());function HR(e,t,n){(0,zR.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var BR={root:"dd-1MBCO",actions:"dd--x4cy",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var us=b(R()),b4=["search","personal-collection-search","search-autocomplete"];function E4(e,t,n,r={}){var i;let o="";return b4.includes(t)?o=UT(Yy(e,n,{stripAgentPart:!0}),(i=r.searchKeywords)!=null?i:[n]):o=Yy(e,n,r),r.placeholders===!0&&(o=VT(o)),o}var T4=()=>{},C4=({selected:e,suggestion:t})=>{let n=ee("inlineSuggestions"),r=j(sa),[o,i]=(0,ii.useState)(!1),s=ee("enableSuggestionFeedback"),a=j(f=>f.input.text),l=ye(),c=M("TextSuggestion",BR),u=(0,ii.useRef)(null);(0,ii.useEffect)(()=>{let f=setTimeout(()=>{l(I1({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(f)}},[t]),HR(u,"click",()=>{l(er({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let d=(0,ii.useMemo)(()=>E4(t.text,t.source,r,{stripAgentPart:n,placeholders:!0,searchKeywords:t.searchKeywords}),[n,t.text,t.source,r,t.searchKeywords]);return t.source==="gpt"&&!n?null:(0,us.jsxs)("div",{className:c.root,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,us.jsx)(Ee,{ref:u,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:T4,children:(0,us.jsx)(Ki,{containerTagName:"div",noWrap:!1,tagName:"span",className:c.formattedText,content:d})}),s&&o&&(0,us.jsx)("div",{className:c.actions,children:(0,us.jsx)(Pp,{source:"overlay",context:a,suggestion:t})})]})},UR=C4;var $R=b(R()),k4=({suggestions:e,selectedIndex:t,reverse:n})=>(0,VR.useMemo)(()=>{let o=e.map((i,s)=>(0,$R.jsx)(UR,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]),Np=k4;var jR={root:"dd-PfvRI",paper:"dd-HYlyY"};var Qc=b(R()),R4=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Mp.useRef)(null),r=M("InlineSuggestionsOverlay",jR),o=j(Mr),i=ye(),s=j(Vt),a=j(ia),l=j(_p),c=ee("showTextSuggestions");return ri(()=>{setTimeout(()=>{i(oi({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Mp.useEffect)(()=>{let u=n.current;if(!u||!u.parentElement)return;u.parentElement.style.left="0px";let d=u.getBoundingClientRect();u.parentElement.style.left=`${Math.min(window.innerWidth-4-d.right,0)}px`}),l||!o||!c||e.length===0||s!==!0||a===!1?null:(0,Qc.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Qc.jsx)("div",{ref:n,className:r.paper,children:(0,Qc.jsx)(rn,{children:(0,Qc.jsx)(Np,{suggestions:e,selectedIndex:t})})})})},P4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),KR=ra(P4)(R4);var Zc=b(R()),A4=({children:e})=>{let n=ee("locale").replace("-","");return(0,Zc.jsx)(Oy.Provider,{value:n,children:e})},I4=({store:e,customStyles:t={},children:n})=>(0,Zc.jsx)(o1,{store:e,children:(0,Zc.jsx)(A4,{children:(0,Zc.jsx)(Ya.Provider,{value:t,children:n})})}),si=I4;var Fp=b(Ne()),Oa=b(Z());var WR=b(Z());function qR(e,t){let[n,r]=(0,WR.useState)(()=>{if(typeof window=="undefined")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return te.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window!="undefined"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){te.error(s)}}]}var GR=()=>/Mac/i.test(navigator.platform);var XR=b(Ne()),yo=b(Z());var o0={};Rt(o0,{enUS:()=>L4,nlNL:()=>_4});var L4={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Sign in"}]},{type:0,value:" to enable "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze for "},{type:8,value:"min",children:[{type:0,value:"10 minutes"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 hour"}]},{type:0,value:" or "},{type:8,value:"day",children:[{type:0,value:"1 day"}]}]},_4={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Log in"}]},{type:0,value:" bij "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze voor "},{type:8,value:"min",children:[{type:0,value:"10 minuten"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 uur"}]},{type:0,value:" of "},{type:8,value:"day",children:[{type:0,value:"1 dag"}]}]};var YR={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var ai=b(R()),i0=(e,t,n)=>r=>(0,ai.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),O4=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=ce(o0),s=dn(),a=M("Login",YR),l=ee("productName"),c=(0,yo.useCallback)(x=>{x.preventDefault(),r&&r(Number.parseInt(x.target.value,10))},[]),u=(0,yo.useCallback)(x=>{x.preventDefault(),s.send(ca,!0)},[t]),d=(0,yo.useMemo)(()=>x=>(0,ai.jsx)("a",{onClick:g=>{g.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:x},"login"),[t]),f=(0,yo.useCallback)(x=>(0,ai.jsx)("button",{type:"button",className:a.anchorButton,onClick:u,children:x},"prompt"),[u]),{min:p,hour:v,day:m}=(0,yo.useMemo)(()=>({min:i0(a,60*10,c),hour:i0(a,60*60,c),day:i0(a,60*60*12,c)}),[]);return(0,ai.jsxs)("div",{className:(0,XR.default)(e,a.root),children:[i("loginPlease",{login:n?f:d,productName:l}),r&&(0,ai.jsxs)(yo.Fragment,{children:[(0,ai.jsx)("br",{}),i("snooze",{min:p,hour:v,day:m})]})]})},Dp=O4;var QR={root:"dd-DoQhb",text:"dd-Jwnev"};var Jc=b(R()),N4=({title:e})=>{let t=M("SearchTrigger",QR),n=ye(),r=ct();return(0,Jc.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(Fn(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,Jc.jsx)(Ta,{}),(0,Jc.jsx)("span",{className:t.text,children:e})]})},ZR=N4;var s0={};Rt(s0,{enUS:()=>M4,nlNL:()=>D4});var M4={arrowHint:[{type:0,value:"Tip: use arrow keys to navigate suggestions"}],searchHintWindows:[{type:0,value:"Press CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],searchHintMac:[{type:0,value:"Press CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Close"}],search:[{type:0,value:"Search"}]},D4={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var JR={root:"dd-oa7Vc",isInline:"dd-bwk31",toggleButton:"dd-MSB8Z",toggleButtonWrapper:"dd-ZkCzT",toggleButtonWrapperHidden:"dd-Sq66c",isCollapsed:"dd-vkrPk",collapsible:"dd-CWQJe",hints:"dd-IOoo3",hintsHidden:"dd-psVuT",triggers:"dd-toIoo",triggersRight:"dd-mc4l2"};var Ve=b(R()),F4=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=M("SuggestionsOverlay",JR),o=ce(s0),i=j(Mr),s=A1(),a=ye(),l=(0,Oa.useRef)(null),c=ee("searchTriggerKey"),u=ee("productName"),d=j(_p),f=j(Vt),p=j(ia),[v,m]=(0,Oa.useState)(null),x=ee("showSearch"),y=ee("showTextSuggestions"),g=ee("adminUrl"),h=ee("isEmbedded"),[w,E]=qR("dd-snooze-until-ms",0),C=d||w>Date.now(),k=e.filter(N=>N.source!=="gpt").length,A=()=>{C&&E(0),a(DR(!C))},F=N=>{let O=Date.now()+N*1e3;E(O),te.info(`Snooze until: ${new Date(O)}`),a(oi({collapse:!0}))};return(0,Oa.useEffect)(()=>{k===0&&m(null)},[e,k]),ri(()=>{a(oi({collapse:!0,skipWhenInputFocus:!0}))}),f===null||p===!1?null:f===!1?(0,Ve.jsxs)("div",{ref:l,className:(0,Fp.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Ve.jsxs)("div",{className:r.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1}}),(0,Ve.jsx)("div",{className:r.triggersRight,children:(0,Ve.jsx)(hi,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(hi,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),(0,Ve.jsx)("div",{className:r.collapsible,children:(0,Ve.jsx)(Dp,{loginUrl:g,isEmbedded:h,onLogIn:n,onSnooze:F})})]}):!s||!i?null:(0,Ve.jsxs)("div",{ref:l,className:(0,Fp.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Ve.jsxs)("div",{className:r.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1},children:x&&(0,Ve.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>m(o(GR()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>m(null),children:(0,Ve.jsx)(ZR,{title:o("search")})})}),(0,Ve.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Ve.jsx)("div",{className:(0,Fp.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,Ve.jsx)(hi,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})]})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(hi,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),k>0&&y&&(0,Ve.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Ve.jsx)(rn,{children:(0,Ve.jsx)(Np,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},z4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),eP=ra(z4)(F4);var Yp=b(Ne());var wo=b(Z());var Na=b(Z());function zp(e){return e.contentEditable==="true"}function H4(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),i=o.cloneRange();i.selectNodeContents(e),i.setEnd(o.endContainer,o.endOffset),n=i.toString().length,i.selectNodeContents(e),i.setEnd(o.startContainer,o.startOffset),t=i.toString().length}return{selectionStart:t,selectionEnd:n}}function tP(e){let{selectionStart:t,selectionEnd:n}=zp(e)?H4(e):e;return[t,n]}function nP(e){let[,t]=(0,Na.useState)(),n=(0,Na.useRef)(null);return n.current=tP(e),(0,Na.useEffect)(()=>{let r=()=>{var a;let[o,i]=(a=n.current)!=null?a:[],s=tP(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function rP(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(ku);if(!s||s.length===0)return;let a=0;s.find(l=>{let c=r.indexOf(l,a);return o>c&&i<c+l.length?(n.selectionStart=c,n.selectionEnd=c+l.length,!0):(a=c+l.length,!1)})}var oP=b(Z()),B4=["div","span","mark","strong","b","i","u","em"];function a0(e,t,n=0){var i;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(i=r.props)==null?void 0:i.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(B4.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,oP.cloneElement)(r,{children:a0(s,t,n+1)})]}return[...e,...t]}function ds(e){return e.tagName.toLowerCase()==="textarea"}var iP={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var uP=b(Ne());var jp=b(Z());var Ma=b(Z());function sP(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Hp(e){let t=(0,Ma.useRef)(null),[n,r]=(0,Ma.useState)(!1);return(0,Ma.useEffect)(()=>{var u;let o=!1,i=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[s,a]=sP((d,f)=>{let p=t.current;if(!p)return;let v=d/i,m=f/i,x=p.getBoundingClientRect(),y=v>x.x&&v<x.x+x.width&&m>x.y&&m<x.y+x.height;y&&!o?(o=!0,r(!0)):!y&&o&&(o=!1,r(!1))},({clientX:d,clientY:f})=>[d,f]),[l,c]=sP(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),c(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function aP(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Bp(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function lP(e){return e!=null}var cP=b(Ne()),Up=b(Z());var vo={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var l0=b(R()),Vp=(0,Up.forwardRef)((o,r)=>{var i=o,{className:e,children:t}=i,n=oe(i,["className","children"]);let s=(0,Up.useRef)(null),a=M("TabCompletion",vo);return(0,l0.jsx)("div",P(S({ref:Bp([s,r]),className:(0,cP.default)(e,a.popoverContentContainer)},n),{children:(0,l0.jsx)("div",{className:a.popoverContent,children:t})}))});var li=b(R()),U4=e=>t=>{let n=Vv(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},V4=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=M("TabCompletion",vo),s=Sp(),a=(0,jp.useMemo)(()=>U4(e.getBoundingClientRect()),[e]),[l,c]=Hp(e);return(0,jp.useEffect)(()=>{c?s.open():s.close()},[c]),(0,li.jsxs)("span",{children:[(0,li.jsx)("mark",{ref:Bp([l,s.triggerRef]),className:(0,uP.default)(i.matchKeyword,{[i.hover]:c}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,li.jsx)(Ia,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,li.jsx)(Vp,{style:n,children:(0,li.jsx)("div",{className:i.hintText,children:o})})})]})},$p=class extends ao{constructor(){super(...arguments);this.keywordMatches=[];this.preparedKeywordMatches=[];this.usedKeywordMatches=new Set}onBeforeParse(n,r){return r.keywordMatches&&r.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=r.keywordMatches.map(o=>P(S({},o),{keywordRegex:new RegExp(`\\b${aP(o.keyword)}\\b`,"i")})),this.keywordMatches=r.keywordMatches),this.usedKeywordMatches.clear(),n}match(n){let r=this.preparedKeywordMatches.map(i=>{if(this.usedKeywordMatches.has(i))return null;let s=n.match(i.keywordRegex);if(!s)return null;let a=n.charAt(s.index-1),l=n.charAt(s.index+i.keyword.length);return a==="{"&&l==="}"?null:{index:s.index,length:s[0].length,match:s[0],matchString:s[0],suggestion:i.suggestion,preparedKeywordMatch:i,valid:!0}}).filter(lP);if(r.length===0)return null;let o=r.reduce((i,s)=>s.index<i.index?s:i);return this.usedKeywordMatches.add(o.preparedKeywordMatch),o}replaceWith(n,r){return(0,li.jsx)(V4,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var dP=b(Ne());var c0=b(R()),$4=({inputElement:e,children:t})=>{let n=M("TabCompletion",vo),[r,o]=Hp(e);return(0,c0.jsx)("mark",{ref:r,className:(0,dP.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Kp=class extends ao{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,c0.jsx)($4,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var qp=b(Ne());var Qt=b(Z());var u0=b(R()),fP=()=>(0,u0.jsx)("svg",{width:"1.3em",height:"1.3em",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"InsertLinkIcon",tabIndex:-1,children:(0,u0.jsx)("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})});var Dr=b(Z());var mP=b(zy());var pP={root:"dd-ky-Bv",content:"dd-kV5e1"};function Wp(e,t,n){var o;let r=((o=e.imageSizes)==null?void 0:o[t])||e.image||n;if(!r)return null;try{return new URL(r).toString()}catch(i){return null}}function d0(e){return e.replace("https://www.","").replace("https://","")}var Vn=b(R()),j4=3,K4=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),W4=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=j4})=>{let i=M("LinkSearch",pP),[s,a]=(0,Dr.useState)(""),l=ye(),c=j(xR("url")),u=j(Q1("URL")),d=(0,Dr.useMemo)(()=>u.map(K4),[u]),[f,p]=(0,Dr.useState)(d.length-1),v=ee("fallbackImage"),m=h=>{let w=h.target;a(w.value)},x=(h,w)=>{h.stopPropagation(),h.preventDefault(),window.open(w,"_blank")},y=h=>{var C;let w=f-1<0?d.length-1:f-1,E=f+1===d.length?0:f+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&p(w),h.code==="ArrowDown"&&p(E),h.code==="Enter"&&e(((C=d[f])==null?void 0:C.text)||s)},g=(0,Dr.useCallback)((0,mP.default)(h=>{l(Di({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,Dr.useEffect)(()=>{s&&g(s)},[s]),(0,Dr.useEffect)(()=>()=>{l(xf())},[]),(0,Vn.jsxs)("div",{className:i.root,children:[(0,Vn.jsx)(rn,{withDivider:!0,children:(s?d:c).slice(0,o).map((h,w)=>(0,Vn.jsx)(Ee,{selected:f===w,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Vn.jsxs)(Ie,{children:[(0,Vn.jsx)(Ie.Image,{src:Wp(h,"small",v||void 0),title:h.title||h.text}),(0,Vn.jsxs)(Ie.Content,{className:i.content,cropText:!0,children:[(0,Vn.jsx)(Ie.Title,{children:h.title||d0(h.text)}),h.title&&d0(h.text)]}),(0,Vn.jsx)(Ee.Actions,{children:(0,Vn.jsx)(Ee.ActionButton,{label:r,onClick:E=>x(E,h.text)})})]})},h.text))}),(0,Vn.jsx)(uc,{value:s,onChange:m,autoFocus:!0,placeholder:n,onKeyUp:y})]})},gP=W4;var f0={};Rt(f0,{enUS:()=>q4,nlNL:()=>G4});var q4={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},G4={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Xt=b(R()),Y4=(0,Qt.forwardRef)((e,t)=>{let n=M("TabCompletion",vo);return(0,Xt.jsx)("mark",{ref:t,className:(0,qp.default)(n.matchSelection)},"selection-start")}),X4=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=ce(f0),s=M("TabCompletion",vo),a=(0,Qt.useRef)(null),l=(0,Qt.useRef)(null),[c,u]=(0,Qt.useState)(null),d=ye(),f=Sp(document.activeElement===r),[p]=(0,Qt.useState)(()=>document.createRange());f.triggerRef.current=p,(0,Qt.useEffect)(()=>()=>p.detach(),[]),(0,Qt.useEffect)(()=>{let m=e.current,x=a.current;!m||!x||(p.setStart(m,0),p.setEnd(x,0))},[e.current,a.current]),ri(()=>{f.close()});let v=(0,Qt.useCallback)(m=>{let x=p.toString(),y=/^http(s?):\/\//.test(m)?m:`https://${m}`;d(pf({text:`[${x}](${y})`,replace:"selection"}))},[]);return(0,Xt.jsxs)("span",{children:[(0,Xt.jsx)("mark",{ref:a,className:(0,qp.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":f.opened?"true":"false",children:o}),f.opened&&(0,Xt.jsx)(Ia,{className:s.popoverRoot,triggerRef:f.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Xt.jsxs)(Vp,{style:n,ref:l,children:[(0,Xt.jsx)("div",{className:(0,qp.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:c!==null}),children:(0,Xt.jsxs)("button",{type:"button",tabIndex:c===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>u("insertLink"),children:[(0,Xt.jsx)(fP,{}),(0,Xt.jsx)("span",{children:"\xA0"}),(0,Xt.jsx)("span",{children:i("insertLink")})]})}),c==="insertLink"&&(0,Xt.jsx)(gP,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{u(null),f.close()}})]})})]},"selection-end")},Gp=class extends ao{constructor(){super(...arguments);this.charCount=0;this.foundIndex=0;this.startRef=null}onBeforeParse(n,r){return this.props=r,this.charCount=0,this.startRef=(0,Qt.createRef)(),this.foundIndex=0,n}match(n){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[r,o]=this.props.selection;if(r===o)return null;let i=this.foundIndex===0?r:o,s=i>=this.charCount&&i<=this.charCount+n.length?{index:i-this.charCount,length:0,match:"",valid:!0}:null;s&&this.foundIndex++;let a=this.foundIndex===1;return s&&a?this.charCount+=i-this.charCount:this.charCount+=n.length,s?S({isStart:a},s):null}replaceWith(n,r){return r.isStart?(0,Xt.jsx)(Y4,{ref:this.startRef}):(0,Xt.jsx)(X4,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var xo=b(R()),Q4=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let c=M("TabCompletion",iP),u=ee("insertLink"),d=ee("showMidSentenceSuggestions"),f=ee("inlineSuggestions"),p=nP(a),v=(0,wo.useRef)(null),m=j(Vt);(0,wo.useEffect)(()=>{ds(a)&&p&&rP(a,p)},[p]);let x=(0,wo.useCallback)(h=>{if(!o||!n)return h;let w=[(0,xo.jsx)("span",{className:c.resetIndent,children:"\u200B"},"u200B"),(0,xo.jsx)("span",{"data-testid":"tab-completion",className:(0,Yp.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,xo.jsx)("span",{className:(0,Yp.default)(c.hint,c.resetIndent),children:(0,xo.jsx)(Tu,{keyCode:"tab"},"tabHint")})),a0(h,w)},[o,n,r]),y=(0,wo.useMemo)(()=>{let h=[];return u&&h.push(new Gp("selection")),h.push(new Kp("placeholders")),i&&h.push(new $p("keywords")),h},[f,u,i]),g=(0,wo.useMemo)(()=>{let h=window.getComputedStyle(a);return{"--dd-color":h.color,"--dd-font-size":h.fontSize,"--dd-font-family":h.fontFamily,"--dd-font-variant":h.fontVariant}},[]);return!e||!m?null:(0,xo.jsxs)("div",{ref:h=>{h!=null&&h.parentElement&&(v.current=h==null?void 0:h.parentElement)},className:c.root,style:g,children:[(0,xo.jsx)(Ki,{tagName:"span",containerTagName:"div",className:(0,Yp.default)(c.container,c.agentText),disableLineBreaks:ds(a),content:t||"\u200B",onAfterParse:x,matchers:y,selection:p,keywordMatches:s,inputElement:a,inputStyle:g,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!d}),(0,xo.jsx)("br",{})]})},Z4=e=>{var x,y,g;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:i}=e,s=aa({input:t}),a=(s==null?void 0:s.text)||"",l=(s==null?void 0:s.source)||"",c=(x=t.html)!=null?x:da(t.text),u=a.indexOf(t.text)===0?a.slice(t.text.length):"",{showTabHint:d}=n,{isSupported:f}=i,{showTabCompletion:p,visible:v,showStyleSuggestions:m}=r;return{showTabHint:d,showStyleSuggestions:m,showTabCompletion:p&&Mr(e),content:c,tabText:u,source:l,keywordMatches:(g=(y=o.list)==null?void 0:y.keywordMatches)!=null?g:[],enabled:v&&f!==!1}},hP=ra(Z4)(Q4);var Ha=b(Z());var J4={token:null,interval:null},p0=ge("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),m0=ge("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(p0()),setInterval(()=>r(p0()),n)}),yP=Ce({name:"passwordlessToken",initialState:J4,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(p0.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(m0.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:vP}=yP.actions,xP=yP.reducer;function eF(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var wP=Dn([bT],e=>e.map(n=>({text:n.response,title:n.name,callToAction:n.callToAction,isLoading:n.isLoading,specialType:n.specialType,rule:{id:eF(n.code),label:n.code,name:n.name,description:n.name}})));var Xp=b(Z());var h0=b(Ne());var g0=b(R()),eu=()=>(0,g0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,g0.jsx)("path",{d:"M502.6 70.63l-61.25-61.25C435.4 3.371 427.2 0 418.7 0H255.1c-35.35 0-64 28.66-64 64l.0195 256C192 355.4 220.7 384 256 384h192c35.2 0 64-28.8 64-64V93.25C512 84.77 508.6 76.63 502.6 70.63zM464 320c0 8.836-7.164 16-16 16H255.1c-8.838 0-16-7.164-16-16L239.1 64.13c0-8.836 7.164-16 16-16h128L384 96c0 17.67 14.33 32 32 32h47.1V320zM272 448c0 8.836-7.164 16-16 16H63.1c-8.838 0-16-7.164-16-16L47.98 192.1c0-8.836 7.164-16 16-16H160V128H63.99c-35.35 0-64 28.65-64 64l.0098 256C.002 483.3 28.66 512 64 512h192c35.2 0 64-28.8 64-64v-32h-47.1L272 448z"})});var SP={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var Fr=b(R()),tF=({entities:e})=>{let t=M("EntitiesWidgetList",SP),[n,r]=(0,Xp.useState)(void 0),o=ye(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ir(a.text),o(oo({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Xp.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Fr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Fr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,Fr.jsx)("span",{className:t.entityText,children:a.text}),(0,Fr.jsxs)("span",{className:t.iconWrapper,children:[(0,Fr.jsx)("span",{className:(0,h0.default)(t.icon),children:(0,Fr.jsx)(eu,{})}),(0,Fr.jsx)("span",{className:(0,h0.default)(t.icon,n===l&&t.iconClicked),children:(0,Fr.jsx)(eu,{})})]})]},a.text))})},bP=tF;var y0=b(R()),EP=()=>(0,y0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,y0.jsx)("path",{d:"M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9",stroke:"currentColor",strokeWidth:"1.5",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"})});var v0=b(R()),TP=()=>(0,v0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,v0.jsx)("path",{d:"M543-340q16.595 0 28.798-12.202Q584-364.405 584-381t-12.202-28.798Q559.595-422 543-422t-28.798 12.202Q502-397.595 502-381t12.202 28.798Q526.405-340 543-340Zm-25-126h47q2-29 8.5-43t32.5-39q27-26 37.5-45.395Q654-612.79 654-639q0-45.882-31.5-74.941Q591-743 540-743q-38 0-68 20.5T428-665l45 19q11-25 27.5-38t39.5-13q29.778 0 48.389 17Q607-663 607-637q0 20-9 35t-32 32q-32 29-40 46.5t-8 57.5ZM260-200q-24 0-42-18t-18-42v-560q0-24 18-42t42-18h560q24 0 42 18t18 42v560q0 24-18 42t-42 18H260Zm0-60h560v-560H260v560ZM140-80q-24 0-42-18t-18-42v-620h60v620h620v60H140Zm120-740v560-560Z"})});var x0=b(R()),CP=()=>(0,x0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,x0.jsx)("path",{d:"M319-250h322v-60H319v60Zm0-170h322v-60H319v60ZM220-80q-24 0-42-18t-18-42v-680q0-24 18-42t42-18h361l219 219v521q0 24-18 42t-42 18H220Zm331-554v-186H220v680h520v-494H551ZM220-820v186-186 680-680Z"})});var kP={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var RP={root:"dd-nazq3",rotation:"dd-3EHTv"};var AP=b(R()),nF=({size:e=12})=>{let t=M("LoadingSpinner",RP);return(0,AP.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},PP=nF;var w0=b(R()),IP=()=>(0,w0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,w0.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});var tu=b(R()),LP=e=>(0,tu.jsxs)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,tu.jsx)("title",{id:"checkTitle",children:"Check"}),(0,tu.jsx)("path",{fill:"#666",d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})]}));var S0={};Rt(S0,{enUS:()=>rF,nlNL:()=>oF});var rF={error:[{type:0,value:"Something went wrong"}]},oF={error:[{type:0,value:"Er ging iets fout"}]};var Rn=b(R()),_P,iF=3e3,sF=({assistantOptions:e})=>{let t=M("OnDemandAssistants",kP),n=ce(S0),r=po(rr),o=po(nr),i=j(PT),s=j(AT),a=ct(),l=s.filter(d=>d.isPinned),c=s.filter(d=>!d.isPinned),u=d=>I(void 0,null,function*(){if(clearTimeout(_P),a("trigger on demand assistant",{assistantCode:d}),d===i){o.call({transcript:e.transcript});return}r.call(P(S({},e),{assistantCode:d})),_P=setTimeout(()=>r.reset(),iF)});return s.length===0?null:(0,Rn.jsxs)("div",{className:t.root,children:[l.map(({assistant:d,assistantName:f})=>(0,Rn.jsx)("button",{type:"button",className:t.button,disabled:r.state==="loading",onClick:()=>u(d),children:f},d)),r.state==="loading"&&(0,Rn.jsx)(PP,{}),r.state==="done"&&(0,Rn.jsx)(LP,{"data-testid":"trigger-done"}),r.state==="error"&&(0,Rn.jsx)(fk,{trigger:(0,Rn.jsx)(IP,{}),children:n("error")}),c.length>0&&r.state==="idle"&&(0,Rn.jsxs)(yt,{placement:"top-end",children:[(0,Rn.jsx)(yt.Trigger,{className:t.trigger,children:(0,Rn.jsx)(kp,{"data-testid":"trigger"})}),(0,Rn.jsx)(yt.Content,{className:t.nav,"data-testid":"popover",children:c.map(({assistant:d,assistantName:f})=>(0,Rn.jsx)(yt.Button,{className:t.item,disabled:r.state==="loading",onClick:()=>u(d),children:f},d))})]})]})},OP=sF;var DP=b(Z());var NP={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var MP=b(R()),aF=({width:e})=>{let t=M("LoadingProgressBar",NP);return(0,MP.jsx)("div",{className:t.loadingBar,style:{width:e}})},Qp=aF;var So=b(R()),Zp=({title:e})=>{let t=(0,DP.useRef)(null);return _x(t),(0,So.jsx)(Ee,{ref:t,children:(0,So.jsx)(Ie,{children:(0,So.jsxs)(Ie.Content,{children:[(0,So.jsx)(Ie.Title,{children:e}),(0,So.jsx)(Qp,{width:"60%"}),(0,So.jsx)(Qp,{width:"90%"}),(0,So.jsx)(Qp,{width:"50%"})]})})})};var nu={};Rt(nu,{enUS:()=>lF,nlNL:()=>cF});var lF={useCue:[{type:0,value:"Add to message"}],__summarizerAssistant__:[{type:0,value:"Summary"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},cF={useCue:[{type:0,value:"Voeg toe aan bericht"}],__summarizerAssistant__:[{type:0,value:"Samenvatting"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var fs=b(Z());var b0={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",actions:"dd-9Iqn9",thumbsUp:"dd-6QwVx",thumbsDown:"dd-d3E8l",form:"dd-sPNU2",formInput:"dd-F3E4I",formSubmit:"dd-vw5S0",actionButton:"dd-cCWyJ",editableCue:"dd-nWSD-",inputSpace:"dd-DGYB1"};var Mt=b(R()),uF=500,dF=100,fF=({content:e,onChange:t,onCopy:n})=>{let r=(0,fs.useRef)(null),o=M("WidgetCue",b0);return(0,fs.useEffect)(()=>{let i=r.current;if(!i)return;i.style.setProperty("height","0px");let s=Math.min(Math.max(i.scrollHeight,dF),uF);i.style.setProperty("height",`${s}px`)},[e]),(0,Mt.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},pF=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var m;let i=M("WidgetCue",b0),s=ce(nu),a=ct(),l=ee("hasKeyboardInput"),[c,u]=(0,fs.useState)(e.text),d=()=>{t&&t(e),n(e)},f=x=>{r&&r(x,e)},p=x=>{o&&o(x,e)},v=x=>{x.preventDefault(),x.stopPropagation(),n(e)};return(0,fs.useEffect)(()=>{a("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,Mt.jsxs)(Ee,{"data-testid":"cue",children:[(0,Mt.jsx)(Ie,{children:(0,Mt.jsxs)(Ie.Content,{children:[e.title&&(0,Mt.jsx)(Ie.Title,{className:i.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?s(e.rule.label):e.title}),e.specialType==="summary"?(0,Mt.jsx)(fF,{content:c,onCopy:()=>{let x=document.getSelection();x&&f(x.toString())},onChange:x=>{var y;return u((y=x.target.value)!=null?y:"")}}):(0,Mt.jsx)(is,{content:e.text,useLabel:s("useCue"),copyLabel:s("copyCue"),onCopy:f,onUse:l?p:void 0})]})}),(0,Mt.jsxs)(Ee.ButtonsContainer,{children:[(0,Mt.jsxs)("div",{className:i.actions,children:[e.specialType==="summary"&&(0,Mt.jsx)(Ee.Button,{onClick:()=>f(c),children:s("copyCue")}),e.callToAction&&(0,Mt.jsx)(Ee.Button,{onClick:d,children:e.callToAction.label}),(0,Mt.jsx)(Ee.Button,{onClick:v,children:s("removeCue")})]}),e.specialType==="summary"?(0,Mt.jsx)(Ji,{eventName:"summary feedback",feedbackText:(m=e.text)!=null?m:"",feedbackType:"summary",eventData:{summary:e.text}}):(0,Mt.jsx)(Ji,{eventName:"Assistant response feedback",eventData:{name:e.rule.name,group:e.rule.label,description:e.rule.description,cueText:e.text},feedbackText:e.text,feedbackType:"assistant"})]})]})},FP=pF;var Da=b(R()),mF=({cues:e})=>{let t=ye(),n=dn(),r=ce(nu),o=ct(),i=c=>{t(TT({code:c.rule.label})),o("Assistant response closed",{name:c.rule.name,group:c.rule.label,description:c.rule.description,cueText:c.text})},s=(c,u)=>{switch(Ir(c),u.specialType){case"summary":o("summary copied to clipboard",{originalText:u.text,finalText:c,assistant:u.rule.label});break;default:o("Assistant response copied",{name:u.rule.name,group:u.rule.label,description:u.rule.description,copiedText:c})}},a=c=>{c.callToAction&&(t(Lf(c)),o("Assistant call to action",{name:c.rule.name,group:c.rule.label,description:c.rule.description,eventName:c.callToAction.event,value:c.callToAction.value}))},l=(c,u)=>{n.send(Ar,{text:c,suggestion:{source:"cue",sourceText:c}}),o("Assistant response used",{name:u.rule.name,group:u.rule.label,description:u.rule.description,usedText:c})};return(0,Da.jsx)(Da.Fragment,{children:e.map(c=>c.isLoading?(0,Da.jsx)(Zp,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Da.jsx)(FP,{cue:c,onCallToAction:a,onRemove:i,onCopy:s,onUse:l},c.rule.id))})},zP=mF;var Jp=b(Z());var HP={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var yr=b(R());function gF(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var BP=({data:e,schema:t})=>{let n=M("WidgetCustomData",HP),r=o=>{Ir(o)};return(0,Jp.useEffect)(()=>{te.info("Custom data",e,t)},[e]),(0,yr.jsx)("dl",{className:n.root,children:t.map(o=>{let i=gF(e,o.path);return(0,yr.jsxs)(Jp.Fragment,{children:[(0,yr.jsx)("dt",{className:n.label,children:o.label}),(0,yr.jsx)("dd",{className:n.value,children:o.type==="boolean"&&i?(0,yr.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!i?(0,yr.jsx)("span",{className:n.isFalse,children:o.falseValue}):typeof i=="string"||typeof i=="number"?(0,yr.jsxs)("button",{type:"button",onClick:()=>r(`${i}`),className:n.copyButton,children:[(0,yr.jsx)("span",{className:n.copyButtonText,children:i}),(0,yr.jsx)(eu,{})]}):"-"})]},o.label)})})};var ut=b(Z());var Fa={};Rt(Fa,{enUS:()=>hF,nlNL:()=>yF});var hF={inputPlaceholder:[{type:0,value:"What is your question?"}],useCue:[{type:0,value:"Add to message"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Submit"}],resetLabel:[{type:0,value:"Reset"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},yF={inputPlaceholder:[{type:0,value:"Wat is je vraag?"}],useCue:[{type:0,value:"Voeg toe aan bericht"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Verzend"}],resetLabel:[{type:0,value:"Gesprek wissen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var em={form:"dd-pleCH",formInput:"dd-pGJMY",formSubmit:"dd--gkRg",actionButton:"dd-I2NEH",resetContainer:"dd-qKIDX",sources:"dd-xf9c6",source:"dd-a-vyX",tooltip:"dd-EsgcZ",linkContent:"dd-gARDA",showMoreSources:"dd-uDGi-"};var xe=b(R()),vF=3,xF=({sources:e,onClick:t})=>{let n=ce(Fa),r=M("WidgetKnowledgeAssistant",em),[o,i]=(0,ut.useState)(!1),s=o?e:e.slice(0,vF);return s.length===0?null:(0,xe.jsxs)("ul",{className:r.sources,children:[s.map(a=>(0,xe.jsx)("li",{className:r.source,"data-testid":"knowledge-assist-source",children:(0,xe.jsxs)(yt,{tooltip:!0,placement:"top-start",children:[(0,xe.jsx)(yt.Trigger,{as:"a",rel:"noreferrer",target:"_blank",href:a.url,onClick:l=>{l.stopPropagation(),t(a)},children:(0,xe.jsx)("span",{className:r.linkContent,children:a.name})}),a.url&&(0,xe.jsx)(yt.Content,{className:r.tooltip,children:decodeURIComponent(a.url)})]})},a.name)),s<e&&(0,xe.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>i(!0),children:n("showMore",{amount:e.length-s.length})})]})},wF=({title:e,description:t})=>(0,xe.jsx)(Ee,{"data-testid":"knowledge-assist-empty-state",children:(0,xe.jsx)(Ie,{children:(0,xe.jsxs)(Ie.Content,{children:[(0,xe.jsx)(Ie.Title,{children:e}),(0,xe.jsx)(is,{content:t})]})})}),SF=({innerRef:e,item:t,index:n,hasKeyboardInput:r,onCopy:o,onUse:i,onSourceClick:s})=>{var l;let a=ce(Fa);return(0,xe.jsxs)(Ee,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,xe.jsx)(Ie,{children:(0,xe.jsxs)(Ie.Content,{children:[(0,xe.jsx)(Ie.Title,{children:t.question}),(0,xe.jsx)(is,{content:t.answer.answer,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:o,onUse:r?i:void 0}),(0,xe.jsx)(xF,{sources:(l=t.answer.sources)!=null?l:[],onClick:c=>s(c,t.question)})]})}),(0,xe.jsxs)(Ee.ButtonsContainer,{children:[(0,xe.jsx)("div",{}),(0,xe.jsx)(Ji,{eventName:"knowledge assist feedback",eventData:{question:t.question,isFollowUpQuestion:n>0,isAgent:!0,answer:t.answer.answer},feedbackText:t.answer.answer,feedbackType:"assistant"})]})]})},E0=(0,ut.createContext)(null),tm=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,i]=(0,ut.useState)(null),[s,a]=(0,ut.useState)(!1),[l,c]=(0,ut.useState)(!!n),[u,d]=(0,ut.useState)(null),f=ye(),p=ct(),v=po(y=>{if(!e)throw new Error("No knowledge assistant was defined");return t({assistantCode:e,input:y,threadId:o,onNewThreadId(g){i(g)}})},{onSuccess(y){var g;p("knowledge assist question answered",{question:y.question,answer:y.answer.answer,sources:(g=y.answer.sources)!=null?g:[],isFollowUpQuestion:y.threadId===o,isAutoInitiated:l}),c(!1)}}),m=y=>I(void 0,null,function*(){a(!0),d(y),yield v.call(y),a(!1),d(null)}),x={isEnabled:!!e,isSubmitting:s,threadId:o,pendingInput:u,onSubmit:m,onReset(){o&&f(ua(o)),i(null)}};return(0,ut.useEffect)(()=>{n&&m(n)},[n]),(0,xe.jsx)(E0.Provider,{value:x,children:r})},nm=()=>{let e=ce(Fa),t=M("WidgetKnowledgeAssistant",em),n=(0,ut.useContext)(E0),r=(0,ut.useRef)(null),[o,i]=(0,ut.useState)(""),s=l=>{i(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var c;r.current&&((c=r.current)==null||c.focus(),i(""))})};return n.isEnabled?(0,xe.jsxs)("form",{className:t.form,onSubmit:a,children:[(0,xe.jsx)("input",{ref:r,className:t.formInput,placeholder:e("inputPlaceholder"),type:"text",disabled:n.isSubmitting,value:o,onChange:s}),(0,xe.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},rm=({title:e,emptyState:t})=>{var v,m;let n=ce(Fa),r=ct(),o=M("WidgetKnowledgeAssistant",em),i=(0,ut.useRef)(null),s=(0,ut.useContext)(E0),a=(m=j(fc((v=s.threadId)!=null?v:-1)))!=null?m:[],l=ee("hasKeyboardInput"),c=dn(),u=x=>{Ir(x),r("Assistant response copied",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",copiedText:x})},d=(x,y)=>{r("knowledge assist source viewed",{question:y,sourceViewed:x.url||x.name})},f=x=>{var y;x.preventDefault(),s.onReset(),r("knowledge assist reset",{threadId:(y=s.threadId)!=null?y:void 0})},p=x=>{c.send(Ar,{text:x,suggestion:{source:"cue",sourceText:x}}),r("Assistant response used",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",usedText:x})};return!s.isEnabled||(a==null?void 0:a.length)===0&&!s.isSubmitting&&!t?null:(0,xe.jsxs)(ut.Fragment,{children:[(0,xe.jsx)(Sr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,xe.jsxs)(rn,{withDivider:!0,children:[t&&a.length===0&&!s.pendingInput&&(0,xe.jsx)(wF,S({},t)),a.map((x,y)=>(0,xe.jsx)(SF,{innerRef:y===a.length-1?i:void 0,item:x,index:y,hasKeyboardInput:l,onCopy:u,onUse:p,onSourceClick:d},`${x.question}_${x.answer}_${y}`)),s.pendingInput&&(0,xe.jsx)(Zp,{title:s.pendingInput})]})}),a.length>0&&(0,xe.jsx)("div",{className:o.resetContainer,children:(0,xe.jsx)(Ee.Button,{disabled:s.threadId===null||s.isSubmitting,onClick:f,children:n("resetLabel")})})]})};var $P=b(Z());var bF=/(https?:\/\/[^\s]+)/,VP=e=>e.split(" ").find(t=>bF.test(t));var $n=b(R()),EF=({suggestion:e,lines:t,onUse:n})=>{var d;let r=e.text||e.url||e.message,o=VP(r),i=ce(Wc),s=ee("showImages"),a=ee("fallbackImage"),l=ee("hasKeyboardInput"),c=f=>{f.preventDefault(),f.stopPropagation(),l&&n(r)},u=(0,$P.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$n.jsxs)(Ee,{onClick:l?c:void 0,"data-testid":"edit-suggestion",children:[(0,$n.jsxs)(Ie,{children:[s&&e.image&&(0,$n.jsx)(Ie.Image,{src:Wp(e,"small",a||void 0),title:e.title}),(0,$n.jsxs)(Ie.Content,{children:[e.title&&(0,$n.jsx)(Ie.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,$n.jsx)(Ee.Labels,{labels:e.searchKeywords}),(0,$n.jsx)(Ie.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$n.jsxs)(Ee.Actions,{children:[o&&(0,$n.jsx)(Ee.ActionButton,{onClick:u,label:i("visitUrl")}),l&&(0,$n.jsx)(Ee.ActionButton,{primary:!0,onClick:c,label:i("useSuggestion")})]})]})},jP=EF;var ru=b(R()),TF=({lines:e,suggestions:t})=>{let n=dn(),r=(o,i)=>{n.send(Ar,{text:o,suggestion:P(S({},i),{source:i.source,sourceText:i.text})})};return(0,ru.jsx)(ru.Fragment,{children:t.map(o=>(0,ru.jsx)(jP,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},KP=TF;var om={};Rt(om,{enUS:()=>CF,nlNL:()=>kF});var CF={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},kF={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var za={root:"dd-W9VCG",loginText:"dd--dS6t",stateText:"dd-348OC",footer:"dd-tvofr",shortcutList:"dd-MuKK-",shortcut:"dd-5CnK9",footerShortcut:"dd-dH7XJ",link:"dd-DRo0x"};var fe=b(R()),qP=(e,t)=>{let n=j(Vt);(0,Ha.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},RF=({onLogIn:e})=>{let t=M("Widget",za),n=ee("isEmbedded"),r=ee("adminUrl");return(0,fe.jsx)("div",{className:t.loginText,children:(0,fe.jsx)("div",{children:(0,fe.jsx)(Dp,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},WP=({text:e})=>{let t=M("Widget",za);return(0,fe.jsx)("div",{className:t.stateText,children:(0,fe.jsx)("div",{children:(0,fe.jsx)("p",{children:e})})},"notification")},PF=()=>{let e=ce(om),t=ye(),n=M("Widget",za),r=ee("showSearch"),o=ee("showSummaryCommand"),i=ee("showKnowledgeSearch"),s=j(Hy("knowledge-assist")),a=ee("isEmbedded"),l=j(Pa("/admin/")),c=dn(),u=ee("productName"),d=ee("hasKeyboardInput"),f=po(()=>nr({})),p=ct(),v=r||o||i||l;return qP(()=>{if(a)return t(m0()),()=>{t(vP())}},[t,a]),!v||!d?null:(0,fe.jsx)(Sr,{title:e("actions"),type:"shortcuts",children:(0,fe.jsxs)("div",{className:n.shortcutList,children:[r&&(0,fe.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-search","aria-label":e("linkSearch"),onClick:()=>{c.send("ShowCommandPalette",{isOpen:!0}),p("open search",{via:"widget-shortcut"})},children:[(0,fe.jsx)(Ta,{}),e("linkSearch")]}),o&&!s&&(0,fe.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-summary","aria-label":e("linkSummary"),disabled:f.state==="loading",onClick:()=>f.call(),children:[(0,fe.jsx)(CP,{}),e("linkSummary")]}),i&&!s&&(0,fe.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-knowledge-assist","aria-label":e("linkKnowledgeSearch"),onClick:()=>{c.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),p("open knowledge assistant",{via:"widget-shortcut"})},children:[(0,fe.jsx)(TP,{}),e("linkKnowledgeSearch")]}),l&&(0,fe.jsxs)("a",{className:n.shortcut,target:"_blank",href:l,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:u}),rel:"noreferrer",onClick:()=>{p("open my deepdesk",{via:"widget-shortcut"})},children:[(0,fe.jsx)(EP,{}),e("linkStudioLogin",{productName:u})]})]})})},AF=()=>{let e=ye(),t=j(gc),n=j(IT),r=j(wP),o=j(V1),i=j(mp),s=j(Ap),a=j(Bi),l=j(Pr);return(0,Ha.useEffect)(()=>{!!o&&!n&&te.warn("Custom data provided, but no schema.")},[o,n]),qP(()=>{t.forEach(({type:c})=>{c==="entities"?e(dr()):Ru.includes(c)||e(hr(c))})},[e,l,a]),(0,Ha.useEffect)(()=>{r.length>0&&!t.some(c=>c.type==="cues")&&te.warn("Received cues, but cues are not configured in widget.")},[t,r]),(0,fe.jsx)(Ha.Fragment,{children:t.map(({type:c,title:u,amount:d,lines:f,schema:p})=>{var v,m;switch(c){case"entities":return i&&i.length>0&&(0,fe.jsx)(Sr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,fe.jsx)(bP,{entities:i})},c);case"cues":return r&&r.length>0&&(0,fe.jsx)(Sr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,fe.jsx)(rn,{withDivider:!0,children:(0,fe.jsx)(zP,{cues:r})})},c);case"custom-data":return o&&p&&(0,fe.jsx)(Sr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,fe.jsx)(rn,{withDivider:!0,children:(0,fe.jsx)(BP,{data:o,schema:p})})},c);default:return((m=(v=s[c])==null?void 0:v.suggestions)==null?void 0:m.length)>0&&(0,fe.jsx)(Sr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,fe.jsx)(rn,{withDivider:!0,children:(0,fe.jsx)(KP,{lines:f,contentType:c,suggestions:s[c].suggestions.slice(0,d)||[]})})},c)}})})},T0=({children:e})=>{let t=M("Widget",za);return(0,fe.jsx)("div",{className:t.footer,children:e})},C0=({children:e})=>{let t=M("Widget",za);return(0,fe.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},IF=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript",expectFormat:"json-schema:cues"}})=>{let r=ce(om),o=j(ia),i=j(Vt),s=j(k1),a=j(Bi),l=j(Hy("knowledge-assist")),c=j(_f),u=j(Of);return o===!1?(0,fe.jsx)(WP,{text:r("notSupported")}):i===!1?(0,fe.jsx)(RF,{onLogIn:e}):!a||!s||i===null?(0,fe.jsx)(WP,{text:r("waiting")}):(0,fe.jsx)(C0,{children:(0,fe.jsxs)(tm,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:u,evaluateKnowledgeAssistFn:u?zi:Hi,children:[(0,fe.jsxs)(Es,{children:[(0,fe.jsx)(PF,{}),(0,fe.jsx)(AF,{}),l&&(0,fe.jsx)(rm,{title:l.title,emptyState:t.emptyState})]}),(0,fe.jsxs)(T0,{children:[l&&(0,fe.jsx)(nm,{}),(0,fe.jsx)(OP,{assistantOptions:n})]})]})})},GP=IF;function Ba(e){let t=new Range;return t.selectNodeContents(e),t}function YP(e,t,n){try{return ci(e,t,n),!0}catch(r){return!1}}function im(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function sm(e){return"tagName"in e&&e.tagName==="BR"}var ou=/[\u200B-\u200D\uFEFF]/g;function ci(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,c){let u=-1,d=/[\u200B-\u200D\uFEFF]/;if(!d.test(l))return c;for(let f=0;f<=l.length;f++)if(d.test(l[f])||u++,u===c)return f;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,u=c.replace(ou,""),d=o+u.length,f=t>=o&&t<=d,p=n>=o&&n<=d;if(f){let v=s(c,t-o);v===0&&!p?r.setStartBefore(l):r.setStart(l,v)}p&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(sm(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let u=0;u<l.childNodes.length&&(a(l.childNodes[u]),!i);u++);let c=l.lastChild;im(l)&&c&&!im(c)&&!sm(c)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function iu(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,c=0;function u(d){let f=d===e,p=d===n,v=d===o;switch(d.nodeType){case Node.TEXT_NODE:{let m=d.textContent;p&&(a=c+m.substring(0,r).replace(ou,"").length),v&&(l=c+m.substring(0,i).replace(ou,"").length),c+=m.replace(ou,"").length;break}case Node.ELEMENT_NODE:{if(sm(d)&&d.nextSibling){c++;break}!f&&im(d)&&d.previousSibling&&c++;for(let m=0;m<d.childNodes.length;m++){let x=p&&m===r,y=v&&m===i;if(x&&(a=c),y&&(l=c),l!==void 0||((!x||!s)&&u(d.childNodes[m]),v&&m===i-1&&(l=c),l!==void 0))break}v&&(l=c);break}default:break}}if(u(e),l===void 0)throw new Error("Could not determine start and end");return{start:a!=null?a:l,end:l}}function su(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a=0,l="";function c(u){let d=u===e,f=u===n,p=u===o;switch(f&&(a=1),u.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let v=f?r:0,m=p?i:void 0;l+=u.textContent.replace(ou,"").substring(v,m);break}case Node.ELEMENT_NODE:{if(!s&&a===1&&sm(u)&&u.nextSibling){l+=`
81
- `;break}!d&&!s&&a===1&&im(u)&&u.previousSibling&&(l+=`
82
- `);let v=f?r:0,m=p?Math.min(i,u.childNodes.length):u.childNodes.length;for(let x=v;x<m&&(c(u.childNodes[x]),a!==2);x++);break}default:break}p&&(a=2)}return c(e),l}var XP=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(XP||{}),bo=class{constructor(t){this.element=t;this.isFocused=!1;this.isActive=!0;this.isDisposed=!1;this.eventListeners={};this.disposeHandlers=[];this.cachedText="";this.cachedCaretPosition=null;this.cachedSelection={start:0,end:0};this.cachedHTML="";this.isSubmitting=!1;this.isPossibleClearInputAction=!1;this.cachedText=this.getText(),this.cachedHTML=this.getHTML(),this.cachedSelection=this.getSelection(),this.listen()}addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}handleInteraction(){let t=this.getText(),n=this.getHTML(),r=this.getSelection(),o=this.cachedCaretPosition===null;if(!this.isActive||(t===""&&this.cachedText!==""&&!this.isPossibleClearInputAction&&this.emit("submit"),t!==this.cachedText?(this.cachedText=t,this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})):n!==null&&n!==this.cachedHTML&&(this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})),(r.start!==this.cachedSelection.start||r.end!==this.cachedSelection.end)&&(this.cachedSelection=r,o=!0,this.emit("selection",r)),!o))return;let i=this.getCaretPosition();Yo(i,this.cachedCaretPosition)||(this.cachedCaretPosition=i,this.emit("caretposition",i))}handleClick(){this.handleInteraction()}handleFocus(){let t=!this.isFocused;this.isFocused=!0,t&&this.emit("focus"),this.handleInteraction()}handleBlur(){this.isPossibleClearInputAction=!1;let t=this.isFocused;this.isFocused=!1,t&&this.emit("blur")}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(XP).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleKeyUp(t){this.handleInteraction(),this.emit("keyup",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),this.addEventListener("input",()=>this.handleInteraction()),this.addEventListener("change",()=>this.handleInteraction()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.handleInteraction()),document.activeElement===this.element&&(this.isFocused=!0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}off(t,n){if(!this.eventListeners[t])return;let r=this.eventListeners[t].indexOf(n);r!==-1&&this.eventListeners[t].splice(r,1)}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.handleInteraction()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function QP(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var ps=class extends bo{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),su(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){var s;let n=this.getRootNode();if(n.activeElement!==this.element)return null;let r="getSelection"in n?n.getSelection():window.getSelection();if(!r)return null;let o="getComposedRanges"in r&&n instanceof ShadowRoot?(s=r.getComposedRanges(n))==null?void 0:s[0]:r.rangeCount>0?r.getRangeAt(0):null;if(!o)return null;let i=this.element.ownerDocument.createRange();return i.setStart(o==null?void 0:o.startContainer,o==null?void 0:o.startOffset),i.setEnd(o==null?void 0:o.endContainer,o==null?void 0:o.endOffset),!i||!this.element.contains(i.startContainer)||!this.element.contains(i.endContainer)?null:i}getCaretPosition(){let n=this.getRange();if(!n||!n.collapsed||!("getBoundingClientRect"in n))return null;let r=n.getBoundingClientRect();return!QP(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!QP(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return iu(this.element,n);let r=this.lastKnownSelection;if(r&&YP(this.element,r.start,r.end))return r;let o=Ba(this.element);return o.collapse(!1),iu(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return su(this.element,ci(this.element,n,r))}listen(){super.listen();let n=new MutationObserver(i=>{var s,a;i.length===2&&i[0].addedNodes.length===1&&((s=i[0].addedNodes[0])==null?void 0:s.textContent)==="\u2060"&&((a=i[1].removedNodes[0])==null?void 0:a.textContent)==="\u2060"||setTimeout(()=>{this.handleInteraction()},0)});n.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.disposeHandlers.push(()=>n.disconnect());let r=this.element.isContentEditable,o=new MutationObserver(()=>{this.element.isContentEditable!==r&&(r=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>o.disconnect())}};var LF=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];function ZP(e,t){let n="mozInnerScreenX"in window,r=document.createElement("div");r.id="input-textarea-caret-position-mirror-div";let o=r.style,i=window.getComputedStyle(e),s=e.ownerDocument.body;o.whiteSpace="pre-wrap",o.wordWrap="break-word",o.position="absolute",o.visibility="hidden",LF.forEach(u=>{o[u]=i[u]}),n?e.scrollHeight>Number.parseInt(i.height)&&(o.overflowY="scroll"):o.overflow="hidden",r.textContent=e.value.substring(0,t);let a=document.createElement("span");a.textContent=e.value.substring(t)||".",r.appendChild(a),s.appendChild(r);let l=e.getBoundingClientRect(),c={top:l.top-e.scrollTop+a.offsetTop+Number.parseInt(i.borderTopWidth)+a.offsetHeight,left:l.left-e.scrollLeft+a.offsetLeft+Number.parseInt(i.borderLeftWidth)};return s.removeChild(r),c}var ms=class extends bo{constructor(){super(...arguments);this.lastKnownSelection=null}getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:n,selectionEnd:r}=this.element;return{start:n,end:r}}getSelectedText(){let n=this.getSelection();return n?this.getText().slice(n.start,n.end):""}getCaretPosition(){return ZP(this.element,this.element.selectionEnd)}listen(){super.listen();let n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var i;return(i=n==null?void 0:n.get)==null?void 0:i.call(this.element)},set:i=>{var s;(s=n==null?void 0:n.set)==null||s.call(this.element,i),this.handleInteraction()}}),this.addEventListener("scroll",()=>{this.emit("caretposition",this.getCaretPosition())});let r=this.element.disabled,o=new MutationObserver(()=>{this.element.disabled!==r&&(r=this.element.disabled,this.emit(r?"disabled":"enabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>o.disconnect())}};function JP(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function _F(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var k0=class{constructor(t){this.name=t;this.disposeHandlers=[];this.broadcastChannel=new BroadcastChannel(t)}onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},R0=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=JP(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},P0=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.externalId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setExternalId(t){this.externalId!==t&&(this.cleanup(),te.info("Set externalId",t),this.externalId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new R0(t,this.deepdeskUrl,{debug:!0}):new k0(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=_F(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(te.info("Received broadcast event",this.externalId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;te.info("Broadcast event",{externalId:this.externalId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.externalId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage(P(S({},o),{channel:this.externalId}))}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),this.channel=void 0,t&&((r=this.defaultChannel)==null||r.close(),this.defaultChannel=void 0)}},eA=P0;function OF(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function $e(e){return Array.isArray(e)?e.map($e):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[OF(n)]:$e(e[n])}),{}):e}function NF(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Ct(e){return Array.isArray(e)?e.map(Ct):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[NF(n)]:Ct(e[n])}),{}):e}var Ua=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var A0=e=>new Promise(t=>{setTimeout(t,e)});var Va=class extends Ua{constructor(){super(...arguments);this.name="ClientError"}},L0=class extends Ua{constructor(){super(...arguments);this.name="ServerError"}},I0=new Map;function MF(e){return I(this,null,function*(){if(e.status===204)return e.text().catch(()=>{}),null;let t=e.headers.get("content-type");if(t!=null&&t.includes("application/json"))return e.json();let n=yield e.text();return n===""?null:(te.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))})}var ui=class ui{constructor(t="",n={}){this.baseUrl=t;this.options=n;this.latestRequestByUrl={};this.fetch=window.fetch.bind(window);n.fetch&&(this.fetch=n.fetch)}patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",C=n,{useCache:c=!1,abortLatest:u=!1,attempts:d=1,retryDelay:f=500,refreshTokenOn401:p=!0,retryOnError:v=k=>k instanceof TypeError,retryOnResponse:m=k=>k.status>=500,version:x=null}=C,y=oe(C,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(c){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(I0.has(s)){r(I0.get(s));return}}let g=P(S({credentials:"include"},y),{headers:S({Accept:"application/json","Content-Type":"application/json"},y.headers)});!l&&this.csrfToken&&(g.headers=P(S({},g.headers),{"X-CSRFToken":this.csrfToken})),typeof x=="string"&&(g.headers=P(S({},g.headers),{"X-Deepdesk-API-Version":x}));let h=d,w=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&u&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let E=()=>I(this,null,function*(){return h--,a(s,g).then(k=>I(this,null,function*(){return m(k)&&!i.isAborted&&h>0?(yield A0(f),E()):k.status===401&&p===!0&&w===!1?(w=!0,yield this.refreshToken(),E()):k})).catch(k=>I(this,null,function*(){if(v(k)&&!i.isAborted&&h>0)return yield A0(f),E();throw k}))});E().then(k=>I(this,null,function*(){let A=yield MF(k);if(delete this.latestRequestByUrl[s],k.status>=500){o(new L0("Server Error",A));return}if(k.status===401){o(new Va("Unauthorized",A));return}if(k.status===403){o(new Va("Forbidden",A));return}if(k.status===404){o(new Va("Not Found",A));return}if(k.status>=400){o(new Va("Bad Request",A));return}c&&I0.set(s,A),r(A)})).catch(k=>{o(k)})})}validateToken(){return I(this,null,function*(){let{has_valid_access_token:t}=yield this.get("/auth/validate");if(!t)try{yield this.refreshToken()}catch(r){return!1}let{is_logged_in:n}=yield this.get("/apis/admin/session/validate/");return!!n})}refreshToken(){return ui.refreshingToken||(ui.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{ui.refreshingToken=null},1e3*60)})),ui.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,S({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,S({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,S({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,S({method:"DELETE"},n))}};ui.refreshingToken=null;var gs=ui;var tA;(t=>{let e;(s=>(s.SEND_MESSAGE="Send Message",s.HANDLING_TIME="Handling Time",s.ADD_TO_PERSONAL_COLLECTION="Add to personal collection",s.DELETE_FROM_PERSONAL_COLLECTION="Delete from personal collection"))(e=t.EventType||(t.EventType={}))})(tA||(tA={}));function _0(e){return P(S({},$e(e)),{metadata:e.metadata})}var hs=class hs{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new gs(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,i)=>I(this,null,function*(){let s=yield r(o,i);return this.handleDeepdeskVersionHeaders(s),s}))}preflight(){return I(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(hs.exchangeTokenPromise||(hs.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),hs.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return I(this,null,function*(){var r;yield this.preflight(),te.info(`Creating conversation for session ${t.externalId} and agent ${t.agentId}`);let n=yield this.client.post("/api/v2/conversations",P(S({chat_start_time:new Date().toISOString()},Ct(t)),{metadata:(r=t.metadata)!=null?r:{}}));return _0(n)})}getMe(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return $e(t)})}postIdentity(t){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",Ct(t))})}patchMe(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",Ct(t));return $e(n)})}getProfile(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return $e(n)})}getKnowledgeAssistant(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return $e(n)})}getContentTypes(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return $e(t)})}getAccount(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return $e(t)})}getPlatformConfig(t){return I(this,null,function*(){let n=t!==void 0?`/platform/config/${t}/`:"/platform/config/",{config:r}=yield this.client.get(n,{useCache:!0});return $e(r)})}checkUserExists(t){return I(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return I(this,arguments,function*(t,n={}){yield this.preflight(),te.info(`Getting conversation for session ${t}`);let{attempts:o=1,retryDelay:i=1e3}=n,s=yield this.client.get(`/api/v2/conversations/by_external_id/${t}`,{attempts:o,retryDelay:i,retryOnResponse:a=>a.status===404||a.status>=500,version:"v2"});return te.info(`Successfully retrieved conversation ${s.id} for session ${t}`),_0(s)})}isConversationSupported(r){return I(this,arguments,function*(t,n={}){te.info(`Check if conversation for session ${t} is supported`);let{attempts:o=1,retryDelay:i=1e3}=n;return(yield this.client.get(`/api/v2/conversations/by_external_id/${t}/has_active_profile`,{attempts:o,retryDelay:i,retryOnResponse:a=>a.status===404||a.status>=500})).has_active_profile})}updateConversation(t,n){return I(this,null,function*(){var i;yield this.preflight();let r=Ct(n);n.metadata&&(r.metadata=(i=n.metadata)!=null?i:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return _0(o)})}postMessages(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(r=>P(S({},Ct(r)),{metadata:r.metadata})))})}sendEvent(t,n){return I(this,null,function*(){yield this.preflight();let s=n,{data:r}=s,o=oe(s,["data"]),i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((a,[l,c])=>P(S({},a),{[l]:c}),{});return this.client.post("/api/events",Ct(P(S(S({},i),o),{data:r,name:t})),{version:"v2"})})}sendEventV1(t,n){return I(this,null,function*(){yield this.preflight();let r=Object.entries(this.latestReceivedDeepdeskVersions).reduce((o,[i,s])=>P(S({},o),{[i]:s}),{});return this.client.post("/api/events",{event:t,data:Ct(S(S({},n),r))},{version:"v1"})})}getEntities(t){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post("/api/entities",{messages:t.filter(r=>r.text)},{version:"v1"})).entities})}getTemporaryExchangeToken(){return I(this,null,function*(){return(yield this.client.get("/auth/exchange-token")).jwt})}exchangeTokenForAccessCookie(t){return I(this,null,function*(){return this.client.post("/apis/admin/session/jwt/",{jwt:t}).catch(n=>{throw te.warn(`Invalid token '${t}'`),n})})}authenticateWithKey(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",Ct(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return I(this,arguments,function*(t,n={},r){if(yield this.preflight(),r==="sticky-messages")throw new Error("Use getPinnedMessages instead");return(yield this.client.post(`/api/v2/conversations/${t}/recommend/${r}`,Ct(n),{abortLatest:!0})).map(s=>P(S({},$e(s)),{text:s.text||s.url||s.message,source:r,type:r})).filter((s,a,l)=>a===l.findIndex(c=>c.text===s.text))})}isLoggedIn(){return I(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,Ct(n),{abortLatest:!0})).map(o=>({score:1,source:o.source,sourceText:o.source_text,text:o.label,trainingJobs:o.training_jobs,searchKeywords:o.search_keywords,type:o.source})).filter((o,i,s)=>i===s.findIndex(a=>a.text===o.text))})}getPinnedMessages(t){return I(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return $e(n).map(r=>P(S({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return I(this,null,function*(){let n=yield this.client.post("/api/style-suggestions",Ct(t),{abortLatest:!0,version:"v1"});return $e(n)})}search(t){return I(this,null,function*(){let n=yield this.client.post(`/api/profiles/${t.profile}/search`,Ct(t),{version:"v2"});return $e(n)})}knowledgeAssist(i,s,a){return I(this,arguments,function*(t,n,r,o={}){yield this.preflight();let l=yield this.client.post(`/api/knowledge-assist/assistants/${r}/search`,Ct({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(c=>({question:c.question,answer:c.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return $e(l)})}requestLoginByEmail(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return $e(n)})}requestPasswordlessToken(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return $e(t.token)})}getCsrfToken(){return I(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return I(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return $e(n)})}getSummary(r){return I(this,arguments,function*(t,n={}){yield this.preflight();let o=yield this.client.post("/api/summary",{conversation:{messages:t.filter(i=>i.text&&i.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model},{version:"v1"});return $e(o)})}evaluateAssistant(t,n){return I(this,null,function*(){var a;yield this.preflight();let r=new URLSearchParams,{expectFormat:o="text"}=n||{};if(o.startsWith("json-schema:")){let l=o.replace("json-schema:","");r.append("expect_response_format","json-schema"),r.append("expect_response_format_schema",l)}else r.append("expect_response_format",o);n!=null&&n.externalConversationId&&r.append("external_conversation_id",n.externalConversationId);let i=n!=null&&n.threadId?`/api/v2/assistants/${t}/threads/${n==null?void 0:n.threadId}/evaluate?${r.toString()}`:`/api/v2/assistants/${t}/evaluate?${r.toString()}`,s=yield this.client.post(i,{input:(a=n==null?void 0:n.input)!=null?a:{},conversation:n==null?void 0:n.transcript});return $e(s.output)})}createAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n}=t,r=yield this.client.post(`/apis/admin/assistants/${n}/threads/`,{});return $e(r)})}postMessageToAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n,threadId:r,message:o}=t,i=yield this.client.post(`/apis/admin/assistants/${n}/threads/${r}/messages/`,{content:o,role:"user"});return $e(i)})}translateMessages(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/translate",Ct(t),{version:"v2"});return $e(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match($x);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&te.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};hs.exchangeTokenPromise=null;var Eo=hs;var nA={startTime:null,stopTime:null},rA=e=>e.handlingTime,oA=Ce({name:"handlingTime",initialState:nA,reducers:{handlingTimeStart(e){if(e.startTime&&!e.stopTime)throw new Error("Timing already started");e.startTime=new Date,e.stopTime=null},handlingTimeStop(e){if(!e.startTime)throw new Error("Timing not started");e.stopTime=new Date},handlingTimeReset(e){e.startTime=null,e.stopTime=null}},extraReducers:e=>{e.addCase(at,()=>nA)}}),{handlingTimeStart:iA,handlingTimeStop:am,handlingTimeReset:sA}=oA.actions,aA=oA.reducer;var lA=(e={})=>{let t=S({onAuthError:oa(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var lm={list:{keywordMatches:[]},fetchState:"idle"};var ys=ge("styleSuggestions/getAll",(n,r)=>I(void 0,[n,r],function*({text:e},t){var l;let{deepdeskAPI:o}=t.extra,i=t.getState(),{showStyleSuggestions:s}=i.settings,a=(l=i.conversation.current)==null?void 0:l.profileCode;if(!s)return lm.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),DF=Ce({name:"styleSuggestions",initialState:lm,reducers:{},extraReducers:e=>{e.addCase(ys.pending,t=>{t.fetchState="loading"}).addCase(ys.rejected,t=>{t.fetchState="error"}).addCase(ys.fulfilled,(t,n)=>{t.fetchState="done",Yo(t.list,n.payload)||(t.list=n.payload)}).addCase(Mi,t=>{t.list=lm.list}).addCase(at,()=>lm)}}),cA=DF.reducer;var uA=(e={})=>{let t,n=!0,r=S({getStyleSuggestions:ys,debounce:500},e);return o=>i=>s=>{var p;let a=o.getState().input.text,l=i(s),c=o.getState();if(c.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:u}=c.settings;if(!((p=c.conversation.current)==null?void 0:p.id)||!u)return l;let{text:f}=c.input;return f===a&&!n||(clearTimeout(t),f==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:f}))},e.debounce)),l}};function FF(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var dA=(e={})=>{let t=S({getTextSuggestions:hr,getAutocompleteSuggestions:Gc,debounce:200,check:Mr},e),n;return r=>o=>i=>{var m;let{input:s}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:c,showTabCompletion:u}=l.settings,d=(m=l.conversation.current)==null?void 0:m.id,f=i.type===Ip.toString();if(!d||!c&&!u)return a;let{input:p}=l;return FF(p,s)&&!f||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let x=sa(l);x===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(x))},f?0:t.debounce)),a}};var fA=ys.fulfilled.toString();function zF(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let i=e.keywordMatches.filter(l=>l.keyword===o),s=t.keywordMatches.filter(l=>l.keyword===o),a=s.length-i.length;a<=0||r.push(...s.slice(0,a))}),r}var pA=e=>t=>n=>r=>{var c;if(r.type!==fA){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(c=i.conversation)==null?void 0:c.current;if(o===s)return;let l=zF(o,s);r.type===fA&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var HF=Yd({assistants:CT,auth:h1,conversation:R1,contentTypes:RT,passwordlessToken:xP,entities:Sk,handlingTime:aA,info:q1,input:H1,settings:c1,profile:LT,search:J1,styleSuggestions:cA,ui:FR,textSuggestions:bR});function mA(e){return FE({reducer:HF,middleware:t=>{var r;let n=t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}).concat(lA()).concat(dA({debounce:200})).concat(uA({debounce:500})).concat(pA(e.deepdeskAPI));return((r=e.middleware)!=null?r:[]).reduce((o,i)=>o.concat(i),n)},preloadedState:e.preloadedState})}var BF=e=>{var t,n;return(n=(t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())!=null?n:"unknown"},UF=e=>t=>n=>r=>{var a,l,c,u,d,f;let o=t.getState(),i=ql("inlineSuggestions")(o);switch(r.type){case oa.toString():{!r.payload&&e.emit("logout",void 0);break}case dr.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(a=o.conversation.current)==null?void 0:a.id,data:{entities:r.payload}});break;case oo.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((c=o.conversation.current)==null?void 0:c.id),data:r.payload.data});break;case Mi.toString():e.logSendMessage(r.payload);break;case Lf.toString():e.emit("call-to-action",{cue:r.payload});break;case rr.fulfilled.toString():r.isBroadcasted||e.broadcast(Ey,r,!1);break;default:break}let s=n(r);switch(r.type){case Mi.toString():e.handleAfterSendMessage(r.payload);break;case Xc.toString():e.onUpdateShowTabHint(r.payload);break;case am.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case pf.toString():{let{start:p,end:v}=o.input.selection;e.emit("replace",P(S({},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}}));break}case er.toString():{let{start:p,end:v}=o.input.selection;e.emit("select-suggestion",P(S({type:BF(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}})),i&&t.dispatch(Xo([]));break}case mf.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(u=o.conversation.current)==null?void 0:u.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Xo.toString():{i&&r.payload.length>0&&t.dispatch(gf(0));break}case nr.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(d=o.conversation.current)==null?void 0:d.id,data:{summary:r.payload,assistant:(f=t.getState().profile.data)==null?void 0:f.summarizerAssistantNew}}),e.emit("summary-generated",{summary:r.payload});break}default:break}return s},gA=UF;function O0(e){return e.toISOString().replace("T"," ").replace("Z","")}var VF=(e,t)=>t.version,hA=Dn([la,Pr,rA,VF],(e,t,n,r)=>{if(!t)return te.warn("No conversationId for handling time metrics"),null;let{startTime:o,stopTime:i}=n;return!o||!i?(te.warn("No startTime and stopTime for handling time metrics"),null):{conversationId:t,clientVersion:r,agentId:e==null?void 0:e.agentId,agentName:e==null?void 0:e.agentName,agentEmail:e==null?void 0:e.agentEmail,timeStart:O0(o),timeStop:O0(i)}});function yA(e,t,n){var A,F,N,O;let r=(A=t.conversation.current)==null?void 0:A.id;if(!r)return te.warn("No conversationId for send message metrics"),null;let{text:o,metrics:{numCharsTyped:i,numCharsPasted:s,numCharsCut:a,numCharsDeleted:l,numPaste:c,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:d,pastes:f,cuts:p,deletions:v,textSuggestions:m,offeredTextSuggestions:x}}=t[e],y=o.length,h=m.reduce((G,{text:W,searchTerm:L})=>G+W.length-(L?L.length:0),0),w=u!=null?u:Date.now(),E=(Date.now()-w)/1e3+(d||0),C=i/E,k=m.reduce((G,{searchTerm:W})=>G+(W?W.length:0),0);return{conversationId:r,source:"agent",text:o,clientVersion:n.version,pastes:f,cuts:p,deletions:v,lenTextTyped:i+k,lenTextTotal:y,lenTextAssisted:h,lenTextPasted:s,lenTextCut:a,lenTextDeleted:l,timeTotalSeconds:E,charsPerSecond:C,numPastes:c,textSuggestionsV2:m,suggestionsCounters:[{source:"gpt",countOffered:x.filter(G=>G.source==="gpt").length}],agentId:(F=t.info.agentInfo)==null?void 0:F.agentId,agentName:(N=t.info.agentInfo)==null?void 0:N.agentName,agentEmail:(O=t.info.agentInfo)==null?void 0:O.agentEmail}}function N0(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return N0(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?N0(o,t):null}function M0(e,t){return N0(e,t)}function vA(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function $F(e){return typeof e=="object"&&e!==null&&"tagName"in e}function cm(e){return $F(e)&&(ds(e)||zp(e))}var wA,zr=new Map,jF=["bottom","height","left","right","top","width"],xA=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:jF.some(n=>e[n]!==t[n]);function SA(e){var n,r,o;if(e.ownerDocument===document)return[];let t=(o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)!=null?o:null;return t?[t,...SA(t)]:[]}function bA(e,t){return!e||!t?null:P(S({},e),{top:e.top+t.top,left:e.left+t.left})}var um=!1,EA=()=>{um=!0;let e=[];if(zr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),zr.delete(n);return}let r=n.getBoundingClientRect();xA(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(bA,t.rect):t.rect;xA(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),zr.size===0){um=!1;return}wA=window.requestAnimationFrame(EA)};function D0(e,t){let n=SA(e),r=[],o=n.map((i,s)=>D0(i,a=>{r[s]=a;let l=zr.get(e);if(!l)return;let c=r.reduce(bA,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),zr.has(e)){let s=zr.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else zr.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!um&&EA()},unobserve(){o.forEach(s=>s.unobserve());let i=zr.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||zr.delete(e),zr.size||(cancelAnimationFrame(wA),um=!1)}}}}var TA,Hr=new Map,CA=()=>{Hr.forEach((e,t)=>{if(!t.isConnected){Hr.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),Hr.size!==0&&(TA=window.requestAnimationFrame(CA))};function kA(e,t){return{observe(){let n=Hr.size===0;Hr.has(e)?Hr.get(e).callbacks.push(t):Hr.set(e,{visible:void 0,callbacks:[t]}),n&&CA()},unobserve(){let n=Hr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Hr.delete(e),Hr.size||cancelAnimationFrame(TA)}}}}var F0=["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderStyle","boxSizing","color","overflowWrap","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontWeight","fontKerning","lineHeight","letterSpacing","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","textIndent","whiteSpace","wordBreak","wordSpacing","wordWrap"];function z0(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function $a(e){return Number.parseFloat(e)}function dm(e){return Math.round(e*1e6)}function RA(e){return e/1e6}function H0(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=$a(e.width),i=$a(e.borderLeftWidth),s=$a(e.borderRightWidth),a=$a(e.paddingRight),l=RA(dm(o)-dm(i)-dm(s)),c=RA(dm(r));if(l-c>2){let u=l-c;n.style.paddingRight=`${a+u}px`}}function au(e,t={}){var u,d;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=(u=t.position)!=null?u:"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ts(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};z0(r,n,F0),H0(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=kA(e,()=>{z0(r,n,F0),H0(r,e,n),i(),setTimeout(i,0)}),a,l=!0,c=D0(e,f=>{if(f===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),f.height===0&&f.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(z0(r,n,F0),H0(r,e,n),i(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),v=window.getComputedStyle(t.closestScrollElement),m=$a(v.borderTopWidth),x=$a(v.borderBottomWidth),y=p.top+m-f.top,g=f.top+f.height+-(p.top+p.height-x);n.style.clipPath=`inset(${y}px 0px ${g}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(d=e.parentElement)==null||d.appendChild(n),c.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),c.unobserve(),s.unobserve(),n.remove()}]}var PA=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch(r){return t}}catch(n){return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch(r){te.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function KF(e){return e.offsetParent!==null}function AA(e){if(!KF(e))return!1;let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function fm(e,t,n=100){let r=AA(e);t({isVisible:r});let o=setInterval(()=>{let i=AA(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Le=b(R());var IA=PA("showTabHint",!0),ja=class ja{constructor({deepdeskUrl:t,version:n=ja.version||"unknown",locale:r="en-US",token:o,fetch:i,productName:s,createCustomChannel:a}){this.inputMediator=null;this.eventListeners={};this.unmountHandlers=[];this.inlineSuggestions=null;this.aboveSuggestions=null;this.floatingMenu=null;this.widgetElement=null;this.widgetRoot=null;this.dynamicThunkObject={};this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let l=t.replace(/\/api$/,"");this.deepdeskApi=new Eo(l,{token:o,fetch:i}),this.version=n,this.instanceId=ja.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[gA({broadcast:(u,d,f)=>{this.broadcastEvents.send(u,d,f)},emit:(u,d)=>this.emit(u,d),handleAfterSendMessage:u=>this.handleAfterSendMessage(u),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:u=>this.logSendMessage(u),onUpdateShowTabHint:u=>IA.update(u),sendEvent:(u,d)=>this.deepdeskApi.sendEvent(u,d)})]};this.store=mA(c),this.broadcastEvents=new eA({debug:!0,deepdeskUrl:l,eventMap:eT(this.store),createCustomChannel:a}),this.store.dispatch(Xc(IA.value())),this.store.dispatch(lf({locale:r,adminUrl:l,productName:s}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){var t;return(t=this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex])!=null?t:null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}externalId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.externalId}shouldAbort(){return this.state.conversation.isSupported===!1?(te.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(te.warn("Profile has not been loaded (yet)"),!0):(te.warn("No conversation loaded (yet)"),!0)}login(){this.store.dispatch(oa(null)),this.store.dispatch(no());let t=n=>Vt(n)&&u1(n)!=="loading";return new Promise(n=>{let r=this.subscribe(t,o=>{o&&(r(),n())});this.unmountHandlers.push(()=>{r()})})}isLoggedIn(){return I(this,null,function*(){return(yield this.store.dispatch(no())).payload})}isConversationSupported(t,n){return I(this,null,function*(){return(yield this.store.dispatch(hy({externalId:t,options:n}))).payload})}createConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(uf(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return I(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(df({externalId:t,options:n}))).payload})}upsertConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(yy(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return I(this,null,function*(){yield this.store.dispatch(vy(t))})}updateConversation(t){return I(this,null,function*(){return(yield this.store.dispatch(ff(t))).payload})}resetConversation(){this.store.dispatch(at()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(lf(t))}setVisitorInfo(t){this.store.dispatch(j1(t))}setCustomData(t){this.store.dispatch(K1(t))}setAgentInfo(t,n){return I(this,null,function*(){yield this.store.dispatch(Xl(S(S({},t),n)))})}setAgentSettings(t){return I(this,null,function*(){yield this.store.dispatch(wy(t))})}getAgentSettings(){return I(this,null,function*(){return(yield this.store.dispatch(Sy())).payload})}refresh(){return I(this,null,function*(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.store.dispatch(hf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()}));let t=[];return this.store.dispatch(Ip()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}notifyExternalSuggestion(t){this.store.dispatch(er(t))}evaluateAssistant(t,n){return I(this,null,function*(){let u=n||{},{input:r={},transcript:o,showCuesInWidget:i=!0,includeMetadata:s,expectFormat:a}=u,l=oe(u,["input","transcript","showCuesInWidget","includeMetadata","expectFormat"]);Object.assign(r,l);let c=yield this.store.dispatch(rr({assistantCode:t,expectFormat:a||"json-schema:cues",transcript:o,includeMetadata:s,input:r,skipState:!i}));if(c.error)throw new Error(c.error.message);return c.payload})}evaluateConversationAssistant(t,n){return I(this,null,function*(){yield this.loadProfileConfig();let r=this.state.profile.data;if(!r){te.warn("Can't evaluate assistant when profile is not loaded yet.");return}let i=r[{accepted:"conversationAcceptedAssistant","new-message":"conversationNewMessageAssistant",ended:"conversationEndedAssistant"}[t]];if(!i){te.warn(`No assistant set in profile for conversation event "${t}"`);return}yield this.evaluateAssistant(i,S({includeMetadata:!0},n))})}getSummary(){return I(this,arguments,function*(t={}){var r;if(!this.hasConversation())return te.warn("No conversation to create summary for."),null;(r=this.state.profile.data)!=null&&r.summarizerAssistantNew||te.warn("No profile loaded yet, or no summarizer assistant set in profile");let n=yield this.store.dispatch(nr(t));if(n.error)throw new Error(n.error.message);return n.payload})}handleKeyDown(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui,{textSuggestions:o,selectedSuggestionIndex:i,selection:s}=this.state.input,{inlineSuggestions:a,showTextSuggestions:l}=this.settings,c=a?"below":"above",u=o.length>0;if(this.store.dispatch(_1(xy(t))),!Mr(this.state)||t.key!=="Tab"&&!l)return;let d=()=>{n||!u||s&&(t.shiftKey||(this.store.dispatch(M1()),t.preventDefault()))},f=()=>{n||!u||a&&i<=0||s&&(t.shiftKey||(this.store.dispatch(D1()),t.preventDefault()))};switch(t.key){case"ArrowUp":c==="below"?f():d();break;case"ArrowDown":{c==="below"?d():f();break}case"Escape":{n||(this.store.dispatch(gf(-1)),this.store.dispatch(oi({collapse:!0})),this.store.dispatch(MR(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let p=aa(this.state);if(!p)return;this.store.dispatch(Xc(!1)),this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"}));break}case" ":{if(this.settings.inlineSuggestions||this.state.input.selectedSuggestionIndex===-1)return;let p=aa(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"space"},replace:"until-selection-end"}));break}case"Enter":{if(this.settings.inlineSuggestions||t.shiftKey||this.state.input.selectedSuggestionIndex===-1)return;let p=aa(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(oi({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Xo([]))}handlingTimeStart(){this.state.handlingTime.startTime||(te.info("Start handling time"),this.store.dispatch(iA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(te.info("Stop handling time"),this.store.dispatch(am()))}logSendMessage(t){let n=yA("input",this.state,{version:this.version});n&&(t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n))}logHandlingTime(){let t=hA(this.state,{version:this.version});t&&(this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(sA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Mi((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(z1()))}emit(t,n){let r=this.eventListeners[t];r&&r.forEach(o=>{try{o(n)}catch(i){te.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),te.error(i)}})}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),()=>{this.off(t,n)}}off(t,n){if(!t&&!n){this.eventListeners={};return}let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}setConversationQuery(t){this.dynamicThunkObject.conversationQuery=t}setPlatformVariables(t){this.store.dispatch(W1(t))}whenConversationLoaded(t){let n=o=>{var i;return(i=o.conversation.current)==null?void 0:i.id},r=()=>this.loadProfileConfig().then(()=>t());n(this.state)&&r(),this.subscribe(n,o=>{o&&r()})}overlayContainerFactory(t,n,r,o){let[i,s]=au(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),[i,s]}createInlineContainer(t,n){var a;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(a=t.ownerDocument.defaultView)==null?void 0:a.frameElement,s=i?i.ownerDocument.defaultView:null;if(i&&(s===window||(s==null?void 0:s.parent)===window)){let[l,c]=au(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});l.dataset.testid=n,l.style.zIndex="2",l.appendChild(r),this.unmountHandlers.push(()=>{c()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ts(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),te.info(`Stored analytics for ${this.conversationId()}`)}catch(t){}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(te.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(F1(r.metrics))):te.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch(t){}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!cm(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let f=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s,inputMediator:a}=f,l=oe(f,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),ts(t),this.inputMediator=a||(ds(t)?new ms(t):new ps(t)),this.inputMediator.on("change",({plainText:p,rawHTML:v})=>{this.store.dispatch(hf({text:p,html:v}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(O1(xy(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:v})=>{this.store.dispatch(N1({text:p,selectionText:v}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(L1(p))});let u;this.inputMediator.on("selection",p=>{clearTimeout(u),p===null?u=setTimeout(()=>{p!==null&&this.store.dispatch(yf(p))},500):this.store.dispatch(yf(p))}),this.inputMediator.on("disabled",()=>{var p;(p=this.inputMediator)==null||p.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{this.settings.detectSubmit&&this.notifySubmit()}),this.inputMediator.on("blur",()=>{this.store.dispatch(Op(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(Op(!0))}),this.renderSuggestions(t,c),this.subscribe(ql("inlineSuggestions"),()=>{this.renderSuggestions(t,c)});let d=this.renderOverlays(n);this.unmountHandlers.push(()=>{d.unmount()}),this.store.dispatch(hf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()})),this.store.dispatch(yf(this.inputMediator.getSelection())),this.store.dispatch(Op(this.inputMediator.isFocused)),this.unmountHandlers.push(()=>{this.state.input.text!==""&&this.storeMetrics()}),this.whenConversationLoaded(()=>{var p;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setExternalId((p=this.state.conversation.current)==null?void 0:p.externalId)}),this.isMounted=!0}subscribe(t,n){let r=t(this.store.getState());return this.store.subscribe(()=>{let o=t(this.store.getState());o!==r&&(r=o,n(r))})}unmount(){var t,n,r,o;(t=this.inlineSuggestions)==null||t.unmount(),(n=this.aboveSuggestions)==null||n.unmount(),(r=this.floatingMenu)==null||r.unmount(),this.unmountHandlers.forEach(i=>i()),this.unmountHandlers=[],(o=this.inputMediator)==null||o.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderSuggestions(t,n){var r,o,i;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(i=this.aboveSuggestions)==null||i.unmount(),this.settings.floatingMenu&&(this.floatingMenu=this.renderFloatingMenu(t,n)),this.settings.inlineSuggestions?this.inlineSuggestions=this.renderInlineSuggestions(t,n):this.aboveSuggestions=this.renderAboveSuggestions(t,n)}renderInlineSuggestions(t,n){let{customStyles:r}=n,o=this.createInlineContainer(t,"deepdesk-caret"),i=(0,di.createRoot)(o);i.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(KR,{})})}));let s=a=>{a?(o.style.display="block",o.style.top=`${a.top}px`,o.style.left=`${a.left}px`):o.style.display="none"};return this.inputMediator.on("caretposition",s),{unmount:()=>{var a;(a=this.inputMediator)==null||a.off("caretposition",s),i.unmount(),o.remove()}}}renderAboveSuggestions(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i}=n,s=o&&M0(t,o)||void 0,[a,l]=this.overlayContainerFactory("deepdesk-tab-completion",s||t,{appendTo:i,closestScrollElement:s,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),[c,u]=this.overlayContainerFactory("deepdesk-suggestions-overlay",s||t,{appendTo:i},r==null?void 0:r.suggestionsRootNode),d=(0,di.createRoot)(a);d.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(hP,{inputElement:t})})}));let f=(0,di.createRoot)(c);return f.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(eP,{onLogIn:()=>this.loginViaPopup().catch(p=>te.warn(p.message))})})})),{unmount(){d.unmount(),f.unmount(),l(),u()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i,floatingMenuParent:s}=n,a=o&&M0(t,o)||void 0,[l,c]=this.overlayContainerFactory("floating-menu",a||t,{appendTo:s!=null?s:i},r==null?void 0:r.floatingMenuParent),u=(0,di.createRoot)(l);return u.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(OR,{onLogIn:()=>this.loginViaPopup().catch(d=>te.warn(d.message))})})})),{unmount(){u.unmount(),c()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays"),o=(0,di.createRoot)(r);return o.render((0,Le.jsx)(si,{store:this.store,customStyles:n,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(PR,{})})})),{unmount(){o.unmount(),r.remove()}}}renderWidget(t,n={}){if(this.widgetElement&&te.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetElement=t,this.configure({showImages:o,isEmbedded:i}),this.widgetRoot=(0,di.createRoot)(t),this.widgetRoot.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(GP,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(s=>te.warn(s.message))})})})),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setExternalId((s=this.state.conversation.current)==null?void 0:s.externalId)})}unmountWidget(){var t,n;(t=this.widgetRoot)==null||t.unmount(),this.widgetRoot=null,(n=this.widgetElement)==null||n.remove(),this.widgetElement=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:i}=r,s=(0,di.createRoot)(n);return s.render((0,Le.jsx)(si,{store:this.store,customStyles:o,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(C0,{children:(0,Le.jsxs)(tm,{assistantCode:t,initialQuestion:i,evaluateKnowledgeAssistFn:r.isLegacyKnowledgeAssist?zi:Hi,children:[(0,Le.jsx)(Es,{children:(0,Le.jsx)(rm,{emptyState:r.emptyState})}),(0,Le.jsx)(T0,{children:(0,Le.jsx)(nm,{})})]})})})})),{unmount(){s.unmount()}}}setupHandlingTime(t){let n=fm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){vA(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(()=>I(this,null,function*(){yield this.store.dispatch(mc());let t=Bi(this.state);t&&this.store.dispatch(lf({showSearch:t.search,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:!!t.summarizerAssistantNew||t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistantNew||!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions}))})),this.loadProfileConfigPromise)}loginViaPopup(t){return I(this,null,function*(){return new Promise((n,r)=>{let o=new MessageChannel,i=o.port1,s=this.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,c=()=>{u&&!u.closed&&u.close(),window.removeEventListener("message",d),clearInterval(f)};i.onmessage=p=>I(this,null,function*(){var v,m;if((v=p.data)!=null&&v.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((m=p.data)==null?void 0:m.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(Zl),l=!0,o.port1.close(),n()}catch(x){console.error(x),r(x)}finally{l=!0,c()}});let u=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");u===null&&r(new Error("Popup blocked by browser"));let d=p=>I(this,null,function*(){var v;if(p.origin===a.origin)switch((v=p.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{try{let m=JSON.stringify({type:"deepdesk-popup-create-channel"});u==null||u.postMessage(m,a.origin,[o.port2])}catch(m){te.error("Error posting message to popup",m),r(m)}break}case"deepdesk-popup-error":{c(),p.data.message==="Timeout"&&te.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}});window.addEventListener("message",d);let f=setInterval(()=>{u&&!u.closed||(c(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(c)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}checkForTrialMode(t){return I(this,null,function*(){try{let{account:n}=yield this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(te.info("Trial is active"),!(yield this.deepdeskApi.checkUserExists(t)))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;te.info(r),this.shouldRender=!1}})}refreshWidgetSuggestions(){return I(this,null,function*(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=gc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(dr()):Ru.includes(r)||this.store.dispatch(hr(r))})}catch(r){this.handleError(r)}})}};ja.version="17.0.0-rc.9",ja.count=0;var lu=ja;function WF(e){return I(this,null,function*(){var o,i,s;let n=yield((o=e.fetch)!=null?o:window.fetch)(e.url),r=yield n.blob();return new File([r],e.name,{type:(s=(i=e.mimeType)!=null?i:n.headers.get("Content-Type"))!=null?s:"image/jpeg"})})}function LA(e,t){return I(this,null,function*(){let n=yield WF(t),r=new Event("change",{bubbles:!0,cancelable:!0});try{Object.defineProperty(e,"files",{configurable:!0,get:()=>[n]}),e.dispatchEvent(r)}finally{Object.hasOwn(e,"files")&&delete e.files}})}function _A(e,t,n){return I(this,null,function*(){yield new Eo(e).authenticateWithKey(t,n)})}function OA(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function NA(r,o){return I(this,arguments,function*(e,t,n={}){var d,f;let{value:i}=e,{start:s,end:a}=(d=n.replace)!=null?d:{start:0,end:i.length},l=`${i.slice(0,s)}${t}${i.slice(a)}`,c=(f=n.selectionAfter)!=null?f:{start:s+t.length,end:s+t.length},u=()=>{if(n.setValue)return n.setValue(l);e.value=l};return Promise.resolve(u()).then(()=>{e.selectionStart=c.start,e.selectionEnd=c.end,e.blur(),e.focus()})})}function MA(r,o){return I(this,arguments,function*(e,t,n={}){let i=n.replace?ci(e,n.replace.start,n.replace.end):Ba(e),s,a=()=>{if(n.setRange)return n.setRange(i.cloneRange());i.deleteContents(),s=document.createElement("span"),i.insertNode(s),n.insertBRs!==!1?t.split(`
83
- `).reverse().forEach((l,c)=>{c>0&&i.insertNode(document.createElement("br")),i.insertNode(document.createTextNode(l))}):i.insertNode(document.createTextNode(t))};return Promise.resolve(a()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let l=n.selectionAfter?ci(e,n.selectionAfter.start,n.selectionAfter.end):(i.collapse(!1),i),c=window.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(l)}if(!s)return;s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}function qF(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function GF(e){let t=document.createDocumentFragment();return e.split(`
84
- `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function DA(e,t){let n=e.parentElement;if(!n){console.warn("No insert point found");return}let{display:r}=window.getComputedStyle(n);r.includes("block")||r==="table-cell"?n==null||n.insertBefore(t,e.nextSibling):DA(n,t)}function FA(o,i){return I(this,arguments,function*(e,t,{isBlock:n,isHTML:r}={}){let s;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let a=()=>{var f;let l=(f=e.ownerDocument.defaultView)!=null?f:window,c=l.getSelection();if((!c||c.rangeCount===0)&&(e.focus(),c=l.getSelection()),!c||c.rangeCount===0)return;let u=c.getRangeAt(0);if(!u)return;s=document.createElement("span"),u.insertNode(s);let d=r?qF(t):GF(t);n?DA(u.startContainer,d):(u.insertNode(d),u.collapse(!1))};return Promise.resolve(a()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!s)try{s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}return QA(YF);})();
80
+ c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var r0=b(R()),m4={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},IR=({className:e,color:t})=>(0,r0.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r0.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:m4[t||"pink"]})});var LR={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var o0={};kt(o0,{enUS:()=>g4,nlNL:()=>h4});var g4={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},h4={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var us=b(R()),NR=({onLogIn:e})=>{let t=ue(o0),n=te("floatingMenu"),r=te("productName"),o=ve(),i=j($t),s=_("FloatingMenu",LR);if(i===null||n===!1)return null;let a=()=>{i===!0?o(Fn(!0)):e()};return(0,us.jsxs)("button",{type:"button",className:(0,OR.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,us.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,us.jsxs)("div",{className:s.icon,children:[(0,us.jsx)(IR,{className:s.logo,color:"pink"}),i===!1&&(0,us.jsx)(AR,{className:s.lock})]})]})};var Fp=b(Q());function Mr(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input;return i.start!==i.end?!1:i.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(i.end))||r&&new RegExp(r).test(o.substring(0,i.end))?!0:n===!1&&r===!1:!1}var y4={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},Mp=({ui:e})=>e.overlayCollapsed,MR=ke({name:"ui",initialState:y4,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputFocus(e,t){e.overlayCollapsedUserOverwrite!==!0&&(t.payload===!0&&(e.overlayCollapsed=!1),e.inputHasFocus=t.payload)},setOverlayCollapsed(e,t){t.payload.collapse===!1&&(e.openOverlayWhenTyping=!1),!(t.payload.skipWhenInputFocus&&e.inputHasFocus)&&(e.overlayCollapsed=t.payload.collapse)},setOpenOverlayWhenTyping(e,t){e.openOverlayWhenTyping=t.payload},setOverlayCollapsedUserOverwrite(e,t){e.overlayCollapsedUserOverwrite=t.payload,e.overlayCollapsed=t.payload}}}),{setShowTabHint:Xc,setInputFocus:_p,setOverlayCollapsed:oi,setOpenOverlayWhenTyping:_R,setOverlayCollapsedUserOverwrite:DR}=MR.actions,FR=MR.reducer;var VR=b(Q());var ii=b(Q());var zR=b(Q());function HR(e,t,n){(0,zR.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var BR={root:"dd-1MBCO",actions:"dd--x4cy",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var ds=b(R()),x4=["search","personal-collection-search","search-autocomplete"];function w4(e,t,n,r={}){var i;let o="";return x4.includes(t)?o=UT(Xy(e,n,{stripAgentPart:!0}),(i=r.searchKeywords)!=null?i:[n]):o=Xy(e,n,r),r.placeholders===!0&&(o=VT(o)),o}var S4=()=>{},b4=({selected:e,suggestion:t})=>{let n=te("inlineSuggestions"),r=j(aa),[o,i]=(0,ii.useState)(!1),s=te("enableSuggestionFeedback"),a=j(f=>f.input.text),l=ve(),c=_("TextSuggestion",BR),u=(0,ii.useRef)(null);(0,ii.useEffect)(()=>{let f=setTimeout(()=>{l(A1({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(f)}},[t]),HR(u,"click",()=>{l(er({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let d=(0,ii.useMemo)(()=>w4(t.text,t.source,r,{stripAgentPart:n,placeholders:!0,searchKeywords:t.searchKeywords}),[n,t.text,t.source,r,t.searchKeywords]);return t.source==="gpt"&&!n?null:(0,ds.jsxs)("div",{className:c.root,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,ds.jsx)(ye,{ref:u,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:S4,children:(0,ds.jsx)(Ki,{containerTagName:"div",noWrap:!1,tagName:"span",className:c.formattedText,content:d})}),s&&o&&(0,ds.jsx)("div",{className:c.actions,children:(0,ds.jsx)(Ip,{source:"overlay",context:a,suggestion:t})})]})},UR=b4;var $R=b(R()),E4=({suggestions:e,selectedIndex:t,reverse:n})=>(0,VR.useMemo)(()=>{let o=e.map((i,s)=>(0,$R.jsx)(UR,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]),Dp=E4;var jR={root:"dd-PfvRI",paper:"dd-HYlyY"};var Qc=b(R()),T4=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Fp.useRef)(null),r=_("InlineSuggestionsOverlay",jR),o=j(Mr),i=ve(),s=j($t),a=j(sa),l=j(Mp),c=te("showTextSuggestions");return ri(()=>{setTimeout(()=>{i(oi({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Fp.useEffect)(()=>{let u=n.current;if(!u||!u.parentElement)return;u.parentElement.style.left="0px";let d=u.getBoundingClientRect();u.parentElement.style.left=`${Math.min(window.innerWidth-4-d.right,0)}px`}),l||!o||!c||e.length===0||s!==!0||a===!1?null:(0,Qc.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Qc.jsx)("div",{ref:n,className:r.paper,children:(0,Qc.jsx)(Ht,{children:(0,Qc.jsx)(Dp,{suggestions:e,selectedIndex:t})})})})},C4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),WR=oa(C4)(T4);var Zc=b(R()),k4=({children:e})=>{let n=te("locale").replace("-","");return(0,Zc.jsx)(_y.Provider,{value:n,children:e})},R4=({store:e,customStyles:t={},children:n})=>(0,Zc.jsx)(r1,{store:e,children:(0,Zc.jsx)(k4,{children:(0,Zc.jsx)(Ya.Provider,{value:t,children:n})})}),si=R4;var Hp=b(Me()),Ma=b(Q());var KR=b(Q());function GR(e,t){let[n,r]=(0,KR.useState)(()=>{if(typeof window=="undefined")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return ee.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window!="undefined"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){ee.error(s)}}]}var qR=()=>/Mac/i.test(navigator.platform);var XR=b(Me()),ho=b(Q());var i0={};kt(i0,{enUS:()=>P4,nlNL:()=>A4});var P4={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Sign in"}]},{type:0,value:" to enable "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze for "},{type:8,value:"min",children:[{type:0,value:"10 minutes"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 hour"}]},{type:0,value:" or "},{type:8,value:"day",children:[{type:0,value:"1 day"}]}]},A4={loginPlease:[{type:8,value:"login",children:[{type:0,value:"Log in"}]},{type:0,value:" bij "},{type:1,value:"productName"},{type:0,value:"."}],snooze:[{type:0,value:"Snooze voor "},{type:8,value:"min",children:[{type:0,value:"10 minuten"}]},{type:0,value:", "},{type:8,value:"hour",children:[{type:0,value:"1 uur"}]},{type:0,value:" of "},{type:8,value:"day",children:[{type:0,value:"1 dag"}]}]};var YR={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var ai=b(R()),s0=(e,t,n)=>r=>(0,ai.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),I4=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=ue(i0),s=un(),a=_("Login",YR),l=te("productName"),c=(0,ho.useCallback)(x=>{x.preventDefault(),r&&r(Number.parseInt(x.target.value,10))},[]),u=(0,ho.useCallback)(x=>{x.preventDefault(),s.send(ua,!0)},[t]),d=(0,ho.useMemo)(()=>x=>(0,ai.jsx)("a",{onClick:m=>{m.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:x},"login"),[t]),f=(0,ho.useCallback)(x=>(0,ai.jsx)("button",{type:"button",className:a.anchorButton,onClick:u,children:x},"prompt"),[u]),{min:p,hour:v,day:g}=(0,ho.useMemo)(()=>({min:s0(a,60*10,c),hour:s0(a,60*60,c),day:s0(a,60*60*12,c)}),[]);return(0,ai.jsxs)("div",{className:(0,XR.default)(e,a.root),children:[i("loginPlease",{login:n?f:d,productName:l}),r&&(0,ai.jsxs)(ho.Fragment,{children:[(0,ai.jsx)("br",{}),i("snooze",{min:p,hour:v,day:g})]})]})},zp=I4;var QR={root:"dd-DoQhb",text:"dd-Jwnev"};var Jc=b(R()),L4=({title:e})=>{let t=_("SearchTrigger",QR),n=ve(),r=ct();return(0,Jc.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(Fn(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,Jc.jsx)(Ca,{}),(0,Jc.jsx)("span",{className:t.text,children:e})]})},ZR=L4;var a0={};kt(a0,{enUS:()=>O4,nlNL:()=>N4});var O4={arrowHint:[{type:0,value:"Tip: use arrow keys to navigate suggestions"}],searchHintWindows:[{type:0,value:"Press CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],searchHintMac:[{type:0,value:"Press CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Close"}],search:[{type:0,value:"Search"}]},N4={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var JR={root:"dd-oa7Vc",isInline:"dd-bwk31",toggleButton:"dd-MSB8Z",toggleButtonWrapper:"dd-ZkCzT",toggleButtonWrapperHidden:"dd-Sq66c",isCollapsed:"dd-vkrPk",collapsible:"dd-CWQJe",hints:"dd-IOoo3",hintsHidden:"dd-psVuT",triggers:"dd-toIoo",triggersRight:"dd-mc4l2"};var Ve=b(R()),M4=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=_("SuggestionsOverlay",JR),o=ue(a0),i=j(Mr),s=P1(),a=ve(),l=(0,Ma.useRef)(null),c=te("searchTriggerKey"),u=te("productName"),d=j(Mp),f=j($t),p=j(sa),[v,g]=(0,Ma.useState)(null),x=te("showSearch"),y=te("showTextSuggestions"),m=te("adminUrl"),h=te("isEmbedded"),[w,E]=GR("dd-snooze-until-ms",0),C=d||w>Date.now(),k=e.filter(M=>M.source!=="gpt").length,A=()=>{C&&E(0),a(DR(!C))},B=M=>{let N=Date.now()+M*1e3;E(N),ee.info(`Snooze until: ${new Date(N)}`),a(oi({collapse:!0}))};return(0,Ma.useEffect)(()=>{k===0&&g(null)},[e,k]),ri(()=>{a(oi({collapse:!0,skipWhenInputFocus:!0}))}),f===null||p===!1?null:f===!1?(0,Ve.jsxs)("div",{ref:l,className:(0,Hp.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Ve.jsxs)("div",{className:r.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1}}),(0,Ve.jsx)("div",{className:r.triggersRight,children:(0,Ve.jsx)(yi,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(yi,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),(0,Ve.jsx)("div",{className:r.collapsible,children:(0,Ve.jsx)(zp,{loginUrl:m,isEmbedded:h,onLogIn:n,onSnooze:B})})]}):!s||!i?null:(0,Ve.jsxs)("div",{ref:l,className:(0,Hp.default)(r.root,{[r.isCollapsed]:C}),children:[!C&&(0,Ve.jsxs)("div",{className:r.triggers,children:[(0,Ve.jsx)("div",{style:{flex:1},children:x&&(0,Ve.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>g(o(qR()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>g(null),children:(0,Ve.jsx)(ZR,{title:o("search")})})}),(0,Ve.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Ve.jsx)("div",{className:(0,Hp.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,Ve.jsx)(yi,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})]})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(yi,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),k>0&&y&&(0,Ve.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Ve.jsx)(Ht,{children:(0,Ve.jsx)(Dp,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},_4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),eP=oa(_4)(M4);var Qp=b(Me());var xo=b(Q());var _a=b(Q());function Bp(e){return e.contentEditable==="true"}function D4(e){let t=0,n=0,r=window.getSelection();if(r.rangeCount!==0){let o=r.getRangeAt(0),i=o.cloneRange();i.selectNodeContents(e),i.setEnd(o.endContainer,o.endOffset),n=i.toString().length,i.selectNodeContents(e),i.setEnd(o.startContainer,o.startOffset),t=i.toString().length}return{selectionStart:t,selectionEnd:n}}function tP(e){let{selectionStart:t,selectionEnd:n}=Bp(e)?D4(e):e;return[t,n]}function nP(e){let[,t]=(0,_a.useState)(),n=(0,_a.useRef)(null);return n.current=tP(e),(0,_a.useEffect)(()=>{let r=()=>{var a;let[o,i]=(a=n.current)!=null?a:[],s=tP(e);(!s||o!==s[0]||i!==s[1])&&(n.current=s,t({}))};return e.addEventListener("keyup",r),e.addEventListener("click",r),e.addEventListener("focus",r),document.addEventListener("selectionchange",r),()=>{e.removeEventListener("keyup",r),e.removeEventListener("click",r),e.removeEventListener("focus",r),document.removeEventListener("selectionchange",r)}},[e]),n.current}function rP(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Pu);if(!s||s.length===0)return;let a=0;s.find(l=>{let c=r.indexOf(l,a);return o>c&&i<c+l.length?(n.selectionStart=c,n.selectionEnd=c+l.length,!0):(a=c+l.length,!1)})}var oP=b(Q()),F4=["div","span","mark","strong","b","i","u","em"];function l0(e,t,n=0){var i;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(i=r.props)==null?void 0:i.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(F4.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,oP.cloneElement)(r,{children:l0(s,t,n+1)})]}return[...e,...t]}function fs(e){return e.tagName.toLowerCase()==="textarea"}var iP={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var uP=b(Me());var Kp=b(Q());var Da=b(Q());function sP(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Up(e){let t=(0,Da.useRef)(null),[n,r]=(0,Da.useState)(!1);return(0,Da.useEffect)(()=>{var u;let o=!1,i=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[s,a]=sP((d,f)=>{let p=t.current;if(!p)return;let v=d/i,g=f/i,x=p.getBoundingClientRect(),y=v>x.x&&v<x.x+x.width&&g>x.y&&g<x.y+x.height;y&&!o?(o=!0,r(!0)):!y&&o&&(o=!1,r(!1))},({clientX:d,clientY:f})=>[d,f]),[l,c]=sP(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),c(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function aP(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Vp(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function lP(e){return e!=null}var cP=b(Me()),$p=b(Q());var yo={root:"dd-7-cgW",container:"dd-PsRQ8",agentText:"dd-qnW-V",tabText:"dd-cUHUr",hint:"dd-v7fSg",matchSelection:"dd-8cr8y",focus:"dd-3tr9l",resetIndent:"dd-TvQfZ",matchKeyword:"dd-oJkRD",matchPlaceholder:"dd-QvNoo",hover:"dd--wi0R",hintText:"dd-7gQQh",popover:"dd-xbRu-",popoverRoot:"dd-rA2x8",popoverContentContainer:"dd-JHICl",popoverContent:"dd--mfkC",selectionOptions:"dd-p52wn",selectionOptionsIsHidden:"dd-sSTDp",selectionOptionsButton:"dd-Q6kRY",caret:"dd-jIhc8",popoverSuggestionsRoot:"dd-iFDbL",suggestionsOverlayInputStyles:"dd-zzENA"};var c0=b(R()),jp=(0,$p.forwardRef)((o,r)=>{var i=o,{className:e,children:t}=i,n=oe(i,["className","children"]);let s=(0,$p.useRef)(null),a=_("TabCompletion",yo);return(0,c0.jsx)("div",P(S({ref:Vp([s,r]),className:(0,cP.default)(e,a.popoverContentContainer)},n),{children:(0,c0.jsx)("div",{className:a.popoverContent,children:t})}))});var li=b(R()),z4=e=>t=>{let n=$v(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},H4=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=_("TabCompletion",yo),s=Ep(),a=(0,Kp.useMemo)(()=>z4(e.getBoundingClientRect()),[e]),[l,c]=Up(e);return(0,Kp.useEffect)(()=>{c?s.open():s.close()},[c]),(0,li.jsxs)("span",{children:[(0,li.jsx)("mark",{ref:Vp([l,s.triggerRef]),className:(0,uP.default)(i.matchKeyword,{[i.hover]:c}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,li.jsx)(La,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,li.jsx)(jp,{style:n,children:(0,li.jsx)("div",{className:i.hintText,children:o})})})]})},Wp=class extends so{constructor(){super(...arguments);this.keywordMatches=[];this.preparedKeywordMatches=[];this.usedKeywordMatches=new Set}onBeforeParse(n,r){return r.keywordMatches&&r.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=r.keywordMatches.map(o=>P(S({},o),{keywordRegex:new RegExp(`\\b${aP(o.keyword)}\\b`,"i")})),this.keywordMatches=r.keywordMatches),this.usedKeywordMatches.clear(),n}match(n){let r=this.preparedKeywordMatches.map(i=>{if(this.usedKeywordMatches.has(i))return null;let s=n.match(i.keywordRegex);if(!s)return null;let a=n.charAt(s.index-1),l=n.charAt(s.index+i.keyword.length);return a==="{"&&l==="}"?null:{index:s.index,length:s[0].length,match:s[0],matchString:s[0],suggestion:i.suggestion,preparedKeywordMatch:i,valid:!0}}).filter(lP);if(r.length===0)return null;let o=r.reduce((i,s)=>s.index<i.index?s:i);return this.usedKeywordMatches.add(o.preparedKeywordMatch),o}replaceWith(n,r){return(0,li.jsx)(H4,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var dP=b(Me());var u0=b(R()),B4=({inputElement:e,children:t})=>{let n=_("TabCompletion",yo),[r,o]=Up(e);return(0,u0.jsx)("mark",{ref:r,className:(0,dP.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Gp=class extends so{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,u0.jsx)(B4,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Yp=b(Me());var Zt=b(Q());var d0=b(R()),fP=()=>(0,d0.jsx)("svg",{width:"1.3em",height:"1.3em",focusable:"false","aria-hidden":"true",viewBox:"0 0 24 24","data-testid":"InsertLinkIcon",tabIndex:-1,children:(0,d0.jsx)("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"})});var _r=b(Q());var mP=b(By());var pP={root:"dd-ky-Bv",content:"dd-kV5e1"};function qp(e,t,n){var o;let r=((o=e.imageSizes)==null?void 0:o[t])||e.image||n;if(!r)return null;try{return new URL(r).toString()}catch(i){return null}}function f0(e){return e.replace("https://www.","").replace("https://","")}var Vn=b(R()),U4=3,V4=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),$4=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=U4})=>{let i=_("LinkSearch",pP),[s,a]=(0,_r.useState)(""),l=ve(),c=j(xR("url")),u=j(X1("URL")),d=(0,_r.useMemo)(()=>u.map(V4),[u]),[f,p]=(0,_r.useState)(d.length-1),v=te("fallbackImage"),g=h=>{let w=h.target;a(w.value)},x=(h,w)=>{h.stopPropagation(),h.preventDefault(),window.open(w,"_blank")},y=h=>{var C;let w=f-1<0?d.length-1:f-1,E=f+1===d.length?0:f+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&p(w),h.code==="ArrowDown"&&p(E),h.code==="Enter"&&e(((C=d[f])==null?void 0:C.text)||s)},m=(0,_r.useCallback)((0,mP.default)(h=>{l(Fi({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,_r.useEffect)(()=>{s&&m(s)},[s]),(0,_r.useEffect)(()=>()=>{l(Sf())},[]),(0,Vn.jsxs)("div",{className:i.root,children:[(0,Vn.jsx)(Ht,{withDivider:!0,children:(s?d:c).slice(0,o).map((h,w)=>(0,Vn.jsx)(ye,{selected:f===w,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Vn.jsxs)(Te,{children:[(0,Vn.jsx)(Te.Image,{src:qp(h,"small",v||void 0),title:h.title||h.text}),(0,Vn.jsxs)(Te.Content,{className:i.content,cropText:!0,children:[(0,Vn.jsx)(Te.Title,{children:h.title||f0(h.text)}),h.title&&f0(h.text)]}),(0,Vn.jsx)(ye.Actions,{children:(0,Vn.jsx)(ye.ActionButton,{label:r,onClick:E=>x(E,h.text)})})]})},h.text))}),(0,Vn.jsx)(uc,{value:s,onChange:g,autoFocus:!0,placeholder:n,onKeyUp:y})]})},gP=$4;var p0={};kt(p0,{enUS:()=>j4,nlNL:()=>W4});var j4={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},W4={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Qt=b(R()),K4=(0,Zt.forwardRef)((e,t)=>{let n=_("TabCompletion",yo);return(0,Qt.jsx)("mark",{ref:t,className:(0,Yp.default)(n.matchSelection)},"selection-start")}),G4=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=ue(p0),s=_("TabCompletion",yo),a=(0,Zt.useRef)(null),l=(0,Zt.useRef)(null),[c,u]=(0,Zt.useState)(null),d=ve(),f=Ep(document.activeElement===r),[p]=(0,Zt.useState)(()=>document.createRange());f.triggerRef.current=p,(0,Zt.useEffect)(()=>()=>p.detach(),[]),(0,Zt.useEffect)(()=>{let g=e.current,x=a.current;!g||!x||(p.setStart(g,0),p.setEnd(x,0))},[e.current,a.current]),ri(()=>{f.close()});let v=(0,Zt.useCallback)(g=>{let x=p.toString(),y=/^http(s?):\/\//.test(g)?g:`https://${g}`;d(gf({text:`[${x}](${y})`,replace:"selection"}))},[]);return(0,Qt.jsxs)("span",{children:[(0,Qt.jsx)("mark",{ref:a,className:(0,Yp.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":f.opened?"true":"false",children:o}),f.opened&&(0,Qt.jsx)(La,{className:s.popoverRoot,triggerRef:f.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Qt.jsxs)(jp,{style:n,ref:l,children:[(0,Qt.jsx)("div",{className:(0,Yp.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:c!==null}),children:(0,Qt.jsxs)("button",{type:"button",tabIndex:c===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>u("insertLink"),children:[(0,Qt.jsx)(fP,{}),(0,Qt.jsx)("span",{children:"\xA0"}),(0,Qt.jsx)("span",{children:i("insertLink")})]})}),c==="insertLink"&&(0,Qt.jsx)(gP,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{u(null),f.close()}})]})})]},"selection-end")},Xp=class extends so{constructor(){super(...arguments);this.charCount=0;this.foundIndex=0;this.startRef=null}onBeforeParse(n,r){return this.props=r,this.charCount=0,this.startRef=(0,Zt.createRef)(),this.foundIndex=0,n}match(n){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[r,o]=this.props.selection;if(r===o)return null;let i=this.foundIndex===0?r:o,s=i>=this.charCount&&i<=this.charCount+n.length?{index:i-this.charCount,length:0,match:"",valid:!0}:null;s&&this.foundIndex++;let a=this.foundIndex===1;return s&&a?this.charCount+=i-this.charCount:this.charCount+=n.length,s?S({isStart:a},s):null}replaceWith(n,r){return r.isStart?(0,Qt.jsx)(K4,{ref:this.startRef}):(0,Qt.jsx)(G4,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var vo=b(R()),q4=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let c=_("TabCompletion",iP),u=te("insertLink"),d=te("showMidSentenceSuggestions"),f=te("inlineSuggestions"),p=nP(a),v=(0,xo.useRef)(null),g=j($t);(0,xo.useEffect)(()=>{fs(a)&&p&&rP(a,p)},[p]);let x=(0,xo.useCallback)(h=>{if(!o||!n)return h;let w=[(0,vo.jsx)("span",{className:c.resetIndent,children:"\u200B"},"u200B"),(0,vo.jsx)("span",{"data-testid":"tab-completion",className:(0,Qp.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,vo.jsx)("span",{className:(0,Qp.default)(c.hint,c.resetIndent),children:(0,vo.jsx)(ku,{keyCode:"tab"},"tabHint")})),l0(h,w)},[o,n,r]),y=(0,xo.useMemo)(()=>{let h=[];return u&&h.push(new Xp("selection")),h.push(new Gp("placeholders")),i&&h.push(new Wp("keywords")),h},[f,u,i]),m=(0,xo.useMemo)(()=>{let h=window.getComputedStyle(a);return{"--dd-color":h.color,"--dd-font-size":h.fontSize,"--dd-font-family":h.fontFamily,"--dd-font-variant":h.fontVariant}},[]);return!e||!g?null:(0,vo.jsxs)("div",{ref:h=>{h!=null&&h.parentElement&&(v.current=h==null?void 0:h.parentElement)},className:c.root,style:m,children:[(0,vo.jsx)(Ki,{tagName:"span",containerTagName:"div",className:(0,Qp.default)(c.container,c.agentText),disableLineBreaks:fs(a),content:t||"\u200B",onAfterParse:x,matchers:y,selection:p,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!d}),(0,vo.jsx)("br",{})]})},Y4=e=>{var x,y,m;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:i}=e,s=la({input:t}),a=(s==null?void 0:s.text)||"",l=(s==null?void 0:s.source)||"",c=(x=t.html)!=null?x:fa(t.text),u=a.indexOf(t.text)===0?a.slice(t.text.length):"",{showTabHint:d}=n,{isSupported:f}=i,{showTabCompletion:p,visible:v,showStyleSuggestions:g}=r;return{showTabHint:d,showStyleSuggestions:g,showTabCompletion:p&&Mr(e),content:c,tabText:u,source:l,keywordMatches:(m=(y=o.list)==null?void 0:y.keywordMatches)!=null?m:[],enabled:v&&f!==!1}},hP=oa(Y4)(q4);var ci=b(Q());var X4={token:null,interval:null},m0=ge("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>I(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),g0=ge("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(m0()),setInterval(()=>r(m0()),n)}),yP=ke({name:"passwordlessToken",initialState:X4,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(m0.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(g0.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:vP}=yP.actions,xP=yP.reducer;function Q4(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var wP=Dn([ST],e=>e.map(n=>({text:n.response,title:n.name,callToAction:n.callToAction,isLoading:n.isLoading,specialType:n.specialType,rule:{id:Q4(n.code),label:n.code,name:n.name,description:n.name}})));var Zp=b(Q());var y0=b(Me());var h0=b(R()),eu=()=>(0,h0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,h0.jsx)("path",{d:"M502.6 70.63l-61.25-61.25C435.4 3.371 427.2 0 418.7 0H255.1c-35.35 0-64 28.66-64 64l.0195 256C192 355.4 220.7 384 256 384h192c35.2 0 64-28.8 64-64V93.25C512 84.77 508.6 76.63 502.6 70.63zM464 320c0 8.836-7.164 16-16 16H255.1c-8.838 0-16-7.164-16-16L239.1 64.13c0-8.836 7.164-16 16-16h128L384 96c0 17.67 14.33 32 32 32h47.1V320zM272 448c0 8.836-7.164 16-16 16H63.1c-8.838 0-16-7.164-16-16L47.98 192.1c0-8.836 7.164-16 16-16H160V128H63.99c-35.35 0-64 28.65-64 64l.0098 256C.002 483.3 28.66 512 64 512h192c35.2 0 64-28.8 64-64v-32h-47.1L272 448z"})});var SP={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var Dr=b(R()),Z4=({entities:e})=>{let t=_("EntitiesWidgetList",SP),[n,r]=(0,Zp.useState)(void 0),o=ve(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ar(a.text),o(no({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Zp.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Dr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Dr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,Dr.jsx)("span",{className:t.entityText,children:a.text}),(0,Dr.jsxs)("span",{className:t.iconWrapper,children:[(0,Dr.jsx)("span",{className:(0,y0.default)(t.icon),children:(0,Dr.jsx)(eu,{})}),(0,Dr.jsx)("span",{className:(0,y0.default)(t.icon,n===l&&t.iconClicked),children:(0,Dr.jsx)(eu,{})})]})]},a.text))})},bP=Z4;var v0=b(R()),EP=()=>(0,v0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,v0.jsx)("path",{d:"M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9",stroke:"currentColor",strokeWidth:"1.5",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"})});var TP={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var CP={root:"dd-nazq3",rotation:"dd-3EHTv"};var RP=b(R()),J4=({size:e=12})=>{let t=_("LoadingSpinner",CP);return(0,RP.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},kP=J4;var x0=b(R()),PP=()=>(0,x0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,x0.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});var tu=b(R()),AP=e=>(0,tu.jsxs)("svg",P(S({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,tu.jsx)("title",{id:"checkTitle",children:"Check"}),(0,tu.jsx)("path",{fill:"#666",d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})]}));var w0={};kt(w0,{enUS:()=>eF,nlNL:()=>tF});var eF={error:[{type:0,value:"Something went wrong"}]},tF={error:[{type:0,value:"Er ging iets fout"}]};var Rn=b(R()),IP,nF=3e3,rF=({assistantOptions:e})=>{let t=_("OnDemandAssistants",TP),n=ue(w0),r=es(nr),o=es(oo),i=j(RT),s=j(PT),a=ct(),l=s.filter(d=>d.isPinned),c=s.filter(d=>!d.isPinned),u=d=>I(void 0,null,function*(){if(clearTimeout(IP),a("trigger on demand assistant",{assistantCode:d}),d===i){o.call({transcript:e.transcript});return}r.call(P(S({},e),{assistantCode:d})),IP=setTimeout(()=>r.reset(),nF)});return s.length===0?null:(0,Rn.jsxs)("div",{className:t.root,children:[l.map(({assistant:d,assistantName:f})=>(0,Rn.jsx)("button",{type:"button",className:t.button,disabled:r.state==="loading",onClick:()=>u(d),children:f},d)),r.state==="loading"&&(0,Rn.jsx)(kP,{}),r.state==="done"&&(0,Rn.jsx)(AP,{"data-testid":"trigger-done"}),r.state==="error"&&(0,Rn.jsx)(fk,{trigger:(0,Rn.jsx)(PP,{}),children:n("error")}),c.length>0&&r.state==="idle"&&(0,Rn.jsxs)(yt,{placement:"top-end",children:[(0,Rn.jsx)(yt.Trigger,{className:t.trigger,children:(0,Rn.jsx)(Pp,{"data-testid":"trigger"})}),(0,Rn.jsx)(yt.Content,{className:t.nav,"data-testid":"popover",children:c.map(({assistant:d,assistantName:f})=>(0,Rn.jsx)(yt.Button,{className:t.item,disabled:r.state==="loading",onClick:()=>u(d),children:f},d))})]})]})},LP=rF;var MP=b(Q());var OP={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var NP=b(R()),oF=({width:e})=>{let t=_("LoadingProgressBar",OP);return(0,NP.jsx)("div",{className:t.loadingBar,style:{width:e}})},Jp=oF;var wo=b(R()),em=({title:e})=>{let t=(0,MP.useRef)(null);return Lx(t),(0,wo.jsx)(ye,{ref:t,children:(0,wo.jsx)(Te,{children:(0,wo.jsxs)(Te.Content,{children:[(0,wo.jsx)(Te.Title,{children:e}),(0,wo.jsx)(Jp,{width:"60%"}),(0,wo.jsx)(Jp,{width:"90%"}),(0,wo.jsx)(Jp,{width:"50%"})]})})})};var nu={};kt(nu,{enUS:()=>iF,nlNL:()=>sF});var iF={useCue:[{type:0,value:"Add to message"}],__summarizerAssistant__:[{type:0,value:"Summary"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},sF={useCue:[{type:0,value:"Voeg toe aan bericht"}],__summarizerAssistant__:[{type:0,value:"Samenvatting"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};var ps=b(Q());var S0={title:"dd-YBHrC",fadeup:"dd-cRM0K",fadedown:"dd-7D4Pq",selected:"dd-bueui",actions:"dd-9Iqn9",thumbsUp:"dd-6QwVx",thumbsDown:"dd-d3E8l",form:"dd-sPNU2",formInput:"dd-F3E4I",formSubmit:"dd-vw5S0",actionButton:"dd-cCWyJ",editableCue:"dd-nWSD-",inputSpace:"dd-DGYB1"};var Mt=b(R()),aF=500,lF=100,cF=({content:e,onChange:t,onCopy:n})=>{let r=(0,ps.useRef)(null),o=_("WidgetCue",S0);return(0,ps.useEffect)(()=>{let i=r.current;if(!i)return;i.style.setProperty("height","0px");let s=Math.min(Math.max(i.scrollHeight,lF),aF);i.style.setProperty("height",`${s}px`)},[e]),(0,Mt.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},uF=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var g;let i=_("WidgetCue",S0),s=ue(nu),a=ct(),l=te("hasKeyboardInput"),[c,u]=(0,ps.useState)(e.text),d=()=>{t&&t(e),n(e)},f=x=>{r&&r(x,e)},p=x=>{o&&o(x,e)},v=x=>{x.preventDefault(),x.stopPropagation(),n(e)};return(0,ps.useEffect)(()=>{a("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,Mt.jsxs)(ye,{"data-testid":"cue",children:[(0,Mt.jsx)(Te,{children:(0,Mt.jsxs)(Te.Content,{children:[e.title&&(0,Mt.jsx)(Te.Title,{className:i.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?s(e.rule.label):e.title}),e.specialType==="summary"?(0,Mt.jsx)(cF,{content:c,onCopy:()=>{let x=document.getSelection();x&&f(x.toString())},onChange:x=>{var y;return u((y=x.target.value)!=null?y:"")}}):(0,Mt.jsx)(go,{content:e.text,useLabel:s("useCue"),copyLabel:s("copyCue"),onCopy:f,onUse:l?p:void 0})]})}),(0,Mt.jsxs)(ye.ButtonsContainer,{children:[(0,Mt.jsxs)("div",{className:i.actions,children:[e.specialType==="summary"&&(0,Mt.jsx)(ye.Button,{onClick:()=>f(c),children:s("copyCue")}),e.callToAction&&(0,Mt.jsx)(ye.Button,{onClick:d,children:e.callToAction.label}),(0,Mt.jsx)(ye.Button,{onClick:v,children:s("removeCue")})]}),e.specialType==="summary"?(0,Mt.jsx)(ts,{eventName:"summary feedback",feedbackText:(g=e.text)!=null?g:"",feedbackType:"summary",eventData:{summary:e.text}}):(0,Mt.jsx)(ts,{eventName:"Assistant response feedback",eventData:{name:e.rule.name,group:e.rule.label,description:e.rule.description,cueText:e.text},feedbackText:e.text,feedbackType:"assistant"})]})]})},_P=uF;var Fa=b(R()),dF=({cues:e})=>{let t=ve(),n=un(),r=ue(nu),o=ct(),i=c=>{t(ET({code:c.rule.label})),o("Assistant response closed",{name:c.rule.name,group:c.rule.label,description:c.rule.description,cueText:c.text})},s=(c,u)=>{switch(Ar(c),u.specialType){case"summary":o("summary copied to clipboard",{originalText:u.text,finalText:c,assistant:u.rule.label});break;default:o("Assistant response copied",{name:u.rule.name,group:u.rule.label,description:u.rule.description,copiedText:c})}},a=c=>{c.callToAction&&(t(Nf(c)),o("Assistant call to action",{name:c.rule.name,group:c.rule.label,description:c.rule.description,eventName:c.callToAction.event,value:c.callToAction.value}))},l=(c,u)=>{n.send(Pr,{text:c,suggestion:{source:"cue",sourceText:c}}),o("Assistant response used",{name:u.rule.name,group:u.rule.label,description:u.rule.description,usedText:c})};return(0,Fa.jsx)(Fa.Fragment,{children:e.map(c=>c.isLoading?(0,Fa.jsx)(em,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Fa.jsx)(_P,{cue:c,onCallToAction:a,onRemove:i,onCopy:s,onUse:l},c.rule.id))})},DP=dF;var tm=b(Q());var FP={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var hr=b(R());function fF(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var zP=({data:e,schema:t})=>{let n=_("WidgetCustomData",FP),r=o=>{Ar(o)};return(0,tm.useEffect)(()=>{ee.info("Custom data",e,t)},[e]),(0,hr.jsx)("dl",{className:n.root,children:t.map(o=>{let i=fF(e,o.path);return(0,hr.jsxs)(tm.Fragment,{children:[(0,hr.jsx)("dt",{className:n.label,children:o.label}),(0,hr.jsx)("dd",{className:n.value,children:o.type==="boolean"&&i?(0,hr.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!i?(0,hr.jsx)("span",{className:n.isFalse,children:o.falseValue}):typeof i=="string"||typeof i=="number"?(0,hr.jsxs)("button",{type:"button",onClick:()=>r(`${i}`),className:n.copyButton,children:[(0,hr.jsx)("span",{className:n.copyButtonText,children:i}),(0,hr.jsx)(eu,{})]}):"-"})]},o.label)})})};var ut=b(Q());var za={};kt(za,{enUS:()=>pF,nlNL:()=>mF});var pF={inputPlaceholder:[{type:0,value:"What is your question?"}],useCue:[{type:0,value:"Add to message"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Submit"}],resetLabel:[{type:0,value:"Reset"}],showMore:[{type:0,value:"Show "},{type:1,value:"amount"},{type:0,value:" more"}]},mF={inputPlaceholder:[{type:0,value:"Wat is je vraag?"}],useCue:[{type:0,value:"Voeg toe aan bericht"}],copyCue:[{type:0,value:"Kopi\xEBren"}],removeCue:[{type:0,value:"Sluiten"}],thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}],submitLabel:[{type:0,value:"Verzend"}],resetLabel:[{type:0,value:"Gesprek wissen"}],showMore:[{type:0,value:"Toon "},{type:1,value:"amount"},{type:0,value:" meer"}]};var nm={form:"dd-pleCH",formInput:"dd-pGJMY",formSubmit:"dd--gkRg",actionButton:"dd-I2NEH",resetContainer:"dd-qKIDX",sources:"dd-xf9c6",source:"dd-a-vyX",tooltip:"dd-EsgcZ",linkContent:"dd-gARDA",showMoreSources:"dd-uDGi-"};var we=b(R()),gF=3,hF=({sources:e,onClick:t})=>{let n=ue(za),r=_("WidgetKnowledgeAssistant",nm),[o,i]=(0,ut.useState)(!1),s=o?e:e.slice(0,gF);return s.length===0?null:(0,we.jsxs)("ul",{className:r.sources,children:[s.map(a=>(0,we.jsx)("li",{className:r.source,"data-testid":"knowledge-assist-source",children:(0,we.jsxs)(yt,{tooltip:!0,placement:"top-start",children:[(0,we.jsx)(yt.Trigger,{as:"a",rel:"noreferrer",target:"_blank",href:a.url,onClick:l=>{l.stopPropagation(),t(a)},children:(0,we.jsx)("span",{className:r.linkContent,children:a.name})}),a.url&&(0,we.jsx)(yt.Content,{className:r.tooltip,children:decodeURIComponent(a.url)})]})},a.name)),s<e&&(0,we.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>i(!0),children:n("showMore",{amount:e.length-s.length})})]})},yF=({title:e,description:t})=>(0,we.jsx)(ye,{"data-testid":"knowledge-assist-empty-state",children:(0,we.jsx)(Te,{children:(0,we.jsxs)(Te.Content,{children:[(0,we.jsx)(Te.Title,{children:e}),(0,we.jsx)(go,{content:t})]})})}),vF=({innerRef:e,item:t,index:n,hasKeyboardInput:r,onCopy:o,onUse:i,onSourceClick:s})=>{var l;let a=ue(za);return(0,we.jsxs)(ye,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,we.jsx)(Te,{children:(0,we.jsxs)(Te.Content,{children:[(0,we.jsx)(Te.Title,{children:t.question}),(0,we.jsx)(go,{content:t.answer.answer,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:o,onUse:r?i:void 0}),(0,we.jsx)(hF,{sources:(l=t.answer.sources)!=null?l:[],onClick:c=>s(c,t.question)})]})}),(0,we.jsxs)(ye.ButtonsContainer,{children:[(0,we.jsx)("div",{}),(0,we.jsx)(ts,{eventName:"knowledge assist feedback",eventData:{question:t.question,isFollowUpQuestion:n>0,isAgent:!0,answer:t.answer.answer},feedbackText:t.answer.answer,feedbackType:"assistant"})]})]})},b0=(0,ut.createContext)(null),rm=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,i]=(0,ut.useState)(null),[s,a]=(0,ut.useState)(!1),[l,c]=(0,ut.useState)(!!n),[u,d]=(0,ut.useState)(null),f=ve(),p=ct(),v=es(y=>{if(!e)throw new Error("No knowledge assistant was defined");return t({assistantCode:e,input:y,threadId:o,onNewThreadId(m){i(m)}})},{onSuccess(y){var m;p("knowledge assist question answered",{question:y.question,answer:y.answer.answer,sources:(m=y.answer.sources)!=null?m:[],isFollowUpQuestion:y.threadId===o,isAutoInitiated:l}),c(!1)}}),g=y=>I(void 0,null,function*(){a(!0),d(y),yield v.call(y),a(!1),d(null)}),x={isEnabled:!!e,isSubmitting:s,threadId:o,pendingInput:u,onSubmit:g,onReset(){o&&f(da(o)),i(null)}};return(0,ut.useEffect)(()=>{n&&g(n)},[n]),(0,we.jsx)(b0.Provider,{value:x,children:r})},om=()=>{let e=ue(za),t=_("WidgetKnowledgeAssistant",nm),n=(0,ut.useContext)(b0),r=(0,ut.useRef)(null),[o,i]=(0,ut.useState)(""),s=l=>{i(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var c;r.current&&((c=r.current)==null||c.focus(),i(""))})};return n.isEnabled?(0,we.jsxs)("form",{className:t.form,onSubmit:a,children:[(0,we.jsx)("input",{ref:r,className:t.formInput,placeholder:e("inputPlaceholder"),type:"text",disabled:n.isSubmitting,value:o,onChange:s}),(0,we.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},im=({title:e,emptyState:t})=>{var v,g;let n=ue(za),r=ct(),o=_("WidgetKnowledgeAssistant",nm),i=(0,ut.useRef)(null),s=(0,ut.useContext)(b0),a=(g=j(fc((v=s.threadId)!=null?v:-1)))!=null?g:[],l=te("hasKeyboardInput"),c=un(),u=x=>{Ar(x),r("Assistant response copied",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",copiedText:x})},d=(x,y)=>{r("knowledge assist source viewed",{question:y,sourceViewed:x.url||x.name})},f=x=>{var y;x.preventDefault(),s.onReset(),r("knowledge assist reset",{threadId:(y=s.threadId)!=null?y:void 0})},p=x=>{c.send(Pr,{text:x,suggestion:{source:"cue",sourceText:x}}),r("Assistant response used",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",usedText:x})};return!s.isEnabled||(a==null?void 0:a.length)===0&&!s.isSubmitting&&!t?null:(0,we.jsxs)(ut.Fragment,{children:[(0,we.jsx)(wr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,we.jsxs)(Ht,{withDivider:!0,children:[t&&a.length===0&&!s.pendingInput&&(0,we.jsx)(yF,S({},t)),a.map((x,y)=>(0,we.jsx)(vF,{innerRef:y===a.length-1?i:void 0,item:x,index:y,hasKeyboardInput:l,onCopy:u,onUse:p,onSourceClick:d},`${x.question}_${x.answer}_${y}`)),s.pendingInput&&(0,we.jsx)(em,{title:s.pendingInput})]})}),a.length>0&&(0,we.jsx)("div",{className:o.resetContainer,children:(0,we.jsx)(ye.Button,{disabled:s.threadId===null||s.isSubmitting,onClick:f,children:n("resetLabel")})})]})};var UP=b(Q());var xF=/(https?:\/\/[^\s]+)/,BP=e=>e.split(" ").find(t=>xF.test(t));var $n=b(R()),wF=({suggestion:e,lines:t,onUse:n})=>{var d;let r=e.text||e.url||e.message,o=BP(r),i=ue(Kc),s=te("showImages"),a=te("fallbackImage"),l=te("hasKeyboardInput"),c=f=>{f.preventDefault(),f.stopPropagation(),l&&n(r)},u=(0,UP.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$n.jsxs)(ye,{onClick:l?c:void 0,"data-testid":"edit-suggestion",children:[(0,$n.jsxs)(Te,{children:[s&&e.image&&(0,$n.jsx)(Te.Image,{src:qp(e,"small",a||void 0),title:e.title}),(0,$n.jsxs)(Te.Content,{children:[e.title&&(0,$n.jsx)(Te.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,$n.jsx)(ye.Labels,{labels:e.searchKeywords}),(0,$n.jsx)(Te.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$n.jsxs)(ye.Actions,{children:[o&&(0,$n.jsx)(ye.ActionButton,{onClick:u,label:i("visitUrl")}),l&&(0,$n.jsx)(ye.ActionButton,{primary:!0,onClick:c,label:i("useSuggestion")})]})]})},VP=wF;var ru=b(R()),SF=({lines:e,suggestions:t})=>{let n=un(),r=(o,i)=>{n.send(Pr,{text:o,suggestion:P(S({},i),{source:i.source,sourceText:i.text})})};return(0,ru.jsx)(ru.Fragment,{children:t.map(o=>(0,ru.jsx)(VP,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},$P=SF;var ou={};kt(ou,{enUS:()=>bF,nlNL:()=>EF});var bF={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}],close:[{type:0,value:"Close"}]},EF={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}],close:[{type:0,value:"Sluiten"}]};var Ha={root:"dd-W9VCG",loginText:"dd--dS6t",stateText:"dd-348OC",footer:"dd-tvofr",shortcutList:"dd-MuKK-",shortcut:"dd-5CnK9",footerShortcut:"dd-dH7XJ",link:"dd-DRo0x"};var ce=b(R()),WP=(e,t)=>{let n=j($t);(0,ci.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},TF=({onLogIn:e})=>{let t=_("Widget",Ha),n=te("isEmbedded"),r=te("adminUrl");return(0,ce.jsx)("div",{className:t.loginText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)(zp,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},jP=({text:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.stateText,children:(0,ce.jsx)("div",{children:(0,ce.jsx)("p",{children:e})})},"notification")},CF=()=>{let e=ue(ou),t=ve(),n=_("Widget",Ha),r=te("showSearch"),o=te("isEmbedded"),i=j(Aa("/admin/")),s=un(),a=te("productName"),l=ct();return WP(()=>{if(o)return t(g0()),()=>{t(vP())}},[t,o]),!r&&!i?null:(0,ce.jsxs)("div",{className:n.shortcutList,children:[r&&(0,ce.jsx)(ye.Button,{"data-testid":"shortcut-search","aria-label":e("linkSearch"),className:n.shortcut,icon:(0,ce.jsx)(Ca,{}),onClick:()=>{s.send("ShowCommandPalette",{isOpen:!0}),l("open search",{via:"widget-shortcut"})},children:e("linkSearch")}),i&&(0,ce.jsx)(ye.Button,{as:"a",target:"_blank",icon:(0,ce.jsx)(EP,{}),href:i,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:a}),className:n.shortcut,rel:"noreferrer",onClick:()=>{l("open my deepdesk",{via:"widget-shortcut"})},children:e("linkStudioLogin",{productName:a})})]})},kF=({title:e,content:t})=>{let n=ue(ou),[r,o]=(0,ci.useState)(!0);return r?(0,ce.jsx)(wr,{"data-testid":"custom-data-banner",type:"custom-data-banner",title:e,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsxs)(ye,{children:[(0,ce.jsx)(Te,{children:(0,ce.jsx)(Te.Content,{children:(0,ce.jsx)(go,{content:t})})}),(0,ce.jsx)(ye.ButtonsContainer,{children:(0,ce.jsx)(ye.Button,{onClick:()=>o(!1),children:n("close")})})]})})}):null},RF=()=>{let e=ve(),t=j(gc),n=j(IT),r=j(wP),o=j(U1),i=j(hp),s=j(Lp),a=j(Ui),l=j(Rr);return(0,ci.useEffect)(()=>{!!o&&!n&&ee.warn("Custom data provided, but no schema.")},[o,n]),WP(()=>{t.forEach(({type:c})=>{c==="entities"?e(ur()):Au.includes(c)||e(gr(c))})},[e,l,a]),(0,ci.useEffect)(()=>{r.length>0&&!t.some(c=>c.type==="cues")&&ee.warn("Received cues, but cues are not configured in widget.")},[t,r]),(0,ce.jsx)(ci.Fragment,{children:t.map(({type:c,title:u,amount:d,lines:f,schema:p,property:v})=>{var g,x;switch(c){case"entities":return i&&i.length>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(bP,{entities:i})},c);case"cues":return r&&r.length>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)(DP,{cues:r})})},c);case"custom-data-banner":return o&&v&&o[v]&&(0,ce.jsx)(kF,{title:u,content:String(o[v])});case"custom-data":return o&&p&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)(zP,{data:o,schema:p})})},c);default:return((x=(g=s[c])==null?void 0:g.suggestions)==null?void 0:x.length)>0&&(0,ce.jsx)(wr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,ce.jsx)(Ht,{withDivider:!0,children:(0,ce.jsx)($P,{lines:f,contentType:c,suggestions:s[c].suggestions.slice(0,d)||[]})})},c)}})})},E0=({children:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.footer,children:e})},T0=({children:e})=>{let t=_("Widget",Ha);return(0,ce.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},PF=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript",expectFormat:"json-schema:cues"}})=>{let r=ue(ou),o=j(sa),i=j($t),s=j(C1),a=j(Ui),l=j(AT("knowledge-assist")),c=j(Mf),u=j(_f);return o===!1?(0,ce.jsx)(jP,{text:r("notSupported")}):i===!1?(0,ce.jsx)(TF,{onLogIn:e}):!a||!s||i===null?(0,ce.jsx)(jP,{text:r("waiting")}):(0,ce.jsx)(T0,{children:(0,ce.jsxs)(rm,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:u,evaluateKnowledgeAssistFn:u?Hi:Bi,children:[(0,ce.jsxs)(Ts,{children:[(0,ce.jsx)(CF,{}),(0,ce.jsx)(RF,{}),l&&(0,ce.jsx)(im,{title:l.title,emptyState:t.emptyState})]}),(0,ce.jsxs)(E0,{children:[l&&(0,ce.jsx)(om,{}),(0,ce.jsx)(LP,{assistantOptions:n})]})]})})},KP=PF;function Ba(e){let t=new Range;return t.selectNodeContents(e),t}function GP(e,t,n){try{return ui(e,t,n),!0}catch(r){return!1}}function sm(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function am(e){return"tagName"in e&&e.tagName==="BR"}var iu=/[\u200B-\u200D\uFEFF]/g;function ui(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,c){let u=-1,d=/[\u200B-\u200D\uFEFF]/;if(!d.test(l))return c;for(let f=0;f<=l.length;f++)if(d.test(l[f])||u++,u===c)return f;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,u=c.replace(iu,""),d=o+u.length,f=t>=o&&t<=d,p=n>=o&&n<=d;if(f){let v=s(c,t-o);v===0&&!p?r.setStartBefore(l):r.setStart(l,v)}p&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(am(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let u=0;u<l.childNodes.length&&(a(l.childNodes[u]),!i);u++);let c=l.lastChild;sm(l)&&c&&!sm(c)&&!am(c)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function su(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,c=0;function u(d){let f=d===e,p=d===n,v=d===o;switch(d.nodeType){case Node.TEXT_NODE:{let g=d.textContent;p&&(a=c+g.substring(0,r).replace(iu,"").length),v&&(l=c+g.substring(0,i).replace(iu,"").length),c+=g.replace(iu,"").length;break}case Node.ELEMENT_NODE:{if(am(d)&&d.nextSibling){c++;break}!f&&sm(d)&&d.previousSibling&&c++;for(let g=0;g<d.childNodes.length;g++){let x=p&&g===r,y=v&&g===i;if(x&&(a=c),y&&(l=c),l!==void 0||((!x||!s)&&u(d.childNodes[g]),v&&g===i-1&&(l=c),l!==void 0))break}v&&(l=c);break}default:break}}if(u(e),l===void 0)throw new Error("Could not determine start and end");return{start:a!=null?a:l,end:l}}function au(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a=0,l="";function c(u){let d=u===e,f=u===n,p=u===o;switch(f&&(a=1),u.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let v=f?r:0,g=p?i:void 0;l+=u.textContent.replace(iu,"").substring(v,g);break}case Node.ELEMENT_NODE:{if(!s&&a===1&&am(u)&&u.nextSibling){l+=`
81
+ `;break}!d&&!s&&a===1&&sm(u)&&u.previousSibling&&(l+=`
82
+ `);let v=f?r:0,g=p?Math.min(i,u.childNodes.length):u.childNodes.length;for(let x=v;x<g&&(c(u.childNodes[x]),a!==2);x++);break}default:break}p&&(a=2)}return c(e),l}var qP=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(qP||{}),So=class{constructor(t){this.element=t;this.isFocused=!1;this.isActive=!0;this.isDisposed=!1;this.eventListeners={};this.disposeHandlers=[];this.cachedText="";this.cachedCaretPosition=null;this.cachedSelection={start:0,end:0};this.cachedHTML="";this.isSubmitting=!1;this.isPossibleClearInputAction=!1;this.cachedText=this.getText(),this.cachedHTML=this.getHTML(),this.cachedSelection=this.getSelection(),this.listen()}addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}handleInteraction(){let t=this.getText(),n=this.getHTML(),r=this.getSelection(),o=this.cachedCaretPosition===null;if(!this.isActive||(t===""&&this.cachedText!==""&&!this.isPossibleClearInputAction&&this.emit("submit"),t!==this.cachedText?(this.cachedText=t,this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})):n!==null&&n!==this.cachedHTML&&(this.cachedHTML=n,o=!0,this.emit("change",{plainText:t,rawHTML:n})),(r.start!==this.cachedSelection.start||r.end!==this.cachedSelection.end)&&(this.cachedSelection=r,o=!0,this.emit("selection",r)),!o))return;let i=this.getCaretPosition();Yo(i,this.cachedCaretPosition)||(this.cachedCaretPosition=i,this.emit("caretposition",i))}handleClick(){this.handleInteraction()}handleFocus(){let t=!this.isFocused;this.isFocused=!0,t&&this.emit("focus"),this.handleInteraction()}handleBlur(){this.isPossibleClearInputAction=!1;let t=this.isFocused;this.isFocused=!1,t&&this.emit("blur")}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(qP).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleKeyUp(t){this.handleInteraction(),this.emit("keyup",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),this.addEventListener("input",()=>this.handleInteraction()),this.addEventListener("change",()=>this.handleInteraction()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.handleInteraction()),document.activeElement===this.element&&(this.isFocused=!0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}off(t,n){if(!this.eventListeners[t])return;let r=this.eventListeners[t].indexOf(n);r!==-1&&this.eventListeners[t].splice(r,1)}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.handleInteraction()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function YP(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var ms=class extends So{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),au(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){var s;let n=this.getRootNode();if(n.activeElement!==this.element)return null;let r="getSelection"in n?n.getSelection():window.getSelection();if(!r)return null;let o="getComposedRanges"in r&&n instanceof ShadowRoot?(s=r.getComposedRanges(n))==null?void 0:s[0]:r.rangeCount>0?r.getRangeAt(0):null;if(!o)return null;let i=this.element.ownerDocument.createRange();return i.setStart(o==null?void 0:o.startContainer,o==null?void 0:o.startOffset),i.setEnd(o==null?void 0:o.endContainer,o==null?void 0:o.endOffset),!i||!this.element.contains(i.startContainer)||!this.element.contains(i.endContainer)?null:i}getCaretPosition(){let n=this.getRange();if(!n||!n.collapsed||!("getBoundingClientRect"in n))return null;let r=n.getBoundingClientRect();return!YP(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!YP(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return su(this.element,n);let r=this.lastKnownSelection;if(r&&GP(this.element,r.start,r.end))return r;let o=Ba(this.element);return o.collapse(!1),su(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return au(this.element,ui(this.element,n,r))}listen(){super.listen();let n=new MutationObserver(i=>{var s,a;i.length===2&&i[0].addedNodes.length===1&&((s=i[0].addedNodes[0])==null?void 0:s.textContent)==="\u2060"&&((a=i[1].removedNodes[0])==null?void 0:a.textContent)==="\u2060"||setTimeout(()=>{this.handleInteraction()},0)});n.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),this.disposeHandlers.push(()=>n.disconnect());let r=this.element.isContentEditable,o=new MutationObserver(()=>{this.element.isContentEditable!==r&&(r=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>o.disconnect())}};var AF=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize"];function XP(e,t){let n="mozInnerScreenX"in window,r=document.createElement("div");r.id="input-textarea-caret-position-mirror-div";let o=r.style,i=window.getComputedStyle(e),s=e.ownerDocument.body;o.whiteSpace="pre-wrap",o.wordWrap="break-word",o.position="absolute",o.visibility="hidden",AF.forEach(u=>{o[u]=i[u]}),n?e.scrollHeight>Number.parseInt(i.height)&&(o.overflowY="scroll"):o.overflow="hidden",r.textContent=e.value.substring(0,t);let a=document.createElement("span");a.textContent=e.value.substring(t)||".",r.appendChild(a),s.appendChild(r);let l=e.getBoundingClientRect(),c={top:l.top-e.scrollTop+a.offsetTop+Number.parseInt(i.borderTopWidth)+a.offsetHeight,left:l.left-e.scrollLeft+a.offsetLeft+Number.parseInt(i.borderLeftWidth)};return s.removeChild(r),c}var gs=class extends So{constructor(){super(...arguments);this.lastKnownSelection=null}getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:n,selectionEnd:r}=this.element;return{start:n,end:r}}getSelectedText(){let n=this.getSelection();return n?this.getText().slice(n.start,n.end):""}getCaretPosition(){return XP(this.element,this.element.selectionEnd)}listen(){super.listen();let n=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var i;return(i=n==null?void 0:n.get)==null?void 0:i.call(this.element)},set:i=>{var s;(s=n==null?void 0:n.set)==null||s.call(this.element,i),this.handleInteraction()}}),this.addEventListener("scroll",()=>{this.emit("caretposition",this.getCaretPosition())});let r=this.element.disabled,o=new MutationObserver(()=>{this.element.disabled!==r&&(r=this.element.disabled,this.emit(r?"disabled":"enabled"))});o.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>o.disconnect())}};function QP(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function IF(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var C0=class{constructor(t){this.name=t;this.disposeHandlers=[];this.broadcastChannel=new BroadcastChannel(t)}onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},k0=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=QP(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},R0=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.externalId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setExternalId(t){this.externalId!==t&&(this.cleanup(),ee.info("Set externalId",t),this.externalId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new k0(t,this.deepdeskUrl,{debug:!0}):new C0(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=IF(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(ee.info("Received broadcast event",this.externalId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;ee.info("Broadcast event",{externalId:this.externalId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.externalId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage(P(S({},o),{channel:this.externalId}))}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),this.channel=void 0,t&&((r=this.defaultChannel)==null||r.close(),this.defaultChannel=void 0)}},ZP=R0;function LF(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function $e(e){return Array.isArray(e)?e.map($e):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[LF(n)]:$e(e[n])}),{}):e}function OF(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function _t(e){return Array.isArray(e)?e.map(_t):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(S({},t),{[OF(n)]:_t(e[n])}),{}):e}var Ua=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var P0=e=>new Promise(t=>{setTimeout(t,e)});var Va=class extends Ua{constructor(){super(...arguments);this.name="ClientError"}},I0=class extends Ua{constructor(){super(...arguments);this.name="ServerError"}},A0=new Map;function NF(e){return I(this,null,function*(){if(e.status===204)return e.text().catch(()=>{}),null;let t=e.headers.get("content-type");if(t!=null&&t.includes("application/json"))return e.json();let n=yield e.text();return n===""?null:(ee.warn("Unexpected response body:",n.slice(0,20)),JSON.parse(n))})}var di=class di{constructor(t="",n={}){this.baseUrl=t;this.options=n;this.latestRequestByUrl={};this.fetch=window.fetch.bind(window);n.fetch&&(this.fetch=n.fetch)}patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,l=n.method===void 0||n.method.toLowerCase()==="get",C=n,{useCache:c=!1,abortLatest:u=!1,attempts:d=1,retryDelay:f=500,refreshTokenOn401:p=!0,retryOnError:v=k=>k instanceof TypeError,retryOnResponse:g=k=>k.status>=500,version:x=null}=C,y=oe(C,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(c){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(A0.has(s)){r(A0.get(s));return}}let m=P(S({credentials:"include"},y),{headers:S({Accept:"application/json","Content-Type":"application/json"},y.headers)});!l&&this.csrfToken&&(m.headers=P(S({},m.headers),{"X-CSRFToken":this.csrfToken})),typeof x=="string"&&(m.headers=P(S({},m.headers),{"X-Deepdesk-API-Version":x}));let h=d,w=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&u&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let E=()=>I(this,null,function*(){return h--,a(s,m).then(k=>I(this,null,function*(){return g(k)&&!i.isAborted&&h>0?(yield P0(f),E()):k.status===401&&p===!0&&w===!1?(w=!0,yield this.refreshToken(),E()):k})).catch(k=>I(this,null,function*(){if(v(k)&&!i.isAborted&&h>0)return yield P0(f),E();throw k}))});E().then(k=>I(this,null,function*(){let A=yield NF(k);if(delete this.latestRequestByUrl[s],k.status>=500){o(new I0("Server Error",A));return}if(k.status===401){o(new Va("Unauthorized",A));return}if(k.status===403){o(new Va("Forbidden",A));return}if(k.status===404){o(new Va("Not Found",A));return}if(k.status>=400){o(new Va("Bad Request",A));return}c&&A0.set(s,A),r(A)})).catch(k=>{o(k)})})}validateToken(){return I(this,null,function*(){let{has_valid_access_token:t}=yield this.get("/auth/validate");if(!t)try{yield this.refreshToken()}catch(r){return!1}let{is_logged_in:n}=yield this.get("/apis/admin/session/validate/");return!!n})}refreshToken(){return di.refreshingToken||(di.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{di.refreshingToken=null},1e3*60)})),di.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,S({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,S({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,S({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,S({method:"DELETE"},n))}};di.refreshingToken=null;var hs=di;function L0(e){return P(S({},$e(e)),{metadata:e.metadata})}var ys=class ys{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new hs(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,i)=>I(this,null,function*(){let s=yield r(o,i);return this.handleDeepdeskVersionHeaders(s),s}))}preflight(){return I(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(ys.exchangeTokenPromise||(ys.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),ys.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return I(this,null,function*(){var r;yield this.preflight(),ee.info(`Creating conversation for session ${t.externalId} and agent ${t.agentId}`);let n=yield this.client.post("/api/v2/conversations",P(S({chat_start_time:new Date().toISOString()},_t(t)),{metadata:(r=t.metadata)!=null?r:{}}));return L0(n)})}getMe(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return $e(t)})}postIdentity(t){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",_t(t))})}patchMe(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",_t(t));return $e(n)})}getProfile(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return $e(n)})}getKnowledgeAssistant(t){return I(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return $e(n)})}getContentTypes(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return $e(t)})}getAccount(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return $e(t)})}getPlatformConfig(t){return I(this,null,function*(){let n=t!==void 0?`/platform/config/${t}/`:"/platform/config/",{config:r}=yield this.client.get(n,{useCache:!0});return $e(r)})}checkUserExists(t){return I(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return I(this,arguments,function*(t,n={}){yield this.preflight(),ee.info(`Getting conversation for session ${t}`);let{attempts:o=1,retryDelay:i=1e3}=n,s=yield this.client.get(`/api/v2/conversations/by_external_id/${t}`,{attempts:o,retryDelay:i,retryOnResponse:a=>a.status===404||a.status>=500,version:"v2"});return ee.info(`Successfully retrieved conversation ${s.id} for session ${t}`),L0(s)})}isConversationSupported(r){return I(this,arguments,function*(t,n={}){ee.info(`Check if conversation for session ${t} is supported`);let{attempts:o=1,retryDelay:i=1e3}=n;return(yield this.client.get(`/api/v2/conversations/by_external_id/${t}/has_active_profile`,{attempts:o,retryDelay:i,retryOnResponse:a=>a.status===404||a.status>=500})).has_active_profile})}updateConversation(t,n){return I(this,null,function*(){var i;yield this.preflight();let r=_t(n);n.metadata&&(r.metadata=(i=n.metadata)!=null?i:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return L0(o)})}postMessages(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(r=>P(S({},_t(r)),{metadata:r.metadata})))})}sendEvent(t,n){return I(this,null,function*(){yield this.preflight();let s=n,{data:r}=s,o=oe(s,["data"]),i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((a,[l,c])=>P(S({},a),{[l]:c}),{});return this.client.post("/api/v2/analytics/events",_t(P(S(S({},i),o),{data:r,name:t})))})}getEntities(t){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post("/api/entities",{messages:t.filter(r=>r.text)},{version:"v1"})).entities})}getTemporaryExchangeToken(){return I(this,null,function*(){return(yield this.client.get("/auth/exchange-token")).jwt})}exchangeTokenForAccessCookie(t){return I(this,null,function*(){return this.client.post("/apis/admin/session/jwt/",{jwt:t}).catch(n=>{throw ee.warn(`Invalid token '${t}'`),n})})}authenticateWithKey(t,n){return I(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",_t(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return I(this,arguments,function*(t,n={},r){if(yield this.preflight(),r==="sticky-messages")throw new Error("Use getPinnedMessages instead");return(yield this.client.post(`/api/v2/conversations/${t}/recommend/${r}`,_t(n),{abortLatest:!0})).map(s=>P(S({},$e(s)),{text:s.text||s.url||s.message,source:r,type:r})).filter((s,a,l)=>a===l.findIndex(c=>c.text===s.text))})}isLoggedIn(){return I(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,_t(n),{abortLatest:!0})).map(o=>({score:1,source:o.source,sourceText:o.source_text,text:o.label,trainingJobs:o.training_jobs,searchKeywords:o.search_keywords,type:o.source})).filter((o,i,s)=>i===s.findIndex(a=>a.text===o.text))})}getPinnedMessages(t){return I(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return $e(n).map(r=>P(S({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return I(this,null,function*(){let n=yield this.client.post("/api/style-suggestions",_t(t),{abortLatest:!0,version:"v1"});return $e(n)})}search(t){return I(this,null,function*(){let n=yield this.client.post(`/api/profiles/${t.profile}/search`,_t(t),{version:"v2"});return $e(n)})}knowledgeAssist(i,s,a){return I(this,arguments,function*(t,n,r,o={}){yield this.preflight();let l=yield this.client.post(`/api/knowledge-assist/assistants/${r}/search`,_t({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(c=>({question:c.question,answer:c.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return $e(l)})}requestLoginByEmail(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return $e(n)})}requestPasswordlessToken(){return I(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return $e(t.token)})}getCsrfToken(){return I(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return I(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return $e(n)})}getSummary(r){return I(this,arguments,function*(t,n={}){yield this.preflight();let o=yield this.client.post("/api/summary",{conversation:{messages:t.filter(i=>i.text&&i.source),agent_id:n.agentId,id:n.externalConversationId},prompt_instruction:n.promptInstruction,model:n.model},{version:"v1"});return $e(o)})}evaluateAssistant(t,n){return I(this,null,function*(){var a;yield this.preflight();let r=new URLSearchParams,{expectFormat:o="text"}=n||{};if(o.startsWith("json-schema:")){let l=o.replace("json-schema:","");r.append("expect_response_format","json-schema"),r.append("expect_response_format_schema",l)}else r.append("expect_response_format",o);n!=null&&n.externalConversationId&&r.append("external_conversation_id",n.externalConversationId);let i=n!=null&&n.threadId?`/api/v2/assistants/${t}/threads/${n==null?void 0:n.threadId}/evaluate?${r.toString()}`:`/api/v2/assistants/${t}/evaluate?${r.toString()}`,s=yield this.client.post(i,{input:(a=n==null?void 0:n.input)!=null?a:{},conversation:n==null?void 0:n.transcript});return $e(s.output)})}createAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n}=t,r=yield this.client.post(`/apis/admin/assistants/${n}/threads/`,{});return $e(r)})}postMessageToAssistantThread(t){return I(this,null,function*(){yield this.preflight();let{assistantCode:n,threadId:r,message:o}=t,i=yield this.client.post(`/apis/admin/assistants/${n}/threads/${r}/messages/`,{content:o,role:"user"});return $e(i)})}translateMessages(t){return I(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/translate",_t(t),{version:"v2"});return $e(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Vx);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&ee.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};ys.exchangeTokenPromise=null;var bo=ys;var JP={startTime:null,stopTime:null},eA=e=>e.handlingTime,tA=ke({name:"handlingTime",initialState:JP,reducers:{handlingTimeStart(e){if(e.startTime&&!e.stopTime)throw new Error("Timing already started");e.startTime=new Date,e.stopTime=null},handlingTimeStop(e){if(!e.startTime)throw new Error("Timing not started");e.stopTime=new Date},handlingTimeReset(e){e.startTime=null,e.stopTime=null}},extraReducers:e=>{e.addCase(at,()=>JP)}}),{handlingTimeStart:nA,handlingTimeStop:lm,handlingTimeReset:rA}=tA.actions,oA=tA.reducer;var iA=(e={})=>{let t=S({onAuthError:ia(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var cm={list:{keywordMatches:[]},fetchState:"idle"};var vs=ge("styleSuggestions/getAll",(n,r)=>I(void 0,[n,r],function*({text:e},t){var l;let{deepdeskAPI:o}=t.extra,i=t.getState(),{showStyleSuggestions:s}=i.settings,a=(l=i.conversation.current)==null?void 0:l.profileCode;if(!s)return cm.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),MF=ke({name:"styleSuggestions",initialState:cm,reducers:{},extraReducers:e=>{e.addCase(vs.pending,t=>{t.fetchState="loading"}).addCase(vs.rejected,t=>{t.fetchState="error"}).addCase(vs.fulfilled,(t,n)=>{t.fetchState="done",Yo(t.list,n.payload)||(t.list=n.payload)}).addCase(Di,t=>{t.list=cm.list}).addCase(at,()=>cm)}}),sA=MF.reducer;var aA=(e={})=>{let t,n=!0,r=S({getStyleSuggestions:vs,debounce:500},e);return o=>i=>s=>{var p;let a=o.getState().input.text,l=i(s),c=o.getState();if(c.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:u}=c.settings;if(!((p=c.conversation.current)==null?void 0:p.id)||!u)return l;let{text:f}=c.input;return f===a&&!n||(clearTimeout(t),f==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:f}))},e.debounce)),l}};function _F(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var lA=(e={})=>{let t=S({getTextSuggestions:gr,getAutocompleteSuggestions:qc,debounce:200,check:Mr},e),n;return r=>o=>i=>{var g;let{input:s}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:c,showTabCompletion:u}=l.settings,d=(g=l.conversation.current)==null?void 0:g.id,f=i.type===Op.toString();if(!d||!c&&!u)return a;let{input:p}=l;return _F(p,s)&&!f||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let x=aa(l);x===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(x))},f?0:t.debounce)),a}};var cA=vs.fulfilled.toString();function DF(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let i=e.keywordMatches.filter(l=>l.keyword===o),s=t.keywordMatches.filter(l=>l.keyword===o),a=s.length-i.length;a<=0||r.push(...s.slice(0,a))}),r}var uA=e=>t=>n=>r=>{var c;if(r.type!==cA){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(c=i.conversation)==null?void 0:c.current;if(o===s)return;let l=DF(o,s);r.type===cA&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var FF=Qd({assistants:TT,auth:g1,conversation:k1,contentTypes:kT,passwordlessToken:xP,entities:Sk,handlingTime:oA,info:K1,input:z1,settings:l1,profile:LT,search:Z1,styleSuggestions:sA,ui:FR,textSuggestions:bR});function dA(e){return DE({reducer:FF,middleware:t=>{var r;let n=t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}).concat(iA()).concat(lA({debounce:200})).concat(aA({debounce:500})).concat(uA(e.deepdeskAPI));return((r=e.middleware)!=null?r:[]).reduce((o,i)=>o.concat(i),n)},preloadedState:e.preloadedState})}var zF=e=>{var t,n;return(n=(t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())!=null?n:"unknown"},HF=e=>t=>n=>r=>{var a,l,c,u,d,f;let o=t.getState(),i=Gl("inlineSuggestions")(o);switch(r.type){case ia.toString():{!r.payload&&e.emit("logout",void 0);break}case ur.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:(a=o.conversation.current)==null?void 0:a.id,data:{entities:r.payload}});break;case no.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((c=o.conversation.current)==null?void 0:c.id),data:r.payload.data});break;case Di.toString():e.logSendMessage(r.payload);break;case Nf.toString():e.emit("call-to-action",{cue:r.payload});break;case nr.fulfilled.toString():r.isBroadcasted||e.broadcast(Cy,r,!1);break;default:break}let s=n(r);switch(r.type){case Di.toString():e.handleAfterSendMessage(r.payload);break;case Xc.toString():e.onUpdateShowTabHint(r.payload);break;case lm.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case gf.toString():{let{start:p,end:v}=o.input.selection;e.emit("replace",P(S({},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}}));break}case er.toString():{let{start:p,end:v}=o.input.selection;e.emit("select-suggestion",P(S({type:zF(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:v}:{start:0,end:v}})),i&&t.dispatch(Xo([]));break}case hf.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(u=o.conversation.current)==null?void 0:u.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Xo.toString():{i&&r.payload.length>0&&t.dispatch(yf(0));break}case oo.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(d=o.conversation.current)==null?void 0:d.id,data:{summary:r.payload,assistant:(f=t.getState().profile.data)==null?void 0:f.summarizerAssistantNew}}),e.emit("summary-generated",{summary:r.payload});break}default:break}return s},fA=HF;function O0(e){return e.toISOString().replace("T"," ").replace("Z","")}var BF=(e,t)=>t.version,pA=Dn([ca,Rr,eA,BF],(e,t,n,r)=>{if(!t)return ee.warn("No conversationId for handling time metrics"),null;let{startTime:o,stopTime:i}=n;return!o||!i?(ee.warn("No startTime and stopTime for handling time metrics"),null):{conversationId:t,clientVersion:r,agentId:e==null?void 0:e.agentId,agentName:e==null?void 0:e.agentName,agentEmail:e==null?void 0:e.agentEmail,timeStart:O0(o),timeStop:O0(i)}});function mA(e,t){let{text:n,metrics:{numPaste:r,pastes:o,textSuggestions:i}}=e.input,s=n.length;return{source:"agent",clientVersion:t.version,pastes:o,lenTextTotal:s,numPastes:r,suggestions:i}}function N0(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return N0(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?N0(o,t):null}function M0(e,t){return N0(e,t)}function gA(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function UF(e){return typeof e=="object"&&e!==null&&"tagName"in e}function um(e){return UF(e)&&(fs(e)||Bp(e))}var yA,Fr=new Map,VF=["bottom","height","left","right","top","width"],hA=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:VF.some(n=>e[n]!==t[n]);function vA(e){var n,r,o;if(e.ownerDocument===document)return[];let t=(o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)!=null?o:null;return t?[t,...vA(t)]:[]}function xA(e,t){return!e||!t?null:P(S({},e),{top:e.top+t.top,left:e.left+t.left})}var dm=!1,wA=()=>{dm=!0;let e=[];if(Fr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Fr.delete(n);return}let r=n.getBoundingClientRect();hA(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(xA,t.rect):t.rect;hA(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),Fr.size===0){dm=!1;return}yA=window.requestAnimationFrame(wA)};function _0(e,t){let n=vA(e),r=[],o=n.map((i,s)=>_0(i,a=>{r[s]=a;let l=Fr.get(e);if(!l)return;let c=r.reduce(xA,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),Fr.has(e)){let s=Fr.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else Fr.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!dm&&wA()},unobserve(){o.forEach(s=>s.unobserve());let i=Fr.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||Fr.delete(e),Fr.size||(cancelAnimationFrame(yA),dm=!1)}}}}var SA,zr=new Map,bA=()=>{zr.forEach((e,t)=>{if(!t.isConnected){zr.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),zr.size!==0&&(SA=window.requestAnimationFrame(bA))};function EA(e,t){return{observe(){let n=zr.size===0;zr.has(e)?zr.get(e).callbacks.push(t):zr.set(e,{visible:void 0,callbacks:[t]}),n&&bA()},unobserve(){let n=zr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||zr.delete(e),zr.size||cancelAnimationFrame(SA)}}}}var D0=["borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","borderStyle","boxSizing","color","overflowWrap","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontWeight","fontKerning","lineHeight","letterSpacing","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","textIndent","whiteSpace","wordBreak","wordSpacing","wordWrap"];function F0(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function $a(e){return Number.parseFloat(e)}function fm(e){return Math.round(e*1e6)}function TA(e){return e/1e6}function z0(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=$a(e.width),i=$a(e.borderLeftWidth),s=$a(e.borderRightWidth),a=$a(e.paddingRight),l=TA(fm(o)-fm(i)-fm(s)),c=TA(fm(r));if(l-c>2){let u=l-c;n.style.paddingRight=`${a+u}px`}}function lu(e,t={}){var u,d;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=(u=t.position)!=null?u:"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",rs(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};F0(r,n,D0),z0(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=EA(e,()=>{F0(r,n,D0),z0(r,e,n),i(),setTimeout(i,0)}),a,l=!0,c=_0(e,f=>{if(f===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),f.height===0&&f.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(F0(r,n,D0),z0(r,e,n),i(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),v=window.getComputedStyle(t.closestScrollElement),g=$a(v.borderTopWidth),x=$a(v.borderBottomWidth),y=p.top+g-f.top,m=f.top+f.height+-(p.top+p.height-x);n.style.clipPath=`inset(${y}px 0px ${m}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(d=e.parentElement)==null||d.appendChild(n),c.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),c.unobserve(),s.unobserve(),n.remove()}]}var CA=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch(r){return t}}catch(n){return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch(r){ee.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function $F(e){return e.offsetParent!==null}function kA(e){if(!$F(e))return!1;let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function pm(e,t,n=100){let r=kA(e);t({isVisible:r});let o=setInterval(()=>{let i=kA(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var cu=class extends Error{},mm=class{constructor(){this.queues={}}push(t,n){let r=()=>{let i=this.queues[t][1];i?(this.queues[t]=[i.promise,null],i.resolve()):delete this.queues[t]};if(!this.queues[t]){let i=n().finally(r);return this.queues[t]=[i,null],i}this.queues[t][1]&&this.queues[t][1].reject(new cu("Queued async function is outdated"));let o=Promise.withResolvers();return this.queues[t][1]=o,o.promise.then(()=>n().finally(r))}};var Le=b(R());var RA=CA("showTabHint",!0),ja=class ja{constructor({deepdeskUrl:t,version:n=ja.version||"unknown",locale:r="en-US",token:o,fetch:i,productName:s,createCustomChannel:a}){this.inputMediator=null;this.eventListeners={};this.unmountHandlers=[];this.inlineSuggestions=null;this.aboveSuggestions=null;this.floatingMenu=null;this.widgetElement=null;this.widgetRoot=null;this.dynamicThunkObject={};this.queues=new mm;this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let l=t.replace(/\/api$/,"");this.deepdeskApi=new bo(l,{token:o,fetch:i}),this.version=n,this.instanceId=ja.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[fA({broadcast:(u,d,f)=>{this.broadcastEvents.send(u,d,f)},emit:(u,d)=>this.emit(u,d),handleAfterSendMessage:u=>this.handleAfterSendMessage(u),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:u=>this.logSendMessage(u),onUpdateShowTabHint:u=>RA.update(u),sendEvent:(u,d)=>this.deepdeskApi.sendEvent(u,d)})]};this.store=dA(c),this.broadcastEvents=new ZP({debug:!0,deepdeskUrl:l,eventMap:J1(this.store),createCustomChannel:a}),this.store.dispatch(Xc(RA.value())),this.store.dispatch(uf({locale:r,adminUrl:l,productName:s}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){var t;return(t=this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex])!=null?t:null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}externalId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.externalId}shouldAbort(){return this.state.conversation.isSupported===!1?(ee.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(ee.warn("Profile has not been loaded (yet)"),!0):(ee.warn("No conversation loaded (yet)"),!0)}login(){this.store.dispatch(ia(null)),this.store.dispatch(eo());let t=n=>$t(n)&&c1(n)!=="loading";return new Promise(n=>{let r=this.subscribe(t,o=>{o&&(r(),n())});this.unmountHandlers.push(()=>{r()})})}isLoggedIn(){return I(this,null,function*(){return(yield this.store.dispatch(eo())).payload})}isConversationSupported(t,n){return I(this,null,function*(){return(yield this.store.dispatch(vy({externalId:t,options:n}))).payload})}createConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(ff(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return I(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(pf({externalId:t,options:n}))).payload})}upsertConversation(t){return I(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(xy(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return I(this,null,function*(){yield this.store.dispatch(wy(t))})}updateConversation(t){return I(this,null,function*(){return(yield this.store.dispatch(mf(t))).payload})}resetConversation(){this.store.dispatch(at()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(uf(t))}setVisitorInfo(t){this.store.dispatch($1(t))}setCustomData(t){this.store.dispatch(j1(t))}setAgentInfo(t,n){return I(this,null,function*(){yield this.store.dispatch(Xl(S(S({},t),n)))})}setAgentSettings(t){return I(this,null,function*(){yield this.store.dispatch(by(t))})}getAgentSettings(){return I(this,null,function*(){return(yield this.store.dispatch(Ey())).payload})}refresh(){return I(this,null,function*(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.store.dispatch(vf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()}));let t=[];return this.store.dispatch(Op()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}notifyExternalSuggestion(t){this.store.dispatch(er(t))}evaluateAssistant(t,n){return I(this,null,function*(){let u=n||{},{input:r={},transcript:o,showCuesInWidget:i=!0,includeMetadata:s,expectFormat:a}=u,l=oe(u,["input","transcript","showCuesInWidget","includeMetadata","expectFormat"]);Object.assign(r,l);let c=yield this.store.dispatch(nr({assistantCode:t,expectFormat:a||"json-schema:cues",transcript:o,includeMetadata:s,input:r,skipState:!i}));if(c.error)throw new Error(c.error.message);return c.payload})}evaluateConversationAssistant(t,n){return I(this,null,function*(){yield this.loadProfileConfig();let r=this.state.profile.data;if(!r){ee.warn("Can't evaluate assistant when profile is not loaded yet.");return}let i=r[{accepted:"conversationAcceptedAssistant","new-message":"conversationNewMessageAssistant",ended:"conversationEndedAssistant"}[t]];if(!i){ee.warn(`No assistant set in profile for conversation event "${t}"`);return}return this.queues.push(i,()=>I(this,null,function*(){yield this.evaluateAssistant(i,S({includeMetadata:!0},n))})).catch(a=>{if(a instanceof cu){ee.warn(`Queued assistant "${i}" was outdated and dropped`);return}throw a})})}getSummary(){return I(this,arguments,function*(t={}){var r;if(!this.hasConversation())return ee.warn("No conversation to create summary for."),null;(r=this.state.profile.data)!=null&&r.summarizerAssistantNew||ee.warn("No profile loaded yet, or no summarizer assistant set in profile");let n=yield this.store.dispatch(oo(t));if(n.error)throw new Error(n.error.message);return n.payload})}handleKeyDown(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui,{textSuggestions:o,selectedSuggestionIndex:i,selection:s}=this.state.input,{inlineSuggestions:a,showTextSuggestions:l}=this.settings,c=a?"below":"above",u=o.length>0;if(this.store.dispatch(L1(Sy(t))),!Mr(this.state)||t.key!=="Tab"&&!l)return;let d=()=>{n||!u||s&&(t.shiftKey||(this.store.dispatch(M1()),t.preventDefault()))},f=()=>{n||!u||a&&i<=0||s&&(t.shiftKey||(this.store.dispatch(_1()),t.preventDefault()))};switch(t.key){case"ArrowUp":c==="below"?f():d();break;case"ArrowDown":{c==="below"?d():f();break}case"Escape":{n||(this.store.dispatch(yf(-1)),this.store.dispatch(oi({collapse:!0})),this.store.dispatch(_R(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let p=la(this.state);if(!p)return;this.store.dispatch(Xc(!1)),this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"}));break}case" ":{if(this.settings.inlineSuggestions||this.state.input.selectedSuggestionIndex===-1)return;let p=la(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"space"},replace:"until-selection-end"}));break}case"Enter":{if(this.settings.inlineSuggestions||t.shiftKey||this.state.input.selectedSuggestionIndex===-1)return;let p=la(this.state);if(!p)return;this.store.dispatch(er({text:p.text,suggestion:p,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(oi({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Xo([]))}handlingTimeStart(){this.state.handlingTime.startTime||(ee.info("Start handling time"),this.store.dispatch(nA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(ee.info("Stop handling time"),this.store.dispatch(lm()))}logSendMessage(t){let n=mA(this.state,{version:this.version});n&&(t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEvent("Send Message",{conversationId:this.conversationId(),data:n}),this.emit("send-message-event",n))}logHandlingTime(){let t=pA(this.state,{version:this.version});t&&(this.deepdeskApi.sendEvent("Handling Time",{conversationId:this.conversationId(),data:t}),this.store.dispatch(rA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Di((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(F1()))}emit(t,n){let r=this.eventListeners[t];r&&r.forEach(o=>{try{o(n)}catch(i){ee.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),ee.error(i)}})}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),()=>{this.off(t,n)}}off(t,n){if(!t&&!n){this.eventListeners={};return}let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}setConversationQuery(t){this.dynamicThunkObject.conversationQuery=t}setPlatformVariables(t){this.store.dispatch(W1(t))}whenConversationLoaded(t){let n=o=>{var i;return(i=o.conversation.current)==null?void 0:i.id},r=()=>this.loadProfileConfig().then(()=>t());n(this.state)&&r(),this.subscribe(n,o=>{o&&r()})}overlayContainerFactory(t,n,r,o){let[i,s]=lu(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),[i,s]}createInlineContainer(t,n){var a;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(a=t.ownerDocument.defaultView)==null?void 0:a.frameElement,s=i?i.ownerDocument.defaultView:null;if(i&&(s===window||(s==null?void 0:s.parent)===window)){let[l,c]=lu(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});l.dataset.testid=n,l.style.zIndex="2",l.appendChild(r),this.unmountHandlers.push(()=>{c()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return rs(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),ee.info(`Stored analytics for ${this.conversationId()}`)}catch(t){}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(ee.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(D1(r.metrics))):ee.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch(t){}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!um(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let f=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s,inputMediator:a}=f,l=oe(f,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),rs(t),this.inputMediator=a||(fs(t)?new gs(t):new ms(t)),this.inputMediator.on("change",({plainText:p,rawHTML:v})=>{this.store.dispatch(vf({text:p,html:v}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(O1(Sy(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:v})=>{this.store.dispatch(N1({text:p,selectionText:v}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(I1(p))});let u;this.inputMediator.on("selection",p=>{clearTimeout(u),p===null?u=setTimeout(()=>{p!==null&&this.store.dispatch(xf(p))},500):this.store.dispatch(xf(p))}),this.inputMediator.on("disabled",()=>{var p;(p=this.inputMediator)==null||p.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{this.settings.detectSubmit&&this.notifySubmit()}),this.inputMediator.on("blur",()=>{this.store.dispatch(_p(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(_p(!0))}),this.renderSuggestions(t,c),this.subscribe(Gl("inlineSuggestions"),()=>{this.renderSuggestions(t,c)});let d=this.renderOverlays(n);this.unmountHandlers.push(()=>{d.unmount()}),this.store.dispatch(vf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()})),this.store.dispatch(xf(this.inputMediator.getSelection())),this.store.dispatch(_p(this.inputMediator.isFocused)),this.unmountHandlers.push(()=>{this.state.input.text!==""&&this.storeMetrics()}),this.whenConversationLoaded(()=>{var p;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setExternalId((p=this.state.conversation.current)==null?void 0:p.externalId)}),this.isMounted=!0}subscribe(t,n){let r=t(this.store.getState());return this.store.subscribe(()=>{let o=t(this.store.getState());o!==r&&(r=o,n(r))})}unmount(){var t,n,r,o;(t=this.inlineSuggestions)==null||t.unmount(),(n=this.aboveSuggestions)==null||n.unmount(),(r=this.floatingMenu)==null||r.unmount(),this.unmountHandlers.forEach(i=>i()),this.unmountHandlers=[],(o=this.inputMediator)==null||o.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderSuggestions(t,n){var r,o,i;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(i=this.aboveSuggestions)==null||i.unmount(),this.settings.floatingMenu&&(this.floatingMenu=this.renderFloatingMenu(t,n)),this.settings.inlineSuggestions?this.inlineSuggestions=this.renderInlineSuggestions(t,n):this.aboveSuggestions=this.renderAboveSuggestions(t,n)}renderInlineSuggestions(t,n){let{customStyles:r}=n,o=this.createInlineContainer(t,"deepdesk-caret"),i=(0,fi.createRoot)(o);i.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(WR,{})})}));let s=a=>{a?(o.style.display="block",o.style.top=`${a.top}px`,o.style.left=`${a.left}px`):o.style.display="none"};return this.inputMediator.on("caretposition",s),{unmount:()=>{var a;(a=this.inputMediator)==null||a.off("caretposition",s),i.unmount(),o.remove()}}}renderAboveSuggestions(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i}=n,s=o&&M0(t,o)||void 0,[a,l]=this.overlayContainerFactory("deepdesk-tab-completion",s||t,{appendTo:i,closestScrollElement:s,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),[c,u]=this.overlayContainerFactory("deepdesk-suggestions-overlay",s||t,{appendTo:i},r==null?void 0:r.suggestionsRootNode),d=(0,fi.createRoot)(a);d.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(hP,{inputElement:t})})}));let f=(0,fi.createRoot)(c);return f.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(eP,{onLogIn:()=>this.loginViaPopup().catch(p=>ee.warn(p.message))})})})),{unmount(){d.unmount(),f.unmount(),l(),u()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i,floatingMenuParent:s}=n,a=o&&M0(t,o)||void 0,[l,c]=this.overlayContainerFactory("floating-menu",a||t,{appendTo:s!=null?s:i},r==null?void 0:r.floatingMenuParent),u=(0,fi.createRoot)(l);return u.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(NR,{onLogIn:()=>this.loginViaPopup().catch(d=>ee.warn(d.message))})})})),{unmount(){u.unmount(),c()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays"),o=(0,fi.createRoot)(r);return o.render((0,Le.jsx)(si,{store:this.store,customStyles:n,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(PR,{})})})),{unmount(){o.unmount(),r.remove()}}}renderWidget(t,n={}){if(this.widgetElement&&ee.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetElement=t,this.configure({showImages:o,isEmbedded:i}),this.widgetRoot=(0,fi.createRoot)(t),this.widgetRoot.render((0,Le.jsx)(si,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(KP,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(s=>ee.warn(s.message))})})})),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setExternalId((s=this.state.conversation.current)==null?void 0:s.externalId)})}unmountWidget(){var t,n;(t=this.widgetRoot)==null||t.unmount(),this.widgetRoot=null,(n=this.widgetElement)==null||n.remove(),this.widgetElement=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:i}=r,s=(0,fi.createRoot)(n);return s.render((0,Le.jsx)(si,{store:this.store,customStyles:o,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(T0,{children:(0,Le.jsxs)(rm,{assistantCode:t,initialQuestion:i,evaluateKnowledgeAssistFn:r.isLegacyKnowledgeAssist?Hi:Bi,children:[(0,Le.jsx)(Ts,{children:(0,Le.jsx)(im,{title:r.title,emptyState:r.emptyState})}),(0,Le.jsx)(E0,{children:(0,Le.jsx)(om,{})})]})})})})),{unmount(){s.unmount()}}}setupHandlingTime(t){let n=pm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){gA(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(()=>I(this,null,function*(){yield this.store.dispatch(mc());let t=Ui(this.state);t&&this.store.dispatch(uf({showSearch:t.search,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:!!t.summarizerAssistantNew,showKnowledgeSearch:!!t.knowledgeAssistantNew||!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions}))})),this.loadProfileConfigPromise)}loginViaPopup(t){return I(this,null,function*(){return new Promise((n,r)=>{let o=new MessageChannel,i=o.port1,s=this.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,c=()=>{u&&!u.closed&&u.close(),window.removeEventListener("message",d),clearInterval(f)};i.onmessage=p=>I(this,null,function*(){var v,g;if((v=p.data)!=null&&v.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((g=p.data)==null?void 0:g.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(Zl),l=!0,o.port1.close(),n()}catch(x){console.error(x),r(x)}finally{l=!0,c()}});let u=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");u===null&&r(new Error("Popup blocked by browser"));let d=p=>I(this,null,function*(){var v;if(p.origin===a.origin)switch((v=p.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{try{let g=JSON.stringify({type:"deepdesk-popup-create-channel"});u==null||u.postMessage(g,a.origin,[o.port2])}catch(g){ee.error("Error posting message to popup",g),r(g)}break}case"deepdesk-popup-error":{c(),p.data.message==="Timeout"&&ee.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}});window.addEventListener("message",d);let f=setInterval(()=>{u&&!u.closed||(c(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(c)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}checkForTrialMode(t){return I(this,null,function*(){try{let{account:n}=yield this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(ee.info("Trial is active"),!(yield this.deepdeskApi.checkUserExists(t)))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;ee.info(r),this.shouldRender=!1}})}refreshWidgetSuggestions(){return I(this,null,function*(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=gc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(ur()):Au.includes(r)||this.store.dispatch(gr(r))})}catch(r){this.handleError(r)}})}};ja.version="17.0.0",ja.count=0;var uu=ja;function jF(e){return I(this,null,function*(){var o,i,s;let n=yield((o=e.fetch)!=null?o:window.fetch)(e.url),r=yield n.blob();return new File([r],e.name,{type:(s=(i=e.mimeType)!=null?i:n.headers.get("Content-Type"))!=null?s:"image/jpeg"})})}function PA(e,t){return I(this,null,function*(){let n=yield jF(t),r=new Event("change",{bubbles:!0,cancelable:!0});try{Object.defineProperty(e,"files",{configurable:!0,get:()=>[n]}),e.dispatchEvent(r)}finally{Object.hasOwn(e,"files")&&delete e.files}})}function AA(e,t,n){return I(this,null,function*(){yield new bo(e).authenticateWithKey(t,n)})}function IA(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function LA(r,o){return I(this,arguments,function*(e,t,n={}){var d,f;let{value:i}=e,{start:s,end:a}=(d=n.replace)!=null?d:{start:0,end:i.length},l=`${i.slice(0,s)}${t}${i.slice(a)}`,c=(f=n.selectionAfter)!=null?f:{start:s+t.length,end:s+t.length},u=()=>{if(n.setValue)return n.setValue(l);e.value=l};return Promise.resolve(u()).then(()=>{e.selectionStart=c.start,e.selectionEnd=c.end,e.blur(),e.focus()})})}function OA(r,o){return I(this,arguments,function*(e,t,n={}){let i=n.replace?ui(e,n.replace.start,n.replace.end):Ba(e),s,a=()=>{if(n.setRange)return n.setRange(i.cloneRange());i.deleteContents(),s=document.createElement("span"),i.insertNode(s),n.insertBRs!==!1?t.split(`
83
+ `).reverse().forEach((l,c)=>{c>0&&i.insertNode(document.createElement("br")),i.insertNode(document.createTextNode(l))}):i.insertNode(document.createTextNode(t))};return Promise.resolve(a()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let l=n.selectionAfter?ui(e,n.selectionAfter.start,n.selectionAfter.end):(i.collapse(!1),i),c=window.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(l)}if(!s)return;s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}function WF(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function KF(e){let t=document.createDocumentFragment();return e.split(`
84
+ `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function NA(e,t){let n=e.parentElement;if(!n){console.warn("No insert point found");return}let{display:r}=window.getComputedStyle(n);r.includes("block")||r==="table-cell"?n==null||n.insertBefore(t,e.nextSibling):NA(n,t)}function MA(o,i){return I(this,arguments,function*(e,t,{isBlock:n,isHTML:r}={}){let s;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let a=()=>{var f;let l=(f=e.ownerDocument.defaultView)!=null?f:window,c=l.getSelection();if((!c||c.rangeCount===0)&&(e.focus(),c=l.getSelection()),!c||c.rangeCount===0)return;let u=c.getRangeAt(0);if(!u)return;s=document.createElement("span"),u.insertNode(s);let d=r?WF(t):KF(t);n?NA(u.startContainer,d):(u.insertNode(d),u.collapse(!1))};return Promise.resolve(a()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!s)try{s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}return qA(GF);})();
85
85
  /*! Bundled license information:
86
86
 
87
87
  classnames/index.js: