@deepdesk/deepdesk-sdk 17.0.0-rc.7 → 17.0.0-rc.8

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,88 +1,87 @@
1
- "use strict";var Deepdesk=(()=>{var FI=Object.create;var qa=Object.defineProperty,HI=Object.defineProperties,zI=Object.getOwnPropertyDescriptor,BI=Object.getOwnPropertyDescriptors,UI=Object.getOwnPropertyNames,kc=Object.getOwnPropertySymbols,jI=Object.getPrototypeOf,qm=Object.prototype.hasOwnProperty,zx=Object.prototype.propertyIsEnumerable;var Gm=Math.pow,$m=(e,t,n)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=(e,t)=>{for(var n in t||(t={}))qm.call(t,n)&&$m(e,n,t[n]);if(kc)for(var n of kc(t))zx.call(t,n)&&$m(e,n,t[n]);return e},P=(e,t)=>HI(e,BI(t));var Ym=e=>typeof e=="symbol"?e:e+"",se=(e,t)=>{var n={};for(var r in e)qm.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&kc)for(var r of kc(e))t.indexOf(r)<0&&zx.call(e,r)&&(n[r]=e[r]);return n};var Qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),bt=(e,t)=>{for(var n in t)qa(e,n,{get:t[n],enumerable:!0})},Bx=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of UI(t))!qm.call(e,o)&&o!==n&&qa(e,o,{get:()=>t[o],enumerable:!(r=zI(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?FI(jI(e)):{},Bx(t||!e||!e.__esModule?qa(n,"default",{value:e,enumerable:!0}):n,e)),VI=e=>Bx(qa({},"__esModule",{value:!0}),e);var Ne=(e,t,n)=>$m(e,typeof t!="symbol"?t+"":t,n);var A=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{a(n.next(l))}catch(u){o(u)}},s=l=>{try{a(n.throw(l))}catch(u){o(u)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,s);a((n=n.apply(e,t)).next())});var Fe=Qe((u5,Rc)=>{"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 Rc!="undefined"&&Rc.exports?(t.default=t,Rc.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var Pc=Qe((c5,jx)=>{"use strict";var Ux=Object.getOwnPropertySymbols,WI=Object.prototype.hasOwnProperty,KI=Object.prototype.propertyIsEnumerable;function $I(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function qI(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}jx.exports=qI()?Object.assign:function(e,t){for(var n,r=$I(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)WI.call(n,s)&&(r[s]=n[s]);if(Ux){o=Ux(n);for(var a=0;a<o.length;a++)KI.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var ow=Qe(we=>{"use strict";var Qm=Pc(),us=60103,Kx=60106;we.Fragment=60107;we.StrictMode=60108;we.Profiler=60114;var $x=60109,qx=60110,Gx=60112;we.Suspense=60113;var Yx=60115,Xx=60116;typeof Symbol=="function"&&Symbol.for&&(vn=Symbol.for,us=vn("react.element"),Kx=vn("react.portal"),we.Fragment=vn("react.fragment"),we.StrictMode=vn("react.strict_mode"),we.Profiler=vn("react.profiler"),$x=vn("react.provider"),qx=vn("react.context"),Gx=vn("react.forward_ref"),we.Suspense=vn("react.suspense"),Yx=vn("react.memo"),Xx=vn("react.lazy"));var vn,Vx=typeof Symbol=="function"&&Symbol.iterator;function GI(e){return e===null||typeof e!="object"?null:(e=Vx&&e[Vx]||e["@@iterator"],typeof e=="function"?e:null)}function Ga(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 Qx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Zx={};function cs(e,t,n){this.props=e,this.context=t,this.refs=Zx,this.updater=n||Qx}cs.prototype.isReactComponent={};cs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Ga(85));this.updater.enqueueSetState(this,e,t,"setState")};cs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Jx(){}Jx.prototype=cs.prototype;function Zm(e,t,n){this.props=e,this.context=t,this.refs=Zx,this.updater=n||Qx}var Jm=Zm.prototype=new Jx;Jm.constructor=Zm;Qm(Jm,cs.prototype);Jm.isPureReactComponent=!0;var eg={current:null},ew=Object.prototype.hasOwnProperty,tw={key:!0,ref:!0,__self:!0,__source:!0};function nw(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)ew.call(t,r)&&!tw.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),u=0;u<a;u++)l[u]=arguments[u+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:us,type:e,key:i,ref:s,props:o,_owner:eg.current}}function YI(e,t){return{$$typeof:us,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function tg(e){return typeof e=="object"&&e!==null&&e.$$typeof===us}function XI(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Wx=/\/+/g;function Xm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?XI(""+e.key):t.toString(36)}function Ic(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 us:case Kx:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Xm(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Wx,"$&/")+"/"),Ic(o,t,n,"",function(u){return u})):o!=null&&(tg(o)&&(o=YI(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Wx,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Array.isArray(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Xm(i,a);s+=Ic(i,t,n,l,o)}else if(l=GI(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Xm(i,a++),s+=Ic(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Ga(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Ac(e,t,n){if(e==null)return e;var r=[],o=0;return Ic(e,r,"","",function(i){return t.call(n,i,o++)}),r}function QI(e){if(e._status===-1){var t=e._result;t=t(),e._status=0,e._result=t,t.then(function(n){e._status===0&&(n=n.default,e._status=1,e._result=n)},function(n){e._status===0&&(e._status=2,e._result=n)})}if(e._status===1)return e._result;throw e._result}var rw={current:null};function Mr(){var e=rw.current;if(e===null)throw Error(Ga(321));return e}var ZI={ReactCurrentDispatcher:rw,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:eg,IsSomeRendererActing:{current:!1},assign:Qm};we.Children={map:Ac,forEach:function(e,t,n){Ac(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ac(e,function(){t++}),t},toArray:function(e){return Ac(e,function(t){return t})||[]},only:function(e){if(!tg(e))throw Error(Ga(143));return e}};we.Component=cs;we.PureComponent=Zm;we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ZI;we.cloneElement=function(e,t,n){if(e==null)throw Error(Ga(267,e));var r=Qm({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=eg.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)ew.call(t,l)&&!tw.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 u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:us,type:e.type,key:o,ref:i,props:r,_owner:s}};we.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:qx,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:$x,_context:e},e.Consumer=e};we.createElement=nw;we.createFactory=function(e){var t=nw.bind(null,e);return t.type=e,t};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:Gx,render:e}};we.isValidElement=tg;we.lazy=function(e){return{$$typeof:Xx,_payload:{_status:-1,_result:e},_init:QI}};we.memo=function(e,t){return{$$typeof:Yx,type:e,compare:t===void 0?null:t}};we.useCallback=function(e,t){return Mr().useCallback(e,t)};we.useContext=function(e,t){return Mr().useContext(e,t)};we.useDebugValue=function(){};we.useEffect=function(e,t){return Mr().useEffect(e,t)};we.useImperativeHandle=function(e,t,n){return Mr().useImperativeHandle(e,t,n)};we.useLayoutEffect=function(e,t){return Mr().useLayoutEffect(e,t)};we.useMemo=function(e,t){return Mr().useMemo(e,t)};we.useReducer=function(e,t,n){return Mr().useReducer(e,t,n)};we.useRef=function(e){return Mr().useRef(e)};we.useState=function(e){return Mr().useState(e)};we.version="17.0.2"});var $=Qe((f5,iw)=>{"use strict";iw.exports=ow()});var cw=Qe(Xa=>{"use strict";Pc();var JI=$(),lw=60103;Xa.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(ng=Symbol.for,lw=ng("react.element"),Xa.Fragment=ng("react.fragment"));var ng,eL=JI.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tL=Object.prototype.hasOwnProperty,nL={key:!0,ref:!0,__self:!0,__source:!0};function uw(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)tL.call(t,r)&&!nL.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:lw,type:e,key:i,ref:s,props:o,_owner:eL.current}}Xa.jsx=uw;Xa.jsxs=uw});var R=Qe((w5,dw)=>{"use strict";dw.exports=cw()});var Bw=Qe(Te=>{"use strict";var hs,Ja,jc,pg;typeof performance=="object"&&typeof performance.now=="function"?(_w=performance,Te.unstable_now=function(){return _w.now()}):(ag=Date,Dw=ag.now(),Te.unstable_now=function(){return ag.now()-Dw});var _w,ag,Dw;typeof window=="undefined"||typeof MessageChannel!="function"?(gs=null,lg=null,ug=function(){if(gs!==null)try{var e=Te.unstable_now();gs(!0,e),gs=null}catch(t){throw setTimeout(ug,0),t}},hs=function(e){gs!==null?setTimeout(hs,0,e):(gs=e,setTimeout(ug,0))},Ja=function(e,t){lg=setTimeout(e,t)},jc=function(){clearTimeout(lg)},Te.unstable_shouldYield=function(){return!1},pg=Te.unstable_forceFrameRate=function(){}):(Fw=window.setTimeout,Hw=window.clearTimeout,typeof console!="undefined"&&(zw=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof zw!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),Qa=!1,Za=null,zc=-1,cg=5,dg=0,Te.unstable_shouldYield=function(){return Te.unstable_now()>=dg},pg=function(){},Te.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"):cg=0<e?Math.floor(1e3/e):5},fg=new MessageChannel,Bc=fg.port2,fg.port1.onmessage=function(){if(Za!==null){var e=Te.unstable_now();dg=e+cg;try{Za(!0,e)?Bc.postMessage(null):(Qa=!1,Za=null)}catch(t){throw Bc.postMessage(null),t}}else Qa=!1},hs=function(e){Za=e,Qa||(Qa=!0,Bc.postMessage(null))},Ja=function(e,t){zc=Fw(function(){e(Te.unstable_now())},t)},jc=function(){Hw(zc),zc=-1});var gs,lg,ug,Fw,Hw,zw,Qa,Za,zc,cg,dg,fg,Bc;function mg(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<Uc(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Fn(e){return e=e[0],e===void 0?null:e}function Vc(e){var t=e[0];if(t!==void 0){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,s=e[i],a=i+1,l=e[a];if(s!==void 0&&0>Uc(s,n))l!==void 0&&0>Uc(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>Uc(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function Uc(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var ur=[],po=[],wL=1,wn=null,Et=3,Wc=!1,ri=!1,el=!1;function gg(e){for(var t=Fn(po);t!==null;){if(t.callback===null)Vc(po);else if(t.startTime<=e)Vc(po),t.sortIndex=t.expirationTime,mg(ur,t);else break;t=Fn(po)}}function hg(e){if(el=!1,gg(e),!ri)if(Fn(ur)!==null)ri=!0,hs(yg);else{var t=Fn(po);t!==null&&Ja(hg,t.startTime-e)}}function yg(e,t){ri=!1,el&&(el=!1,jc()),Wc=!0;var n=Et;try{for(gg(t),wn=Fn(ur);wn!==null&&(!(wn.expirationTime>t)||e&&!Te.unstable_shouldYield());){var r=wn.callback;if(typeof r=="function"){wn.callback=null,Et=wn.priorityLevel;var o=r(wn.expirationTime<=t);t=Te.unstable_now(),typeof o=="function"?wn.callback=o:wn===Fn(ur)&&Vc(ur),gg(t)}else Vc(ur);wn=Fn(ur)}if(wn!==null)var i=!0;else{var s=Fn(po);s!==null&&Ja(hg,s.startTime-t),i=!1}return i}finally{wn=null,Et=n,Wc=!1}}var SL=pg;Te.unstable_IdlePriority=5;Te.unstable_ImmediatePriority=1;Te.unstable_LowPriority=4;Te.unstable_NormalPriority=3;Te.unstable_Profiling=null;Te.unstable_UserBlockingPriority=2;Te.unstable_cancelCallback=function(e){e.callback=null};Te.unstable_continueExecution=function(){ri||Wc||(ri=!0,hs(yg))};Te.unstable_getCurrentPriorityLevel=function(){return Et};Te.unstable_getFirstCallbackNode=function(){return Fn(ur)};Te.unstable_next=function(e){switch(Et){case 1:case 2:case 3:var t=3;break;default:t=Et}var n=Et;Et=t;try{return e()}finally{Et=n}};Te.unstable_pauseExecution=function(){};Te.unstable_requestPaint=SL;Te.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Et;Et=e;try{return t()}finally{Et=n}};Te.unstable_scheduleCallback=function(e,t,n){var r=Te.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:wL++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,mg(po,e),Fn(ur)===null&&e===Fn(po)&&(el?jc():el=!0,Ja(hg,n-r))):(e.sortIndex=o,mg(ur,e),ri||Wc||(ri=!0,hs(yg))),e};Te.unstable_wrapCallback=function(e){var t=Et;return function(){var n=Et;Et=t;try{return e.apply(this,arguments)}finally{Et=n}}}});var jw=Qe(($6,Uw)=>{"use strict";Uw.exports=Bw()});var P1=Qe(kn=>{"use strict";var Fd=$(),Ve=Pc(),dt=jw();function U(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."}if(!Fd)throw Error(U(227));var tb=new Set,Il={};function mi(e,t){Fs(e,t),Fs(e+"Capture",t)}function Fs(e,t){for(Il[e]=t,e=0;e<t.length;e++)tb.add(t[e])}var Br=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),bL=/^[: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]*$/,Vw=Object.prototype.hasOwnProperty,Ww={},Kw={};function EL(e){return Vw.call(Kw,e)?!0:Vw.call(Ww,e)?!1:bL.test(e)?Kw[e]=!0:(Ww[e]=!0,!1)}function TL(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 CL(e,t,n,r){if(t===null||typeof t=="undefined"||TL(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 Ft(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 vt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){vt[e]=new Ft(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];vt[t]=new Ft(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){vt[e]=new Ft(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vt[e]=new Ft(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){vt[e]=new Ft(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){vt[e]=new Ft(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){vt[e]=new Ft(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){vt[e]=new Ft(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){vt[e]=new Ft(e,5,!1,e.toLowerCase(),null,!1,!1)});var kh=/[\-:]([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(kh,Rh);vt[t]=new Ft(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(kh,Rh);vt[t]=new Ft(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(kh,Rh);vt[t]=new Ft(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){vt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!1,!1)});vt.xlinkHref=new Ft("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){vt[e]=new Ft(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ph(e,t,n,r){var o=vt.hasOwnProperty(t)?vt[t]:null,i=o!==null?o.type===0:r?!1:!(!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N");i||(CL(t,n,o,r)&&(n=null),r||o===null?EL(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 gi=Fd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,pl=60103,ii=60106,go=60107,Ah=60108,vl=60114,Ih=60109,Lh=60110,Hd=60112,xl=60113,md=60120,zd=60115,Oh=60116,Mh=60121,Nh=60128,nb=60129,_h=60130,Bg=60131;typeof Symbol=="function"&&Symbol.for&&(nt=Symbol.for,pl=nt("react.element"),ii=nt("react.portal"),go=nt("react.fragment"),Ah=nt("react.strict_mode"),vl=nt("react.profiler"),Ih=nt("react.provider"),Lh=nt("react.context"),Hd=nt("react.forward_ref"),xl=nt("react.suspense"),md=nt("react.suspense_list"),zd=nt("react.memo"),Oh=nt("react.lazy"),Mh=nt("react.block"),nt("react.scope"),Nh=nt("react.opaque.id"),nb=nt("react.debug_trace_mode"),_h=nt("react.offscreen"),Bg=nt("react.legacy_hidden"));var nt,$w=typeof Symbol=="function"&&Symbol.iterator;function tl(e){return e===null||typeof e!="object"?null:(e=$w&&e[$w]||e["@@iterator"],typeof e=="function"?e:null)}var vg;function ml(e){if(vg===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);vg=t&&t[1]||""}return`
2
- `+vg+e}var xg=!1;function Kc(e,t){if(!e||xg)return"";xg=!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(l){var r=l}Reflect.construct(e,[],t)}else{try{t.call()}catch(l){r=l}e.call(t.prototype)}else{try{throw Error()}catch(l){r=l}e()}}catch(l){if(l&&r&&typeof l.stack=="string"){for(var o=l.stack.split(`
3
- `),i=r.stack.split(`
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])return`
5
- `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{xg=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ml(e):""}function kL(e){switch(e.tag){case 5:return ml(e.type);case 16:return ml("Lazy");case 13:return ml("Suspense");case 19:return ml("SuspenseList");case 0:case 2:case 15:return e=Kc(e.type,!1),e;case 11:return e=Kc(e.type.render,!1),e;case 22:return e=Kc(e.type._render,!1),e;case 1:return e=Kc(e.type,!0),e;default:return""}}function Rs(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 go:return"Fragment";case ii:return"Portal";case vl:return"Profiler";case Ah:return"StrictMode";case xl:return"Suspense";case md:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lh:return(e.displayName||"Context")+".Consumer";case Ih:return(e._context.displayName||"Context")+".Provider";case Hd:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case zd:return Rs(e.type);case Mh:return Rs(e._render);case Oh:t=e._payload,e=e._init;try{return Rs(e(t))}catch(n){}}return null}function Ro(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function rb(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function RL(e){var t=rb(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 $c(e){e._valueTracker||(e._valueTracker=RL(e))}function ob(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=rb(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gd(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 Ug(e,t){var n=t.checked;return Ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function qw(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ro(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 ib(e,t){t=t.checked,t!=null&&Ph(e,"checked",t,!1)}function jg(e,t){ib(e,t);var n=Ro(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")?Vg(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vg(e,t.type,Ro(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gw(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 Vg(e,t,n){(t!=="number"||gd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function PL(e){var t="";return Fd.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Wg(e,t){return e=Ve({children:void 0},t),(t=PL(t.children))&&(e.children=t),e}function Ps(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=""+Ro(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 Kg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Yw(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(U(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(U(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ro(n)}}function sb(e,t){var n=Ro(t.value),r=Ro(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 Xw(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var $g={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function ab(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 qg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?ab(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qc,lb=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!==$g.svg||"innerHTML"in e)e.innerHTML=t;else{for(qc=qc||document.createElement("div"),qc.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ll(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var wl={animationIterationCount:!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},AL=["Webkit","ms","Moz","O"];Object.keys(wl).forEach(function(e){AL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),wl[t]=wl[e]})});function ub(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||wl.hasOwnProperty(e)&&wl[e]?(""+t).trim():t+"px"}function cb(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ub(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var IL=Ve({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 Gg(e,t){if(t){if(IL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function Yg(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}}function Dh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xg=null,As=null,Is=null;function Qw(e){if(e=Kl(e)){if(typeof Xg!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Kd(t),Xg(e.stateNode,e.type,t))}}function db(e){As?Is?Is.push(e):Is=[e]:As=e}function fb(){if(As){var e=As,t=Is;if(Is=As=null,Qw(e),t)for(e=0;e<t.length;e++)Qw(t[e])}}function Fh(e,t){return e(t)}function pb(e,t,n,r,o){return e(t,n,r,o)}function Hh(){}var mb=Fh,si=!1,wg=!1;function zh(){(As!==null||Is!==null)&&(Hh(),fb())}function LL(e,t,n){if(wg)return e(t,n);wg=!0;try{return mb(e,t,n)}finally{wg=!1,zh()}}function Ol(e,t){var n=e.stateNode;if(n===null)return null;var r=Kd(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(U(231,t,typeof n));return n}var Qg=!1;if(Br)try{ys={},Object.defineProperty(ys,"passive",{get:function(){Qg=!0}}),window.addEventListener("test",ys,ys),window.removeEventListener("test",ys,ys)}catch(e){Qg=!1}var ys;function OL(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Sl=!1,hd=null,yd=!1,Zg=null,ML={onError:function(e){Sl=!0,hd=e}};function NL(e,t,n,r,o,i,s,a,l){Sl=!1,hd=null,OL.apply(ML,arguments)}function _L(e,t,n,r,o,i,s,a,l){if(NL.apply(this,arguments),Sl){if(Sl){var u=hd;Sl=!1,hd=null}else throw Error(U(198));yd||(yd=!0,Zg=u)}}function hi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&1026)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function gb(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 Zw(e){if(hi(e)!==e)throw Error(U(188))}function DL(e){var t=e.alternate;if(!t){if(t=hi(e),t===null)throw Error(U(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 Zw(o),e;if(i===r)return Zw(o),t;i=i.sibling}throw Error(U(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(U(189))}}if(n.alternate!==r)throw Error(U(190))}if(n.tag!==3)throw Error(U(188));return n.stateNode.current===n?e:t}function hb(e){if(e=DL(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Jw(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var yb,Bh,vb,xb,Jg=!1,cr=[],xo=null,wo=null,So=null,Ml=new Map,Nl=new Map,nl=[],eS="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 eh(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function tS(e,t){switch(e){case"focusin":case"focusout":xo=null;break;case"dragenter":case"dragleave":wo=null;break;case"mouseover":case"mouseout":So=null;break;case"pointerover":case"pointerout":Ml.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nl.delete(t.pointerId)}}function rl(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=eh(t,n,r,o,i),t!==null&&(t=Kl(t),t!==null&&Bh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function FL(e,t,n,r,o){switch(t){case"focusin":return xo=rl(xo,e,t,n,r,o),!0;case"dragenter":return wo=rl(wo,e,t,n,r,o),!0;case"mouseover":return So=rl(So,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Ml.set(i,rl(Ml.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Nl.set(i,rl(Nl.get(i)||null,e,t,n,r,o)),!0}return!1}function HL(e){var t=ai(e.target);if(t!==null){var n=hi(t);if(n!==null){if(t=n.tag,t===13){if(t=gb(n),t!==null){e.blockedOn=t,xb(e.lanePriority,function(){dt.unstable_runWithPriority(e.priority,function(){vb(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function od(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Kl(n),t!==null&&Bh(t),e.blockedOn=n,!1;t.shift()}return!0}function nS(e,t,n){od(e)&&n.delete(t)}function zL(){for(Jg=!1;0<cr.length;){var e=cr[0];if(e.blockedOn!==null){e=Kl(e.blockedOn),e!==null&&yb(e);break}for(var t=e.targetContainers;0<t.length;){var n=Wh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&cr.shift()}xo!==null&&od(xo)&&(xo=null),wo!==null&&od(wo)&&(wo=null),So!==null&&od(So)&&(So=null),Ml.forEach(nS),Nl.forEach(nS)}function ol(e,t){e.blockedOn===t&&(e.blockedOn=null,Jg||(Jg=!0,dt.unstable_scheduleCallback(dt.unstable_NormalPriority,zL)))}function wb(e){function t(o){return ol(o,e)}if(0<cr.length){ol(cr[0],e);for(var n=1;n<cr.length;n++){var r=cr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(xo!==null&&ol(xo,e),wo!==null&&ol(wo,e),So!==null&&ol(So,e),Ml.forEach(t),Nl.forEach(t),n=0;n<nl.length;n++)r=nl[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<nl.length&&(n=nl[0],n.blockedOn===null);)HL(n),n.blockedOn===null&&nl.shift()}function Gc(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ss={animationend:Gc("Animation","AnimationEnd"),animationiteration:Gc("Animation","AnimationIteration"),animationstart:Gc("Animation","AnimationStart"),transitionend:Gc("Transition","TransitionEnd")},Sg={},Sb={};Br&&(Sb=document.createElement("div").style,"AnimationEvent"in window||(delete Ss.animationend.animation,delete Ss.animationiteration.animation,delete Ss.animationstart.animation),"TransitionEvent"in window||delete Ss.transitionend.transition);function Bd(e){if(Sg[e])return Sg[e];if(!Ss[e])return e;var t=Ss[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Sb)return Sg[e]=t[n];return e}var bb=Bd("animationend"),Eb=Bd("animationiteration"),Tb=Bd("animationstart"),Cb=Bd("transitionend"),kb=new Map,Uh=new Map,BL=["abort","abort",bb,"animationEnd",Eb,"animationIteration",Tb,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Cb,"transitionEnd","waiting","waiting"];function jh(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),Uh.set(r,t),kb.set(r,o),mi(o,[r])}}var UL=dt.unstable_now;UL();var He=8;function xs(e){if((1&e)!==0)return He=15,1;if((2&e)!==0)return He=14,2;if((4&e)!==0)return He=13,4;var t=24&e;return t!==0?(He=12,t):(e&32)!==0?(He=11,32):(t=192&e,t!==0?(He=10,t):(e&256)!==0?(He=9,256):(t=3584&e,t!==0?(He=8,t):(e&4096)!==0?(He=7,4096):(t=4186112&e,t!==0?(He=6,t):(t=62914560&e,t!==0?(He=5,t):e&67108864?(He=4,67108864):(e&134217728)!==0?(He=3,134217728):(t=805306368&e,t!==0?(He=2,t):(1073741824&e)!==0?(He=1,1073741824):(He=8,e))))))}function jL(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function VL(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(U(358,e))}}function _l(e,t){var n=e.pendingLanes;if(n===0)return He=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=He=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=xs(l),o=He):(a&=i,a!==0&&(r=xs(a),o=He))}else i=n&~s,i!==0?(r=xs(i),o=He):a!==0&&(r=xs(a),o=He);if(r===0)return 0;if(r=31-Po(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&(t&s)===0){if(xs(t),o<=He)return t;He=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Po(t),o=1<<n,r|=e[n],t&=~o;return r}function Rb(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function vd(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=ws(24&~t),e===0?vd(10,t):e;case 10:return e=ws(192&~t),e===0?vd(8,t):e;case 8:return e=ws(3584&~t),e===0&&(e=ws(4186112&~t),e===0&&(e=512)),e;case 2:return t=ws(805306368&~t),t===0&&(t=268435456),t}throw Error(U(358,e))}function ws(e){return e&-e}function bg(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ud(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-Po(t),e[t]=n}var Po=Math.clz32?Math.clz32:$L,WL=Math.log,KL=Math.LN2;function $L(e){return e===0?32:31-(WL(e)/KL|0)|0}var qL=dt.unstable_UserBlockingPriority,GL=dt.unstable_runWithPriority,id=!0;function YL(e,t,n,r){si||Hh();var o=Vh,i=si;si=!0;try{pb(o,e,t,n,r)}finally{(si=i)||zh()}}function XL(e,t,n,r){GL(qL,Vh.bind(null,e,t,n,r))}function Vh(e,t,n,r){if(id){var o;if((o=(t&4)===0)&&0<cr.length&&-1<eS.indexOf(e))e=eh(null,e,t,n,r),cr.push(e);else{var i=Wh(e,t,n,r);if(i===null)o&&tS(e,r);else{if(o){if(-1<eS.indexOf(e)){e=eh(i,e,t,n,r),cr.push(e);return}if(FL(i,e,t,n,r))return;tS(e,r)}Bb(e,t,r,null,n)}}}}function Wh(e,t,n,r){var o=Dh(r);if(o=ai(o),o!==null){var i=hi(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=gb(i),o!==null)return o;o=null}else if(s===3){if(i.stateNode.hydrate)return i.tag===3?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Bb(e,t,r,o,n),null}var ho=null,Kh=null,sd=null;function Pb(){if(sd)return sd;var e,t=Kh,n=t.length,r,o="value"in ho?ho.value:ho.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 sd=o.slice(e,1<r?1-r:void 0)}function ad(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 Yc(){return!0}function rS(){return!1}function cn(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)?Yc:rS,this.isPropagationStopped=rS,this}return Ve(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=Yc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Yc)},persist:function(){},isPersistent:Yc}),t}var Us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$h=cn(Us),Wl=Ve({},Us,{view:0,detail:0}),QL=cn(Wl),Eg,Tg,il,jd=Ve({},Wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qh,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!==il&&(il&&e.type==="mousemove"?(Eg=e.screenX-il.screenX,Tg=e.screenY-il.screenY):Tg=Eg=0,il=e),Eg)},movementY:function(e){return"movementY"in e?e.movementY:Tg}}),oS=cn(jd),ZL=Ve({},jd,{dataTransfer:0}),JL=cn(ZL),eO=Ve({},Wl,{relatedTarget:0}),Cg=cn(eO),tO=Ve({},Us,{animationName:0,elapsedTime:0,pseudoElement:0}),nO=cn(tO),rO=Ve({},Us,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),oO=cn(rO),iO=Ve({},Us,{data:0}),iS=cn(iO),sO={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},aO={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"},lO={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uO(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lO[e])?!!t[e]:!1}function qh(){return uO}var cO=Ve({},Wl,{key:function(e){if(e.key){var t=sO[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ad(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?aO[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qh,charCode:function(e){return e.type==="keypress"?ad(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ad(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dO=cn(cO),fO=Ve({},jd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sS=cn(fO),pO=Ve({},Wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qh}),mO=cn(pO),gO=Ve({},Us,{propertyName:0,elapsedTime:0,pseudoElement:0}),hO=cn(gO),yO=Ve({},jd,{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}),vO=cn(yO),xO=[9,13,27,32],Gh=Br&&"CompositionEvent"in window,bl=null;Br&&"documentMode"in document&&(bl=document.documentMode);var wO=Br&&"TextEvent"in window&&!bl,Ab=Br&&(!Gh||bl&&8<bl&&11>=bl),aS=" ",lS=!1;function Ib(e,t){switch(e){case"keyup":return xO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bs=!1;function SO(e,t){switch(e){case"compositionend":return Lb(t);case"keypress":return t.which!==32?null:(lS=!0,aS);case"textInput":return e=t.data,e===aS&&lS?null:e;default:return null}}function bO(e,t){if(bs)return e==="compositionend"||!Gh&&Ib(e,t)?(e=Pb(),sd=Kh=ho=null,bs=!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 Ab&&t.locale!=="ko"?null:t.data;default:return null}}var EO={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 uS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!EO[e.type]:t==="textarea"}function Ob(e,t,n,r){db(r),t=xd(t,"onChange"),0<t.length&&(n=new $h("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var El=null,Dl=null;function TO(e){Fb(e,0)}function Vd(e){var t=Ts(e);if(ob(t))return e}function CO(e,t){if(e==="change")return t}var Mb=!1;Br&&(Br?(Qc="oninput"in document,Qc||(kg=document.createElement("div"),kg.setAttribute("oninput","return;"),Qc=typeof kg.oninput=="function"),Xc=Qc):Xc=!1,Mb=Xc&&(!document.documentMode||9<document.documentMode));var Xc,Qc,kg;function cS(){El&&(El.detachEvent("onpropertychange",Nb),Dl=El=null)}function Nb(e){if(e.propertyName==="value"&&Vd(Dl)){var t=[];if(Ob(t,Dl,e,Dh(e)),e=TO,si)e(t);else{si=!0;try{Fh(e,t)}finally{si=!1,zh()}}}}function kO(e,t,n){e==="focusin"?(cS(),El=t,Dl=n,El.attachEvent("onpropertychange",Nb)):e==="focusout"&&cS()}function RO(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vd(Dl)}function PO(e,t){if(e==="click")return Vd(t)}function AO(e,t){if(e==="input"||e==="change")return Vd(t)}function IO(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:IO,LO=Object.prototype.hasOwnProperty;function Fl(e,t){if(Sn(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++)if(!LO.call(t,n[r])||!Sn(e[n[r]],t[n[r]]))return!1;return!0}function dS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fS(e,t){var n=dS(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=dS(n)}}function _b(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_b(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pS(){for(var e=window,t=gd();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=gd(e.document)}return t}function th(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")}var OO=Br&&"documentMode"in document&&11>=document.documentMode,Es=null,nh=null,Tl=null,rh=!1;function mS(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rh||Es==null||Es!==gd(r)||(r=Es,"selectionStart"in r&&th(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}),Tl&&Fl(Tl,r)||(Tl=r,r=xd(nh,"onSelect"),0<r.length&&(t=new $h("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Es)))}jh("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);jh("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);jh(BL,2);for(Rg="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Zc=0;Zc<Rg.length;Zc++)Uh.set(Rg[Zc],0);var Rg,Zc;Fs("onMouseEnter",["mouseout","mouseover"]);Fs("onMouseLeave",["mouseout","mouseover"]);Fs("onPointerEnter",["pointerout","pointerover"]);Fs("onPointerLeave",["pointerout","pointerover"]);mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));mi("onBeforeInput",["compositionend","keypress","textInput","paste"]);mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Db=new Set("cancel close invalid load scroll toggle".split(" ").concat(gl));function gS(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,_L(r,t,void 0,e),e.currentTarget=null}function Fb(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,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;gS(o,a,u),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;gS(o,a,u),i=l}}}if(yd)throw e=Zg,yd=!1,Zg=null,e}function Be(e,t){var n=jb(t),r=e+"__bubble";n.has(r)||(zb(t,e,2,!1),n.add(r))}var hS="_reactListening"+Math.random().toString(36).slice(2);function Hb(e){e[hS]||(e[hS]=!0,tb.forEach(function(t){Db.has(t)||yS(t,!1,e,null),yS(t,!0,e,null)}))}function yS(e,t,n,r){var o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,i=n;if(e==="selectionchange"&&n.nodeType!==9&&(i=n.ownerDocument),r!==null&&!t&&Db.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=jb(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),zb(i,e,o,t),s.add(a))}function zb(e,t,n,r){var o=Uh.get(t);switch(o===void 0?2:o){case 0:o=YL;break;case 1:o=XL;break;default:o=Vh}n=o.bind(null,t,n,e),o=void 0,!Qg||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 Bb(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=ai(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}LL(function(){var u=i,c=Dh(n),f=[];e:{var d=kb.get(e);if(d!==void 0){var p=$h,y=e;switch(e){case"keypress":if(ad(n)===0)break e;case"keydown":case"keyup":p=dO;break;case"focusin":y="focus",p=Cg;break;case"focusout":y="blur",p=Cg;break;case"beforeblur":case"afterblur":p=Cg;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=oS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=JL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=mO;break;case bb:case Eb:case Tb:p=nO;break;case Cb:p=hO;break;case"scroll":p=QL;break;case"wheel":p=vO;break;case"copy":case"cut":case"paste":p=oO;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=sS}var h=(t&4)!==0,g=!h&&e==="scroll",m=h?d!==null?d+"Capture":null:d;h=[];for(var v=u,x;v!==null;){x=v;var w=x.stateNode;if(x.tag===5&&w!==null&&(x=w,m!==null&&(w=Ol(v,m),w!=null&&h.push(Hl(v,w,x)))),g)break;v=v.return}0<h.length&&(d=new p(d,y,null,n,c),f.push({event:d,listeners:h}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&(t&16)===0&&(y=n.relatedTarget||n.fromElement)&&(ai(y)||y[js]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?ai(y):null,y!==null&&(g=hi(y),y!==g||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(h=oS,w="onMouseLeave",m="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(h=sS,w="onPointerLeave",m="onPointerEnter",v="pointer"),g=p==null?d:Ts(p),x=y==null?d:Ts(y),d=new h(w,v+"leave",p,n,c),d.target=g,d.relatedTarget=x,w=null,ai(c)===u&&(h=new h(m,v+"enter",y,n,c),h.target=x,h.relatedTarget=g,w=h),g=w,p&&y)t:{for(h=p,m=y,v=0,x=h;x;x=vs(x))v++;for(x=0,w=m;w;w=vs(w))x++;for(;0<v-x;)h=vs(h),v--;for(;0<x-v;)m=vs(m),x--;for(;v--;){if(h===m||m!==null&&h===m.alternate)break t;h=vs(h),m=vs(m)}h=null}else h=null;p!==null&&vS(f,d,p,h,!1),y!==null&&g!==null&&vS(f,g,y,h,!0)}}e:{if(d=u?Ts(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var C=CO;else if(uS(d))if(Mb)C=AO;else{C=RO;var E=kO}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=PO);if(C&&(C=C(e,u))){Ob(f,C,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Vg(d,"number",d.value)}switch(E=u?Ts(u):window,e){case"focusin":(uS(E)||E.contentEditable==="true")&&(Es=E,nh=u,Tl=null);break;case"focusout":Tl=nh=Es=null;break;case"mousedown":rh=!0;break;case"contextmenu":case"mouseup":case"dragend":rh=!1,mS(f,n,c);break;case"selectionchange":if(OO)break;case"keydown":case"keyup":mS(f,n,c)}var k;if(Gh)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else bs?Ib(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(Ab&&n.locale!=="ko"&&(bs||I!=="onCompositionStart"?I==="onCompositionEnd"&&bs&&(k=Pb()):(ho=c,Kh="value"in ho?ho.value:ho.textContent,bs=!0)),E=xd(u,I),0<E.length&&(I=new iS(I,e,null,n,c),f.push({event:I,listeners:E}),k?I.data=k:(k=Lb(n),k!==null&&(I.data=k)))),(k=wO?SO(e,n):bO(e,n))&&(u=xd(u,"onBeforeInput"),0<u.length&&(c=new iS("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=k))}Fb(f,t)})}function Hl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xd(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ol(e,n),i!=null&&r.unshift(Hl(e,i,o)),i=Ol(e,t),i!=null&&r.push(Hl(e,i,o))),e=e.return}return r}function vs(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function vS(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=Ol(n,i),l!=null&&s.unshift(Hl(n,l,a))):o||(l=Ol(n,i),l!=null&&s.push(Hl(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function wd(){}var Pg=null,Ag=null;function Ub(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function oh(e,t){return e==="textarea"||e==="option"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xS=typeof setTimeout=="function"?setTimeout:void 0,MO=typeof clearTimeout=="function"?clearTimeout:void 0;function Yh(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Ls(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function wS(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 Ig=0;function NO(e){return{$$typeof:Nh,toString:e,valueOf:e}}var Wd=Math.random().toString(36).slice(2),yo="__reactFiber$"+Wd,Sd="__reactProps$"+Wd,js="__reactContainer$"+Wd,SS="__reactEvents$"+Wd;function ai(e){var t=e[yo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[js]||n[yo]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=wS(e);e!==null;){if(n=e[yo])return n;e=wS(e)}return t}e=n,n=e.parentNode}return null}function Kl(e){return e=e[yo]||e[js],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ts(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Kd(e){return e[Sd]||null}function jb(e){var t=e[SS];return t===void 0&&(t=e[SS]=new Set),t}var ih=[],Cs=-1;function Oo(e){return{current:e}}function Ue(e){0>Cs||(e.current=ih[Cs],ih[Cs]=null,Cs--)}function Xe(e,t){Cs++,ih[Cs]=e.current,e.current=t}var Ao={},Rt=Oo(Ao),tn=Oo(!1),di=Ao;function Hs(e,t){var n=e.type.contextTypes;if(!n)return Ao;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 nn(e){return e=e.childContextTypes,e!=null}function bd(){Ue(tn),Ue(Rt)}function bS(e,t,n){if(Rt.current!==Ao)throw Error(U(168));Xe(Rt,t),Xe(tn,n)}function Vb(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in e))throw Error(U(108,Rs(t)||"Unknown",o));return Ve({},n,r)}function ld(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ao,di=Rt.current,Xe(Rt,e),Xe(tn,tn.current),!0}function ES(e,t,n){var r=e.stateNode;if(!r)throw Error(U(169));n?(e=Vb(e,t,di),r.__reactInternalMemoizedMergedChildContext=e,Ue(tn),Ue(Rt),Xe(Rt,e)):Ue(tn),Xe(tn,n)}var Xh=null,ci=null,_O=dt.unstable_runWithPriority,Qh=dt.unstable_scheduleCallback,sh=dt.unstable_cancelCallback,DO=dt.unstable_shouldYield,TS=dt.unstable_requestPaint,ah=dt.unstable_now,FO=dt.unstable_getCurrentPriorityLevel,$d=dt.unstable_ImmediatePriority,Wb=dt.unstable_UserBlockingPriority,Kb=dt.unstable_NormalPriority,$b=dt.unstable_LowPriority,qb=dt.unstable_IdlePriority,Lg={},HO=TS!==void 0?TS:function(){},_r=null,ud=null,Og=!1,CS=ah(),Ct=1e4>CS?ah:function(){return ah()-CS};function zs(){switch(FO()){case $d:return 99;case Wb:return 98;case Kb:return 97;case $b:return 96;case qb:return 95;default:throw Error(U(332))}}function Gb(e){switch(e){case 99:return $d;case 98:return Wb;case 97:return Kb;case 96:return $b;case 95:return qb;default:throw Error(U(332))}}function fi(e,t){return e=Gb(e),_O(e,t)}function zl(e,t,n){return e=Gb(e),Qh(e,t,n)}function gr(){if(ud!==null){var e=ud;ud=null,sh(e)}Yb()}function Yb(){if(!Og&&_r!==null){Og=!0;var e=0;try{var t=_r;fi(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),_r=null}catch(n){throw _r!==null&&(_r=_r.slice(e+1)),Qh($d,gr),n}finally{Og=!1}}}var zO=gi.ReactCurrentBatchConfig;function Hn(e,t){if(e&&e.defaultProps){t=Ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ed=Oo(null),Td=null,ks=null,Cd=null;function Zh(){Cd=ks=Td=null}function Jh(e){var t=Ed.current;Ue(Ed),e.type._context._currentValue=t}function Xb(e,t){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)===t){if(n===null||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,n!==null&&(n.childLanes|=t);e=e.return}}function Os(e,t){Td=e,Cd=ks=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(zn=!0),e.firstContext=null)}function Tn(e,t){if(Cd!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Cd=e,t=1073741823),t={context:e,observedBits:t,next:null},ks===null){if(Td===null)throw Error(U(308));ks=t,Td.dependencies={lanes:0,firstContext:t,responders:null}}else ks=ks.next=t;return e._currentValue}var mo=!1;function ey(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Qb(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 bo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Eo(e,t){if(e=e.updateQueue,e!==null){e=e.shared;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function kS(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 Bl(e,t,n,r){var o=e.updateQueue;mo=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var f=c.lastBaseUpdate;f!==s&&(f===null?c.firstBaseUpdate=u:f.next=u,c.lastBaseUpdate=l)}}if(i!==null){f=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var p=e,y=i;switch(a=t,d=n,y.tag){case 1:if(p=y.payload,typeof p=="function"){f=p.call(d,f,a);break e}f=p;break e;case 3:p.flags=p.flags&-4097|64;case 0:if(p=y.payload,a=typeof p=="function"?p.call(d,f,a):p,a==null)break e;f=Ve({},f,a);break e;case 2:mo=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(!0);c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,ql|=s,e.lanes=s,e.memoizedState=f}}function RS(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(U(191,o));o.call(r)}}}var Zb=new Fd.Component().refs;function kd(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qd={isMounted:function(e){return(e=e._reactInternals)?hi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=un(),o=To(e),i=bo(r,o);i.payload=t,n!=null&&(i.callback=n),Eo(e,i),Co(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=un(),o=To(e),i=bo(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Eo(e,i),Co(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=un(),r=To(e),o=bo(n,r);o.tag=2,t!=null&&(o.callback=t),Eo(e,o),Co(e,r,n)}};function PS(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?!Fl(n,r)||!Fl(o,i):!0}function Jb(e,t,n){var r=!1,o=Ao,i=t.contextType;return typeof i=="object"&&i!==null?i=Tn(i):(o=nn(t)?di:Rt.current,r=t.contextTypes,i=(r=r!=null)?Hs(e,o):Ao),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=qd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function AS(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&&qd.enqueueReplaceState(t,t.state,null)}function lh(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Zb,ey(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Tn(i):(i=nn(t)?di:Rt.current,o.context=Hs(e,i)),Bl(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(kd(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&&qd.enqueueReplaceState(o,o.state,null),Bl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Jc=Array.isArray;function sl(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(U(309));var r=n.stateNode}if(!r)throw Error(U(147,e));var o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var s=r.refs;s===Zb&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(U(284));if(!n._owner)throw Error(U(290,e))}return e}function ed(e,t){if(e.type!=="textarea")throw Error(U(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function e1(e){function t(g,m){if(e){var v=g.lastEffect;v!==null?(v.nextEffect=m,g.lastEffect=m):g.firstEffect=g.lastEffect=m,m.nextEffect=null,m.flags=8}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function r(g,m){for(g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function o(g,m){return g=Lo(g,m),g.index=0,g.sibling=null,g}function i(g,m,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<m?(g.flags=2,m):v):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,v,x){return m===null||m.tag!==6?(m=Fg(v,g.mode,x),m.return=g,m):(m=o(m,v),m.return=g,m)}function l(g,m,v,x){return m!==null&&m.elementType===v.type?(x=o(m,v.props),x.ref=sl(g,m,v),x.return=g,x):(x=pd(v.type,v.key,v.props,null,g.mode,x),x.ref=sl(g,m,v),x.return=g,x)}function u(g,m,v,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=Hg(v,g.mode,x),m.return=g,m):(m=o(m,v.children||[]),m.return=g,m)}function c(g,m,v,x,w){return m===null||m.tag!==7?(m=Ds(v,g.mode,x,w),m.return=g,m):(m=o(m,v),m.return=g,m)}function f(g,m,v){if(typeof m=="string"||typeof m=="number")return m=Fg(""+m,g.mode,v),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case pl:return v=pd(m.type,m.key,m.props,null,g.mode,v),v.ref=sl(g,null,m),v.return=g,v;case ii:return m=Hg(m,g.mode,v),m.return=g,m}if(Jc(m)||tl(m))return m=Ds(m,g.mode,v,null),m.return=g,m;ed(g,m)}return null}function d(g,m,v,x){var w=m!==null?m.key:null;if(typeof v=="string"||typeof v=="number")return w!==null?null:a(g,m,""+v,x);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case pl:return v.key===w?v.type===go?c(g,m,v.props.children,x,w):l(g,m,v,x):null;case ii:return v.key===w?u(g,m,v,x):null}if(Jc(v)||tl(v))return w!==null?null:c(g,m,v,x,null);ed(g,v)}return null}function p(g,m,v,x,w){if(typeof x=="string"||typeof x=="number")return g=g.get(v)||null,a(m,g,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case pl:return g=g.get(x.key===null?v:x.key)||null,x.type===go?c(m,g,x.props.children,w,x.key):l(m,g,x,w);case ii:return g=g.get(x.key===null?v:x.key)||null,u(m,g,x,w)}if(Jc(x)||tl(x))return g=g.get(v)||null,c(m,g,x,w,null);ed(m,x)}return null}function y(g,m,v,x){for(var w=null,C=null,E=m,k=m=0,I=null;E!==null&&k<v.length;k++){E.index>k?(I=E,E=null):I=E.sibling;var L=d(g,E,v[k],x);if(L===null){E===null&&(E=I);break}e&&E&&L.alternate===null&&t(g,E),m=i(L,m,k),C===null?w=L:C.sibling=L,C=L,E=I}if(k===v.length)return n(g,E),w;if(E===null){for(;k<v.length;k++)E=f(g,v[k],x),E!==null&&(m=i(E,m,k),C===null?w=E:C.sibling=E,C=E);return w}for(E=r(g,E);k<v.length;k++)I=p(E,g,k,v[k],x),I!==null&&(e&&I.alternate!==null&&E.delete(I.key===null?k:I.key),m=i(I,m,k),C===null?w=I:C.sibling=I,C=I);return e&&E.forEach(function(G){return t(g,G)}),w}function h(g,m,v,x){var w=tl(v);if(typeof w!="function")throw Error(U(150));if(v=w.call(v),v==null)throw Error(U(151));for(var C=w=null,E=m,k=m=0,I=null,L=v.next();E!==null&&!L.done;k++,L=v.next()){E.index>k?(I=E,E=null):I=E.sibling;var G=d(g,E,L.value,x);if(G===null){E===null&&(E=I);break}e&&E&&G.alternate===null&&t(g,E),m=i(G,m,k),C===null?w=G:C.sibling=G,C=G,E=I}if(L.done)return n(g,E),w;if(E===null){for(;!L.done;k++,L=v.next())L=f(g,L.value,x),L!==null&&(m=i(L,m,k),C===null?w=L:C.sibling=L,C=L);return w}for(E=r(g,E);!L.done;k++,L=v.next())L=p(E,g,k,L.value,x),L!==null&&(e&&L.alternate!==null&&E.delete(L.key===null?k:L.key),m=i(L,m,k),C===null?w=L:C.sibling=L,C=L);return e&&E.forEach(function(F){return t(g,F)}),w}return function(g,m,v,x){var w=typeof v=="object"&&v!==null&&v.type===go&&v.key===null;w&&(v=v.props.children);var C=typeof v=="object"&&v!==null;if(C)switch(v.$$typeof){case pl:e:{for(C=v.key,w=m;w!==null;){if(w.key===C){switch(w.tag){case 7:if(v.type===go){n(g,w.sibling),m=o(w,v.props.children),m.return=g,g=m;break e}break;default:if(w.elementType===v.type){n(g,w.sibling),m=o(w,v.props),m.ref=sl(g,w,v),m.return=g,g=m;break e}}n(g,w);break}else t(g,w);w=w.sibling}v.type===go?(m=Ds(v.props.children,g.mode,x,v.key),m.return=g,g=m):(x=pd(v.type,v.key,v.props,null,g.mode,x),x.ref=sl(g,m,v),x.return=g,g=x)}return s(g);case ii:e:{for(w=v.key;m!==null;){if(m.key===w)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(g,m.sibling),m=o(m,v.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=Hg(v,g.mode,x),m.return=g,g=m}return s(g)}if(typeof v=="string"||typeof v=="number")return v=""+v,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,v),m.return=g,g=m):(n(g,m),m=Fg(v,g.mode,x),m.return=g,g=m),s(g);if(Jc(v))return y(g,m,v,x);if(tl(v))return h(g,m,v,x);if(C&&ed(g,v),typeof v=="undefined"&&!w)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(U(152,Rs(g.type)||"Component"))}return n(g,m)}}var Rd=e1(!0),t1=e1(!1),$l={},pr=Oo($l),Ul=Oo($l),jl=Oo($l);function li(e){if(e===$l)throw Error(U(174));return e}function uh(e,t){switch(Xe(jl,t),Xe(Ul,e),Xe(pr,$l),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:qg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=qg(t,e)}Ue(pr),Xe(pr,t)}function Bs(){Ue(pr),Ue(Ul),Ue(jl)}function IS(e){li(jl.current);var t=li(pr.current),n=qg(t,e.type);t!==n&&(Xe(Ul,e),Xe(pr,n))}function ty(e){Ul.current===e&&(Ue(pr),Ue(Ul))}var Ye=Oo(0);function Pd(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&64)!==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 Fr=null,vo=null,mr=!1;function n1(e,t){var n=bn(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,e.lastEffect!==null?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function LS(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,!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,!0):!1;case 13:return!1;default:return!1}}function ch(e){if(mr){var t=vo;if(t){var n=t;if(!LS(e,t)){if(t=Ls(n.nextSibling),!t||!LS(e,t)){e.flags=e.flags&-1025|2,mr=!1,Fr=e;return}n1(Fr,n)}Fr=e,vo=Ls(t.firstChild)}else e.flags=e.flags&-1025|2,mr=!1,Fr=e}}function OS(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Fr=e}function td(e){if(e!==Fr)return!1;if(!mr)return OS(e),mr=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!oh(t,e.memoizedProps))for(t=vo;t;)n1(e,t),t=Ls(t.nextSibling);if(OS(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){vo=Ls(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}vo=null}}else vo=Fr?Ls(e.stateNode.nextSibling):null;return!0}function Mg(){vo=Fr=null,mr=!1}var Ms=[];function ny(){for(var e=0;e<Ms.length;e++)Ms[e]._workInProgressVersionPrimary=null;Ms.length=0}var Cl=gi.ReactCurrentDispatcher,En=gi.ReactCurrentBatchConfig,Vl=0,Ze=null,Tt=null,ht=null,Ad=!1,kl=!1;function Jt(){throw Error(U(321))}function ry(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sn(e[n],t[n]))return!1;return!0}function oy(e,t,n,r,o,i){if(Vl=i,Ze=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cl.current=e===null||e.memoizedState===null?UO:jO,e=n(r,o),kl){i=0;do{if(kl=!1,!(25>i))throw Error(U(301));i+=1,ht=Tt=null,t.updateQueue=null,Cl.current=VO,e=n(r,o)}while(kl)}if(Cl.current=Md,t=Tt!==null&&Tt.next!==null,Vl=0,ht=Tt=Ze=null,Ad=!1,t)throw Error(U(300));return e}function ui(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?Ze.memoizedState=ht=e:ht=ht.next=e,ht}function yi(){if(Tt===null){var e=Ze.alternate;e=e!==null?e.memoizedState:null}else e=Tt.next;var t=ht===null?Ze.memoizedState:ht.next;if(t!==null)ht=t,Tt=e;else{if(e===null)throw Error(U(310));Tt=e,e={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},ht===null?Ze.memoizedState=ht=e:ht=ht.next=e}return ht}function dr(e,t){return typeof t=="function"?t(e):t}function al(e){var t=yi(),n=t.queue;if(n===null)throw Error(U(311));n.lastRenderedReducer=e;var r=Tt,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){o=o.next,r=r.baseState;var a=s=i=null,l=o;do{var u=l.lane;if((Vl&u)===u)a!==null&&(a=a.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),r=l.eagerReducer===e?l.eagerState:e(r,l.action);else{var c={lane:u,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};a===null?(s=a=c,i=r):a=a.next=c,Ze.lanes|=u,ql|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,Sn(r,t.memoizedState)||(zn=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ll(e){var t=yi(),n=t.queue;if(n===null)throw Error(U(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);Sn(i,t.memoizedState)||(zn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function MS(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(o!==null?e=o===r:(e=e.mutableReadLanes,(e=(Vl&e)===e)&&(t._workInProgressVersionPrimary=r,Ms.push(t))),e)return n(t._source);throw Ms.push(t),Error(U(350))}function r1(e,t,n,r){var o=Dt;if(o===null)throw Error(U(349));var i=t._getVersion,s=i(t._source),a=Cl.current,l=a.useState(function(){return MS(o,t,n)}),u=l[1],c=l[0];l=ht;var f=e.memoizedState,d=f.refs,p=d.getSnapshot,y=f.source;f=f.subscribe;var h=Ze;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!Sn(s,g)){g=n(t._source),Sn(c,g)||(u(g),g=To(h),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,v=g;0<v;){var x=31-Po(v),w=1<<x;m[x]|=g,v&=~w}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var v=To(h);o.mutableReadLanes|=v&o.pendingLanes}catch(x){m(function(){throw x})}})},[t,r]),Sn(p,n)&&Sn(y,t)&&Sn(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:dr,lastRenderedState:c},e.dispatch=u=ay.bind(null,Ze,e),l.queue=e,l.baseQueue=null,c=MS(o,t,n),l.memoizedState=l.baseState=c),c}function o1(e,t,n){var r=yi();return r1(r,e,t,n)}function ul(e){var t=ui();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:dr,lastRenderedState:e},e=e.dispatch=ay.bind(null,Ze,e),[t.memoizedState,e]}function Id(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ze.updateQueue,t===null?(t={lastEffect:null},Ze.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 NS(e){var t=ui();return e={current:e},t.memoizedState=e}function Ld(){return yi().memoizedState}function dh(e,t,n,r){var o=ui();Ze.flags|=e,o.memoizedState=Id(1|t,n,void 0,r===void 0?null:r)}function iy(e,t,n,r){var o=yi();r=r===void 0?null:r;var i=void 0;if(Tt!==null){var s=Tt.memoizedState;if(i=s.destroy,r!==null&&ry(r,s.deps)){Id(t,n,i,r);return}}Ze.flags|=e,o.memoizedState=Id(1|t,n,i,r)}function _S(e,t){return dh(516,4,e,t)}function Od(e,t){return iy(516,4,e,t)}function i1(e,t){return iy(4,2,e,t)}function s1(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 a1(e,t,n){return n=n!=null?n.concat([e]):null,iy(4,2,s1.bind(null,t,e),n)}function sy(){}function l1(e,t){var n=yi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ry(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function u1(e,t){var n=yi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ry(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function BO(e,t){var n=zs();fi(98>n?98:n,function(){e(!0)}),fi(97<n?97:n,function(){var r=En.transition;En.transition=1;try{e(!1),t()}finally{En.transition=r}})}function ay(e,t,n){var r=un(),o=To(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},s=t.pending;if(s===null?i.next=i:(i.next=s.next,s.next=i),t.pending=i,s=e.alternate,e===Ze||s!==null&&s===Ze)kl=Ad=!0;else{if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,l=s(a,n);if(i.eagerReducer=s,i.eagerState=l,Sn(l,a))return}catch(u){}finally{}Co(e,o,r)}}var Md={readContext:Tn,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useMutableSource:Jt,useOpaqueIdentifier:Jt,unstable_isNewReconciler:!1},UO={readContext:Tn,useCallback:function(e,t){return ui().memoizedState=[e,t===void 0?null:t],e},useContext:Tn,useEffect:_S,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,dh(4,2,s1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return dh(4,2,e,t)},useMemo:function(e,t){var n=ui();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ui();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},e=e.dispatch=ay.bind(null,Ze,e),[r.memoizedState,e]},useRef:NS,useState:ul,useDebugValue:sy,useDeferredValue:function(e){var t=ul(e),n=t[0],r=t[1];return _S(function(){var o=En.transition;En.transition=1;try{r(e)}finally{En.transition=o}},[e]),n},useTransition:function(){var e=ul(!1),t=e[0];return e=BO.bind(null,e[1]),NS(e),[e,t]},useMutableSource:function(e,t,n){var r=ui();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},r1(r,e,t,n)},useOpaqueIdentifier:function(){if(mr){var e=!1,t=NO(function(){throw e||(e=!0,n("r:"+(Ig++).toString(36))),Error(U(355))}),n=ul(t)[1];return(Ze.mode&2)===0&&(Ze.flags|=516,Id(5,function(){n("r:"+(Ig++).toString(36))},void 0,null)),t}return t="r:"+(Ig++).toString(36),ul(t),t},unstable_isNewReconciler:!1},jO={readContext:Tn,useCallback:l1,useContext:Tn,useEffect:Od,useImperativeHandle:a1,useLayoutEffect:i1,useMemo:u1,useReducer:al,useRef:Ld,useState:function(){return al(dr)},useDebugValue:sy,useDeferredValue:function(e){var t=al(dr),n=t[0],r=t[1];return Od(function(){var o=En.transition;En.transition=1;try{r(e)}finally{En.transition=o}},[e]),n},useTransition:function(){var e=al(dr)[0];return[Ld().current,e]},useMutableSource:o1,useOpaqueIdentifier:function(){return al(dr)[0]},unstable_isNewReconciler:!1},VO={readContext:Tn,useCallback:l1,useContext:Tn,useEffect:Od,useImperativeHandle:a1,useLayoutEffect:i1,useMemo:u1,useReducer:ll,useRef:Ld,useState:function(){return ll(dr)},useDebugValue:sy,useDeferredValue:function(e){var t=ll(dr),n=t[0],r=t[1];return Od(function(){var o=En.transition;En.transition=1;try{r(e)}finally{En.transition=o}},[e]),n},useTransition:function(){var e=ll(dr)[0];return[Ld().current,e]},useMutableSource:o1,useOpaqueIdentifier:function(){return ll(dr)[0]},unstable_isNewReconciler:!1},WO=gi.ReactCurrentOwner,zn=!1;function en(e,t,n,r){t.child=e===null?t1(t,null,n,r):Rd(t,e.child,n,r)}function DS(e,t,n,r,o){n=n.render;var i=t.ref;return Os(t,o),r=oy(e,t,n,r,i,o),e!==null&&!zn?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Hr(e,t,o)):(t.flags|=1,en(e,t,r,o),t.child)}function FS(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!py(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,c1(e,t,s,r,o,i)):(e=pd(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}return s=e.child,(o&i)===0&&(o=s.memoizedProps,n=n.compare,n=n!==null?n:Fl,n(o,r)&&e.ref===t.ref)?Hr(e,t,i):(t.flags|=1,e=Lo(s,r),e.ref=t.ref,e.return=t,t.child=e)}function c1(e,t,n,r,o,i){if(e!==null&&Fl(e.memoizedProps,r)&&e.ref===t.ref)if(zn=!1,(i&o)!==0)(e.flags&16384)!==0&&(zn=!0);else return t.lanes=e.lanes,Hr(e,t,i);return fh(e,t,n,r,i)}function Ng(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden"||r.mode==="unstable-defer-without-hiding")if((t.mode&4)===0)t.memoizedState={baseLanes:0},rd(t,n);else if((n&1073741824)!==0)t.memoizedState={baseLanes:0},rd(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},rd(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,rd(t,r);return en(e,t,o,n),t.child}function d1(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function fh(e,t,n,r,o){var i=nn(n)?di:Rt.current;return i=Hs(t,i),Os(t,o),n=oy(e,t,n,r,i,o),e!==null&&!zn?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Hr(e,t,o)):(t.flags|=1,en(e,t,n,o),t.child)}function HS(e,t,n,r,o){if(nn(n)){var i=!0;ld(t)}else i=!1;if(Os(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),Jb(t,n,r),lh(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Tn(u):(u=nn(n)?di:Rt.current,u=Hs(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&AS(t,s,r,u),mo=!1;var d=t.memoizedState;s.state=d,Bl(t,r,s,o),l=t.memoizedState,a!==r||d!==l||tn.current||mo?(typeof c=="function"&&(kd(t,n,c,r),l=t.memoizedState),(a=mo||PS(t,n,a,r,d,l,u))?(f||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|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,Qb(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Hn(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Tn(l):(l=nn(n)?di:Rt.current,l=Hs(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&AS(t,s,r,l),mo=!1,d=t.memoizedState,s.state=d,Bl(t,r,s,o);var y=t.memoizedState;a!==f||d!==y||tn.current||mo?(typeof p=="function"&&(kd(t,n,p,r),y=t.memoizedState),(u=mo||PS(t,n,u,r,d,y,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return ph(e,t,n,r,i,o)}function ph(e,t,n,r,o,i){d1(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&ES(t,n,!1),Hr(e,t,i);r=t.stateNode,WO.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Rd(t,e.child,null,i),t.child=Rd(t,null,a,i)):en(e,t,a,i),t.memoizedState=r.state,o&&ES(t,n,!0),t.child}function zS(e){var t=e.stateNode;t.pendingContext?bS(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bS(e,t.context,!1),uh(e,t.containerInfo)}var nd={dehydrated:null,retryLane:0};function BS(e,t,n){var r=t.pendingProps,o=Ye.current,i=!1,s;return(s=(t.flags&64)!==0)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-65):e!==null&&e.memoizedState===null||r.fallback===void 0||r.unstable_avoidThisFallback===!0||(o|=1),Xe(Ye,o&1),e===null?(r.fallback!==void 0&&ch(t),e=r.children,o=r.fallback,i?(e=US(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=nd,e):typeof r.unstable_expectedLoadTime=="number"?(e=US(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=nd,t.lanes=33554432,e):(n=my({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=VS(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=nd,r):(n=jS(e,t,r.children,n),t.memoizedState=null,n):i?(r=VS(e,t,r.children,r.fallback,n),i=t.child,o=e.child.memoizedState,i.memoizedState=o===null?{baseLanes:n}:{baseLanes:o.baseLanes|n},i.childLanes=e.childLanes&~n,t.memoizedState=nd,r):(n=jS(e,t,r.children,n),t.memoizedState=null,n)}function US(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},(o&2)===0&&i!==null?(i.childLanes=0,i.pendingProps=t):i=my(t,o,0,null),n=Ds(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function jS(e,t,n,r){var o=e.child;return e=o.sibling,n=Lo(o,{mode:"visible",children:n}),(t.mode&2)===0&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}function VS(e,t,n,r,o){var i=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return(i&2)===0&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=a,s=n.lastEffect,s!==null?(t.firstEffect=n.firstEffect,t.lastEffect=s,s.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Lo(s,a),e!==null?r=Lo(e,r):(r=Ds(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function WS(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Xb(e.return,t)}function _g(e,t,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o,s.lastEffect=i)}function KS(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(en(e,t,r.children,n),r=Ye.current,(r&2)!==0)r=r&1|2,t.flags|=64;else{if(e!==null&&(e.flags&64)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&WS(e,n);else if(e.tag===19)WS(e,n);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(Xe(Ye,r),(t.mode&2)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Pd(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),_g(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Pd(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}_g(t,!0,n,null,i,t.lastEffect);break;case"together":_g(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Hr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ql|=t.lanes,(n&t.childLanes)!==0){if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Lo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Lo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var f1,mh,p1,m1;f1=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}};mh=function(){};p1=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,li(pr.current);var i=null;switch(n){case"input":o=Ug(e,o),r=Ug(e,r),i=[];break;case"option":o=Wg(e,o),r=Wg(e,r),i=[];break;case"select":o=Ve({},o,{value:void 0}),r=Ve({},r,{value:void 0}),i=[];break;case"textarea":o=Kg(e,o),r=Kg(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=wd)}Gg(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Il.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="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(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Il.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Be("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===Nh?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};m1=function(e,t,n,r){n!==r&&(t.flags|=4)};function cl(e,t){if(!mr)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 KO(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return nn(t.type)&&bd(),null;case 3:return Bs(),Ue(tn),Ue(Rt),ny(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(td(t)?t.flags|=4:r.hydrate||(t.flags|=256)),mh(t),null;case 5:ty(t);var o=li(jl.current);if(n=t.type,e!==null&&t.stateNode!=null)p1(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(U(166));return null}if(e=li(pr.current),td(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[yo]=t,r[Sd]=i,n){case"dialog":Be("cancel",r),Be("close",r);break;case"iframe":case"object":case"embed":Be("load",r);break;case"video":case"audio":for(e=0;e<gl.length;e++)Be(gl[e],r);break;case"source":Be("error",r);break;case"img":case"image":case"link":Be("error",r),Be("load",r);break;case"details":Be("toggle",r);break;case"input":qw(r,i),Be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Be("invalid",r);break;case"textarea":Yw(r,i),Be("invalid",r)}Gg(n,i),e=null;for(var s in i)i.hasOwnProperty(s)&&(o=i[s],s==="children"?typeof o=="string"?r.textContent!==o&&(e=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(e=["children",""+o]):Il.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&Be("scroll",r));switch(n){case"input":$c(r),Gw(r,i,!0);break;case"textarea":$c(r),Xw(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=wd)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===$g.html&&(e=ab(n)),e===$g.html?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[yo]=t,e[Sd]=r,f1(e,t,!1,!1),t.stateNode=e,s=Yg(n,r),n){case"dialog":Be("cancel",e),Be("close",e),o=r;break;case"iframe":case"object":case"embed":Be("load",e),o=r;break;case"video":case"audio":for(o=0;o<gl.length;o++)Be(gl[o],e);o=r;break;case"source":Be("error",e),o=r;break;case"img":case"image":case"link":Be("error",e),Be("load",e),o=r;break;case"details":Be("toggle",e),o=r;break;case"input":qw(e,r),o=Ug(e,r),Be("invalid",e);break;case"option":o=Wg(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ve({},r,{value:void 0}),Be("invalid",e);break;case"textarea":Yw(e,r),o=Kg(e,r),Be("invalid",e);break;default:o=r}Gg(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?cb(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&lb(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ll(e,l):typeof l=="number"&&Ll(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Il.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Be("scroll",e):l!=null&&Ph(e,i,l,s))}switch(n){case"input":$c(e),Gw(e,r,!1);break;case"textarea":$c(e),Xw(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ro(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Ps(e,!!r.multiple,i,!1):r.defaultValue!=null&&Ps(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=wd)}Ub(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)m1(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(U(166));n=li(jl.current),li(pr.current),td(t)?(r=t.stateNode,n=t.memoizedProps,r[yo]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[yo]=t,t.stateNode=r)}return null;case 13:return Ue(Ye),r=t.memoizedState,(t.flags&64)!==0?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&td(t):n=e.memoizedState!==null,r&&!n&&(t.mode&2)!==0&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||(Ye.current&1)!==0?yt===0&&(yt=3):((yt===0||yt===3)&&(yt=4),Dt===null||(ql&134217727)===0&&(Ws&134217727)===0||Ns(Dt,kt))),(r||n)&&(t.flags|=4),null);case 4:return Bs(),mh(t),e===null&&Hb(t.stateNode.containerInfo),null;case 10:return Jh(t),null;case 17:return nn(t.type)&&bd(),null;case 19:if(Ue(Ye),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)cl(r,!1);else{if(yt!==0||e!==null&&(e.flags&64)!==0)for(e=t.child;e!==null;){if(s=Pd(e),s!==null){for(t.flags|=64,cl(r,!1),i=s.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),r.lastEffect===null&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,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.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 Xe(Ye,Ye.current&1|2),t.child}e=e.sibling}r.tail!==null&&Ct()>wh&&(t.flags|=64,i=!0,cl(r,!1),t.lanes=33554432)}else{if(!i)if(e=Pd(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),cl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!mr)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Ct()-r.renderingStartTime>wh&&n!==1073741824&&(t.flags|=64,i=!0,cl(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(n=r.last,n!==null?n.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Ct(),n.sibling=null,t=Ye.current,Xe(Ye,i?t&1|2:t&1),n):null;case 23:case 24:return fy(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(U(156,t.tag))}function $O(e){switch(e.tag){case 1:nn(e.type)&&bd();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Bs(),Ue(tn),Ue(Rt),ny(),t=e.flags,(t&64)!==0)throw Error(U(285));return e.flags=t&-4097|64,e;case 5:return ty(e),null;case 13:return Ue(Ye),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return Ue(Ye),null;case 4:return Bs(),null;case 10:return Jh(e),null;case 23:case 24:return fy(),null;default:return null}}function ly(e,t){try{var n="",r=t;do n+=kL(r),r=r.return;while(r);var o=n}catch(i){o=`
6
- Error generating stack: `+i.message+`
7
- `+i.stack}return{value:e,source:t,stack:o}}function gh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var qO=typeof WeakMap=="function"?WeakMap:Map;function g1(e,t,n){n=bo(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){_d||(_d=!0,Sh=r),gh(e,t)},n}function h1(e,t,n){n=bo(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return gh(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(fr===null?fr=new Set([this]):fr.add(this),gh(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var GO=typeof WeakSet=="function"?WeakSet:Set;function $S(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){ko(e,n)}else t.current=null}function YO(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(t.flags&256&&e!==null){var n=e.memoizedProps,r=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Hn(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Yh(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(U(163))}function XO(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{if((e.tag&3)===3){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(t=n.updateQueue,t=t!==null?t.lastEffect:null,t!==null){e=t=t.next;do{var o=e;r=o.next,o=o.tag,(o&4)!==0&&(o&1)!==0&&(C1(n,e),oM(n,e)),e=r}while(e!==t)}return;case 1:e=n.stateNode,n.flags&4&&(t===null?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Hn(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&RS(n,t,e);return;case 3:if(t=n.updateQueue,t!==null){if(e=null,n.child!==null)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}RS(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&Ub(n.type,n.memoizedProps)&&e.focus();return;case 6:return;case 4:return;case 12:return;case 13:n.memoizedState===null&&(n=n.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&wb(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(U(163))}function qS(e,t){for(var n=e;;){if(n.tag===5){var r=n.stateNode;if(t)r=r.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=o!=null&&o.hasOwnProperty("display")?o.display:null,r.style.display=ub("display",o)}}else if(n.tag===6)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((n.tag!==23&&n.tag!==24||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function GS(e,t){if(ci&&typeof ci.onCommitFiberUnmount=="function")try{ci.onCommitFiberUnmount(Xh,t)}catch(i){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(e=t.updateQueue,e!==null&&(e=e.lastEffect,e!==null)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,o!==void 0)if((r&4)!==0)C1(t,n);else{r=t;try{o()}catch(i){ko(r,i)}}n=n.next}while(n!==e)}break;case 1:if($S(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){ko(t,i)}break;case 5:$S(t);break;case 4:y1(e,t)}}function YS(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function XS(e){return e.tag===5||e.tag===3||e.tag===4}function QS(e){e:{for(var t=e.return;t!==null;){if(XS(t))break e;t=t.return}throw Error(U(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:t=t.containerInfo,r=!0;break;case 4:t=t.containerInfo,r=!0;break;default:throw Error(U(161))}n.flags&16&&(Ll(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||XS(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue t;n.child.return=n,n=n.child}if(!(n.flags&2)){n=n.stateNode;break e}}r?hh(e,n,t):yh(e,n,t)}function hh(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,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=wd));else if(r!==4&&(e=e.child,e!==null))for(hh(e,t,n),e=e.sibling;e!==null;)hh(e,t,n),e=e.sibling}function yh(e,t,n){var r=e.tag,o=r===5||r===6;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(yh(e,t,n),e=e.sibling;e!==null;)yh(e,t,n),e=e.sibling}function y1(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(U(160));switch(o=r.stateNode,r.tag){case 5:i=!1;break e;case 3:o=o.containerInfo,i=!0;break e;case 4:o=o.containerInfo,i=!0;break e}r=r.return}r=!0}if(n.tag===5||n.tag===6){e:for(var s=e,a=n,l=a;;)if(GS(s,l),l.child!==null&&l.tag!==4)l.child.return=l,l=l.child;else{if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}i?(s=o,a=n.stateNode,s.nodeType===8?s.parentNode.removeChild(a):s.removeChild(a)):o.removeChild(n.stateNode)}else if(n.tag===4){if(n.child!==null){o=n.stateNode.containerInfo,i=!0,n.child.return=n,n=n.child;continue}}else if(GS(e,n),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.tag===4&&(r=!1)}n.sibling.return=n.return,n=n.sibling}}function Dg(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var r=n=n.next;do(r.tag&3)===3&&(e=r.destroy,r.destroy=void 0,e!==void 0&&e()),r=r.next;while(r!==n)}return;case 1:return;case 5:if(n=t.stateNode,n!=null){r=t.memoizedProps;var o=e!==null?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,i!==null){for(n[Sd]=r,e==="input"&&r.type==="radio"&&r.name!=null&&ib(n,r),Yg(e,o),t=Yg(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?cb(n,a):s==="dangerouslySetInnerHTML"?lb(n,a):s==="children"?Ll(n,a):Ph(n,s,a,t)}switch(e){case"input":jg(n,r);break;case"textarea":sb(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Ps(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Ps(n,!!r.multiple,r.defaultValue,!0):Ps(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(U(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,wb(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(dy=Ct(),qS(t.child,!0)),ZS(t);return;case 19:ZS(t);return;case 17:return;case 23:case 24:qS(t,t.memoizedState!==null);return}throw Error(U(163))}function ZS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new GO),t.forEach(function(r){var o=aM.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function QO(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var ZO=Math.ceil,Nd=gi.ReactCurrentDispatcher,uy=gi.ReactCurrentOwner,le=0,Dt=null,rt=null,kt=0,pi=0,vh=Oo(0),yt=0,Gd=null,Vs=0,ql=0,Ws=0,cy=0,xh=null,dy=0,wh=1/0;function Ks(){wh=Ct()+500}var Y=null,_d=!1,Sh=null,fr=null,Io=!1,Rl=null,hl=90,bh=[],Eh=[],zr=null,Pl=0,Th=null,cd=-1,Dr=0,dd=0,Al=null,fd=!1;function un(){return(le&48)!==0?Ct():cd!==-1?cd:cd=Ct()}function To(e){if(e=e.mode,(e&2)===0)return 1;if((e&4)===0)return zs()===99?1:2;if(Dr===0&&(Dr=Vs),zO.transition!==0){dd!==0&&(dd=xh!==null?xh.pendingLanes:0),e=Dr;var t=4186112&~dd;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=zs(),(le&4)!==0&&e===98?e=vd(12,Dr):(e=jL(e),e=vd(e,Dr)),e}function Co(e,t,n){if(50<Pl)throw Pl=0,Th=null,Error(U(185));if(e=Yd(e,t),e===null)return null;Ud(e,t,n),e===Dt&&(Ws|=t,yt===4&&Ns(e,kt));var r=zs();t===1?(le&8)!==0&&(le&48)===0?Ch(e):(Cn(e,n),le===0&&(Ks(),gr())):((le&4)===0||r!==98&&r!==99||(zr===null?zr=new Set([e]):zr.add(e)),Cn(e,n)),xh=e}function Yd(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}function Cn(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Po(s),l=1<<a,u=i[a];if(u===-1){if((l&r)===0||(l&o)!==0){u=t,xs(l);var c=He;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=_l(e,e===Dt?kt:0),t=He,r===0)n!==null&&(n!==Lg&&sh(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==Lg&&sh(n)}t===15?(n=Ch.bind(null,e),_r===null?(_r=[n],ud=Qh($d,Yb)):_r.push(n),n=Lg):t===14?n=zl(99,Ch.bind(null,e)):(n=VL(t),n=zl(n,v1.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function v1(e){if(cd=-1,dd=Dr=0,(le&48)!==0)throw Error(U(327));var t=e.callbackNode;if(Mo()&&e.callbackNode!==t)return null;var n=_l(e,e===Dt?kt:0);if(n===0)return null;var r=n,o=le;le|=16;var i=b1();(Dt!==e||kt!==r)&&(Ks(),_s(e,r));do try{tM();break}catch(a){S1(e,a)}while(!0);if(Zh(),Nd.current=i,le=o,rt!==null?r=0:(Dt=null,kt=0,r=yt),(Vs&Ws)!==0)_s(e,0);else if(r!==0){if(r===2&&(le|=64,e.hydrate&&(e.hydrate=!1,Yh(e.containerInfo)),n=Rb(e),n!==0&&(r=yl(e,n))),r===1)throw t=Gd,_s(e,0),Ns(e,n),Cn(e,Ct()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(U(345));case 2:oi(e);break;case 3:if(Ns(e,n),(n&62914560)===n&&(r=dy+500-Ct(),10<r)){if(_l(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){un(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=xS(oi.bind(null,e),r);break}oi(e);break;case 4:if(Ns(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Po(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Ct()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ZO(n/1960))-n,10<n){e.timeoutHandle=xS(oi.bind(null,e),n);break}oi(e);break;case 5:oi(e);break;default:throw Error(U(329))}}return Cn(e,Ct()),e.callbackNode===t?v1.bind(null,e):null}function Ns(e,t){for(t&=~cy,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Po(t),r=1<<n;e[n]=-1,t&=~r}}function Ch(e){if((le&48)!==0)throw Error(U(327));if(Mo(),e===Dt&&(e.expiredLanes&kt)!==0){var t=kt,n=yl(e,t);(Vs&Ws)!==0&&(t=_l(e,t),n=yl(e,t))}else t=_l(e,0),n=yl(e,t);if(e.tag!==0&&n===2&&(le|=64,e.hydrate&&(e.hydrate=!1,Yh(e.containerInfo)),t=Rb(e),t!==0&&(n=yl(e,t))),n===1)throw n=Gd,_s(e,0),Ns(e,t),Cn(e,Ct()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,oi(e),Cn(e,Ct()),null}function JO(){if(zr!==null){var e=zr;zr=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Cn(t,Ct())})}gr()}function x1(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Ks(),gr())}}function w1(e,t){var n=le;le&=-2,le|=8;try{return e(t)}finally{le=n,le===0&&(Ks(),gr())}}function rd(e,t){Xe(vh,pi),pi|=t,Vs|=t}function fy(){pi=vh.current,Ue(vh)}function _s(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,MO(n)),rt!==null)for(n=rt.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&bd();break;case 3:Bs(),Ue(tn),Ue(Rt),ny();break;case 5:ty(r);break;case 4:Bs();break;case 13:Ue(Ye);break;case 19:Ue(Ye);break;case 10:Jh(r);break;case 23:case 24:fy()}n=n.return}Dt=e,rt=Lo(e.current,null),kt=pi=Vs=t,yt=0,Gd=null,cy=Ws=ql=0}function S1(e,t){do{var n=rt;try{if(Zh(),Cl.current=Md,Ad){for(var r=Ze.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ad=!1}if(Vl=0,ht=Tt=Ze=null,kl=!1,uy.current=null,n===null||n.return===null){yt=1,Gd=t,rt=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=kt,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if((a.mode&2)===0){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var f=(Ye.current&1)!==0,d=s;do{var p;if(p=d.tag===13){var y=d.memoizedState;if(y!==null)p=y.dehydrated!==null;else{var h=d.memoizedProps;p=h.fallback===void 0?!1:h.unstable_avoidThisFallback!==!0?!0:!f}}if(p){var g=d.updateQueue;if(g===null){var m=new Set;m.add(u),d.updateQueue=m}else g.add(u);if((d.mode&2)===0){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var v=bo(-1,1);v.tag=2,Eo(a,v)}a.lanes|=1;break e}l=void 0,a=t;var x=i.pingCache;if(x===null?(x=i.pingCache=new qO,l=new Set,x.set(u,l)):(l=x.get(u),l===void 0&&(l=new Set,x.set(u,l))),!l.has(a)){l.add(a);var w=sM.bind(null,i,u,a);u.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Rs(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
8
-
9
- Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}yt!==5&&(yt=2),l=ly(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=g1(d,i,t);kS(d,C);break e;case 1:i=l;var E=d.type,k=d.stateNode;if((d.flags&64)===0&&(typeof E.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(fr===null||!fr.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=h1(d,i,t);kS(d,I);break e}}d=d.return}while(d!==null)}T1(n)}catch(L){t=L,rt===n&&n!==null&&(rt=n=n.return);continue}break}while(!0)}function b1(){var e=Nd.current;return Nd.current=Md,e===null?Md:e}function yl(e,t){var n=le;le|=16;var r=b1();Dt===e&&kt===t||_s(e,t);do try{eM();break}catch(o){S1(e,o)}while(!0);if(Zh(),le=n,Nd.current=r,rt!==null)throw Error(U(261));return Dt=null,kt=0,yt}function eM(){for(;rt!==null;)E1(rt)}function tM(){for(;rt!==null&&!DO();)E1(rt)}function E1(e){var t=k1(e.alternate,e,pi);e.memoizedProps=e.pendingProps,t===null?T1(e):rt=t,uy.current=null}function T1(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&2048)===0){if(n=KO(n,t,pi),n!==null){rt=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||(pi&1073741824)!==0||(n.mode&4)===0){for(var r=0,o=n.child;o!==null;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}e!==null&&(e.flags&2048)===0&&(e.firstEffect===null&&(e.firstEffect=t.firstEffect),t.lastEffect!==null&&(e.lastEffect!==null&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(e.lastEffect!==null?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(n=$O(t),n!==null){n.flags&=2047,rt=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(t=t.sibling,t!==null){rt=t;return}rt=t=e}while(t!==null);yt===0&&(yt=5)}function oi(e){var t=zs();return fi(99,nM.bind(null,e,t)),null}function nM(e,t){do Mo();while(Rl!==null);if((le&48)!==0)throw Error(U(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(U(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var s=e.eventTimes,a=e.expirationTimes;0<i;){var l=31-Po(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(zr!==null&&(r&24)===0&&zr.has(e)&&zr.delete(e),e===Dt&&(rt=Dt=null,kt=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=le,le|=32,uy.current=null,Pg=id,s=pS(),th(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch(L){a=null;break e}var c=0,f=-1,d=-1,p=0,y=0,h=s,g=null;t:for(;;){for(var m;h!==a||i!==0&&h.nodeType!==3||(f=c+i),h!==l||u!==0&&h.nodeType!==3||(d=c+u),h.nodeType===3&&(c+=h.nodeValue.length),(m=h.firstChild)!==null;)g=h,h=m;for(;;){if(h===s)break t;if(g===a&&++p===i&&(f=c),g===l&&++y===u&&(d=c),(m=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=m}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;Ag={focusedElem:s,selectionRange:a},id=!1,Al=null,fd=!1,Y=r;do try{rM()}catch(L){if(Y===null)throw Error(U(330));ko(Y,L),Y=Y.nextEffect}while(Y!==null);Al=null,Y=r;do try{for(s=e;Y!==null;){var v=Y.flags;if(v&16&&Ll(Y.stateNode,""),v&128){var x=Y.alternate;if(x!==null){var w=x.ref;w!==null&&(typeof w=="function"?w(null):w.current=null)}}switch(v&1038){case 2:QS(Y),Y.flags&=-3;break;case 6:QS(Y),Y.flags&=-3,Dg(Y.alternate,Y);break;case 1024:Y.flags&=-1025;break;case 1028:Y.flags&=-1025,Dg(Y.alternate,Y);break;case 4:Dg(Y.alternate,Y);break;case 8:a=Y,y1(s,a);var C=a.alternate;YS(a),C!==null&&YS(C)}Y=Y.nextEffect}}catch(L){if(Y===null)throw Error(U(330));ko(Y,L),Y=Y.nextEffect}while(Y!==null);if(w=Ag,x=pS(),v=w.focusedElem,s=w.selectionRange,x!==v&&v&&v.ownerDocument&&_b(v.ownerDocument.documentElement,v)){for(s!==null&&th(v)&&(x=s.start,w=s.end,w===void 0&&(w=x),"selectionStart"in v?(v.selectionStart=x,v.selectionEnd=Math.min(w,v.value.length)):(w=(x=v.ownerDocument||document)&&x.defaultView||window,w.getSelection&&(w=w.getSelection(),a=v.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!w.extend&&C>s&&(a=s,s=C,C=a),a=fS(v,C),i=fS(v,s),a&&i&&(w.rangeCount!==1||w.anchorNode!==a.node||w.anchorOffset!==a.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&(x=x.createRange(),x.setStart(a.node,a.offset),w.removeAllRanges(),C>s?(w.addRange(x),w.extend(i.node,i.offset)):(x.setEnd(i.node,i.offset),w.addRange(x)))))),x=[],w=v;w=w.parentNode;)w.nodeType===1&&x.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<x.length;v++)w=x[v],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}id=!!Pg,Ag=Pg=null,e.current=n,Y=r;do try{for(v=e;Y!==null;){var E=Y.flags;if(E&36&&XO(v,Y.alternate,Y),E&128){x=void 0;var k=Y.ref;if(k!==null){var I=Y.stateNode;switch(Y.tag){case 5:x=I;break;default:x=I}typeof k=="function"?k(x):k.current=x}}Y=Y.nextEffect}}catch(L){if(Y===null)throw Error(U(330));ko(Y,L),Y=Y.nextEffect}while(Y!==null);Y=null,HO(),le=o}else e.current=n;if(Io)Io=!1,Rl=e,hl=t;else for(Y=r;Y!==null;)t=Y.nextEffect,Y.nextEffect=null,Y.flags&8&&(E=Y,E.sibling=null,E.stateNode=null),Y=t;if(r=e.pendingLanes,r===0&&(fr=null),r===1?e===Th?Pl++:(Pl=0,Th=e):Pl=0,n=n.stateNode,ci&&typeof ci.onCommitFiberRoot=="function")try{ci.onCommitFiberRoot(Xh,n,void 0,(n.current.flags&64)===64)}catch(L){}if(Cn(e,Ct()),_d)throw _d=!1,e=Sh,Sh=null,e;return(le&8)!==0||gr(),null}function rM(){for(;Y!==null;){var e=Y.alternate;fd||Al===null||((Y.flags&8)!==0?Jw(Y,Al)&&(fd=!0):Y.tag===13&&QO(e,Y)&&Jw(Y,Al)&&(fd=!0));var t=Y.flags;(t&256)!==0&&YO(e,Y),(t&512)===0||Io||(Io=!0,zl(97,function(){return Mo(),null})),Y=Y.nextEffect}}function Mo(){if(hl!==90){var e=97<hl?97:hl;return hl=90,fi(e,iM)}return!1}function oM(e,t){bh.push(t,e),Io||(Io=!0,zl(97,function(){return Mo(),null}))}function C1(e,t){Eh.push(t,e),Io||(Io=!0,zl(97,function(){return Mo(),null}))}function iM(){if(Rl===null)return!1;var e=Rl;if(Rl=null,(le&48)!==0)throw Error(U(331));var t=le;le|=32;var n=Eh;Eh=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],s=o.destroy;if(o.destroy=void 0,typeof s=="function")try{s()}catch(l){if(i===null)throw Error(U(330));ko(i,l)}}for(n=bh,bh=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var a=o.create;o.destroy=a()}catch(l){if(i===null)throw Error(U(330));ko(i,l)}}for(a=e.current.firstEffect;a!==null;)e=a.nextEffect,a.nextEffect=null,a.flags&8&&(a.sibling=null,a.stateNode=null),a=e;return le=t,gr(),!0}function JS(e,t,n){t=ly(n,t),t=g1(e,t,1),Eo(e,t),t=un(),e=Yd(e,1),e!==null&&(Ud(e,1,t),Cn(e,t))}function ko(e,t){if(e.tag===3)JS(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){JS(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(fr===null||!fr.has(r))){e=ly(t,e);var o=h1(n,e,1);if(Eo(n,o),o=un(),n=Yd(n,1),n!==null)Ud(n,1,o),Cn(n,o);else if(typeof r.componentDidCatch=="function"&&(fr===null||!fr.has(r)))try{r.componentDidCatch(t,e)}catch(i){}break}}n=n.return}}function sM(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=un(),e.pingedLanes|=e.suspendedLanes&n,Dt===e&&(kt&n)===n&&(yt===4||yt===3&&(kt&62914560)===kt&&500>Ct()-dy?_s(e,0):cy|=n),Cn(e,t)}function aM(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,(t&2)===0?t=1:(t&4)===0?t=zs()===99?1:2:(Dr===0&&(Dr=Vs),t=ws(62914560&~Dr),t===0&&(t=4194304))),n=un(),e=Yd(e,t),e!==null&&(Ud(e,t,n),Cn(e,n))}var k1;k1=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||tn.current)zn=!0;else if((n&r)!==0)zn=(e.flags&16384)!==0;else{switch(zn=!1,t.tag){case 3:zS(t),Mg();break;case 5:IS(t);break;case 1:nn(t.type)&&ld(t);break;case 4:uh(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;Xe(Ed,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return(n&t.child.childLanes)!==0?BS(e,t,n):(Xe(Ye,Ye.current&1),t=Hr(e,t,n),t!==null?t.sibling:null);Xe(Ye,Ye.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&64)!==0){if(r)return KS(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Xe(Ye,Ye.current),r)break;return null;case 23:case 24:return t.lanes=0,Ng(e,t,n)}return Hr(e,t,n)}else zn=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=Hs(t,Rt.current),Os(t,n),o=oy(null,t,r,e,o,n),t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,nn(r)){var i=!0;ld(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ey(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&kd(t,r,s,e),o.updater=qd,t.stateNode=o,o._reactInternals=t,lh(t,r,e,n),t=ph(null,t,r,!0,i,n)}else t.tag=0,en(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=uM(o),e=Hn(o,e),i){case 0:t=fh(null,t,o,e,n);break e;case 1:t=HS(null,t,o,e,n);break e;case 11:t=DS(null,t,o,e,n);break e;case 14:t=FS(null,t,o,Hn(o.type,e),r,n);break e}throw Error(U(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Hn(r,o),fh(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Hn(r,o),HS(e,t,r,o,n);case 3:if(zS(t),r=t.updateQueue,e===null||r===null)throw Error(U(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,Qb(e,t),Bl(t,r,null,n),r=t.memoizedState.element,r===o)Mg(),t=Hr(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(vo=Ls(t.stateNode.containerInfo.firstChild),Fr=t,i=mr=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Ms.push(i);for(n=t1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else en(e,t,r,n),Mg();t=t.child}return t;case 5:return IS(t),e===null&&ch(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,oh(r,o)?s=null:i!==null&&oh(r,i)&&(t.flags|=16),d1(e,t),en(e,t,s,n),t.child;case 6:return e===null&&ch(t),null;case 13:return BS(e,t,n);case 4:return uh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Rd(t,null,r,n):en(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Hn(r,o),DS(e,t,r,o,n);case 7:return en(e,t,t.pendingProps,n),t.child;case 8:return en(e,t,t.pendingProps.children,n),t.child;case 12:return en(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value;var a=t.type._context;if(Xe(Ed,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=Sn(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!tn.current){t=Hr(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){s=a.child;for(var u=l.firstContext;u!==null;){if(u.context===r&&(u.observedBits&i)!==0){a.tag===1&&(u=bo(-1,n&-n),u.tag=2,Eo(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Xb(a.return,n),l.lanes|=n;break}u=u.next}}else s=a.tag===10&&a.type===t.type?null:a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===t){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}en(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Os(t,n),o=Tn(o,i.unstable_observedBits),r=r(o),t.flags|=1,en(e,t,r,n),t.child;case 14:return o=t.type,i=Hn(o,t.pendingProps),i=Hn(o.type,i),FS(e,t,o,i,r,n);case 15:return c1(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Hn(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,nn(r)?(e=!0,ld(t)):e=!1,Os(t,n),Jb(t,r,o),lh(t,r,o,n),ph(null,t,r,!0,e,n);case 19:return KS(e,t,n);case 23:return Ng(e,t,n);case 24:return Ng(e,t,n)}throw Error(U(156,t.tag))};function lM(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.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(e,t,n,r){return new lM(e,t,n,r)}function py(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uM(e){if(typeof e=="function")return py(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Hd)return 11;if(e===zd)return 14}return 2}function Lo(e,t){var n=e.alternate;return n===null?(n=bn(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.nextEffect=null,n.firstEffect=null,n.lastEffect=null),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 pd(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")py(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case go:return Ds(n.children,o,i,t);case nb:s=8,o|=16;break;case Ah:s=8,o|=1;break;case vl:return e=bn(12,n,t,o|8),e.elementType=vl,e.type=vl,e.lanes=i,e;case xl:return e=bn(13,n,t,o),e.type=xl,e.elementType=xl,e.lanes=i,e;case md:return e=bn(19,n,t,o),e.elementType=md,e.lanes=i,e;case _h:return my(n,o,i,t);case Bg:return e=bn(24,n,t,o),e.elementType=Bg,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ih:s=10;break e;case Lh:s=9;break e;case Hd:s=11;break e;case zd:s=14;break e;case Oh:s=16,r=null;break e;case Mh:s=22;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=bn(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ds(e,t,n,r){return e=bn(7,e,r,t),e.lanes=n,e}function my(e,t,n,r){return e=bn(23,e,r,t),e.elementType=_h,e.lanes=n,e}function Fg(e,t,n){return e=bn(6,e,null,t),e.lanes=n,e}function Hg(e,t,n){return t=bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cM(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=bg(0),this.expirationTimes=bg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bg(0),this.mutableSourceEagerHydrationData=null}function dM(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ii,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Dd(e,t,n,r){var o=t.current,i=un(),s=To(o);e:if(n){n=n._reactInternals;t:{if(hi(n)!==n||n.tag!==1)throw Error(U(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(nn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(U(171))}if(n.tag===1){var l=n.type;if(nn(l)){n=Vb(n,l,a);break e}}n=a}else n=Ao;return t.context===null?t.context=n:t.pendingContext=n,t=bo(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Eo(o,t),Co(o,s,i),s}function zg(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 eb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gy(e,t){eb(e,t),(e=e.alternate)&&eb(e,t)}function fM(){return null}function hy(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new cM(e,t,n!=null&&n.hydrate===!0),t=bn(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,ey(t),e[js]=n.current,Hb(e.nodeType===8?e.parentNode:e),r)for(e=0;e<r.length;e++){t=r[e];var o=t._getVersion;o=o(t._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}hy.prototype.render=function(e){Dd(e,this._internalRoot,null,null)};hy.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Dd(null,e,null,function(){t[js]=null})};function Gl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function pM(e,t){if(t||(t=e?e.nodeType===9?e.documentElement:e.firstChild:null,t=!(!t||t.nodeType!==1||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new hy(e,0,t?{hydrate:!0}:void 0)}function Xd(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i._internalRoot;if(typeof o=="function"){var a=o;o=function(){var u=zg(s);a.call(u)}}Dd(t,s,e,o)}else{if(i=n._reactRootContainer=pM(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=zg(s);l.call(u)}}w1(function(){Dd(t,s,e,o)})}return zg(s)}yb=function(e){if(e.tag===13){var t=un();Co(e,4,t),gy(e,4)}};Bh=function(e){if(e.tag===13){var t=un();Co(e,67108864,t),gy(e,67108864)}};vb=function(e){if(e.tag===13){var t=un(),n=To(e);Co(e,n,t),gy(e,n)}};xb=function(e,t){return t()};Xg=function(e,t,n){switch(t){case"input":if(jg(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=Kd(r);if(!o)throw Error(U(90));ob(r),jg(r,o)}}}break;case"textarea":sb(e,n);break;case"select":t=n.value,t!=null&&Ps(e,!!n.multiple,t,!1)}};Fh=x1;pb=function(e,t,n,r,o){var i=le;le|=4;try{return fi(98,e.bind(null,t,n,r,o))}finally{le=i,le===0&&(Ks(),gr())}};Hh=function(){(le&49)===0&&(JO(),Mo())};mb=function(e,t){var n=le;le|=2;try{return e(t)}finally{le=n,le===0&&(Ks(),gr())}};function R1(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gl(t))throw Error(U(200));return dM(e,t,null,n)}var mM={Events:[Kl,Ts,Kd,db,fb,Mo,{current:!1}]},dl={findFiberByHostInstance:ai,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},gM={bundleType:dl.bundleType,version:dl.version,rendererPackageName:dl.rendererPackageName,rendererConfig:dl.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hb(e),e===null?null:e.stateNode},findFiberByHostInstance:dl.findFiberByHostInstance||fM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(fl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!fl.isDisabled&&fl.supportsFiber))try{Xh=fl.inject(gM),ci=fl}catch(e){}var fl;kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=mM;kn.createPortal=R1;kn.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(U(188)):Error(U(268,Object.keys(e)));return e=hb(t),e=e===null?null:e.stateNode,e};kn.flushSync=function(e,t){var n=le;if((n&48)!==0)return e(t);le|=1;try{if(e)return fi(99,e.bind(null,t))}finally{le=n,gr()}};kn.hydrate=function(e,t,n){if(!Gl(t))throw Error(U(200));return Xd(null,e,t,!0,n)};kn.render=function(e,t,n){if(!Gl(t))throw Error(U(200));return Xd(null,e,t,!1,n)};kn.unmountComponentAtNode=function(e){if(!Gl(e))throw Error(U(40));return e._reactRootContainer?(w1(function(){Xd(null,null,e,!1,function(){e._reactRootContainer=null,e[js]=null})}),!0):!1};kn.unstable_batchedUpdates=x1;kn.unstable_createPortal=function(e,t){return R1(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};kn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gl(n))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return Xd(e,t,n,!1,r)};kn.version="17.0.2"});var $s=Qe((G6,I1)=>{"use strict";function A1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(A1)}catch(e){console.error(e)}}A1(),I1.exports=P1()});var cE=Qe(uE=>{"use strict";var Zs=$();function rN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oN=typeof Object.is=="function"?Object.is:rN,iN=Zs.useState,sN=Zs.useEffect,aN=Zs.useLayoutEffect,lN=Zs.useDebugValue;function uN(e,t){var n=t(),r=iN({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return aN(function(){o.value=n,o.getSnapshot=t,By(o)&&i({inst:o})},[e,n,t]),sN(function(){return By(o)&&i({inst:o}),e(function(){By(o)&&i({inst:o})})},[e]),lN(n),n}function By(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!oN(e,n)}catch(r){return!0}}function cN(e,t){return t()}var dN=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?cN:uN;uE.useSyncExternalStore=Zs.useSyncExternalStore!==void 0?Zs.useSyncExternalStore:dN});var Uy=Qe((H9,dE)=>{"use strict";dE.exports=cE()});var pE=Qe(fE=>{"use strict";var of=$(),fN=Uy();function pN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mN=typeof Object.is=="function"?Object.is:pN,gN=fN.useSyncExternalStore,hN=of.useRef,yN=of.useEffect,vN=of.useMemo,xN=of.useDebugValue;fE.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=hN(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=vN(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return f=y}return f=p}if(y=f,mN(c,p))return y;var h=r(p);return o!==void 0&&o(y,h)?(c=p,y):(c=p,f=h)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=gN(e,i[0],i[1]);return yN(function(){s.hasValue=!0,s.value=a},[a]),xN(a),a}});var gE=Qe((B9,mE)=>{"use strict";mE.exports=pE()});var kE=Qe(Pe=>{"use strict";var ft=typeof Symbol=="function"&&Symbol.for,Vy=ft?Symbol.for("react.element"):60103,Wy=ft?Symbol.for("react.portal"):60106,uf=ft?Symbol.for("react.fragment"):60107,cf=ft?Symbol.for("react.strict_mode"):60108,df=ft?Symbol.for("react.profiler"):60114,ff=ft?Symbol.for("react.provider"):60109,pf=ft?Symbol.for("react.context"):60110,Ky=ft?Symbol.for("react.async_mode"):60111,mf=ft?Symbol.for("react.concurrent_mode"):60111,gf=ft?Symbol.for("react.forward_ref"):60112,hf=ft?Symbol.for("react.suspense"):60113,EN=ft?Symbol.for("react.suspense_list"):60120,yf=ft?Symbol.for("react.memo"):60115,vf=ft?Symbol.for("react.lazy"):60116,TN=ft?Symbol.for("react.block"):60121,CN=ft?Symbol.for("react.fundamental"):60117,kN=ft?Symbol.for("react.responder"):60118,RN=ft?Symbol.for("react.scope"):60119;function fn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Vy:switch(e=e.type,e){case Ky:case mf:case uf:case df:case cf:case hf:return e;default:switch(e=e&&e.$$typeof,e){case pf:case gf:case vf:case yf:case ff:return e;default:return t}}case Wy:return t}}}function CE(e){return fn(e)===mf}Pe.AsyncMode=Ky;Pe.ConcurrentMode=mf;Pe.ContextConsumer=pf;Pe.ContextProvider=ff;Pe.Element=Vy;Pe.ForwardRef=gf;Pe.Fragment=uf;Pe.Lazy=vf;Pe.Memo=yf;Pe.Portal=Wy;Pe.Profiler=df;Pe.StrictMode=cf;Pe.Suspense=hf;Pe.isAsyncMode=function(e){return CE(e)||fn(e)===Ky};Pe.isConcurrentMode=CE;Pe.isContextConsumer=function(e){return fn(e)===pf};Pe.isContextProvider=function(e){return fn(e)===ff};Pe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Vy};Pe.isForwardRef=function(e){return fn(e)===gf};Pe.isFragment=function(e){return fn(e)===uf};Pe.isLazy=function(e){return fn(e)===vf};Pe.isMemo=function(e){return fn(e)===yf};Pe.isPortal=function(e){return fn(e)===Wy};Pe.isProfiler=function(e){return fn(e)===df};Pe.isStrictMode=function(e){return fn(e)===cf};Pe.isSuspense=function(e){return fn(e)===hf};Pe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===uf||e===mf||e===df||e===cf||e===hf||e===EN||typeof e=="object"&&e!==null&&(e.$$typeof===vf||e.$$typeof===yf||e.$$typeof===ff||e.$$typeof===pf||e.$$typeof===gf||e.$$typeof===CN||e.$$typeof===kN||e.$$typeof===RN||e.$$typeof===TN)};Pe.typeOf=fn});var PE=Qe((e8,RE)=>{"use strict";RE.exports=kE()});var _E=Qe((t8,NE)=>{"use strict";var $y=PE(),PN={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},AN={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},IN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},OE={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},qy={};qy[$y.ForwardRef]=IN;qy[$y.Memo]=OE;function AE(e){return $y.isMemo(e)?OE:qy[e.$$typeof]||PN}var LN=Object.defineProperty,ON=Object.getOwnPropertyNames,IE=Object.getOwnPropertySymbols,MN=Object.getOwnPropertyDescriptor,NN=Object.getPrototypeOf,LE=Object.prototype;function ME(e,t,n){if(typeof t!="string"){if(LE){var r=NN(t);r&&r!==LE&&ME(e,r,n)}var o=ON(t);IE&&(o=o.concat(IE(t)));for(var i=AE(e),s=AE(t),a=0;a<o.length;++a){var l=o[a];if(!AN[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=MN(t,l);try{LN(e,l,u)}catch(c){}}}}return e}NE.exports=ME});var FE=Qe(Ae=>{"use strict";var Gy=Symbol.for("react.element"),Yy=Symbol.for("react.portal"),xf=Symbol.for("react.fragment"),wf=Symbol.for("react.strict_mode"),Sf=Symbol.for("react.profiler"),bf=Symbol.for("react.provider"),Ef=Symbol.for("react.context"),_N=Symbol.for("react.server_context"),Tf=Symbol.for("react.forward_ref"),Cf=Symbol.for("react.suspense"),kf=Symbol.for("react.suspense_list"),Rf=Symbol.for("react.memo"),Pf=Symbol.for("react.lazy"),DN=Symbol.for("react.offscreen"),DE;DE=Symbol.for("react.module.reference");function Pn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Gy:switch(e=e.type,e){case xf:case Sf:case wf:case Cf:case kf:return e;default:switch(e=e&&e.$$typeof,e){case _N:case Ef:case Tf:case Pf:case Rf:case bf:return e;default:return t}}case Yy:return t}}}Ae.ContextConsumer=Ef;Ae.ContextProvider=bf;Ae.Element=Gy;Ae.ForwardRef=Tf;Ae.Fragment=xf;Ae.Lazy=Pf;Ae.Memo=Rf;Ae.Portal=Yy;Ae.Profiler=Sf;Ae.StrictMode=wf;Ae.Suspense=Cf;Ae.SuspenseList=kf;Ae.isAsyncMode=function(){return!1};Ae.isConcurrentMode=function(){return!1};Ae.isContextConsumer=function(e){return Pn(e)===Ef};Ae.isContextProvider=function(e){return Pn(e)===bf};Ae.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gy};Ae.isForwardRef=function(e){return Pn(e)===Tf};Ae.isFragment=function(e){return Pn(e)===xf};Ae.isLazy=function(e){return Pn(e)===Pf};Ae.isMemo=function(e){return Pn(e)===Rf};Ae.isPortal=function(e){return Pn(e)===Yy};Ae.isProfiler=function(e){return Pn(e)===Sf};Ae.isStrictMode=function(e){return Pn(e)===wf};Ae.isSuspense=function(e){return Pn(e)===Cf};Ae.isSuspenseList=function(e){return Pn(e)===kf};Ae.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xf||e===Sf||e===wf||e===Cf||e===kf||e===DN||typeof e=="object"&&e!==null&&(e.$$typeof===Pf||e.$$typeof===Rf||e.$$typeof===bf||e.$$typeof===Ef||e.$$typeof===Tf||e.$$typeof===DE||e.getModuleId!==void 0)};Ae.typeOf=Pn});var zE=Qe((r8,HE)=>{"use strict";HE.exports=FE()});var Tv=Qe((Z7,cC)=>{"use strict";var z2="Expected a function",lC=NaN,B2="[object Symbol]",U2=/^\s+|\s+$/g,j2=/^[-+]0x[0-9a-f]+$/i,V2=/^0b[01]+$/i,W2=/^0o[0-7]+$/i,K2=parseInt,$2=typeof global=="object"&&global&&global.Object===Object&&global,q2=typeof self=="object"&&self&&self.Object===Object&&self,G2=$2||q2||Function("return this")(),Y2=Object.prototype,X2=Y2.toString,Q2=Math.max,Z2=Math.min,bv=function(){return G2.Date.now()};function J2(e,t,n){var r,o,i,s,a,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(z2);t=uC(t)||0,Ev(n)&&(c=!!n.leading,f="maxWait"in n,i=f?Q2(uC(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function p(E){var k=r,I=o;return r=o=void 0,u=E,s=e.apply(I,k),s}function y(E){return u=E,a=setTimeout(m,t),c?p(E):s}function h(E){var k=E-l,I=E-u,L=t-k;return f?Z2(L,i-I):L}function g(E){var k=E-l,I=E-u;return l===void 0||k>=t||k<0||f&&I>=i}function m(){var E=bv();if(g(E))return v(E);a=setTimeout(m,h(E))}function v(E){return a=void 0,d&&r?p(E):(r=o=void 0,s)}function x(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function w(){return a===void 0?s:v(bv())}function C(){var E=bv(),k=g(E);if(r=arguments,o=this,l=E,k){if(a===void 0)return y(l);if(f)return a=setTimeout(m,t),p(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=x,C.flush=w,C}function Ev(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function e_(e){return!!e&&typeof e=="object"}function t_(e){return typeof e=="symbol"||e_(e)&&X2.call(e)==B2}function uC(e){if(typeof e=="number")return e;if(t_(e))return lC;if(Ev(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ev(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(U2,"");var n=V2.test(e);return n||W2.test(e)?K2(e.slice(2),n?2:8):j2.test(e)?lC:+e}cC.exports=J2});var PC=Qe((DB,RC)=>{"use strict";var f_=/["'&<>]/;RC.exports=p_;function p_(e){var t=""+e,n=f_.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 a5={};bt(a5,{Card:()=>Oe,ContentEditableInput:()=>es,DeepdeskAPI:()=>lo,DeepdeskSDK:()=>xc,HTTPClient:()=>ns,InputMediator:()=>ao,InputType:()=>ms,KeyboardHint:()=>_c,Label:()=>yw,Locale:()=>nu,Section:()=>lr,SectionList:()=>fs,Sources:()=>Nr,Suggestion:()=>be,SuggestionList:()=>Zt,TextAreaInput:()=>ts,ToggleButton:()=>ni,attachFile:()=>EI,authenticateWithKey:()=>TI,createFullRange:()=>za,createOverlayContainer:()=>vc,createRangeFromOffsets:()=>Zo,escapeHTML:()=>ca,formatTextMarkup:()=>CI,getRangeOffsets:()=>hc,getRangeText:()=>yc,insertCKEditor:()=>AI,isHTML:()=>mp,isSupportedInputElement:()=>Dm,updateContentEditable:()=>RI,updateTextArea:()=>kI,useClickOutsideRoot:()=>$o,useStyles:()=>D,waitForElementVisibilityChange:()=>zm});var og=S(Fe()),xn=S($());var Lc=S($()),sw=S(Fe());var Ya=Lc.default.createContext({});function D(e,t){let i=(0,Lc.useContext)(Ya),{debug:n}=i,o=se(i,["debug"])[e];return Object.entries(t).reduce((s,[a,l])=>{let u=o==null?void 0:o[a];return P(b({},s),{[a]:(0,sw.default)(l,u,n?`${e}__${a}`:!1)})},{})}var aw={root:"dd-4s9wq"};var ei=S(R()),Oc=()=>(0,ei.jsxs)("svg",{className:aw.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,ei.jsx)("defs",{children:(0,ei.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,ei.jsx)("title",{children:"Failed loading image"}),(0,ei.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 rg={root:"dd-c9KvZ",imageWrapper:"dd-sE7D9",image:"dd-bEGMz",content:"dd-oFIQa",title:"dd-mSgoo",contentIsCropped:"dd-Uvjv4",lineClamp:"dd-ApQo-"};var ti=S(R()),Mc=(0,xn.createContext)(rg),rL=({title:e,src:t})=>{let n=(0,xn.useContext)(Mc),[r,o]=(0,xn.useState)(!1);return(0,xn.useEffect)(()=>{o(!1)},[t]),(0,ti.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,ti.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,ti.jsx)(Oc,{})})},oL=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,xn.useContext)(Mc);return(0,ti.jsx)("div",{className:(0,og.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},iL=i=>{var s=i,{as:e="h1",cropText:t=!1,className:n,children:r}=s,o=se(s,["as","cropText","className","children"]);let a=(0,xn.useContext)(Mc);return xn.default.createElement(e,b({className:(0,og.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Nc=({children:e})=>{let t=D("Card",rg);return(0,ti.jsx)("div",{className:t.root,children:(0,ti.jsx)(Mc.Provider,{value:t,children:e})})};Nc.Image=rL;Nc.Content=oL;Nc.Title=iL;var Oe=Nc;var pw=S(Fe());var fw={root:"dd-llBx9"};var mw=S(R());var sL={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},aL=r=>{var o=r,{className:e,keyCode:t}=o,n=se(o,["className","keyCode"]);let i=D("KeyboardHint",fw);return(0,mw.jsx)("span",b({"data-key":sL[t],className:(0,pw.default)(e,i.root)},n))},_c=aL;var hw=S(Fe());var gw={root:"dd-e6HXZ"};var vw=S(R()),lL=r=>{var o=r,{className:e,children:t}=o,n=se(o,["className","children"]);let i=D("Label",gw);return(0,vw.jsx)("span",P(b({},n),{className:(0,hw.default)(e,i.root),children:t}))},yw=lL;var xw={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var ds=S(R()),uL=o=>{var i=o,{title:e,children:t,type:n}=i,r=se(i,["title","children","type"]);let s=D("Section",xw);return(0,ds.jsxs)("section",P(b({},r),{className:s.root,"data-section-type":n,children:[e&&(0,ds.jsx)("div",{className:s.subTitleContainer,children:(0,ds.jsx)("span",{className:s.subtitle,children:e})}),(0,ds.jsx)("div",{className:s.suggestions,children:t})]}))},lr=uL;var Cw=S(Fe()),kw=S($());var uo=S($()),Ew=S(R()),ww=(0,uo.createContext)(null),Sw=({scrollContainerRef:e,children:t})=>{let n=(0,uo.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,Ew.jsx)(ww.Provider,{value:n,children:t})},bw=e=>{let t=(0,uo.useContext)(ww);(0,uo.useEffect)(()=>{let n=e.current;n&&t(n)},[])};var Tw={root:"dd-uoTXh"};var ig=S(R()),cL=({className:e,children:t})=>{let n=D("SectionList",Tw),r=(0,kw.useRef)(null);return(0,ig.jsx)(Sw,{scrollContainerRef:r,children:(0,ig.jsx)("div",{ref:r,className:(0,Cw.default)(n.root,e),children:t})})},fs=cL;var ps=S(Fe()),Qt=S($());var sg={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 Xt=S(R()),co=(0,Qt.createContext)(sg),dL=r=>{var o=r,{fixed:e,children:t}=o,n=se(o,["fixed","children"]);let i=(0,Qt.useContext)(co);return(0,Xt.jsx)("div",P(b({},n),{className:(0,ps.default)(i.actions,{[i.actionsIsFixed]:e}),children:t}))};function fL(a){var l=a,{as:e,className:t,icon:n,title:r,children:o,disabled:i}=l,s=se(l,["as","className","icon","title","children","disabled"]);let u=(0,Qt.useContext)(co);return(0,Xt.jsxs)(e||"button",P(b({type:"button",className:(0,ps.default)(u.button,{[u.buttonWithIcon]:n,[u.buttonDisabled]:i},t),title:r,"aria-label":r},s),{children:[n,o]}))}var pL=({children:e})=>{let t=(0,Qt.useContext)(co);return(0,Xt.jsx)("div",{className:t.buttonsContainer,children:e})},mL=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,Qt.useContext)(co);return(0,Xt.jsxs)("div",{className:(0,ps.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,Xt.jsx)("ul",{className:i.dropdownList,children:o})]})},gL=({index:e,label:t,onClick:n})=>{let r=(0,Qt.useContext)(co);return(0,Xt.jsx)("li",{className:r.dropdownItem,children:(0,Xt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},hL=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,Qt.useContext)(co);return(0,Xt.jsx)("button",{type:"button",className:(0,ps.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r!=null?r:s=>s.stopPropagation(),disabled:n,"aria-hidden":n,children:o})},yL=({labels:e})=>{let t=(0,Qt.useContext)(co);return(0,Xt.jsx)("div",{className:t.labels,children:e.map(n=>(0,Xt.jsx)("span",{className:t.label,children:n},n))})},fo=Qt.default.forwardRef((a,s)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,i=se(l,["className","selected","onClick","children","as"]);let u=D("Suggestion",sg),c=(0,Qt.useCallback)(f=>{f.preventDefault(),n&&n(f)},[n]);return(0,Xt.jsx)(o,P(b({},i),{ref:s,className:(0,ps.default)(e,u.root,{[u.isSelected]:t,[u.isClickable]:!!n}),onClick:c,children:(0,Xt.jsx)(co.Provider,{value:u,children:r})}))});fo.Labels=yL;fo.Actions=dL;fo.ActionButton=hL;fo.DropdownButton=mL;fo.DropdownItem=gL;fo.ButtonsContainer=pL;fo.Button=fL;var be=fo;var Pw=S(Fe());var Rw={root:"dd-W35K-",isWithDivider:"dd-sscOy"};var Aw=S(R()),vL=({withDivider:e,children:t})=>{let n=D("SuggestionList",Rw);return(0,Aw.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Pw.default)(n.root,{[n.isWithDivider]:e}),children:t})},Zt=vL;var Lw=S(Fe());var Iw={root:"dd-oWarc",isCollapsed:"dd-tfZI0"};var Dc=S(R()),xL=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=D("ToggleButton",Iw);return(0,Dc.jsx)("button",{type:"button",className:(0,Lw.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Dc.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Dc.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},ni=xL;var Ow=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Fc=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Mw=/x-deepdesk-(([a-z0-9\-_])+-version)/,Hc=["cues","custom-data","knowledge-assist"],Nw=Intl.DateTimeFormat().resolvedOptions().timeZone,Nr=(h=>(h.SEARCH="search",h.TEMPLATE="template",h.ELASTIC_SEARCH="search-autocomplete",h.GPT="gpt",h.TRIE="trie",h.TRIE_WITH_TYPOS="trie-with-typos",h.SEMANTIC="semantic",h.TEXT_RECOMMENDATION="text_recommendation",h.URL_RECOMMENDATION="url_recommendation",h.LINK_RECOMMENDATION="link_recommendation",h.PERSONAL_COLLECTION="personal-collection",h.PERSONAL_COLLECTION_SEARCH="personal-collection-search",h.SEARCH_OVERLAY="search-overlay",h.SEARCH_PREVIEW="search-preview",h.SEARCH_URL="search-url",h))(Nr||{}),ms=(s=>(s.ENTER="enter",s.TAB="tab",s.ARROW="arrow",s.HOTKEY="hotkey",s.MOUSE="mouse",s.SPACE="space",s))(ms||{});var ut=S($s());var xP=S($());function Rn(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(0)var o,i;throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(s){return"'"+s+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ur(e){return!!e&&!!e[We]}function Bn(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var o=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return o===Object||typeof o=="function"&&Function.toString.call(o)===EM}(e)||Array.isArray(e)||!!e[F1]||!!(!((t=e.constructor)===null||t===void 0)&&t[F1])||Cy(e)||ky(e))}function vi(e,t,n){n===void 0&&(n=!1),Ys(e)===0?(n?Object.keys:Gs)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Ys(e){var t=e[We];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Cy(e)?2:ky(e)?3:0}function qs(e,t){return Ys(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hM(e,t){return Ys(e)===2?e.get(t):e[t]}function H1(e,t,n){var r=Ys(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function z1(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Cy(e){return SM&&e instanceof Map}function ky(e){return bM&&e instanceof Set}function No(e){return e.o||e.t}function Ry(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=j1(e);delete t[We];for(var n=Gs(t),r=0;r<n.length;r++){var o=n[r],i=t[o];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function Py(e,t){return t===void 0&&(t=!1),Ay(e)||Ur(e)||!Bn(e)||(Ys(e)>1&&(e.set=e.add=e.clear=e.delete=yM),Object.freeze(e),t&&vi(e,function(n,r){return Py(r,!0)},!0)),e}function yM(){Rn(2)}function Ay(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function hr(e){var t=Ty[e];return t||Rn(18,e),t}function vM(e,t){Ty[e]||(Ty[e]=t)}function Sy(){return Xl}function yy(e,t){t&&(hr("Patches"),e.u=[],e.s=[],e.v=t)}function Qd(e){by(e),e.p.forEach(xM),e.p=null}function by(e){e===Xl&&(Xl=e.l)}function L1(e){return Xl={p:[],l:Xl,h:e,m:!0,_:0}}function xM(e){var t=e[We];t.i===0||t.i===1?t.j():t.g=!0}function vy(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||hr("ES5").S(t,e,r),r?(n[We].P&&(Qd(t),Rn(4)),Bn(e)&&(e=Zd(t,e),t.l||Jd(t,e)),t.u&&hr("Patches").M(n[We].t,e,t.u,t.s)):e=Zd(t,n,[]),Qd(t),t.u&&t.v(t.u,t.s),e!==U1?e:void 0}function Zd(e,t,n){if(Ay(t))return t;var r=t[We];if(!r)return vi(t,function(a,l){return O1(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Jd(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=Ry(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),vi(i,function(a,l){return O1(e,r,o,a,l,n,s)}),Jd(e,o,!1),n&&e.u&&hr("Patches").N(r,n,e.u,e.s)}return r.o}function O1(e,t,n,r,o,i,s){if(Ur(o)){var a=Zd(e,o,i&&t&&t.i!==3&&!qs(t.R,r)?i.concat(r):void 0);if(H1(n,r,a),!Ur(a))return;e.m=!1}else s&&n.add(o);if(Bn(o)&&!Ay(o)){if(!e.h.D&&e._<1)return;Zd(e,o),t&&t.A.l||Jd(e,o)}}function Jd(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Py(t,n)}function xy(e,t){var n=e[We];return(n?No(n):e)[t]}function M1(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function _o(e){e.P||(e.P=!0,e.l&&_o(e.l))}function wy(e){e.o||(e.o=Ry(e.t))}function Ey(e,t,n){var r=Cy(t)?hr("MapSet").F(t,n):ky(t)?hr("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Sy(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ql;s&&(l=[a],u=Yl);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):hr("ES5").J(t,n);return(n?n.A:Sy()).p.push(r),r}function wM(e){return Ur(e)||Rn(22,e),function t(n){if(!Bn(n))return n;var r,o=n[We],i=Ys(n);if(o){if(!o.P&&(o.i<4||!hr("ES5").K(o)))return o.t;o.I=!0,r=N1(n,i),o.I=!1}else r=N1(n,i);return vi(r,function(s,a){o&&hM(o.t,s)===a||H1(r,s,t(a))}),i===3?new Set(r):r}(e)}function N1(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ry(e)}function B1(){function e(s,a){var l=i[s];return l?l.enumerable=a:i[s]=l={configurable:!0,enumerable:a,get:function(){var u=this[We];return Ql.get(u,s)},set:function(u){var c=this[We];Ql.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][We];if(!l.P)switch(l.i){case 5:r(l)&&_o(l);break;case 4:n(l)&&_o(l)}}}function n(s){for(var a=s.t,l=s.k,u=Gs(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==We){var d=a[f];if(d===void 0&&!qs(a,f))return!0;var p=l[f],y=p&&p[We];if(y?y.t!==d:!z1(p,d))return!0}}var h=!!a[We];return u.length!==Gs(a).length+(h?0:1)}function r(s){var a=s.k;if(a.length!==s.t.length)return!0;var l=Object.getOwnPropertyDescriptor(a,a.length-1);if(l&&!l.get)return!0;for(var u=0;u<a.length;u++)if(!a.hasOwnProperty(u))return!0;return!1}function o(s){s.g&&Rn(3,JSON.stringify(No(s)))}var i={};vM("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var p=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(p,""+y,e(y,!0));return p}var h=j1(d);delete h[We];for(var g=Gs(h),m=0;m<g.length;m++){var v=g[m];h[v]=e(v,f||!!h[v].enumerable)}return Object.create(Object.getPrototypeOf(d),h)}(l,s),c={i:l?5:4,A:a?a.A:Sy(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,We,{value:c,writable:!0}),u},S:function(s,a,l){l?Ur(a)&&a[We].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[We];if(f){var d=f.t,p=f.k,y=f.R,h=f.i;if(h===4)vi(p,function(w){w!==We&&(d[w]!==void 0||qs(d,w)?y[w]||u(p[w]):(y[w]=!0,_o(f)))}),vi(d,function(w){p[w]!==void 0||qs(p,w)||(y[w]=!1,_o(f))});else if(h===5){if(r(f)&&(_o(f),y.length=!0),p.length<d.length)for(var g=p.length;g<d.length;g++)y[g]=!1;else for(var m=d.length;m<p.length;m++)y[m]=!0;for(var v=Math.min(p.length,d.length),x=0;x<v;x++)p.hasOwnProperty(x)||(y[x]=!0),y[x]===void 0&&u(p[x])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var _1,Xl,Iy=typeof Symbol!="undefined"&&typeof Symbol("x")=="symbol",SM=typeof Map!="undefined",bM=typeof Set!="undefined",D1=typeof Proxy!="undefined"&&Proxy.revocable!==void 0&&typeof Reflect!="undefined",U1=Iy?Symbol.for("immer-nothing"):((_1={})["immer-nothing"]=!0,_1),F1=Iy?Symbol.for("immer-draftable"):"__$immer_draftable",We=Iy?Symbol.for("immer-state"):"__$immer_state";var EM=""+Object.prototype.constructor,Gs=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,j1=Object.getOwnPropertyDescriptors||function(e){var t={};return Gs(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Ty={},Ql={get:function(e,t){if(t===We)return e;var n=No(e);if(!qs(n,t))return function(o,i,s){var a,l=M1(i,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(o.k):void 0}(e,n,t);var r=n[t];return e.I||!Bn(r)?r:r===xy(e.t,t)?(wy(e),e.o[t]=Ey(e.A.h,r,e)):r},has:function(e,t){return t in No(e)},ownKeys:function(e){return Reflect.ownKeys(No(e))},set:function(e,t,n){var r=M1(No(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=xy(No(e),t),i=o==null?void 0:o[We];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(z1(n,o)&&(n!==void 0||qs(e.t,t)))return!0;wy(e),_o(e)}return e.o[t]===n&&(n!==void 0||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return xy(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,wy(e),_o(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=No(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Rn(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Rn(12)}},Yl={};vi(Ql,function(e,t){Yl[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Yl.deleteProperty=function(e,t){return Yl.set.call(this,e,t,void 0)},Yl.set=function(e,t,n){return Ql.set.call(this,e[0],t,n,e[0])};var TM=function(){function e(n){var r=this;this.O=D1,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(h){var g=this;h===void 0&&(h=a);for(var m=arguments.length,v=Array(m>1?m-1:0),x=1;x<m;x++)v[x-1]=arguments[x];return l.produce(h,function(w){var C;return(C=i).call.apply(C,[g,w].concat(v))})}}var u;if(typeof i!="function"&&Rn(6),s!==void 0&&typeof s!="function"&&Rn(7),Bn(o)){var c=L1(r),f=Ey(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Qd(c):by(c)}return typeof Promise!="undefined"&&u instanceof Promise?u.then(function(h){return yy(c,s),vy(h,c)},function(h){throw Qd(c),h}):(yy(c,s),vy(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===U1&&(u=void 0),r.D&&Py(u,!0),s){var p=[],y=[];hr("Patches").M(o,u,p,y),s(p,y)}return u}Rn(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,f=Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];return r.produceWithPatches(u,function(p){return o.apply(void 0,[p].concat(f))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise!="undefined"&&l instanceof Promise?l.then(function(u){return[u,s,a]}):[l,s,a]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){Bn(n)||Rn(8),Ur(n)&&(n=wM(n));var r=L1(this),o=Ey(this,n,void 0);return o[We].C=!0,by(r),o},t.finishDraft=function(n,r){var o=n&&n[We],i=o.A;return yy(i,r),vy(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!D1&&Rn(20),this.O=n},t.applyPatches=function(n,r){var o;for(o=r.length-1;o>=0;o--){var i=r[o];if(i.path.length===0&&i.op==="replace"){n=i.value;break}}o>-1&&(r=r.slice(o+1));var s=hr("Patches").$;return Ur(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),dn=new TM,CM=dn.produce,Y6=dn.produceWithPatches.bind(dn),X6=dn.setAutoFreeze.bind(dn),Q6=dn.setUseProxies.bind(dn),Z6=dn.applyPatches.bind(dn),J6=dn.createDraft.bind(dn),e9=dn.finishDraft.bind(dn),ef=CM;function xi(e){"@babel/helpers - typeof";return xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xi(e)}function V1(e,t){if(xi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xi(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function W1(e){var t=V1(e,"string");return xi(t)=="symbol"?t:t+""}function K1(e,t,n){return(t=W1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ly(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$1(Object(n),!0).forEach(function(r){K1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pt(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 q1=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),Oy=function(){return Math.random().toString(36).substring(7).split("").join(".")},tf={INIT:"@@redux/INIT"+Oy(),REPLACE:"@@redux/REPLACE"+Oy(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Oy()}};function kM(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function My(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Pt(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(Pt(1));return n(My)(e,t)}if(typeof e!="function")throw new Error(Pt(2));var o=e,i=t,s=[],a=s,l=!1;function u(){a===s&&(a=s.slice())}function c(){if(l)throw new Error(Pt(3));return i}function f(h){if(typeof h!="function")throw new Error(Pt(4));if(l)throw new Error(Pt(5));var g=!0;return u(),a.push(h),function(){if(g){if(l)throw new Error(Pt(6));g=!1,u();var v=a.indexOf(h);a.splice(v,1),s=null}}}function d(h){if(!kM(h))throw new Error(Pt(7));if(typeof h.type=="undefined")throw new Error(Pt(8));if(l)throw new Error(Pt(9));try{l=!0,i=o(i,h)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var v=g[m];v()}return h}function p(h){if(typeof h!="function")throw new Error(Pt(10));o=h,d({type:tf.REPLACE})}function y(){var h,g=f;return h={subscribe:function(v){if(typeof v!="object"||v===null)throw new Error(Pt(11));function x(){v.next&&v.next(c())}x();var w=g(x);return{unsubscribe:w}}},h[q1]=function(){return this},h}return d({type:tf.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:p},r[q1]=y,r}function RM(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:tf.INIT});if(typeof r=="undefined")throw new Error(Pt(12));if(typeof n(void 0,{type:tf.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(Pt(13))})}function nf(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];typeof e[o]=="function"&&(n[o]=e[o])}var i=Object.keys(n),s,a;try{RM(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(0)var f;for(var d=!1,p={},y=0;y<i.length;y++){var h=i[y],g=n[h],m=u[h],v=g(m,c);if(typeof v=="undefined"){var x=c&&c.type;throw new Error(Pt(14))}p[h]=v,d=d||v!==m}return d=d||i.length!==Object.keys(u).length,d?p:u}}function Xs(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function G1(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),i=function(){throw new Error(Pt(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Xs.apply(void 0,a)(o.dispatch),Ly(Ly({},o),{},{dispatch:i})}}}var rf="NOT_FOUND";function PM(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:rf},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function AM(e,t){var n=[];function r(a){var l=n.findIndex(function(c){return t(a,c.key)});if(l>-1){var u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return rf}function o(a,l){r(a)===rf&&(n.unshift({key:a,value:l}),n.length>e&&n.pop())}function i(){return n}function s(){n=[]}return{get:r,put:o,getEntries:i,clear:s}}var Y1=function(t,n){return t===n};function IM(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function X1(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,o=r===void 0?Y1:r,i=n.maxSize,s=i===void 0?1:i,a=n.resultEqualityCheck,l=IM(o),u=s===1?PM(l):AM(s,l);function c(){var f=u.get(arguments);if(f===rf){if(f=e.apply(null,arguments),a){var d=u.getEntries(),p=d.find(function(y){return a(y.value,f)});p&&(f=p.value)}u.put(arguments,f)}return f}return c.clearCache=function(){return u.clear()},c}function LM(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function OM(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=function(){for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];var u=0,c,f={memoizeOptions:void 0},d=a.pop();if(typeof d=="object"&&(f=d,d=a.pop()),typeof d!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof d+"]");var p=f,y=p.memoizeOptions,h=y===void 0?n:y,g=Array.isArray(h)?h:[h],m=LM(a),v=e.apply(void 0,[function(){return u++,d.apply(null,arguments)}].concat(g)),x=e(function(){for(var C=[],E=m.length,k=0;k<E;k++)C.push(m[k].apply(null,arguments));return c=v.apply(null,C),c});return Object.assign(x,{resultFunc:d,memoizedResultFunc:v,dependencies:m,lastResult:function(){return c},recomputations:function(){return u},resetRecomputations:function(){return u=0}}),x};return o}var Un=OM(X1);function Q1(e){var t=function(r){var o=r.dispatch,i=r.getState;return function(s){return function(a){return typeof a=="function"?a(o,i,e):s(a)}}};return t}var Z1=Q1();Z1.withExtraArgument=Q1;var Ny=Z1;var rE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),MM=function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(u){return function(c){return l([u,c])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,o&&(i=u[0]&2?o.return:u[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,u[1])).done)return i;switch(o=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,o=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){n.label=u[1];break}if(u[0]===6&&n.label<i[1]){n.label=i[1],i=u;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(u);break}i[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(c){u=[6,c],o=0}finally{r=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},Qs=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},NM=Object.defineProperty,_M=Object.defineProperties,DM=Object.getOwnPropertyDescriptors,J1=Object.getOwnPropertySymbols,FM=Object.prototype.hasOwnProperty,HM=Object.prototype.propertyIsEnumerable,eE=function(e,t,n){return t in e?NM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Do=function(e,t){for(var n in t||(t={}))FM.call(t,n)&&eE(e,n,t[n]);if(J1)for(var r=0,o=J1(t);r<o.length;r++){var n=o[r];HM.call(t,n)&&eE(e,n,t[n])}return e},_y=function(e,t){return _M(e,DM(t))},zM=function(e,t,n){return new Promise(function(r,o){var i=function(l){try{a(n.next(l))}catch(u){o(u)}},s=function(l){try{a(n.throw(l))}catch(u){o(u)}},a=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(i,s)};a((n=n.apply(e,t)).next())})};var BM=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xs:Xs.apply(null,arguments)},b9=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function UM(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function ot(e,t){function n(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(t){var i=t.apply(void 0,r);if(!i)throw new Error("prepareAction did not return an object");return Do(Do({type:e,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}var jM=function(e){rE(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,Qs([void 0],n[0].concat(this)))):new(t.bind.apply(t,Qs([void 0],n.concat(this))))},t}(Array),VM=function(e){rE(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,Qs([void 0],n[0].concat(this)))):new(t.bind.apply(t,Qs([void 0],n.concat(this))))},t}(Array);function Hy(e){return Bn(e)?ef(e,function(){}):e}function WM(e){return typeof e=="boolean"}function KM(){return function(t){return $M(t)}}function $M(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t,r=e.immutableCheck,o=r===void 0?!0:r,i=e.serializableCheck,s=i===void 0?!0:i,a=e.actionCreatorCheck,l=a===void 0?!0:a,u=new jM;if(n&&(WM(n)?u.push(Ny):u.push(Ny.withExtraArgument(n.extraArgument))),0){if(o)var c;if(s)var f;if(l)var d}return u}var Dy=!0;function oE(e){var t=KM(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,f=n.enhancers,d=f===void 0?void 0:f,p;if(typeof o=="function")p=o;else if(UM(o))p=nf(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var y=s;if(typeof y=="function"&&(y=y(t),!Dy&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!Dy&&y.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=G1.apply(void 0,y),g=Xs;l&&(g=BM(Do({trace:!Dy},typeof l=="object"&&l)));var m=new VM(h),v=m;Array.isArray(d)?v=Qs([h],d):typeof d=="function"&&(v=d(m));var x=g.apply(void 0,v);return My(p,c,x)}function iE(e){var t={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(!a)throw new Error("`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");return t[a]=s,o},addMatcher:function(i,s){return n.push({matcher:i,reducer:s}),o},addDefaultCase:function(i){return r=i,o}};return e(o),[t,n,r]}function qM(e){return typeof e=="function"}function GM(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?iE(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(qM(e))l=function(){return Hy(e())};else{var u=Hy(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var p=Qs([i[d.type]],s.filter(function(y){var h=y.matcher;return h(d)}).map(function(y){var h=y.reducer;return h}));return p.filter(function(y){return!!y}).length===0&&(p=[a]),p.reduce(function(y,h){if(h)if(Ur(y)){var g=y,m=h(g,d);return m===void 0?y:m}else{if(Bn(y))return ef(y,function(v){return h(v,d)});var m=h(y,d);if(m===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return y},f)}return c.getInitialState=l,c}function YM(e,t){return e+"/"+t}function Ce(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n=typeof e.initialState=="function"?e.initialState:Hy(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=YM(t,c),p,y;"reducer"in f?(p=f.reducer,y=f.prepare):p=f,i[c]=p,s[d]=p,a[c]=y?ot(d,y):ot(d)});function l(){var c=typeof e.extraReducers=="function"?iE(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,p=c[1],y=p===void 0?[]:p,h=c[2],g=h===void 0?void 0:h,m=Do(Do({},d),s);return GM(n,function(v){for(var x in m)v.addCase(x,m[x]);for(var w=0,C=y;w<C.length;w++){var E=C[w];v.addMatcher(E.matcher,E.reducer)}g&&v.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,f){return u||(u=l()),u(c,f)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var XM="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",QM=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=XM[Math.random()*64|0];return t},ZM=["name","message","stack","code"],Fy=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),tE=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),JM=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=ZM;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},ge=function(){function e(t,n,r){var o=ot(t+"/fulfilled",function(c,f,d,p){return{payload:c,meta:_y(Do({},p||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=ot(t+"/pending",function(c,f,d){return{payload:void 0,meta:_y(Do({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=ot(t+"/rejected",function(c,f,d,p,y){return{payload:p,error:(r&&r.serializeError||JM)(c||"Rejected"),meta:_y(Do({},y||{}),{arg:d,requestId:f,rejectedWithValue:!!p,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController!="undefined"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(f,d,p){var y=r!=null&&r.idGenerator?r.idGenerator(c):QM(),h=new l,g,m=!1;function v(w){g=w,h.abort()}var x=function(){return zM(this,null,function(){var w,C,E,k,I,L,G;return MM(this,function(F){switch(F.label){case 0:return F.trys.push([0,4,,5]),k=(w=r==null?void 0:r.condition)==null?void 0:w.call(r,c,{getState:d,extra:p}),tN(k)?[4,k]:[3,2];case 1:k=F.sent(),F.label=2;case 2:if(k===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,I=new Promise(function(j,M){return h.signal.addEventListener("abort",function(){return M({name:"AbortError",message:g||"Aborted"})})}),f(i(y,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:y,arg:c},{getState:d,extra:p}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:f,getState:d,extra:p,requestId:y,signal:h.signal,abort:v,rejectWithValue:function(j,M){return new Fy(j,M)},fulfillWithValue:function(j,M){return new tE(j,M)}})).then(function(j){if(j instanceof Fy)throw j;return j instanceof tE?o(j.payload,y,c,j.meta):o(j,y,c)})])];case 3:return E=F.sent(),[3,5];case 4:return L=F.sent(),E=L instanceof Fy?s(null,y,c,L.payload,L.meta):s(L,y,c),[3,5];case 5:return G=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,G||f(E),[2,E]}})})}();return Object.assign(x,{abort:v,requestId:y,arg:c,unwrap:function(){return x.then(eN)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function eN(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function tN(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var sE="listener",aE="completed",lE="cancelled",k9="task-"+lE,R9="task-"+aE,P9=sE+"-"+lE,A9=sE+"-"+aE;var zy="listenerMiddleware";var I9=ot(zy+"/add"),L9=ot(zy+"/removeAll"),O9=ot(zy+"/remove");var nE,M9=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window!="undefined"?window:typeof global!="undefined"?global:globalThis):function(e){return(nE||(nE=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},nN=function(e){return function(t){setTimeout(t,e)}},N9=typeof window!="undefined"&&window.requestAnimationFrame?window.requestAnimationFrame:nN(10);B1();var XE=S(Uy()),QE=S(gE());var jy=S($s());function wN(e){e()}var hE=wN,yE=e=>hE=e,vE=()=>hE;var Js=S($());var SE=S($());var Zl=S($()),xE=Symbol.for("react-redux-context"),wE=typeof globalThis!="undefined"?globalThis:{};function SN(){var e;if(!Zl.createContext)return{};let t=(e=wE[xE])!=null?e:wE[xE]=new Map,n=t.get(Zl.createContext);return n||(n=Zl.createContext(null),t.set(Zl.createContext,n)),n}var At=SN();function Jl(e=At){return function(){return(0,SE.useContext)(e)}}var sf=Jl();var af=()=>{throw new Error("uSES not initialized!")};var bE=af,EE=e=>{bE=e},bN=(e,t)=>e===t;function TE(e=At){let t=e===At?sf:Jl(e);return function(r,o={}){let{equalityFn:i=bN,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:f,noopCheck:d}=t(),p=(0,Js.useRef)(!0),y=(0,Js.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),h=bE(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,Js.useDebugValue)(h),h}}var K=TE();function Fo(){return Fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fo.apply(null,arguments)}function lf(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Zy=S(_E()),Ie=S($()),$E=S(zE());var HN=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function zN(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function p(v,x){return l=v,u=x,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function y(){return c=e(l,u),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function h(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function g(){let v=e(l,u),x=!s(v,c);return c=v,x&&(d=n(c,f,u)),d}function m(v,x){let w=!i(x,u),C=!o(v,l,x,u);return l=v,u=x,w&&C?y():w?h():C?g():d}return function(x,w){return a?m(x,w):p(x,w)}}function Xy(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=lf(t,HN),s=n(e,i),a=r(e,i),l=o(e,i);return zN(s,a,l,e,i)}function Qy(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 eu(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function BE(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Af(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=BE(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=BE(u),u=i(a,l)),u},i}}function ea(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function UE(e){return e&&typeof e=="object"?eu(t=>Qy(e,t)):e?typeof e=="function"?Af(e,"mapDispatchToProps"):ea(e,"mapDispatchToProps"):eu(t=>({dispatch:t}))}function jE(e){return e?typeof e=="function"?Af(e,"mapStateToProps"):ea(e,"mapStateToProps"):eu(()=>({}))}function BN(e,t,n){return Fo({},n,e,t)}function UN(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let f=e(l,u,c);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function VE(e){return e?typeof e=="function"?UN(e):ea(e,"mergeProps"):()=>BN}function jN(){let e=vE(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var WE={notify(){},get:()=>[]};function If(e,t){let n,r=WE,o=0,i=!1;function s(h){c();let g=r.subscribe(h),m=!1;return()=>{m||(m=!0,g(),f())}}function a(){r.notify()}function l(){y.onStateChange&&y.onStateChange()}function u(){return i}function c(){o++,n||(n=t?t.addNestedSub(l):e.subscribe(l),r=jN())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=WE)}function d(){i||(i=!0,c())}function p(){i&&(i=!1,f())}let y={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:u,trySubscribe:d,tryUnsubscribe:p,getListeners:()=>r};return y}var Lf=S($()),VN=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",ta=VN?Lf.useLayoutEffect:Lf.useEffect;function KE(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function na(e,t){if(KE(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])||!KE(e[n[o]],t[n[o]]))return!1;return!0}var WN=["reactReduxForwardedRef"],qE=af,GE=e=>{qE=e};var KN=[null,null];function $N(e,t,n){ta(()=>e(...t),n)}function qN(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function GN(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,p=()=>{if(f||!a.current)return;let h=t.getState(),g,m;try{g=r(h,o.current)}catch(v){m=v,d=v}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function YN(e,t){return e===t}function XN(e,t,n,{pure:r,areStatesEqual:o=YN,areOwnPropsEqual:i=na,areStatePropsEqual:s=na,areMergedPropsEqual:a=na,forwardRef:l=!1,context:u=At}={}){let c=u,f=jE(e),d=UE(t),p=VE(n),y=!!e;return g=>{let m=g.displayName||g.name||"Component",v=`Connect(${m})`,x={shouldHandleStateChanges:y,displayName:v,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function w(k){let[I,L,G]=Ie.useMemo(()=>{let{reactReduxForwardedRef:ye}=k,Ee=lf(k,WN);return[k.context,ye,Ee]},[k]),F=Ie.useMemo(()=>I&&I.Consumer&&(0,$E.isContextConsumer)(Ie.createElement(I.Consumer,null))?I:c,[I,c]),j=Ie.useContext(F),M=!!k.store&&!!k.store.getState&&!!k.store.dispatch,_=!!j&&!!j.store,X=M?k.store:j.store,te=_?j.getServerState:X.getState,q=Ie.useMemo(()=>Xy(X.dispatch,x),[X]),[W,B]=Ie.useMemo(()=>{if(!y)return KN;let ye=If(X,M?void 0:j.subscription),Ee=ye.notifyNestedSubs.bind(ye);return[ye,Ee]},[X,M,j]),N=Ie.useMemo(()=>M?j:Fo({},j,{subscription:W}),[M,j,W]),H=Ie.useRef(),ce=Ie.useRef(G),V=Ie.useRef(),me=Ie.useRef(!1),pe=Ie.useRef(!1),Se=Ie.useRef(!1),fe=Ie.useRef();ta(()=>(Se.current=!0,()=>{Se.current=!1}),[]);let ne=Ie.useMemo(()=>()=>V.current&&G===ce.current?V.current:q(X.getState(),G),[X,G]),Q=Ie.useMemo(()=>Ee=>W?GN(y,X,W,q,ce,H,me,Se,V,B,Ee):()=>{},[W]);$N(qN,[ce,H,me,G,V,B]);let ie;try{ie=qE(Q,ne,te?()=>q(te(),G):ne)}catch(ye){throw fe.current&&(ye.message+=`
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,Sm=Object.prototype.hasOwnProperty,nx=Object.prototype.propertyIsEnumerable;var bm=Math.pow,wm=(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={}))Sm.call(t,n)&&wm(e,n,t[n]);if(mu)for(var n of mu(t))nx.call(t,n)&&wm(e,n,t[n]);return e},P=(e,t)=>WA(e,GA(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&&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))!Sm.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)=>wm(e,typeof t!="symbol"?t+"":t,n);var I=(e,t,n)=>new Promise((r,o)=>{var s=l=>{try{a(n.next(l))}catch(c){o(c)}},i=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,i);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="",s=0;s<arguments.length;s++){var i=arguments[s];i&&(o=r(o,n(i)))}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 s="";for(var i in o)e.call(o,i)&&o[i]&&(s=r(s,i));return s}function r(o,s){return s?o?o+" "+s:o+s: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"),sI=Symbol.for("react.suspense"),iI=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 Si(e,t,n){this.props=e,this.context=t,this.refs=cx,this.updater=n||ax}Si.prototype.isReactComponent={};Si.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")};Si.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ux(){}ux.prototype=Si.prototype;function Cm(e,t,n){this.props=e,this.context=t,this.refs=cx,this.updater=n||ax}var km=Cm.prototype=new ux;km.constructor=Cm;lx(km,Si.prototype);km.isPureReactComponent=!0;var sx=Array.isArray,dx=Object.prototype.hasOwnProperty,Rm={current:null},fx={key:!0,ref:!0,__self:!0,__source:!0};function px(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+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:s,ref:i,props:o,_owner:Rm.current}}function cI(e,t){return{$$typeof:Ga,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===Ga}function uI(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?uI(""+e.key):t.toString(36)}function yu(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Ga:case ZA:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+Tm(i,0):r,sx(o)?(n="",e!=null&&(n=e.replace(ix,"$&/")+"/"),yu(o,t,n,"",function(c){return c})):o!=null&&(Pm(o)&&(o=cI(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(ix,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",sx(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Tm(s,a);i+=yu(s,t,n,l,o)}else if(l=lI(e),typeof l=="function")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Tm(s,a++),i+=yu(s,t,n,l,o);else if(s==="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 i}function hu(e,t,n){if(e==null)return e;var r=[],o=0;return yu(e,r,"","",function(s){return t.call(n,s,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:Rm};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(!Pm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};he.Component=Si;he.Fragment=JA;he.Profiler=tI;he.PureComponent=Cm;he.StrictMode=eI;he.Suspense=sI;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,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Rm.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:s,props:r,_owner:i}};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=Pm;he.lazy=function(e){return{$$typeof:aI,_payload:{_status:-1,_result:e},_init:dI}};he.memo=function(e,t){return{$$typeof:iI,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={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=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:s,ref:i,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 Dm(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,s=o>>>1;r<s;){var i=2*(r+1)-1,a=e[i],l=i+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[i]=n,r=i);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()}):(Om=Date,Wx=Om.now(),Me.unstable_now=function(){return Om.now()-Wx});var Kx,Om,Wx,br=[],Ro=[],DI=1,An=null,Pt=3,Lu=!1,ys=!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 Fm(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,Dm(br,t);else break;t=jn(Ro)}}function zm(e){if(Qa=!1,Fm(e),!ys)if(jn(br)!==null)ys=!0,Bm(Hm);else{var t=jn(Ro);t!==null&&Um(zm,t.startTime-e)}}function Hm(e,t){ys=!1,Qa&&(Qa=!1,Xx(Za),Za=-1),Lu=!0;var n=Pt;try{for(Fm(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),Fm(t)}else Iu(br);An=jn(br)}if(An!==null)var s=!0;else{var i=jn(Ro);i!==null&&Um(zm,i.startTime-t),s=!1}return s}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 Nm(){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(Nm)}:typeof MessageChannel!="undefined"?(Mm=new MessageChannel,Gx=Mm.port2,Mm.port1.onmessage=Nm,Xa=function(){Gx.postMessage(null)}):Xa=function(){Yx(Nm,0)};var Mm,Gx;function Bm(e){Au=e,_u||(_u=!0,Xa())}function Um(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(){ys||Lu||(ys=!0,Bm(Hm))};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,Dm(Ro,e),jn(br)===null&&e===jn(Ro)&&(Qa?(Xx(Za),Za=-1):Qa=!0,Um(zm,n-r))):(e.sortIndex=o,Dm(br,e),ys||Lu||(ys=!0,Bm(Hm))),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 iE=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 Is(e,t){Wi(e,t),Wi(e+"Capture",t)}function Wi(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"),ug=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 ug.call(ow,e)?!0:ug.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,s,i){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=s,this.removeEmptyString=i}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 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 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(nh,rh);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(nh,rh);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 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")&&(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"),Pi=Symbol.for("react.portal"),Ai=Symbol.for("react.fragment"),sh=Symbol.for("react.strict_mode"),dg=Symbol.for("react.profiler"),uS=Symbol.for("react.provider"),dS=Symbol.for("react.context"),ih=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 fS=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var sw=Symbol.iterator;function Ja(e){return e===null||typeof e!="object"?null:(e=sw&&e[sw]||e["@@iterator"],typeof e=="function"?e:null)}var qe=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
+ `),s=r.stack.split(`
4
+ `),i=o.length-1,a=s.length-1;1<=i&&0<=a&&o[i]!==s[a];)a--;for(;1<=i&&0<=a;i--,a--)if(o[i]!==s[a]){if(i!==1||a!==1)do if(i--,a--,0>a||o[i]!==s[a]){var l=`
5
+ `+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{$m=!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=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 Ai:return"Fragment";case Pi:return"Portal";case dg:return"Profiler";case sh:return"StrictMode";case fg:return"Suspense";case pg: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 ih: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 $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 mg(t);case 8:return t===sh?"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,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},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 gg(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 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 gS(e,t){t=t.checked,t!=null&&oh(e,"checked",t,!1)}function hg(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")?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 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 yg(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 Bi(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 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 xg(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 wg(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 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,Ui=null,Vi=null;function uw(e){if(e=Hl(e)){if(typeof Eg!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Dd(t),Eg(e.stateNode,e.type,t))}}function SS(e){Ui?Vi?Vi.push(e):Vi=[e]:Ui=e}function bS(){if(Ui){var e=Ui,t=Vi;if(Vi=Ui=null,uw(e),t)for(e=0;e<t.length;e++)uw(t[e])}}function ES(e,t){return e(t)}function TS(){}var Km=!1;function CS(e,t,n){if(Km)return e(t,n);Km=!0;try{return ES(e,t,n)}finally{Km=!1,(Ui!==null||Vi!==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 Tg=!1;if(Yr)try{ki={},Object.defineProperty(ki,"passive",{get:function(){Tg=!0}}),window.addEventListener("test",ki,ki),window.removeEventListener("test",ki,ki)}catch(e){Tg=!1}var ki;function qI(e,t,n,r,o,s,i,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,Cg=null,GI={onError:function(e){fl=!0,cd=e}};function YI(e,t,n,r,o,s,i,a,l){fl=!1,cd=null,qI.apply(GI,arguments)}function XI(e,t,n,r,o,s,i,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,Cg=c)}}function Ls(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(Ls(e)!==e)throw Error(D(188))}function QI(e){var t=e.alternate;if(!t){if(t=Ls(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 s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return dw(o),e;if(s===r)return dw(o),t;s=s.sibling}throw Error(D(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,a=o.child;a;){if(a===n){i=!0,n=o,r=s;break}if(a===r){i=!0,r=o,n=s;break}a=a.sibling}if(!i){for(a=s.child;a;){if(a===n){i=!0,n=s,r=o;break}if(a===r){i=!0,r=s,n=o;break}a=a.sibling}if(!i)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,ch=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:sL,rL=Math.log,oL=Math.LN2;function sL(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,s=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~o;a!==0?r=cl(a):(s&=i,s!==0&&(r=cl(s)))}else i=n&~o,i!==0?r=cl(i):s!==0&&(r=cl(s));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&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 iL(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,s=e.pendingLanes;0<s;){var i=31-Yn(s),a=1<<i,l=o[i];l===-1?((a&n)===0||(a&r)!==0)&&(o[i]=iL(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function kg(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 Wm(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),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}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 Ae=0;function OS(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var NS,dh,MS,DS,FS,Rg=!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,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,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 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 s=o.pointerId;return El.set(s,el(El.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Tl.set(s,el(Tl.get(s)||null,e,t,n,r,o)),!0}return!1}function zS(e){var t=ws(e.target);if(t!==null){var n=Ls(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=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 mw(e,t,n){Zu(e)&&n.delete(t)}function dL(){Rg=!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,Rg||(Rg=!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 $i=Jr.ReactCurrentBatchConfig,pd=!0;function fL(e,t,n,r){var o=Ae,s=$i.transition;$i.transition=null;try{Ae=1,fh(e,t,n,r)}finally{Ae=o,$i.transition=s}}function pL(e,t,n,r){var o=Ae,s=$i.transition;$i.transition=null;try{Ae=4,fh(e,t,n,r)}finally{Ae=o,$i.transition=s}}function fh(e,t,n,r){if(pd){var o=Pg(e,t,n,r);if(o===null)Jm(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 s=Hl(o);if(s!==null&&NS(s),s=Pg(e,t,n,r),s===null&&Jm(e,t,r,md,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else Jm(e,t,r,null,n)}}var md=null;function Pg(e,t,n,r){if(md=null,e=lh(r),e=ws(e),e!==null)if(t=Ls(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 ch: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,ph=null,Ju=null;function BS(){if(Ju)return Ju;var e,t=ph,n=t.length,r,o="value"in Oo?Oo.value:Oo.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-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,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.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 Ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mh=xn(Ji),zl=qe({},Ji,{view:0,detail:0}),mL=xn(zl),qm,Gm,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: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"?(qm=e.screenX-nl.screenX,Gm=e.screenY-nl.screenY):Gm=qm=0,nl=e),qm)},movementY:function(e){return"movementY"in e?e.movementY:Gm}}),hw=xn(Od),gL=qe({},Od,{dataTransfer:0}),hL=xn(gL),yL=qe({},zl,{relatedTarget:0}),Ym=xn(yL),vL=qe({},Ji,{animationName:0,elapsedTime:0,pseudoElement:0}),xL=xn(vL),wL=qe({},Ji,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),SL=xn(wL),bL=qe({},Ji,{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 gh(){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:gh,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:gh}),LL=xn(IL),_L=qe({},Ji,{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],hh=Yr&&"CompositionEvent"in window,pl=null;Yr&&"documentMode"in document&&(pl=document.documentMode);var FL=Yr&&"TextEvent"in window&&!pl,US=Yr&&(!hh||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 Ii=!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(Ii)return e==="compositionend"||!hh&&VS(e,t)?(e=BS(),Ju=ph=Oo=null,Ii=!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 mh("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=Oi(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||(Xm=document.createElement("div"),Xm.setAttribute("oninput","return;"),Uu=typeof Xm.oninput=="function"),Bu=Uu):Bu=!1,KS=Bu&&(!document.documentMode||9<document.documentMode));var Bu,Uu,Xm;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,lh(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(!ug.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 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 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&&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,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Tw(n,s);var i=Tw(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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,Li=null,Ag=null,gl=null,Ig=!1;function Cw(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ig||Li==null||Li!==ld(r)||(r=Li,"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=gd(Ag,"onSelect"),0<r.length&&(t=new mh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Li)))}function Vu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _i={animationend:Vu("Animation","AnimationEnd"),animationiteration:Vu("Animation","AnimationIteration"),animationstart:Vu("Animation","AnimationStart"),transitionend:Vu("Transition","TransitionEnd")},Qm={},YS={};Yr&&(YS=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);function Md(e){if(Qm[e])return Qm[e];if(!_i[e])return e;var t=_i[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in YS)return Qm[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),Is(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");Wi("onMouseEnter",["mouseout","mouseover"]);Wi("onMouseLeave",["mouseout","mouseover"]);Wi("onPointerEnter",["pointerout","pointerover"]);Wi("onPointerLeave",["pointerout","pointerover"]);Is("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Is("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Is("onBeforeInput",["compositionend","keypress","textInput","paste"]);Is("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Is("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Is("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 s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var a=r[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==s&&o.isPropagationStopped())break e;Aw(o,a,c),s=l}else for(i=0;i<r.length;i++){if(a=r[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==s&&o.isPropagationStopped())break e;Aw(o,a,c),s=l}}}if(ud)throw e=Cg,ud=!1,Cg=null,e}function Fe(e,t){var n=t[Mg];n===void 0&&(n=t[Mg]=new Set);var r=e+"__bubble";n.has(r)||(nb(t,e,2,!1),n.add(r))}function Zm(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)||Zm(n,!1,e),Zm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ku]||(t[Ku]=!0,Zm("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=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 s=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;i=i.return}for(;a!==null;){if(i=ws(a),i===null)return;if(l=i.tag,l===5||l===6){r=s=i;continue e}a=a.parentNode}}r=r.return}CS(function(){var c=s,u=lh(n),d=[];e:{var f=eb.get(e);if(f!==void 0){var p=mh,v=e;switch(e){case"keypress":if(ed(n)===0)break e;case"keydown":case"keyup":p=PL;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=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!==bg&&(v=n.relatedTarget||n.fromElement)&&(ws(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?ws(v):null,v!==null&&(x=Ls(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:Oi(p),h=v==null?f:Oi(v),f=new m(w,g+"leave",p,n,u),f.target=x,f.relatedTarget=h,w=null,ws(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=Ri(h))g++;for(h=0,w=y;w;w=Ri(w))h++;for(;0<g-h;)m=Ri(m),g--;for(;0<h-g;)y=Ri(y),h--;for(;g--;){if(m===y||y!==null&&m===y.alternate)break t;m=Ri(m),y=Ri(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?Oi(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"&&yg(f,"number",f.value)}switch(C=c?Oi(c):window,e){case"focusin":(Sw(C)||C.contentEditable==="true")&&(Li=C,Ag=c,gl=null);break;case"focusout":gl=Ag=Li=null;break;case"mousedown":Ig=!0;break;case"contextmenu":case"mouseup":case"dragend":Ig=!1,Cw(d,n,u);break;case"selectionchange":if(YL)break;case"keydown":case"keyup":Cw(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 Ii?VS(e,n)&&(A="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(A="onCompositionStart");A&&(US&&n.locale!=="ko"&&(Ii||A!=="onCompositionStart"?A==="onCompositionEnd"&&Ii&&(k=BS()):(Oo=u,ph="value"in Oo?Oo.value:Oo.textContent,Ii=!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,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=bl(e,n),s!=null&&r.unshift(Al(e,s,o)),s=bl(e,t),s!=null&&r.push(Al(e,s,o))),e=e.return}return r}function Ri(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 s=t._reactName,i=[];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,s),l!=null&&i.unshift(Al(n,l,a))):o||(l=bl(n,s),l!=null&&i.push(Al(n,l,a)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}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 Lg=null,_g=null;function Og(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 Ng=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_)}:Ng;function t_(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 ea=Math.random().toString(36).slice(2),Cr="__reactFiber$"+ea,Il="__reactProps$"+ea,Xr="__reactContainer$"+ea,Mg="__reactEvents$"+ea,n_="__reactListeners$"+ea,r_="__reactHandles$"+ea;function ws(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 Oi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function Dd(e){return e[Il]||null}var Dg=[],Ni=-1;function Wo(e){return{current:e}}function ze(e){0>Ni||(e.current=Dg[Ni],Dg[Ni]=null,Ni--)}function De(e,t){Ni++,Dg[Ni]=e.current,e.current=t}var jo={},_t=Wo(jo),an=Wo(!1),Cs=jo;function qi(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={},s;for(s in n)o[s]=t[s];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,Cs=_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,Cs),r.__reactInternalMemoizedMergedChildContext=e,ze(an),ze(_t),De(_t,e)):ze(an),De(an,n)}var Kr=null,Fd=!1,tg=!1;function ob(e){Kr===null?Kr=[e]:Kr.push(e)}function o_(e){Fd=!0,ob(e)}function qo(){if(!tg&&Kr!==null){tg=!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(ch,qo),o}finally{Ae=t,tg=!1}}return null}var Mi=[],Di=0,xd=null,wd=0,In=[],Ln=0,ks=null,Wr=1,qr="";function vs(e,t){Mi[Di++]=wd,Mi[Di++]=xd,xd=e,wd=t}function sb(e,t,n){In[Ln++]=Wr,In[Ln++]=qr,In[Ln++]=ks,ks=e;var r=Wr;e=qr;var o=32-Yn(r)-1;r&=~(1<<o),n+=1;var s=32-Yn(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,Wr=1<<32-Yn(t)+o|n<<o|r,qr=s+e}else Wr=1<<s|n<<o|r,qr=e}function vh(e){e.return!==null&&(vs(e,1),sb(e,1,0))}function xh(e){for(;e===xd;)xd=Mi[--Di],Mi[Di]=null,wd=Mi[--Di],Mi[Di]=null;for(;e===ks;)ks=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 ib(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=ks!==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 Fg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zg(e){if(Ue){var t=hn;if(t){var n=t;if(!Dw(e,t)){if(Fg(e))throw Error(D(418));t=zo(n.nextSibling);var r=yn;t&&Dw(e,t)?ib(r,n):(e.flags=e.flags&-4097|2,Ue=!1,yn=e)}}else{if(Fg(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"&&!Og(e.type,e.memoizedProps)),t&&(t=hn)){if(Fg(e))throw ab(),Error(D(418));for(;t;)ib(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 Gi(){hn=yn=null,Ue=!1}function wh(e){Gn===null?Gn=[e]:Gn.push(e)}var s_=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,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var a=o.refs;i===null?delete a[s]:a[s]=i},t._stringRef=s,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 s(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 i(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,g,h,w){return g===null||g.tag!==6?(g=lg(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===Ai?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=cg(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=Ts(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=lg(""+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 Pi:return g=cg(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=Ts(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 Pi: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 Pi: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=s(N,g,A),C===null?E=N:C.sibling=N,C=N,k=F}if(A===h.length)return n(y,k),Ue&&vs(y,A),E;if(k===null){for(;A<h.length;A++)k=d(y,h[A],w),k!==null&&(g=s(k,g,A),C===null?E=k:C.sibling=k,C=k);return Ue&&vs(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=s(F,g,A),C===null?E=F:C.sibling=F,C=F);return e&&k.forEach(function(O){return t(y,O)}),Ue&&vs(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=s(O,g,A),C===null?E=O:C.sibling=O,C=O,k=F}if(N.done)return n(y,k),Ue&&vs(y,A),E;if(k===null){for(;!N.done;A++,N=h.next())N=d(y,N.value,w),N!==null&&(g=s(N,g,A),C===null?E=N:C.sibling=N,C=N);return Ue&&vs(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=s(N,g,A),C===null?E=N:C.sibling=N,C=N);return e&&k.forEach(function(G){return t(y,G)}),Ue&&vs(y,A),E}function x(y,g,h,w){if(typeof h=="object"&&h!==null&&h.type===Ai&&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===Ai){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===Ai?(g=Ts(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 i(y);case Pi: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=cg(h,y.mode,w),g.return=y,y=g}return i(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=lg(h,y.mode,w),g.return=y,y=g),i(y)):n(y,g)}return x}var Yi=lb(!0),cb=lb(!1),Sd=Wo(null),bd=null,Fi=null,Sh=null;function bh(){Sh=Fi=bd=null}function Eh(e){var t=Sd.current;ze(Sd),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 ji(e,t){bd=e,Sh=Fi=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(Sh!==e)if(e={context:e,memoizedValue:t,next:null},Fi===null){if(bd===null)throw Error(D(308));Fi=e,bd.dependencies={lanes:0,firstContext:e}}else Fi=Fi.next=e;return t}var Ss=null;function Th(e){Ss===null?Ss=[e]:Ss.push(e)}function ub(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,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 Ch(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,Th(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,uh(e,n)}}function Hw(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,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 s=o.firstBaseUpdate,i=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=o.baseState;i=0,u=c=l=null,a=s;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,i|=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 i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Ps|=i,e.lanes=i,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 bs(e){if(e===Bl)throw Error(D(174));return e}function kh(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:xg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xg(t,e)}ze(Rr),De(Rr,t)}function Xi(){ze(Rr),ze(Ll),ze(_l)}function fb(e){bs(_l.current);var t=bs(Rr.current),n=xg(t,e.type);t!==n&&(De(Ll,e),De(Rr,n))}function Rh(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 ng=[];function Ph(){for(var e=0;e<ng.length;e++)ng[e]._workInProgressVersionPrimary=null;ng.length=0}var nd=Jr.ReactCurrentDispatcher,rg=Jr.ReactCurrentBatchConfig,Rs=0,We=null,ot=null,pt=null,Cd=!1,hl=!1,Ol=0,i_=0;function At(){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,s){if(Rs=s,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){s=0;do{if(hl=!1,Ol=0,25<=s)throw Error(D(301));s+=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,Rs=0,pt=ot=We=null,Cd=!1,t)throw Error(D(300));return e}function Lh(){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 og(e){var t=Mn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=ot,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var a=i=null,l=null,c=s;do{var u=c.lane;if((Rs&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,i=r):l=l.next=d,We.lanes|=u,Ps|=u}c=c.next}while(c!==null&&c!==s);l===null?i=r:l.next=a,Qn(r,t.memoizedState)||(sn=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,We.lanes|=s,Ps|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function sg(e){var t=Mn(),n=t.queue;if(n===null)throw Error(D(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Qn(s,t.memoizedState)||(sn=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function pb(){}function mb(e,t){var n=We,r=Mn(),o=t(),s=!Qn(r.memoizedState,o);if(s&&(r.memoizedState=o,sn=!0),r=r.queue,_h(yb.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||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));(Rs&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 s=void 0;if(ot!==null){var i=ot.memoizedState;if(s=i.destroy,r!==null&&Ah(r,i.deps)){o.memoizedState=Ml(t,n,s,r);return}}We.flags|=e,o.memoizedState=Ml(1|t,n,s,r)}function Vw(e,t){return rd(8390656,8,e,t)}function _h(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 Oh(){}function Cb(e,t){var n=Mn();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 kb(e,t){var n=Mn();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 Rb(e,t,n){return(Rs&21)===0?(e.baseState&&(e.baseState=!1,sn=!0),e.memoizedState=n):(Qn(n,t)||(n=_S(),We.lanes|=n,Ps|=n,e.baseState=!0),t)}function a_(e,t){var n=Ae;Ae=n!==0&&4>n?n:4,e(!0);var r=rg.transition;rg.transition={};try{e(!1),t()}finally{Ae=n,rg.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 s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,a=s(i,n);if(o.hasEagerState=!0,o.eagerState=a,Qn(a,i)){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=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,uh(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:Oh,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));(Rs&30)!==0||gb(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,Vw(yb.bind(null,r,s,e),[e]),r.flags|=2048,Ml(9,hb.bind(null,r,s,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=i_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},d_={readContext:Nn,useCallback:Cb,useContext:Nn,useEffect:_h,useImperativeHandle:Tb,useInsertionEffect:Sb,useLayoutEffect:bb,useMemo:kb,useReducer:og,useRef:wb,useState:function(){return og(Nl)},useDebugValue:Oh,useDeferredValue:function(e){var t=Mn();return Rb(t,ot.memoizedState,e)},useTransition:function(){var e=og(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:_h,useImperativeHandle:Tb,useInsertionEffect:Sb,useLayoutEffect:bb,useMemo:kb,useReducer:sg,useRef:wb,useState:function(){return sg(Nl)},useDebugValue:Oh,useDeferredValue:function(e){var t=Mn();return ot===null?t.memoizedState=e:Rb(t,ot.memoizedState,e)},useTransition:function(){var e=sg(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 Bg(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)?Ls(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ht(),o=Uo(e),s=Gr(r,o);s.payload=t,n!=null&&(s.callback=n),t=Ho(e,s,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),s=Gr(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ho(e,s,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,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Rl(n,r)||!Rl(o,s):!0}function _b(e,t,n){var r=!1,o=jo,s=t.contextType;return typeof s=="object"&&s!==null?s=Nn(s):(o=ln(t)?Cs:_t.current,r=t.contextTypes,s=(r=r!=null)?qi(e,o):jo),t=new t(n,s),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=s),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 Ug(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Ch(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Nn(s):(s=ln(t)?Cs:_t.current,o.context=qi(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Bg(e,t,s,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 Qi(e,t){try{var n="",r=t;do n+=VI(r),r=r.return;while(r);var o=n}catch(s){o=`
7
+ Error generating stack: `+s.message+`
8
+ `+s.stack}return{value:e,source:t,stack:o,digest:null}}function ig(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 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,Zg=r),Vg(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(){Vg(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Vg(e,t),typeof r!="function"&&(Bo===null?Bo=new Set([this]):Bo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),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):Yi(t,e.child,n,r)}function Gw(e,t,n,r,o){n=n.render;var s=t.ref;return ji(t,o),r=Ih(e,t,n,r,s,o),n=Lh(),e!==null&&!sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Zr(e,t,o)):(Ue&&n&&vh(t),t.flags|=1,zt(e,t,r,o),t.child)}function Yw(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Uh(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Mb(e,t,s,r,o)):(e=ad(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,(e.lanes&o)===0){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Rl,n(i,r)&&e.ref===t.ref)return Zr(e,t,o)}return t.flags|=1,e=Vo(s,r),e.ref=t.ref,e.return=t,t.child=e}function Mb(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Rl(s,r)&&e.ref===t.ref)if(sn=!1,t.pendingProps=r=s,(e.lanes&o)!==0)(e.flags&131072)!==0&&(sn=!0);else return t.lanes=e.lanes,Zr(e,t,o)}return $g(e,t,n,r,o)}function Db(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Hi,gn),gn|=n;else{if((n&1073741824)===0)return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(Hi,gn),gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,De(Hi,gn),gn|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,De(Hi,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 $g(e,t,n,r,o){var s=ln(n)?Cs:_t.current;return s=qi(t,s),ji(t,o),n=Ih(e,t,n,r,s,o),r=Lh(),e!==null&&!sn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Zr(e,t,o)):(Ue&&r&&vh(t),t.flags|=1,zt(e,t,n,o),t.child)}function Xw(e,t,n,r,o){if(ln(n)){var s=!0;vd(t)}else s=!1;if(ji(t,o),t.stateNode===null)od(e,t),_b(t,n,r),Ug(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,c=n.contextType;typeof c=="object"&&c!==null?c=Nn(c):(c=ln(n)?Cs:_t.current,c=qi(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||l!==c)&&jw(t,i,r,c),Io=!1;var f=t.memoizedState;i.state=f,Ed(t,r,i,o),l=t.memoizedState,a!==r||f!==l||an.current||Io?(typeof u=="function"&&(Bg(t,n,u,r),l=t.memoizedState),(a=Io||$w(t,n,a,r,f,l,c))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=c,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,db(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Wn(t.type,a),i.props=c,d=t.pendingProps,f=i.context,l=n.contextType,typeof l=="object"&&l!==null?l=Nn(l):(l=ln(n)?Cs:_t.current,l=qi(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||f!==l)&&jw(t,i,r,l),Io=!1,f=t.memoizedState,i.state=f,Ed(t,r,i,o);var v=t.memoizedState;a!==d||f!==v||an.current||Io?(typeof p=="function"&&(Bg(t,n,p,r),v=t.memoizedState),(c=Io||$w(t,n,c,r,f,v,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,v,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,v,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),i.props=r,i.state=v,i.context=l,r=c):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return jg(e,t,n,r,s,o)}function jg(e,t,n,r,o,s){Fb(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&Mw(t,n,!1),Zr(e,t,s);r=t.stateNode,m_.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Yi(t,e.child,null,s),t.child=Yi(t,null,a,s)):zt(e,t,a,s),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),kh(e,t.containerInfo)}function Qw(e,t,n,r,o){return Gi(),wh(o),t.flags|=256,zt(e,t,n,r),t.child}var Kg={dehydrated:null,treeContext:null,retryLane:0};function Wg(e){return{baseLanes:e,cachePool:null,transitions:null}}function Hb(e,t,n){var r=t.pendingProps,o=Ke.current,s=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),De(Ke,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):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},(r&1)===0&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Vd(i,r,0,null),e=Ts(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Wg(n),t.memoizedState=Kg,e):Nh(t,i));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return g_(e,t,i,r,a,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return(i&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?s=Vo(a,s):(s=Ts(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Wg(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Kg,r}return s=e.child,e=s.sibling,r=Vo(s,{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 Nh(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&&wh(r),Yi(t,e.child,null,n),e=Nh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function g_(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=ig(Error(D(422))),Yu(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Vd({mode:"visible",children:r.children},o,0,null),s=Ts(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,(t.mode&1)!==0&&Yi(t,e.child,null,i),t.child.memoizedState=Wg(i),t.memoizedState=Kg,s);if((t.mode&1)===0)return Yu(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(D(419)),r=ig(s,r,void 0),Yu(e,t,i,r)}if(a=(i&e.childLanes)!==0,sn||a){if(r=mt,r!==null){switch(i&-i){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|i))!==0?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,Qr(e,o),Xn(r,e,o,-1))}return Bh(),r=ig(Error(D(421))),Yu(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=P_.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,hn=zo(o.nextSibling),yn=t,Ue=!0,Gn=null,e!==null&&(In[Ln++]=Wr,In[Ln++]=qr,In[Ln++]=ks,Wr=e.id,qr=e.overflow,ks=t),t=Nh(t,r.children),t.flags|=4096,t)}function Zw(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 s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function Bb(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=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),ag(t,!1,o,n,s);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}ag(t,!0,n,null,s);break;case"together":ag(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),Ps|=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),Gi();break;case 5:fb(t);break;case 1:ln(t.type)&&vd(t);break;case 4:kh(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,qg,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}};qg=function(){};Vb=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,bs(Rr.current);var s=null;switch(n){case"input":o=gg(e,o),r=gg(e,r),s=[];break;case"select":o=qe({},o,{value:void 0}),r=qe({},r,{value:void 0}),s=[];break;case"textarea":o=vg(e,o),r=vg(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=hd)}wg(n,r);var i;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var a=o[c];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(wl.hasOwnProperty(c)?s||(s=[]):(s=s||[]).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(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(wl.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Fe("scroll",e),s||a===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(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(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 It(t),null;case 1:return ln(t.type)&&yd(),It(t),null;case 3:return r=t.stateNode,Xi(),ze(an),ze(_t),Ph(),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&&(th(Gn),Gn=null))),qg(e,t),It(t),null;case 5:Rh(t);var o=bs(_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=bs(Rr.current),qu(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Cr]=t,r[Il]=s,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,s),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},Fe("invalid",r);break;case"textarea":lw(r,s),Fe("invalid",r)}wg(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Wu(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&Wu(r.textContent,a,e),o=["children",""+a]):wl.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&Fe("scroll",r)}switch(n){case"input":Nu(r),aw(r,s,!0);break;case"textarea":Nu(r),cw(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=hd)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=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=i.createElement("div"),e.innerHTML="<script></script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Cr]=t,e[Il]=r,Ub(e,t,!1,!1),t.stateNode=e;e:{switch(i=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=qe({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":lw(e,r),o=vg(e,r),Fe("invalid",e);break;default:o=r}wg(n,o),a=o;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?wS(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&vS(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Sl(e,l):typeof l=="number"&&Sl(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(wl.hasOwnProperty(s)?l!=null&&s==="onScroll"&&Fe("scroll",e):l!=null&&oh(e,s,l,i))}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,s=r.value,s!=null?Bi(e,!!r.multiple,s,!1):r.defaultValue!=null&&Bi(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=bs(_l.current),bs(Rr.current),qu(t)){if(r=t.stateNode,n=t.memoizedProps,r[Cr]=t,(s=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)}s&&(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(),Gi(),t.flags|=98560,s=!1;else if(s=qu(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(D(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(D(317));s[Cr]=t}else Gi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;It(t),s=!1}else Gn!==null&&(th(Gn),Gn=null),s=!0;if(!s)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?st===0&&(st=3):Bh())),t.updateQueue!==null&&(t.flags|=4),It(t),null);case 4:return Xi(),qg(e,t),e===null&&Pl(t.stateNode.containerInfo),It(t),null;case 10:return Eh(t.type._context),It(t),null;case 17:return ln(t.type)&&yd(),It(t),null;case 19:if(ze(Ke),s=t.memoizedState,s===null)return It(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)ol(s,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Td(e),i!==null){for(t.flags|=128,ol(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.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}s.tail!==null&&Je()>Zi&&(t.flags|=128,r=!0,ol(s,!1),t.lanes=4194304)}else{if(!r)if(e=Td(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ol(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Ue)return It(t),null}else 2*Je()-s.renderingStartTime>Zi&&n!==1073741824&&(t.flags|=128,r=!0,ol(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.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 Hh(),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(xh(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 Xi(),ze(an),ze(_t),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(Ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(Ke),null;case 4:return Xi(),null;case 10:return Eh(t.type._context),null;case 22:case 23:return Hh(),null;case 24:return null;default:return null}}var Xu=!1,Lt=!1,x_=typeof WeakSet=="function"?WeakSet:Set,X=null;function zi(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 Gg(e,t,n){try{n()}catch(r){Ye(e,t,r)}}var Jw=!1;function w_(e,t){if(Lg=pd,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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(w){n=null;break e}var i=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=i+o),d!==s||r!==0&&d.nodeType!==3||(l=i+r),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(a=i),f===s&&++u===r&&(l=i),(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(_g={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 s=o.destroy;o.destroy=void 0,s!==void 0&&Gg(t,n,s)}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 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 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[Mg],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 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=hd));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,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||zi(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?eg(e.parentNode,n):e.nodeType===1&&eg(e,n),Cl(e)):eg(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 s=o,i=s.destroy;s=s.tag,i!==void 0&&((s&2)!==0||(s&4)!==0)&&Gg(n,t,i),o=o.next}while(o!==r)}Po(e,t,n);break;case 1:if(!Lt&&(zi(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 s=e,i=t,a=i;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(s,i,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&&zi(n,n.return);break;case 5:if(Kn(t,e),Er(e),r&512&&n!==null&&zi(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 s=e.memoizedProps,i=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&gS(o,s),Sg(a,i);var c=Sg(a,s);for(i=0;i<l.length;i+=2){var u=l[i],d=l[i+1];u==="style"?wS(o,d):u==="dangerouslySetInnerHTML"?vS(o,d):u==="children"?Sl(o,d):oh(o,u,d,c)}switch(a){case"input":hg(o,s);break;case"textarea":hS(o,s);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var p=s.value;p!=null?Bi(o,!!s.multiple,p,!1):f!==!!s.multiple&&(s.defaultValue!=null?Bi(o,!!s.multiple,s.defaultValue,!0):Bi(o,!!s.multiple,s.multiple?[]:"",!1))}o[Il]=s}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,s=e.memoizedProps;try{o.nodeValue=s}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&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(Fh=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:zi(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:zi(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?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=xS("display",i))}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 s=eS(e);Qg(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,a=eS(e);Xg(e,a,i);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,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Xu;if(!i){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Lt;a=Xu;var c=Lt;if(Xu=i,(Lt=l)&&!c)for(X=o;X!==null;)i=X,l=i.child,i.tag===22&&i.memoizedState!==null?oS(o):l!==null?(l.return=i,X=l):oS(o);for(;s!==null;)X=s,Gb(s,t,n),s=s.sibling;X=o,Xu=a,Lt=c}nS(e,t,n)}else(o.subtreeFlags&8772)!==0&&s!==null?(s.return=o,X=s):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 s=t.updateQueue;s!==null&&Bw(t,s,r);break;case 3:var i=t.updateQueue;if(i!==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,i,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&&Yg(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 s=t.return;try{Yg(t)}catch(l){Ye(t,s,l)}break;case 5:var i=t.return;try{Yg(t)}catch(l){Ye(t,i,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,Mh=Jr.ReactCurrentOwner,On=Jr.ReactCurrentBatchConfig,we=0,mt=null,et=null,St=0,gn=0,Hi=Wo(0),st=0,Dl=null,Ps=0,Ud=0,Dh=0,vl=null,on=null,Fh=0,Zi=1/0,jr=null,Pd=!1,Zg=null,Bo=null,Qu=!1,No=null,Ad=0,xl=0,Jg=null,sd=-1,id=0;function Ht(){return(we&6)!==0?Je():sd!==-1?sd:sd=Je()}function Uo(e){return(e.mode&1)===0?1:(we&2)!==0&&St!==0?St&-St:s_.transition!==null?(id===0&&(id=_S()),id):(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,Jg=null,Error(D(185));Fl(e,n,r),((we&2)===0||e!==mt)&&(e===mt&&((we&2)===0&&(Ud|=n),st===4&&_o(e,St)),cn(e,r),n===1&&we===0&&(t.mode&1)===0&&(Zi=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_(sS.bind(null,e)):ob(sS.bind(null,e)),e_(function(){(we&6)===0&&qo()}),n=null;else{switch(OS(r)){case 1:n=ch;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(sd=-1,id=0,(we&6)!==0)throw Error(D(327));var n=e.callbackNode;if(Ki()&&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 s=Qb();(mt!==e||St!==t)&&(jr=null,Zi=Je()+500,Es(e,t));do try{C_();break}catch(a){Xb(e,a)}while(!0);bh(),Rd.current=s,we=o,et!==null?t=0:(mt=null,St=0,t=st)}if(t!==0){if(t===2&&(o=kg(e),o!==0&&(r=o,t=eh(e,o))),t===1)throw n=Dl,Es(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&&(s=kg(e),s!==0&&(r=s,t=eh(e,s))),t===1))throw n=Dl,Es(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:xs(e,on,jr);break;case 3:if(_o(e,r),(r&130023424)===r&&(t=Fh+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=Ng(xs.bind(null,e,on,jr),t);break}xs(e,on,jr);break;case 4:if(_o(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Yn(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}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=Ng(xs.bind(null,e,on,jr),r);break}xs(e,on,jr);break;case 5:xs(e,on,jr);break;default:throw Error(D(329))}}}return cn(e,Je()),e.callbackNode===n?Yb.bind(null,e):null}function eh(e,t){var n=vl;return e.current.memoizedState.isDehydrated&&(Es(e,t).flags|=256),e=Id(e,t),e!==2&&(t=on,on=n,t!==null&&th(t)),e}function th(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],s=o.getSnapshot;o=o.value;try{if(!Qn(s(),o))return!1}catch(i){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&=~Dh,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 sS(e){if((we&6)!==0)throw Error(D(327));Ki();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=kg(e);r!==0&&(t=r,n=eh(e,r))}if(n===1)throw n=Dl,Es(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,xs(e,on,jr),cn(e,Je()),null}function zh(e,t){var n=we;we|=1;try{return e(t)}finally{we=n,we===0&&(Zi=Je()+500,Fd&&qo())}}function As(e){No!==null&&No.tag===0&&(we&6)===0&&Ki();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 Hh(){gn=Hi.current,ze(Hi)}function Es(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(xh(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&yd();break;case 3:Xi(),ze(an),ze(_t),Ph();break;case 5:Rh(r);break;case 4:Xi();break;case 13:ze(Ke);break;case 19:ze(Ke);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=gn=t,st=0,Dl=null,Dh=Ud=Ps=0,on=vl=null,Ss!==null){for(t=0;t<Ss.length;t++)if(n=Ss[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}Ss=null}return e}function Xb(e,t){do{var n=et;try{if(bh(),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(Rs=0,pt=ot=We=null,hl=!1,Ol=0,Mh.current=null,n===null||n.return===null){st=1,Dl=t,et=null;break}e:{var s=e,i=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(i);if(p!==null){p.flags&=-257,qw(p,i,a,s,t),p.mode&1&&Kw(s,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(s,c,t),Bh();break e}l=Error(D(426))}}else if(Ue&&a.mode&1){var x=Ww(i);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),qw(x,i,a,s,t),wh(Qi(l,a));break e}}s=l=Qi(l,a),st!==4&&(st=2),vl===null?vl=[s]:vl.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=Ob(s,l,t);Hw(s,y);break e;case 1:a=l;var g=s.type,h=s.stateNode;if((s.flags&128)===0&&(typeof g.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Bo===null||!Bo.has(h)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=Nb(s,a,t);Hw(s,w);break e}}s=s.return}while(s!==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 Bh(){(st===0||st===3||st===2)&&(st=4),mt===null||(Ps&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,Es(e,t));do try{T_();break}catch(o){Xb(e,o)}while(!0);if(bh(),we=n,Rd.current=r,et!==null)throw Error(D(261));return mt=null,St=0,st}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,Mh.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{st=6,et=null;return}}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);st===0&&(st=5)}function xs(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 Ki();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 s=n.lanes|n.childLanes;if(lL(e,s),e===mt&&(et=mt=null,St=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||Qu||(Qu=!0,nE(dd,function(){return Ki(),null})),s=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||s){s=On.transition,On.transition=null;var i=Ae;Ae=1;var a=we;we|=4,Mh.current=null,w_(e,n),qb(n,e),GL(_g),pd=!!Lg,_g=Lg=null,e.current=n,S_(n,e,o),JI(),we=a,Ae=i,On.transition=s}else e.current=n;if(Qu&&(Qu=!1,No=e,Ad=o),s=e.pendingLanes,s===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=Zg,Zg=null,e;return(Ad&1)!==0&&e.tag!==0&&Ki(),s=e.pendingLanes,(s&1)!==0?e===Jg?xl++:(xl=0,Jg=e):xl=0,qo(),null}function Ki(){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 s=X,i=s.child;if((X.flags&16)!==0){var a=s.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,s)}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=s.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=s}}if((s.subtreeFlags&2064)!==0&&i!==null)i.return=s,X=i;else e:for(;X!==null;){if(s=X,(s.flags&2048)!==0)switch(s.tag){case 0:case 11:case 15:yl(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,X=y;break e}X=s.return}}var g=e.current;for(X=g;X!==null;){i=X;var h=i.child;if((i.subtreeFlags&2064)!==0&&h!==null)h.return=i,X=h;else e:for(i=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===i){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 iS(e,t,n){t=Qi(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)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=Qi(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&&(st===4||st===3&&(St&130023424)===St&&500>Je()-Fh?Es(e,0):Dh|=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&&sb(t,wd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;od(e,t),e=t.pendingProps;var o=qi(t,_t.current);ji(t,n),o=Ih(null,t,r,e,o,n);var s=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,ln(r)?(s=!0,vd(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Ch(t),o.updater=Hd,t.stateNode=o,o._reactInternals=t,Ug(t,r,e,n),t=jg(null,t,r,!0,s,n)):(t.tag=0,Ue&&s&&vh(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=$g(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),$g(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,s=t.memoizedState,o=s.element,db(e,t),Ed(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=Qi(Error(D(423)),t),t=Qw(e,t,r,n,o);break e}else if(r!==o){o=Qi(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(Gi(),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&&zg(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Og(r,o)?i=null:s!==null&&Og(r,s)&&(t.flags|=32),Fb(e,t),zt(e,t,i,n),t.child;case 6:return e===null&&zg(t),null;case 13:return Hb(e,t,n);case 4:return kh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yi(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,s=t.memoizedProps,i=o.value,De(Sd,r._currentValue),r._currentValue=i,s!==null)if(Qn(s.value,i)){if(s.children===o.children&&!an.current){t=Zr(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){i=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Gr(-1,n&-n),l.tag=2;var c=s.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}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Hg(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(D(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Hg(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}zt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ji(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,ji(t,n),_b(t,r,o),Ug(t,r,o,n),jg(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 Uh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function L_(e){if(typeof e=="function")return Uh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ih)return 11;if(e===ah)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,s){var i=2;if(r=e,typeof e=="function")Uh(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ai:return Ts(n.children,o,s,t);case sh:i=8,o|=8;break;case dg:return e=_n(12,n,t,o|2),e.elementType=dg,e.lanes=s,e;case fg:return e=_n(13,n,t,o),e.elementType=fg,e.lanes=s,e;case pg:return e=_n(19,n,t,o),e.elementType=pg,e.lanes=s,e;case fS:return Vd(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case uS:i=10;break e;case dS:i=9;break e;case ih:i=11;break e;case ah:i=14;break e;case Ao:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=_n(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function Ts(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 lg(e,t,n){return e=_n(6,e,null,t),e.lanes=n,e}function cg(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=Wm(0),this.expirationTimes=Wm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wm(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vh(e,t,n,r,o,s,i,a,l){return e=new __(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=_n(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ch(s),e}function O_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function rE(e){if(!e)return jo;e=e._reactInternals;e:{if(Ls(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,s,i,a,l){return e=Vh(n,r,!0,e,o,s,i,a,l),e.context=rE(null),n=e.current,r=Ht(),o=Uo(n),s=Gr(r,o),s.callback=t!=null?t:null,Ho(n,s,o),e.current.lanes=o,Fl(e,o,r),cn(e,r),e}function $d(e,t,n,r){var o=t.current,s=Ht(),i=Uo(o);return n=rE(n),t.context===null?t.context=n:t.pendingContext=n,t=Gr(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ho(o,t,i),e!==null&&(Xn(e,o,i,s),td(e,o,i)),i}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 $h(e,t){aS(e,t),(e=e.alternate)&&aS(e,t)}function N_(){return null}var sE=typeof reportError=="function"?reportError:function(e){console.error(e)};function jh(e){this._internalRoot=e}jd.prototype.render=jh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));$d(e,t,null,null)};jd.prototype.unmount=jh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;As(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 Kh(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 s=r;r=function(){var c=Ld(i);s.call(c)}}var i=oE(t,r,e,0,null,!1,!1,"",lS);return e._reactRootContainer=i,e[Xr]=i.current,Pl(e.nodeType===8?e.parentNode:e),As(),i}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=Vh(e,0,!1,null,null,!1,!1,"",lS);return e._reactRootContainer=l,e[Xr]=l.current,Pl(e.nodeType===8?e.parentNode:e),As(function(){$d(t,l,n,r)}),l}function Wd(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var a=o;o=function(){var l=Ld(i);a.call(l)}}$d(t,i,e,o)}else i=M_(n,t,e,o,r);return Ld(i)}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),cn(t,Je()),(we&6)===0&&(Zi=Je()+500,qo()))}break;case 13:As(function(){var r=Qr(e,1);if(r!==null){var o=Ht();Xn(r,e,1,o)}}),$h(e,1)}};dh=function(e){if(e.tag===13){var t=Qr(e,134217728);if(t!==null){var n=Ht();Xn(t,e,134217728,n)}$h(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)}$h(e,t)}};DS=function(){return Ae};FS=function(e,t){var n=Ae;try{return Ae=e,t()}finally{Ae=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=Dd(r);if(!o)throw Error(D(90));mS(r),hg(r,o)}}}break;case"textarea":hS(e,n);break;case"select":t=n.value,t!=null&&Bi(e,!!n.multiple,t,!1)}};ES=zh;TS=As;var D_={usingClientEntryPoint:!1,Events:[Hl,Oi,Dd,SS,bS,zh]},sl={findFiberByHostInstance:ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},F_={bundleType:sl.bundleType,version:sl.version,rendererPackageName:sl.rendererPackageName,rendererConfig:sl.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:sl.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"&&(il=__REACT_DEVTOOLS_GLOBAL_HOOK__,!il.isDisabled&&il.supportsFiber))try{_d=il.inject(F_),kr=il}catch(e){}var il;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(!Kh(t))throw Error(D(200));return O_(e,t,null,n)};wn.createRoot=function(e,t){if(!Kh(e))throw Error(D(299));var n=!1,r="",o=sE;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[Xr]=t.current,Pl(e.nodeType===8?e.parentNode:e),new jh(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 As(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(!Kh(e))throw Error(D(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=sE;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=oE(t,null,e,1,n!=null?n:null,o,!1,s,i),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?(As(function(){Wd(null,null,e,!1,function(){e._reactRootContainer=null,e[Xr]=null})}),!0):!1};wn.unstable_batchedUpdates=zh;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=iE()});var uE=en(Wh=>{"use strict";var cE=Ul();Wh.createRoot=cE.createRoot,Wh.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 s=DO(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=zO(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),o!==void 0&&i.hasValue){var v=i.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,s[0],s[1]);return FO(function(){i.hasValue=!0,i.value=a},[a]),HO(a),a}});var qE=en((E9,WE)=>{"use strict";WE.exports=KE()});var Hy=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,Fy=function(){return OM.Date.now()};function zM(e,t,n){var r,o,s,i,a,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(TM);t=xT(t)||0,zy(n)&&(u=!!n.leading,d="maxWait"in n,s=d?DM(xT(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f);function p(C){var k=r,A=o;return r=o=void 0,c=C,i=e.apply(A,k),i}function v(C){return c=C,a=setTimeout(y,t),u?p(C):i}function m(C){var k=C-l,A=C-c,F=t-k;return d?FM(F,s-A):F}function x(C){var k=C-l,A=C-c;return l===void 0||k>=t||k<0||d&&A>=s}function y(){var C=Fy();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,i)}function h(){a!==void 0&&clearTimeout(a),c=0,r=l=o=a=void 0}function w(){return a===void 0?i:g(Fy())}function E(){var C=Fy(),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)),i}return E.cancel=h,E.flush=w,E}function zy(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(zy(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=zy(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="",s=0,i=0;for(s=n.index;s<t.length;s++){switch(t.charCodeAt(s)){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}i!==s&&(o+=t.substring(i,s)),i=s+1,o+=r}return i!==s?o+t.substring(i,s):o}});var YF={};Rt(YF,{Card:()=>Ie,ContentEditableInput:()=>pi,DeepdeskAPI:()=>Eo,DeepdeskSDK:()=>lu,HTTPClient:()=>gi,InputMediator:()=>bo,InputType:()=>Ci,KeyboardHint:()=>Tu,Label:()=>Rx,Locale:()=>Wl,Section:()=>Sr,SectionList:()=>Ei,Sources:()=>$r,Suggestion:()=>Ee,SuggestionList:()=>rn,TextAreaInput:()=>mi,ToggleButton:()=>hs,attachFile:()=>LA,authenticateWithKey:()=>_A,createFullRange:()=>Ba,createOverlayContainer:()=>au,createRangeFromOffsets:()=>cs,escapeHTML:()=>da,formatTextMarkup:()=>OA,getRangeOffsets:()=>su,getRangeText:()=>iu,insertCKEditor:()=>FA,isHTML:()=>$f,isSupportedInputElement:()=>dm,updateContentEditable:()=>MA,updateTextArea:()=>NA,useClickOutsideRoot:()=>rs,useStyles:()=>M,waitForElementVisibilityChange:()=>mm});var Im=b(Ne()),Pn=b(Z());var xu=b(Z()),yx=b(Ne());var Ya=xu.default.createContext({});function M(e,t){let s=(0,xu.useContext)(Ya),{debug:n}=s,o=oe(s,["debug"])[e];return Object.entries(t).reduce((i,[a,l])=>{let c=o==null?void 0:o[a];return P(S({},i),{[a]:(0,yx.default)(l,c,n?`${e}__${a}`:!1)})},{})}var vx={root:"dd-4s9wq"};var ms=b(R()),Su=()=>(0,ms.jsxs)("svg",{className:vx.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,ms.jsx)("defs",{children:(0,ms.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,ms.jsx)("title",{children:"Failed loading image"}),(0,ms.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 gs=b(R()),bu=(0,Pn.createContext)(Am),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,gs.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,gs.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,gs.jsx)(Su,{})})},wI=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Pn.useContext)(bu);return(0,gs.jsx)("div",{className:(0,Im.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},SI=s=>{var i=s,{as:e="h1",cropText:t=!1,className:n,children:r}=i,o=oe(i,["as","cropText","className","children"]);let a=(0,Pn.useContext)(bu);return Pn.default.createElement(e,S({className:(0,Im.default)(a.title,n,{[a.contentIsCropped]:t})},o),r)},Eu=({children:e})=>{let t=M("Card",Am);return(0,gs.jsx)("div",{className:t.root,children:(0,gs.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 s=M("KeyboardHint",bx);return(0,Tx.jsx)("span",S({"data-key":bI[t],className:(0,Ex.default)(e,s.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 s=M("Label",Cx);return(0,Px.jsx)("span",P(S({},n),{className:(0,kx.default)(e,s.root),children:t}))},Rx=TI;var Ax={root:"dd-FiMI7",subTitleContainer:"dd-98jc7",subtitle:"dd-3MnW8",suggestions:"dd-0SGL8"};var bi=b(R()),CI=o=>{var s=o,{title:e,children:t,type:n}=s,r=oe(s,["title","children","type"]);let i=M("Section",Ax);return(0,bi.jsxs)("section",P(S({},r),{className:i.root,"data-section-type":n,children:[e&&(0,bi.jsx)("div",{className:i.subTitleContainer,children:(0,bi.jsx)("span",{className:i.subtitle,children:e})}),(0,bi.jsx)("div",{className:i.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:s}=o.getBoundingClientRect(),{top:i}=r.getBoundingClientRect();o.scrollTo({top:i-s})},[]);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 Lm=b(R()),kI=({className:e,children:t})=>{let n=M("SectionList",Nx),r=(0,Dx.useRef)(null);return(0,Lm.jsx)(Lx,{scrollContainerRef:r,children:(0,Lm.jsx)("div",{ref:r,className:(0,Mx.default)(n.root,e),children:t})})},Ei=kI;var Ti=b(Ne()),nn=b(Z());var _m={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)(_m),RI=r=>{var o=r,{fixed:e,children:t}=o,n=oe(o,["fixed","children"]);let s=(0,nn.useContext)(Co);return(0,tn.jsx)("div",P(S({},n),{className:(0,Ti.default)(s.actions,{[s.actionsIsFixed]:e}),children:t}))};function PI(a){var l=a,{as:e,className:t,icon:n,title:r,children:o,disabled:s}=l,i=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,Ti.default)(c.button,{[c.buttonWithIcon]:n,[c.buttonDisabled]:s},t),title:r,"aria-label":r},i),{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 s=(0,nn.useContext)(Co);return(0,tn.jsxs)("div",{className:(0,Ti.default)(e,s.actionButton,s.dropdownButton,{[s.actionButtonIsPrimary]:t,[s.actionButtonIsDisabled]:n}),onMouseDown:i=>i.stopPropagation(),onClick:i=>i.stopPropagation(),children:[r,(0,tn.jsx)("ul",{className:s.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 s=(0,nn.useContext)(Co);return(0,tn.jsx)("button",{type:"button",className:(0,Ti.default)(e,s.actionButton,{[s.actionButtonIsPrimary]:t,[s.actionButtonIsDisabled]:n}),onClick:r!=null?r:i=>i.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,i)=>{var l=a,{className:e,selected:t,onClick:n,children:r,as:o="div"}=l,s=oe(l,["className","selected","onClick","children","as"]);let c=M("Suggestion",_m),u=(0,nn.useCallback)(d=>{d.preventDefault(),n&&n(d)},[n]);return(0,tn.jsx)(o,P(S({},s),{ref:i,className:(0,Ti.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"})})})},hs=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||{}),Ci=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i.SPACE="space",i))(Ci||{});var ds=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_,qh=()=>Math.random().toString(36).substring(7).split("").join("."),H_={INIT:`@@redux/INIT${qh()}`,REPLACE:`@@redux/REPLACE${qh()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${qh()}`},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 Gh(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(Gh)(e,t)}let r=e,o=t,s=new Map,i=s,a=0,l=!1;function c(){i===s&&(i=new Map,s.forEach((x,y)=>{i.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 i.set(g,x),function(){if(y){if(l)throw new Error(Et(6));y=!1,c(),i.delete(g),s=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(s=i).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 i=0;i<t.length;i++){let a=t[i];typeof e[a]=="function"&&(n[a]=e[a])}let r=Object.keys(n),o,s;try{B_(n)}catch(i){s=i}return function(a={},l){if(s)throw s;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),s=()=>{throw new Error(Et(15))},i={getState:o.getState,dispatch:(l,...c)=>s(l,...c)},a=e.map(l=>l(i));return s=ta(...a)(o.dispatch),P(S({},o),{dispatch:s})}}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 Qh(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 _s(e){return e.copy_||e.base_}function Zh(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 s=0;s<o.length;s++){let i=o[s],a=r[i];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[i]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[i]})}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 ry(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])=>ry(r,!0))),e}function $_(){Zn(2)}function nf(e){return Object.isFrozen(e)}var j_={};function Os(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&&(Os("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jh(e){ey(e),e.drafts_.forEach(W_),e.drafts_=null}function ey(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_&&(Jh(t),Zn(4)),Jn(e)&&(e=Qd(t,e),t.parent_||Zd(t,e)),t.patches_&&Os("Patches").generateReplacementPatches_(n[Sn].base_,e,t.patches_,t.inversePatches_)):e=Qd(t,n,[]),Jh(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,s)=>vE(e,r,t,o,s,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_,s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),Xd(s,(a,l)=>vE(e,r,o,a,l,n,i)),Zd(e,o,!1),n&&e.patches_&&Os("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function vE(e,t,n,r,o,s,i){if(Go(o)){let a=s&&t&&t.type_!==3&&!Qh(t.assigned_,r)?s.concat(r):void 0,l=Qd(e,o,a);if(SE(n,r,l),Go(l))e.canAutoFreeze_=!1;else return}else i&&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_&&ry(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,s=oy;n&&(o=[r],s=$l);let{revoke:i,proxy:a}=Proxy.revocable(o,s);return r.draft_=a,r.revoke_=i,a}var oy={get(e,t){if(t===Sn)return e;let n=_s(e);if(!Qh(n,t))return G_(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 _s(e)},ownKeys(e){return Reflect.ownKeys(_s(e))},set(e,t,n){let r=EE(_s(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let o=Yh(_s(e),t),s=o==null?void 0:o[Sn];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(V_(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=_s(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(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[Sn];return(n?_s(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 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 Y_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){let s=n;n=t;let i=this;return function(l=s,...c){return i.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 s=hE(this),i=ny(t,void 0),a=!0;try{o=n(i),a=!1}finally{a?Jh(s):ey(s)}return gE(s,r),yE(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===xE&&(o=void 0),this.autoFreeze_&&ry(o,!0),r){let s=[],i=[];Os("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...a)=>this.produceWithPatches(i,l=>t(l,...a));let r,o;return[this.produce(t,n,(i,a)=>{r=i,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=ny(e,void 0);return n[Sn].isManual_=!0,ey(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=Os("Patches").applyPatches_;return Go(e)?r(e,t):this.produce(e,o=>r(o,t))}};function ny(e,t){let n=ef(e)?Os("MapSet").proxyMap_(e,t):tf(e)?Os("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=Zh(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Zh(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 sy(e,t={}){let n=of(),{resultEqualityCheck:r}=t,o,s=0;function i(){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),s++,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,s!==0&&s--),o=typeof u=="object"&&u!==null||typeof u=="function"?new rO(u):u}return c.s=kE,c.v=u,u}return i.clearCache=()=>{n=of(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function RE(e,...t){let n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=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=sy,argsMemoizeOptions:v=[],devModeChecks:m={}}=u,x=CE(f),y=CE(v),g=eO(o),h=d(function(){return s++,c.apply(null,arguments)},...x),w=!0,E=p(function(){i++;let k=tO(g,arguments);return a=h.apply(null,k),a},...y);return Object.assign(E,{resultFunc:c,memoizedResultFunc:h,dependencies:g,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>a,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var Dn=RE(sy),sO=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(s=>e[s]);return t(r,(...s)=>s.reduce((i,a,l)=>(i[n[l]]=a,i),{}))},{withTypes:()=>sO});function PE(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var AE=PE(),IE=PE;var iO=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)},s9=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 it(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:s=!0}=t!=null?t:{},i=new DE;return n&&(lO(n)?i.push(AE):i.push(IE(n.extraArgument))),i},uO="RTK_autoBatch";var OE=e=>t=>{setTimeout(t,e)},dO=(e={type:"raf"})=>t=>(...n)=>{let r=t(...n),o=!0,s=!1,i=!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=()=>{i=!1,s&&(s=!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]),s=!o,s&&(i||(i=!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:s=void 0,enhancers:i=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=iO(S({trace:!1},typeof o=="object"&&o)));let u=fE(...l),d=fO(u),f=typeof i=="function"?i(d):d(),p=c(...f);return Gh(a,s,p)}function zE(e){let t={},n=[],r,o={addCase(s,i){let a=typeof s=="string"?s:s.type;if(!a)throw new Error(eo(28));if(a in t)throw new Error(eo(29));return t[a]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function pO(e){return typeof e=="function"}function mO(e,t){let[n,r,o]=zE(t),s;if(pO(e))s=()=>LE(e());else{let a=LE(e);s=()=>a}function i(a=s(),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 i.getInitialState=s,i}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"],iy=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=it(t+"/fulfilled",(l,c,u,d)=>({payload:l,meta:P(S({},d||{}),{arg:u,requestId:c,requestStatus:"fulfilled"})})),s=it(t+"/pending",(l,c,u)=>({payload:void 0,meta:P(S({},u||{}),{arg:c,requestId:l,requestStatus:"pending"})})),i=it(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(s(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 iy(F,N),fulfillWithValue:(F,N)=>new NE(F,N)})).then(F=>{if(F instanceof iy)throw F;return F instanceof NE?o(F.payload,p,l,F.meta):o(F,p,l)})])}catch(k){h=k instanceof iy?i(null,p,l,k.payload,k.meta):i(k,p,l)}finally{m&&v.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&i.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:s,rejected:i,fulfilled:o,settled:hO(i,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:s,reducerPath:i=s}=o;if(!s)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(s,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:s,reducer:m,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x},y(i)),{injectInto(h,C={}){var k=C,{reducerPath:w}=k,E=oe(k,["reducerPath"]);let A=w!=null?w:i;return h.inject({reducerPath:A,reducer:m},E),S(S({},g),y(A,!0))}});return g}}function CO(e,t,n,r){function o(s,...i){let a=t(s);return typeof a=="undefined"&&r&&(a=n()),e(a,...i)}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 s,i;if("reducer"in r){if(n&&!AO(r))throw new Error(eo(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?it(e,i):it(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:s,fulfilled:i,pending:a,rejected:l,settled:c,options:u}=n,d=o(e,s,u);r.exposeAction(t,d),i&&r.addCase(d.fulfilled,i),a&&r.addCase(d.pending,a),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:i||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 ay="listenerMiddleware";var LO=$E(it(`${ay}/add`),{withTypes:()=>LO}),g9=it(`${ay}/removeAll`),_O=$E(it(`${ay}/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"),py=Symbol.for("react.memo"),XO=Symbol.for("react.lazy");var QO=e1,ZO=py;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 py:return e;case WO:return e;default:return t}}case VO:return t}}}function eN(e){return JO(e)===py}function tN(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){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=!i(g,u);return u=g,h&&(f=n(u,d,c)),f}function y(g,h){let w=!s(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,s){var i=s,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r}=i,o=oe(i,["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]=(...s)=>t(o(...s)))}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 t1(e,t){return function(r,{displayName:o}){let s=function(a,l){return s.dependsOnOwnProps?s.mapToProps(a,l):s.mapToProps(a,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(a,l){s.mapToProps=e,s.dependsOnOwnProps=GE(e);let c=s(a,l);return typeof c=="function"&&(s.mapToProps=c,s.dependsOnOwnProps=GE(c),c=s(a,l)),c},s}}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 oN(e){return e&&typeof e=="object"?dy(t=>rN(e,t)):e?typeof e=="function"?t1(e,"mapDispatchToProps"):my(e,"mapDispatchToProps"):dy(t=>({dispatch:t}))}function sN(e){return e?typeof e=="function"?t1(e,"mapStateToProps"):my(e,"mapStateToProps"):dy(()=>({}))}function iN(e,t,n){return S(S(S({},n),e),t)}function aN(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let s=!1,i;return function(l,c,u){let d=e(l,c,u);return s?o(d,i)||(i=d):(s=!0,i=d),i}}}function lN(e){return e?typeof e=="function"?aN(e):my(e,"mergeProps"):()=>iN}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,s=!1;function i(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 s}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(){s||(s=!0,u())}function p(){s&&(s=!1,d())}let v={addNestedSub:i,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 ly(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 fy(e,t){if(typeof t!="string"){if(JE){let s=EN(t);s&&s!==JE&&fy(e,s)}let n=SN(t);ZE&&(n=n.concat(ZE(t)));let r=QE(e),o=QE(t);for(let s=0;s<n.length;++s){let i=n[s];if(!yN[i]&&!(o&&o[i])&&!(r&&r[i])){let a=bN(t,i);try{wN(e,i,a)}catch(l){}}}}return e}var cy=Symbol.for("react-redux-context"),uy=typeof globalThis!="undefined"?globalThis:{};function TN(){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 to=TN(),CN=[null,null];function kN(e,t,n){af(()=>e(...t),n)}function RN(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function PN(e,t,n,r,o,s,i,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===s.current?i.current||c():(s.current=x,l.current=x,i.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:s=ly,areStatePropsEqual:i=ly,areMergedPropsEqual:a=ly,forwardRef:l=!1,context:c=to}={}){let u=c,d=sN(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:i,areOwnPropsEqual:s,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,se=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,se?()=>Y(se(),N):me)}catch(Q){throw Se.current&&(Q.message+=`
10
9
  The error may be correlated with this previous error:
11
- ${fe.current.stack}
10
+ ${Se.current.stack}
12
11
 
13
- `),ye}ta(()=>{fe.current=void 0,V.current=void 0,H.current=ie});let oe=Ie.useMemo(()=>Ie.createElement(g,Fo({},ie,{ref:L})),[L,g,ie]);return Ie.useMemo(()=>y?Ie.createElement(F.Provider,{value:N},oe):oe,[F,oe,N])}let E=Ie.memo(w);if(E.WrappedComponent=g,E.displayName=w.displayName=v,l){let I=Ie.forwardRef(function(G,F){return Ie.createElement(E,Fo({},G,{reactReduxForwardedRef:F}))});return I.displayName=v,I.WrappedComponent=g,(0,Zy.default)(I,g)}return(0,Zy.default)(E,g)}}var wi=XN;var tu=S($());function QN({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=tu.useMemo(()=>{let u=If(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=tu.useMemo(()=>e.getState(),[e]);return ta(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]),tu.createElement((t||At).Provider,{value:s},n)}var Jy=QN;function Of(e=At){let t=e===At?sf:Jl(e);return function(){let{store:r}=t();return r}}var ev=Of();function YE(e=At){let t=e===At?ev:Of(e);return function(){return t().dispatch}}var he=YE();EE(QE.useSyncExternalStoreWithSelector);GE(XE.useSyncExternalStore);yE(jy.unstable_batchedUpdates);var nu=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(nu||{});var ZN={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},ZE=Ce({name:"settings",initialState:ZN,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o!="undefined"&&(e[r]=o)})}}}),{set:Mf}=ZE.actions,ru=e=>t=>t.settings[e],J=e=>K(ru(e)),JE=ZE.reducer;var JN={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},zt=e=>e.auth.isLoggedIn,eT=e=>e.auth.loginFetchState,tT=e=>e.auth.verifyFetchState,nT=e=>e.auth.showLoginOverlay,jr=ge("auth/validate",(e,t)=>A(void 0,null,function*(){return t.extra.deepdeskAPI.isLoggedIn()})),rT=ge("auth/requestLogin",(n,r)=>A(void 0,[n,r],function*({email:e},t){let{deepdeskAPI:o}=t.extra;return o.requestLoginByEmail(e)})),ou=ge("auth/verifyLoginToken",(n,r)=>A(void 0,[n,r],function*({token:e},t){let{deepdeskAPI:o}=t.extra;return o.verifyLoginToken(e)})),oT=Ce({name:"auth",initialState:JN,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(jr.pending,t=>{t.loginFetchState="loading"}),e.addCase(jr.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(jr.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(ou.pending,t=>{t.verifyFetchState="loading"}),e.addCase(ou.rejected,t=>{t.verifyFetchState="error"}),e.addCase(ou.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:ra,setShowLoginOverlay:iT}=oT.actions,sT=oT.reducer;function Vr(){}Vr.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,u=t.length,c=1,f=l+u;o.maxEditLength&&(f=Math.min(f,o.maxEditLength));var d=(r=o.timeout)!==null&&r!==void 0?r:1/0,p=Date.now()+d,y=[{oldPos:-1,lastComponent:void 0}],h=this.extractCommon(y[0],n,t,0);if(y[0].oldPos+1>=u&&h+1>=l)return a([{value:this.join(n),count:n.length}]);var g=-1/0,m=1/0;function v(){for(var w=Math.max(g,-c);w<=Math.min(m,c);w+=2){var C=void 0,E=y[w-1],k=y[w+1];E&&(y[w-1]=void 0);var I=!1;if(k){var L=k.oldPos-w;I=k&&0<=L&&L<l}var G=E&&E.oldPos+1<u;if(!I&&!G){y[w]=void 0;continue}if(!G||I&&E.oldPos+1<k.oldPos?C=s.addToPath(k,!0,void 0,0):C=s.addToPath(E,void 0,!0,1),h=s.extractCommon(C,n,t,w),C.oldPos+1>=u&&h+1>=l)return a(e2(s,C.lastComponent,n,t,s.useLongestToken));y[w]=C,C.oldPos+1>=u&&(m=Math.min(m,w-1)),h+1>=l&&(g=Math.max(g,w+1))}c++}if(i)(function w(){setTimeout(function(){if(c>f||Date.now()>p)return i();v()||w()},0)})();else for(;c<=f&&Date.now()<=p;){var x=v();if(x)return x}},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,u=0;l+1<i&&a+1<s&&this.equals(n[l+1],r[a+1]);)l++,a++,u++;return u&&(t.lastComponent={count:u,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 e2(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,u=0,c=0;a<l;a++){var f=i[a];if(f.removed){if(f.value=e.join(r.slice(c,c+f.count)),c+=f.count,a&&i[a-1].added){var p=i[a-1];i[a-1]=i[a],i[a]=p}}else{if(!f.added&&o){var d=n.slice(u,u+f.count);d=d.map(function(h,g){var m=r[c+g];return m.length>h.length?m:h}),f.value=e.join(d)}else f.value=e.join(n.slice(u,u+f.count));u+=f.count,f.added||(c+=f.count)}}var y=i[l-1];return l>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(i[l-2].value+=y.value,i.pop()),i}var t2=new Vr;function uT(e,t,n){return t2.diff(e,t,n)}var aT=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,lT=/\S/,cT=new Vr;cT.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!lT.test(e)&&!lT.test(t)};cT.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]&&aT.test(t[n])&&aT.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var dT=new Vr;dT.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
14
- `));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 n2=new Vr;n2.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var r2=new Vr;r2.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Nf(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nf=function(t){return typeof t}:Nf=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}var o2=Object.prototype.toString,iu=new Vr;iu.useLongestToken=!0;iu.tokenize=dT.tokenize;iu.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(tv(e,null,null,o),o," ")};iu.equals=function(e,t){return Vr.prototype.equals.call(iu,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function tv(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(o2.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]=tv(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Nf(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]=tv(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var nv=new Vr;nv.tokenize=function(e){return e.slice()};nv.join=nv.removeEmpty=function(e){return e};function fT(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function Ho(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)=>Ho(i,t[s],n-1)):fT(e)&&fT(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>Ho(e[s],t[s],n-1)):!1}function i2(e){return Math.max(...e.map(t=>t.length))}function s2(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return P(b({},r),{[o]:i})}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function pT(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<i2(r);o++){let i=s2(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 a2=2;function mT(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=pT(e,a2);return n&&n.text!==t?n:e[0]}var l2={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},ee=l2;var gT={current:null,isSupported:null},it=ot("resetConversation"),hT=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.externalId)||null},yr=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},oa=e=>e.conversation.isSupported,rv=ge("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.externalId,e.options)}),_f=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=yr(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),ov=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})})}),Hf=ge("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=yr(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>b({},o)))}),u2=[_f.rejected,Df.rejected,Ff.rejected,Hf.rejected].map(e=>e==null?void 0:e.toString()),c2=Ce({name:"conversation",initialState:gT,reducers:{},extraReducers:e=>{e.addCase(rv.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(_f.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(ov.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(Hf.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(it,()=>gT).addMatcher(t=>u2.includes(t.type),(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)})}}),yT=c2.reducer;var Si={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 iv(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 zf=ot("input/replaceText"),bi=ot("input/sendMessage"),Bf=ot("input/applyImageSuggestion"),Wr=ot("input/sendEvent"),vT=Ce({name:"input",initialState:Si,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=Si.metrics,e.textSuggestions=[],e.mixedSuggestion=null;else if(n!==null&&e.text!==n.text){let{key:a,shiftKey:l,ctrlKey:u,metaKey:c,altKey:f}=n.keyDown;switch(a){case"Enter":l&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:d}=e,p=uT(n.text,d);n.text.length-d.length>1&&e.metrics.deletions.push(...p.filter(y=>y.removed).map(y=>y.value)),e.metrics.numCharsDeleted+=n.text.length-d.length;break}case"Shift":case"Meta":case"Tab":break;case"C":case"V":case"X":case"c":case"v":case"x":if(u||c)break;default:if(!u&&!c&&!f){e.metrics.numCharsTyped+=1;let d=((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;d&&d.length>0&&(e.metrics.numCharsDeleted+=d.length,e.metrics.deletions.push(d))}}e.metrics.agentStartedTypingTimestamp||(e.metrics.agentStartedTypingTimestamp=Date.now())}e.beforeInputChange=null},setSelection(e,t){t.payload!==null&&(Ho(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:u,text:c},eventMetrics:{inputType:f},replace:d}=n,p=o==="search"||o==="personal-collection-search",y=r.slice(e.text.substring(0,e.selection.start).length);(p||d==="selection")&&(y=r),n.suggestion.source==="search-overlay"&&(y=c),e.metrics.textSuggestions.push({text:y,source:o,abVariant:i,abTestName:s,inputType:f,sourceText:l,trainingJobs:a||[],searchTerm:p?e.text:u}),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(b({},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(b({},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=mT(t.payload,n);e.mixedSuggestion=r!=null&&r.text.includes(n)?r:null},setMetrics(e,{payload:t}){e.metrics=t},resetMetrics(e){e.metrics=Si.metrics}},extraReducers:e=>{e.addCase(it,t=>{t.mixedSuggestion=Si.mixedSuggestion,t.textSuggestions=Si.textSuggestions,t.selectedSuggestionIndex=Si.selectedSuggestionIndex,t.metrics=Si.metrics})}}),ia=e=>e.input.text.substring(0,e.input.selection.end),d2=e=>e.input.selection,sa=e=>{let{mixedSuggestion:t,selectedSuggestionIndex:n,textSuggestions:r}=e.input;return n>-1?r[n]:t},xT=()=>K(d2),{commitSuggestion:jn,offeredTextSuggestion:wT,registerCut:ST,registerKeyDown:bT,registerKeyUp:ET,registerPaste:TT,selectNextTextSuggestion:CT,selectPreviousTextSuggestion:kT,selectTextSuggestionByIndex:Uf,setInput:jf,setMetrics:RT,setSelection:Vf,setTextSuggestions:zo,resetMetrics:PT}=vT.actions,AT=vT.reducer;function IT(e){try{return Intl.DateTimeFormat(void 0,{timeZone:e}),!0}catch(t){return!1}}var f2={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,customData:void 0,platformVariables:void 0,fetchState:"idle"},aa=e=>{var t;return(t=e.info.agentInfo)!=null?t:null},LT=e=>{var t;return(t=e.info.visitorInfo)!=null?t:null},OT=e=>{var t;return(t=e.info.customData)!=null?t:null},au=({info:{visitorInfo:e,agentInfo:t}})=>{var n,r;return{timezone:e!=null&&e.visitorTimeZone&&IT(e.visitorTimeZone)?e.visitorTimeZone:Nw,agentName:(n=t==null?void 0:t.agentNickname)!=null?n:"",visitorName:(r=e==null?void 0:e.visitorName)!=null?r:""}},p2=[["agentNickname","nickname"],["agentDefaultLocale","defaultLocale"],["agentEmail","email"]],su=ge("info/setAgentInfo",(e,t)=>A(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=p2.reduce((u,[c,f])=>!r[f]&&c in e?P(b({},u),{[f]:e[c]}):u,{});Object.keys(l).length>0&&o.push(n.patchMe(l).then(u=>r=u))}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}})),sv=ge("info/setAgentSettings",(e,t)=>A(void 0,null,function*(){let{deepdeskAPI:n}=t.extra,r=yield n.getMe(),o=b(b({},typeof r.uiConfig=="object"?r.uiConfig:{}),e);return yield n.patchMe({uiConfig:o}),o})),av=ge("info/getAgentSettings",(e,t)=>A(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return(yield n.getMe()).uiConfig})),MT=Ce({name:"info",initialState:f2,reducers:{setVisitorInfo(e,t){e.visitorInfo=b(b({},e.visitorInfo),t.payload)},setCustomData(e,t){e.customData=t.payload},setPlatformVariables(e,t){e.platformVariables=t.payload}},extraReducers:e=>{e.addCase(su.pending,(t,n)=>{t.fetchState="loading",t.agentInfo=b(b({},t.agentInfo),n.meta.arg)}).addCase(su.rejected,t=>{t.fetchState="error"}).addCase(su.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo=n.payload}).addCase(sv.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(av.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(it,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:NT,setCustomData:_T,setPlatformVariables:DT}=MT.actions,FT=MT.reducer;function rn(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:{}},HT=e=>e.search.isOpen,zT=e=>e.search.page,lv=e=>e.search.list,BT=e=>e.search.aggregates,m2=Un([lv,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),UT=e=>t=>m2(t,e),Ei=ge("search/getAll",(e,t)=>A(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:au(r)});return{results:s.map(u=>P(b(b({},u),u.title&&i?{title:rn(u.title,i)}:{}),{text:rn(u.text,i!=null?i:{}),source:`search-${u.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),jT=Ce({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(Ei.pending,t=>{t.fetchState="loading"}).addCase(Ei.rejected,(t,n)=>{t.fetchState="error",ee.error(n.error)}).addCase(Ei.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(it,()=>Wf)}}),{resetSearch:Kf,setIsOpen:An,setPage:Kr}=jT.actions,VT=jT.reducer;var uv="SetOutputs",la="ShowLoginOverlay",lu="UserLoggedIn",g2="UserLoggedOut",vr="ApplySuggestion",cv="ApplyImageSuggestion",h2="ShowCommandPalette",y2=e=>({[uv]:t=>{e.dispatch(P(b({},t),{isBroadcasted:!0}))},[h2]:t=>{e.dispatch(An(t.isOpen)),t.page&&e.dispatch(Kr(t.page))},[la]:t=>{e.dispatch(iT(t))},[lu]:()=>{e.dispatch(jr())},[g2]:()=>{e.dispatch(jr())},[cv]:t=>{e.dispatch(Bf({suggestion:t.suggestion}))},[vr]:t=>{e.dispatch(jn(P(b({},t),{eventMetrics:{inputType:"mouse"},replace:"selection"})))}}),WT=y2;var uu=S($()),$T=S(R()),KT=uu.default.createContext(null),Bo=({broadcastEvents:e,children:t})=>{let n=uu.default.useMemo(()=>e,[]);return(0,$T.jsx)(KT.Provider,{value:n,children:t})},on=()=>{let e=(0,uu.useContext)(KT);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var np=S(Fe()),Vn=S($());var Jf=S($());var dv=function(e,t){return dv=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])},dv(e,t)};function cu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");dv(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var pn=function(){return pn=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},pn.apply(this,arguments)};function qT(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 $f(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 qf(e,t){var n=t&&t.cache?t.cache:T2,r=t&&t.serializer?t.serializer:b2,o=t&&t.strategy?t.strategy:x2;return o(e,{cache:n,serializer:r})}function v2(e){return e==null||typeof e=="number"||typeof e=="boolean"}function GT(e,t,n,r){var o=v2(r)?r:n(r),i=t.get(o);return typeof i=="undefined"&&(i=e.call(this,r),t.set(o,i)),i}function YT(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 fv(e,t,n,r,o){return n.bind(t,e,r,o)}function x2(e,t){var n=e.length===1?GT:YT;return fv(e,this,n,t.cache.create(),t.serializer)}function w2(e,t){return fv(e,this,YT,t.cache.create(),t.serializer)}function S2(e,t){return fv(e,this,GT,t.cache.create(),t.serializer)}var b2=function(){return JSON.stringify(arguments)},E2=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}(),T2={create:function(){return new E2}},Gf={variadic:w2,monadic:S2};var Yf;(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"})(Yf||(Yf={}));var Xf=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var In;(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"})(In||(In={}));var Qf;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Qf||(Qf={}));function pv(e){return e.type===In.literal}function mv(e){return e.type===In.argument}function du(e){return e.type===In.number}function fu(e){return e.type===In.date}function pu(e){return e.type===In.time}function mu(e){return e.type===In.select}function gu(e){return e.type===In.plural}function XT(e){return e.type===In.pound}function hu(e){return e.type===In.tag}function Zf(e){return!!(e&&typeof e=="object"&&e.type===Qf.number)}function yu(e){return!!(e&&typeof e=="object"&&e.type===Qf.dateTime)}function gv(e){e.forEach(function(t){if(delete t.location,mu(t)||gu(t))for(var n in t.options)delete t.options[n].location,gv(t.options[n].value);else du(t)&&Zf(t.style)||(fu(t)||pu(t))&&yu(t.style)?delete t.style.location:hu(t)&&gv(t.children)})}function QT(e,t){t===void 0&&(t={}),t=pn({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Xf(e,t).parse();if(n.err){var r=SyntaxError(Yf[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||gv(n.val),n.val}var Ti;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ti||(Ti={}));var vu=function(e){cu(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 hv=function(e){cu(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('", "'),'"'),Ti.INVALID_VALUE,i)||this}return t}(vu);var ZT=function(e){cu(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ti.INVALID_VALUE,o)||this}return t}(vu);var JT=function(e){cu(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,'"'),Ti.MISSING_VALUE,r)||this}return t}(vu);var It;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(It||(It={}));function C2(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==It.literal||n.type!==It.literal?t.push(n):r.value+=n.value,t},[])}function k2(e){return typeof e=="function"}function xu(e,t,n,r,o,i,s){if(e.length===1&&pv(e[0]))return[{type:It.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(pv(c)){a.push({type:It.literal,value:c.value});continue}if(XT(c)){typeof i=="number"&&a.push({type:It.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new JT(f,s);var d=o[f];if(mv(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?It.literal:It.object,value:d});continue}if(fu(c)){var p=typeof c.style=="string"?r.date[c.style]:yu(c.style)?c.style.parsedOptions:void 0;a.push({type:It.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(pu(c)){var p=typeof c.style=="string"?r.time[c.style]:yu(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:It.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(du(c)){var p=typeof c.style=="string"?r.number[c.style]:Zf(c.style)?c.style.parsedOptions:void 0;p&&p.scale&&(d=d*(p.scale||1)),a.push({type:It.literal,value:n.getNumberFormat(t,p).format(d)});continue}if(hu(c)){var y=c.children,h=c.value,g=o[h];if(!k2(g))throw new ZT(h,"function",s);var m=xu(y,t,n,r,o,i),v=g(m.map(function(C){return C.value}));Array.isArray(v)||(v=[v]),a.push.apply(a,v.map(function(C){return{type:typeof C=="string"?It.literal:It.object,value:C}}))}if(mu(c)){var x=c.options[d]||c.options.other;if(!x)throw new hv(c.value,d,Object.keys(c.options),s);a.push.apply(a,xu(x.value,t,n,r,o));continue}if(gu(c)){var x=c.options["=".concat(d)];if(!x){if(!Intl.PluralRules)throw new vu(`Intl.PluralRules is not available in this environment.
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,fy(A,x)}return fy(C,x)}}var ra=IN;function LN(e){let{children:t,context:n,serverState:r,store:o}=e,s=le.useMemo(()=>{let l=n1(o);return{store:o,subscription:l,getServerState:r?()=>r:void 0}},[o,r]),i=le.useMemo(()=>o.getState(),[o]);return af(()=>{let{subscription:l}=s;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==o.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[s,i]),le.createElement((n||to).Provider,{value:s},t)}var o1=LN;function gy(e=to){return function(){return le.useContext(e)}}var s1=gy();function i1(e=to){let t=e===to?s1:gy(e),n=()=>{let{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var _N=i1();function ON(e=to){let t=e===to?_N:i1(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?s1:gy(e),n=(r,o={})=>{let{equalityFn:s=NN}=typeof o=="function"?{equalityFn:o}:o,i=t(),{store:a,subscription:l,getServerState:c}=i,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,s);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]:{},s=o.callback;typeof o=="function"&&(s=o,o={}),this.options=o;var i=this;function a(w){return s?(setTimeout(function(){s(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=i.addToPath(k,!0,void 0,0):E=i.addToPath(C,void 0,!0,1),m=i.extractCommon(E,n,t,w),E.oldPos+1>=c&&m+1>=l)return a(zN(i,E.lastComponent,n,t,i.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(s)(function w(){setTimeout(function(){if(u>d||Date.now()>p)return s();g()||w()},0)})();else for(;u<=d&&Date.now()<=p;){var h=g();if(h)return h}},addToPath:function(t,n,r,o){var s=t.lastComponent;return s&&s.added===n&&s.removed===r?{oldPos:t.oldPos+o,lastComponent:{count:s.count+1,added:n,removed:r,previousComponent:s.previousComponent}}:{oldPos:t.oldPos+o,lastComponent:{count:1,added:n,removed:r,previousComponent:s}}},extractCommon:function(t,n,r,o){for(var s=n.length,i=r.length,a=t.oldPos,l=a-o,c=0;l+1<s&&a+1<i&&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 s=[],i;t;)s.push(t),i=t.previousComponent,delete t.previousComponent,t=i;s.reverse();for(var a=0,l=s.length,c=0,u=0;a<l;a++){var d=s[a];if(d.removed){if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,a&&s[a-1].added){var p=s[a-1];s[a-1]=s[a],s[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=s[l-1];return l>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(s[l-2].value+=v.value,s.pop()),s}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(s,i){return typeof i=="undefined"?n:i}:r;return typeof e=="string"?e:JSON.stringify(hy(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 hy(e,t,n,r,o){t=t||[],n=n||[],r&&(e=r(o,e));var s;for(s=0;s<t.length;s+=1)if(t[s]===e)return n[s];var i;if(VN.call(e)==="[object Array]"){for(t.push(e),i=new Array(e.length),n.push(i),s=0;s<e.length;s+=1)i[s]=hy(e[s],t,n,r,o);return t.pop(),n.pop(),i}if(e&&e.toJSON&&(e=e.toJSON()),cf(e)==="object"&&e!==null){t.push(e),i={},n.push(i);var a=[],l;for(l in e)e.hasOwnProperty(l)&&a.push(l);for(a.sort(),s=0;s<a.length;s+=1)l=a[s],i[l]=hy(e[l],t,n,r,l);t.pop(),n.pop()}else i=e;return i}var yy=new ro;yy.tokenize=function(e){return e.slice()};yy.join=yy.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((s,i)=>Yo(s,t[i],n-1)):b1(e)&&b1(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(i=>Yo(e[i],t[i],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 s=r[o]?r[o]+1:1;return P(S({},r),{[o]:s})}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 s=jN(r.map(a=>a[o]),t),i=r.filter(a=>!s.includes(a[o]));if(i.length>=t)r=i;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=it("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},sa=e=>e.conversation.isSupported,vy=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)}),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:s,agentEmail:i,agentNickname:a,metadata:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:i,agentName:s,agentNickname:a,metadata:l})})}),pf=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,pf.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(vy.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(xy.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(pf.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).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 Ns={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 wy(e){let{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:s}=e;return{key:t,shiftKey:n,ctrlKey:r,metaKey:o,altKey:s}}var mf=it("input/replaceText"),Ms=it("input/sendMessage"),gf=it("input/applyImageSuggestion"),oo=it("input/sendEvent"),P1=Ce({name:"input",initialState:Ns,reducers:{setInput(e,t){var s,i;let{beforeInputChange:n}=e,{text:r,html:o}=t.payload;if(e.text=r,e.html=o!=null?o:null,r==="")e.metrics=Ns.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=((s=n.selection)==null?void 0:s.start)!==void 0&&((i=n.selection)==null?void 0:i.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:s,abTestName:i,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:s,abTestName:i,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(s=>s.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,s=n.numCharsDeleted+(o!=null&&o.length?o.length:0),i=o!=null&&o.length?[...n.deletions,o]:n.deletions;e.metrics=P(S({},e.metrics),{numCharsDeleted:s,deletions:i,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=Ns.metrics}},extraReducers:e=>{e.addCase(at,t=>{t.mixedSuggestion=Ns.mixedSuggestion,t.textSuggestions=Ns.textSuggestions,t.selectedSuggestionIndex=Ns.selectedSuggestionIndex,t.metrics=Ns.metrics})}}),ia=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:hf,setInput:yf,setMetrics:F1,setSelection:vf,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 s,i,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:(s=r.nickname)!=null?s:e.agentNickname,agentEmail:(i=r.email)!=null?i:e.agentEmail,agentDefaultLocale:(a=r.defaultLocale)!=null?a:e.agentDefaultLocale,agentTimeZone:e.agentTimeZone}})),Sy=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})),by=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(Sy.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(by.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 xf={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},G1=e=>e.search.isOpen,Y1=e=>e.search.page,Ey=e=>e.search.list,X1=e=>e.search.aggregates,JN=Dn([Ey,(e,t)=>t],(e,t)=>e.filter(n=>n.type===t)),Q1=e=>t=>JN(t,e),Ds=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:s}=r.info;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,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:i.map(c=>P(S(S({},c),c.title&&s?{title:un(c.title,s)}:{}),{text:un(c.text,s!=null?s:{}),source:`search-${c.type.toLowerCase()}`,searchTerm:e.query})),aggregates:a}})),Z1=Ce({name:"search",initialState:xf,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=xf.fetchState,e.list=xf.list}},extraReducers:e=>{e.addCase(Ds.pending,t=>{t.fetchState="loading"}).addCase(Ds.rejected,(t,n)=>{t.fetchState="error",te.error(n.error)}).addCase(Ds.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(at,()=>xf)}}),{resetSearch:wf,setIsOpen:Fn,setPage:so}=Z1.actions,J1=Z1.reducer;var Ty="SetOutputs",ca="ShowLoginOverlay",Zl="UserLoggedIn",eM="UserLoggedOut",Ar="ApplySuggestion",Cy="ApplyImageSuggestion",tM="ShowCommandPalette",nM=e=>({[Ty]:t=>{e.dispatch(P(S({},t),{isBroadcasted:!0}))},[tM]:t=>{e.dispatch(Fn(t.isOpen)),t.page&&e.dispatch(so(t.page))},[ca]:t=>{e.dispatch(g1(t))},[Zl]:()=>{e.dispatch(no())},[eM]:()=>{e.dispatch(no())},[Cy]:t=>{e.dispatch(gf({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 Lf=b(Ne()),tr=b(Z());var Pf=b(Z());var ky=function(e,t){return ky=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])},ky(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");ky(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 s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}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 Sf(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function bf(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),s=t.get(o);return typeof s=="undefined"&&(s=e.call(this,r),t.set(o,s)),s}function sT(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),s=t.get(o);return typeof s=="undefined"&&(s=e.apply(this,r),t.set(o,s)),s}function Ry(e,t,n,r,o){return n.bind(t,e,r,o)}function oM(e,t){var n=e.length===1?oT:sT;return Ry(e,this,n,t.cache.create(),t.serializer)}function sM(e,t){return Ry(e,this,sT,t.cache.create(),t.serializer)}function iM(e,t){return Ry(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}},Ef={variadic:sM,monadic:iM};var Tf;(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"})(Tf||(Tf={}));var Cf=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 kf;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(kf||(kf={}));function Py(e){return e.type===zn.literal}function Ay(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 sc(e){return e.type===zn.plural}function iT(e){return e.type===zn.pound}function ic(e){return e.type===zn.tag}function Rf(e){return!!(e&&typeof e=="object"&&e.type===kf.number)}function ac(e){return!!(e&&typeof e=="object"&&e.type===kf.dateTime)}function Iy(e){e.forEach(function(t){if(delete t.location,oc(t)||sc(t))for(var n in t.options)delete t.options[n].location,Iy(t.options[n].value);else tc(t)&&Rf(t.style)||(nc(t)||rc(t))&&ac(t.style)?delete t.style.location:ic(t)&&Iy(t.children)})}function aT(e,t){t===void 0&&(t={}),t=En({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Cf(e,t).parse();if(n.err){var r=SyntaxError(Tf[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Iy(n.val),n.val}var Fs;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Fs||(Fs={}));var lc=function(e){ec(t,e);function t(n,r,o){var s=e.call(this,n)||this;return s.code=r,s.originalMessage=o,s}return t.prototype.toString=function(){return"[formatjs Error: ".concat(this.code,"] ").concat(this.message)},t}(Error);var Ly=function(e){ec(t,e);function t(n,r,o,s){return e.call(this,'Invalid values for "'.concat(n,'": "').concat(r,'". Options are "').concat(Object.keys(o).join('", "'),'"'),Fs.INVALID_VALUE,s)||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),Fs.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,'"'),Fs.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,s,i){if(e.length===1&&Py(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(Py(u)){a.push({type:Ot.literal,value:u.value});continue}if(iT(u)){typeof s=="number"&&a.push({type:Ot.literal,value:n.getNumberFormat(t).format(s)});continue}var d=u.value;if(!(o&&d in o))throw new cT(d,i);var f=o[d];if(Ay(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]:Rf(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(ic(u)){var v=u.children,m=u.value,x=o[m];if(!dM(x))throw new lT(m,"function",i);var y=cc(v,t,n,r,o,s),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 Ly(u.value,f,Object.keys(u.options),i);a.push.apply(a,cc(h.value,t,n,r,o));continue}if(sc(u)){var h=u.options["=".concat(f)];if(!h){if(!Intl.PluralRules)throw new lc(`Intl.PluralRules is not available in this environment.
15
14
  Try polyfilling it using "@formatjs/intl-pluralrules"
16
- `,Ti.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));x=c.options[w]||c.options.other}if(!x)throw new hv(c.value,d,Object.keys(c.options),s);a.push.apply(a,xu(x.value,t,n,r,o,d-(c.offset||0)));continue}}return C2(a)}function R2(e,t){return t?pn(pn(pn({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=pn(pn({},e[r]),t[r]||{}),n},{})):e}function P2(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=R2(e[r],t[r]),n},pn({},e)):e}function yv(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function A2(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:qf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,$f([void 0],n,!1)))},{cache:yv(e.number),strategy:Gf.variadic}),getDateTimeFormat:qf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,$f([void 0],n,!1)))},{cache:yv(e.dateTime),strategy:Gf.variadic}),getPluralRules:qf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,$f([void 0],n,!1)))},{cache:yv(e.pluralRules),strategy:Gf.variadic})}}var vv=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(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var f=c.reduce(function(d,p){return!d.length||p.type!==It.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return xu(i.ast,i.locales,i.formatters,i.formats,u,void 0,i.message)},this.resolvedOptions=function(){var u;return{locale:((u=i.resolvedLocale)===null||u===void 0?void 0:u.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=qT(s,["formatters"]);this.ast=e.__parse(t,pn(pn({},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=P2(e.formats,r),this.formatters=o&&o.formatters||A2(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=QT,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 I2(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var L2="dummy",xv=(0,Jf.createContext)(null);function ue(e){var r;let t=(0,Jf.useContext)(xv);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=I2(n,o);return s?new vv(s).format(i):(t!==L2&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}var ep=S($());var eC={root:"dd-tvkOF",content:"dd-eXA1D"};var wv=S(R()),O2=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,ep.useRef)(null),u=D("Dialog",eC),c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},f=d=>{d.target===l.current&&e&&r()};return(0,ep.useEffect)(()=>{var d,p;!l.current||!e||!t||(p=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,wv.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:f,children:(0,wv.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},tp=O2;var nC=S(Fe());var tC={root:"dd-ranhW"};var rC=S(R()),M2=r=>{var o=r,{className:e,value:t}=o,n=se(o,["className","value"]);let i=D("TextInput",tC);return(0,rC.jsx)("input",b({className:(0,nC.default)(e,i.root),type:"text",value:t},n))},wu=M2;var Sv={};bt(Sv,{enUS:()=>N2,nlNL:()=>_2});var N2={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"}]},_2={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 oC={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 et=S(R());var D2=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch(t){return e}},F2=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=ue(Sv),s=D("LoginTokenDialog",oC),a=K(tT),l=he(),u=J("productName"),[c,f]=(0,Vn.useState)(e||""),[d,p]=(0,Vn.useState)(0),[y,h]=(0,Vn.useState)(""),g=(0,Vn.useCallback)(w=>A(void 0,null,function*(){w.preventDefault(),l(rT({email:c})),p(1)}),[n,c]),m=()=>{h(""),p(0)},v=(0,Vn.useCallback)(w=>A(void 0,null,function*(){w.preventDefault();let C=D2(w.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:x}));return}l(ou({token:C}))}),[n]),x=(0,Vn.useMemo)(()=>w=>(0,et.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:w},"back-button"),[]);return(0,Vn.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:x})),a==="done"&&r()},[a]),(0,et.jsx)(tp,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,et.jsxs)("div",{className:s.root,children:[(0,et.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,et.jsxs)("form",{onSubmit:g,children:[(0,et.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,et.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,et.jsx)(wu,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:w=>f(w.target.value)}),(0,et.jsx)("div",{className:s.actions,children:(0,et.jsx)("button",{type:"submit",className:(0,np.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,et.jsxs)("form",{onSubmit:v,children:[(0,et.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,et.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,et.jsx)(wu,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,et.jsx)("div",{className:s.errorMessage,children:y}),(0,et.jsxs)("div",{className:s.actions,children:[(0,et.jsx)("button",{type:"button",className:(0,np.default)(s.button),onClick:m,children:i("back")}),(0,et.jsx)("button",{type:"submit",className:(0,np.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},iC=F2;var aC=S(R()),H2=()=>{let e=K(nT),t=K(aa),n=J("adminUrl"),r=on(),o=()=>r.send(la,!1),i=()=>{r.send(la,!1),r.send(lu)};return(0,aC.jsx)(iC,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},sC=H2;var yP=S(Tv()),$t=S($());var Su="__summarizerAssistant__",dC={cues:[],threads:{},fetchState:"idle"},fC=e=>{var t;return(t=e.assistants)==null?void 0:t.cues};var bu=e=>t=>{var n,r;return(r=(n=t.assistants)==null?void 0:n.threads[e])!=null?r:null},rp=ot("assistants/callToAction"),Wn=ge("assistants/evaluateSummaryAssistant",(e,t)=>A(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(Kn(b({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})),n_=1,Ci=ge("assistants/evaluateKnowledgeAssistantLegacy",(e,t)=>A(void 0,null,function*(){var p,y,h,g;let{threadId:n}=e,{onNewThreadId:r,input:o}=e,{deepdeskAPI:i}=t.extra,s=t.getState(),{platformVariables:a}=s.info;n||(n=n_++,r&&r(n));let l=(p=bu(n)(s))!=null?p:[],u=yield i.getKnowledgeAssistant(e.assistantCode),c=(y=s.conversation.current)==null?void 0:y.externalId,f=(g=(h=s.info)==null?void 0:h.agentInfo)==null?void 0:g.agentId;if(!u)throw new Error("KnowledgeAssistant is not found");let d=yield i.knowledgeAssist({customerInstruction:u.customerInstruction,doNotKnowAnswer:u.doNotKnowAnswer,question:o},l,u.code,{agentId:f,conversationId:c});return a&&(d.answer=rn(d.answer,a)),{threadId:n,question:o,answer:d}})),ki=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>A(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(Kn(P(b({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:rn(l.response,s!=null?s:{}),sources:l.sources}}})),Kn=ge("assistants/evaluate",(e,t)=>A(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:u}=l.info,c=(p=l.conversation.current)==null?void 0:p.externalId,f;if(o==="in-memory-transcript"){if(!r.conversationQuery)throw new Error("Can't include in-memory-transcript, setConversationQuery is not defined");f=yield r.conversationQuery()}else Array.isArray(o)&&(f=o);if(e.includeMetadata){if(!l.conversation.current)throw new Error("Can't include metadata, no current conversation");let{metadata:y}=l.conversation.current;Object.assign(i,{metadata:y})}let d=yield n.evaluateAssistant(e.assistantCode,{expectFormat:s,input:i,transcript:f,externalConversationId:c,threadId:a});switch(s){case"text":return rn(d,u);case"json-schema:cues":return Array.isArray(d)?d.map(y=>P(b({},y),{name:rn(y.name,u),response:rn(y.response,u)})):[];case"json-schema:knowledge-assist":{let y=d;return P(b({},y),{answer:rn(y.response,u)})}default:return d}})),pC=Ce({name:"assistants",initialState:dC,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(Kn.pending,(t,n)=>{n.meta.arg.skipState||(t.fetchState="loading")}).addCase(Kn.rejected,(t,n)=>{var r;ee.warn((r=n.error)==null?void 0:r.message),!n.meta.arg.skipState&&(t.fetchState="error")}).addCase(Kn.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(ki.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=se(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(Ci.fulfilled,(t,n)=>{let i=n.payload,{threadId:r}=i,o=se(i,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(Wn.pending,t=>{let n={code:Su,name:"Summary",response:"",isLoading:!0},r=t.cues.filter(o=>o.code!==Su);t.cues=[...r,n]}).addCase(Wn.rejected,t=>{let n=t.cues.filter(r=>r.code!==Su);t.cues=n}).addCase(Wn.fulfilled,(t,n)=>{let r={code:Su,name:"Summary",response:n.payload,specialType:"summary"},o=t.cues.filter(i=>i.code!==Su);t.cues=[...o,r]}).addCase(it,()=>dC)}}),{removeCueByCode:mC,resetCues:iB,removeThreadById:ua}=pC.actions,gC=pC.reducer;var r_={data:null,fetchState:"idle"},hC=e=>e.contentTypes.data,Eu=ge("contentTypes/getContentTypes",(e,t)=>A(void 0,null,function*(){return t.extra.deepdeskAPI.getContentTypes()})),o_=Ce({name:"contentTypes",initialState:r_,reducers:{},extraReducers:e=>{e.addCase(Eu.pending,t=>{t.fetchState="loading"}).addCase(Eu.rejected,t=>{t.fetchState="error"}).addCase(Eu.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),yC=o_.reducer;var i_={data:null,fetchState:"idle"},s_=[],Ri=e=>e.profile.data,a_=e=>e.profile.data?e.profile.data.uiConfig.widget.types:s_,Cu=Un([a_],e=>e.filter(t=>t.isActive)),vC=e=>{var t;return(t=e.profile.data)==null?void 0:t.summarizerAssistantNew},xC=e=>{var t;return((t=e.profile.data)==null?void 0:t.onDemandAssistants)||[]},Cv=e=>t=>Cu(t).find(n=>n.type===e),wC=e=>e.profile.data?!!e.profile.data.uiConfig.widget.types.find(t=>t.type==="custom-data"):!1,op=e=>{var t;return(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew},ip=e=>{var t;return(t=e.profile.data)==null?void 0:t.knowledgeAssistant},Tu=ge("profile/getProfile",(e,t)=>A(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)})),l_=Ce({name:"profile",initialState:i_,reducers:{},extraReducers:e=>{e.addCase(Tu.pending,t=>{t.fetchState="loading"}).addCase(Tu.rejected,t=>{t.fetchState="error"}).addCase(Tu.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),SC=l_.reducer;function xr(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 Qr=S($());var bC=S($()),sp=S(Fe());var mn={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 $r={};bt($r,{enUS:()=>u_,nlNL:()=>c_});var u_={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"}]},c_={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 Uo=S(R()),d_=({src:e,title:t})=>{let n=D("CommandPalette",mn),[r,o]=(0,bC.useState)("loading"),i=ue($r);return(0,Uo.jsxs)("div",{className:n.image,children:[(0,Uo.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,sp.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Uo.jsx)("span",{className:(0,sp.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Uo.jsx)("span",{className:(0,sp.default)(n.imageSrc,n.imageSrcStatus),children:(0,Uo.jsx)(Oc,{})}),t&&(0,Uo.jsx)("span",{className:n.imageTitle,children:t})]})},EC=d_;var TC=S($()),CC=S(Fe());var Pi=S(R());function kv({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=ue($r),s=D("CommandPalette",mn);return TC.default.Children.count(e)===0?null:(0,Pi.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Pi.jsxs)("div",{className:s.listHeader,children:[t&&(0,Pi.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Pi.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Pi.jsx)("div",{className:(0,CC.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var Bu=S(Fe());var ap=S($());function ku(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,Pv=2,Av=4,st=8,lp=16,Ru=32,$n=64,Rv={a:{content:ke|st,self:!1,type:ke|st|Ru|$n},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:ke|st,void:!0},body:{content:ke|Pv|Av|st|lp|Ru|$n},button:{content:st,type:ke|st|Ru|$n},caption:{content:ke,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:ke|Ru|$n},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|st|lp},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:st,parent:["ruby","rtc"]},rtc:{content:st,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:st,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|st,void:!0}};function Ii(e){return t=>{Rv[t]=b(b({},e),Rv[t])}}["address","main","div","figure","p","pre"].forEach(Ii({content:ke,type:ke|$n}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Ii({content:st,type:ke|st|$n}));["p","pre"].forEach(Ii({content:st,type:ke|$n}));["s","small","span","del","ins"].forEach(Ii({content:st,type:ke|st}));["article","aside","footer","header","nav","section","blockquote"].forEach(Ii({content:ke,type:ke|Pv|$n}));["h1","h2","h3","h4","h5","h6"].forEach(Ii({content:st,type:ke|Av|$n}));["audio","canvas","iframe","img","video"].forEach(Ii({type:ke|st|lp|$n}));var Au=Object.freeze(Rv),Iv=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Lv=Object.keys(Au).filter(e=>e!=="canvas"&&e!=="iframe"),_e=1,Ov=2,Ai=3,jo=4,cp=5,dp=Object.freeze({alt:_e,cite:_e,class:_e,colspan:Ai,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:Ai,scope:_e,sizes:_e,span:Ai,start:Ai,style:cp,src:_e,srclang:_e,srcset:_e,tabindex:_e,target:_e,title:_e,type:_e,width:_e}),Mv=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function up(){return up=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},up.apply(this,arguments)}function fp({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?ap.default.createElement(i,up({className:t},e)):ap.default.createElement(i,up({className:t},e),n)}var Pu=class{attribute(t,n){return n}node(t,n){return n}};function kC(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?P(b({match:o[0],void:r},n(o)),{index:o.index,length:o[0].length,valid:!0}):null}var qr=class{constructor(t,n,r){ku(this,"greedy",!1),ku(this,"options",void 0),ku(this,"propName",void 0),ku(this,"inverseName",void 0),ku(this,"factory",void 0),this.options=b({},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?ap.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return kC(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Li=S($()),IC=S(PC());function Gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m_=/(url|image|image-set)\(/i,Nv=class extends Pu{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(m_)&&delete n[r]}),n}},AC=1,g_=3,h_=/^<(!doctype|(html|head|body)(\s|>))/i,y_=/^(aria-|data-|\w+:)/iu,v_=/{{{(\w+)\/?}}}/;function x_(){if(!(typeof window=="undefined"||typeof document=="undefined"))return document.implementation.createHTMLDocument("Interweave")}var pp=class{constructor(t,n={},r=[],o=[]){var i;Gr(this,"allowed",void 0),Gr(this,"banned",void 0),Gr(this,"blocked",void 0),Gr(this,"container",void 0),Gr(this,"content",[]),Gr(this,"props",void 0),Gr(this,"matchers",void 0),Gr(this,"filters",void 0),Gr(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new Nv],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Lv),this.banned=new Set(Iv),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 u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let f="";for(;i&&(a=l.match(i));){let d=a,{index:p,length:y,match:h,valid:g,void:m}=d,v=se(d,["index","length","match","valid","void"]),x=l.propName+String(s);p>0&&(f+=i.slice(0,p)),g?(f+=m?`{{{${x}/}}}`:`{{{${x}}}}${h}{{{/${x}}}}`,this.keyIndex+=1,s+=1,r[x]={children:h,matcher:l,props:P(b(b({},o),v),{key:this.keyIndex})}):f+=h,l.greedy?(i=f+i.slice(p+y),f=""):i=i.slice(p+(y||h.length))}l.greedy||(i=f+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
+ `,Fs.MISSING_INTL_API,i);var w=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));h=u.options[w]||u.options.other}if(!h)throw new Ly(u.value,f,Object.keys(u.options),i);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 _y(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:bf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Sf([void 0],n,!1)))},{cache:_y(e.number),strategy:Ef.variadic}),getDateTimeFormat:bf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Sf([void 0],n,!1)))},{cache:_y(e.dateTime),strategy:Ef.variadic}),getPluralRules:bf(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Sf([void 0],n,!1)))},{cache:_y(e.pluralRules),strategy:Ef.variadic})}}var Oy=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var s=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(c){var u=s.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(s.ast,s.locales,s.formatters,s.formats,c,void 0,s.message)},this.resolvedOptions=function(){var c;return{locale:((c=s.resolvedLocale)===null||c===void 0?void 0:c.toString())||Intl.NumberFormat.supportedLocalesOf(s.locales)[0]}},this.getAst=function(){return s.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 i=o||{},a=i.formatters,l=rT(i,["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",Ny=(0,Pf.createContext)(null);function ce(e){var r;let t=(0,Pf.useContext)(Ny);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,s)=>{let i=gM(n,o);return i?new Oy(i).format(s):(t!==hM&&console.warn(`${o} does not exist in messages of ${t}`),`[${o}]`)}}var Af=b(Z());var uT={root:"dd-tvkOF",content:"dd-eXA1D"};var My=b(R()),yM=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:s,overlayAriaLabel:i,contentAriaLabel:a})=>{let l=(0,Af.useRef)(null),c=M("Dialog",uT),u=f=>{if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),o();return}s&&s(f)},d=f=>{f.target===l.current&&e&&r()};return(0,Af.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,My.jsx)("div",{role:"dialog","data-testid":"dialog",className:c.root,"aria-label":i,ref:l,onKeyDown:u,onMouseDown:d,children:(0,My.jsx)("div",{"data-testid":"dialog-content",className:c.content,"aria-label":a,children:n})}):null},If=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 s=M("TextInput",dT);return(0,pT.jsx)("input",S({className:(0,fT.default)(e,s.root),type:"text",value:t},n))},uc=vM;var Dy={};Rt(Dy,{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 s=ce(Dy),i=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(s("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:i.anchorButton,onClick:y,children:w},"back-button"),[]);return(0,tr.useEffect)(()=>{a==="error"&&m(s("verifyCodeError",{login:h})),a==="done"&&r()},[a]),(0,tt.jsx)(If,{autoFocus:!0,isOpen:t,contentAriaLabel:s("promptTitle",{productName:c}),overlayAriaLabel:s("promptTitle",{productName:c}),onClose:o,onBack:o,children:(0,tt.jsxs)("div",{className:i.root,children:[(0,tt.jsx)("h1",{className:i.title,children:s("promptTitle",{productName:c})}),f===0&&(0,tt.jsxs)("form",{onSubmit:x,children:[(0,tt.jsx)("h2",{className:i.subtitle,children:s("requestCodeTitle")}),(0,tt.jsx)("p",{className:i.text,children:s("requestCodeBody",{productName:c})}),(0,tt.jsx)(uc,{className:i.input,name:"email",placeholder:s("requestCodeInputPlaceholder"),value:u,onChange:w=>d(w.target.value)}),(0,tt.jsx)("div",{className:i.actions,children:(0,tt.jsx)("button",{type:"submit",className:(0,Lf.default)(i.button,i.primaryButton),children:s("requestCodeSubmitLabel")})})]}),f===1&&(0,tt.jsxs)("form",{onSubmit:g,children:[(0,tt.jsx)("h2",{className:i.subtitle,children:s("verifyCodeTitle")}),(0,tt.jsx)("p",{className:i.text,children:s("verifyCodeBody")}),(0,tt.jsx)(uc,{className:i.input,name:"token",placeholder:s("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,tt.jsx)("div",{className:i.errorMessage,children:v}),(0,tt.jsxs)("div",{className:i.actions,children:[(0,tt.jsx)("button",{type:"button",className:(0,Lf.default)(i.button),onClick:y,children:s("back")}),(0,tt.jsx)("button",{type:"submit",className:(0,Lf.default)(i.button,i.primaryButton),disabled:["loading","done"].includes(a),children:s("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),s=()=>{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:s})},hT=EM;var CR=b(Hy()),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},_f=it("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 s=yield t.dispatch(rr(S({assistantCode:o,expectFormat:"text",transcript:"in-memory-transcript",skipState:!0},e)));if(s.error)throw new Error(s.error.message);if(typeof s.payload!="string")throw te.warn("Unexpected summary output",s),new Error("Unexpected summary output");return s.payload})),UM=1,zs=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:s}=t.extra,i=t.getState(),{platformVariables:a}=i.info;n||(n=UM++,r&&r(n));let l=(p=fc(n)(i))!=null?p:[],c=yield s.getKnowledgeAssistant(e.assistantCode),u=(v=i.conversation.current)==null?void 0:v.externalId,d=(x=(m=i.info)==null?void 0:m.agentInfo)==null?void 0:x.agentId;if(!c)throw new Error("KnowledgeAssistant is not found");let f=yield s.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}})),Hs=ge("assistants/evaluateKnowledgeAssistant",(e,t)=>I(void 0,null,function*(){let{threadId:n}=e,{onNewThreadId:r}=e,{deepdeskAPI:o}=t.extra,s=t.getState(),{platformVariables:i}=s.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,i!=null?i:{}),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:s={},expectFormat:i,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(s,{metadata:v})}let f=yield n.evaluateAssistant(e.assistantCode,{expectFormat:i,input:s,transcript:d,externalConversationId:u,threadId:a});switch(i){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(i=>i.code),s=t.cues.filter(i=>!o.includes(i.code));t.fetchState="done",t.cues=[...s,...r];break}}}).addCase(Hs.fulfilled,(t,n)=>{let s=n.payload,{threadId:r}=s,o=oe(s,["threadId"]);t.threads[r]=[...t.threads[r]||[],o]}).addCase(zs.fulfilled,(t,n)=>{let s=n.payload,{threadId:r}=s,o=oe(s,["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(s=>s.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=[],Bs=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)||[]},By=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,Of=e=>{var t;return(t=e.profile.data)==null?void 0:t.knowledgeAssistantNew},Nf=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 s;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((s=r.profile.data)==null?void 0:s.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()),Mf=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 io={};Rt(io,{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"),s=ce(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,Mf.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Zo.jsx)("span",{className:(0,Mf.default)(n.imageSrc,n.imageSrcStatus),children:s("loading")}),r==="error"&&(0,Zo.jsx)("span",{className:(0,Mf.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 Us=b(R());function Uy({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let s=ce(io),i=M("CommandPalette",Tn);return NT.default.Children.count(e)===0?null:(0,Us.jsxs)("div",{"data-testid":"commandpalette-list",className:i.list,children:[(t||r)&&(0,Us.jsxs)("div",{className:i.listHeader,children:[t&&(0,Us.jsx)("h4",{className:i.listHeading,children:t}),r&&o&&(0,Us.jsx)("button",{onClick:o,className:i.listMoreButton,type:"button",children:s("showAll")})]}),(0,Us.jsx)("div",{className:(0,MT.default)(i.listWrapper,n==="horizontal"&&i.listHorizontal),children:e})]})}var Ac=b(Ne());var Df=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,$y=2,jy=4,lt=8,Ff=16,yc=32,or=64,Vy={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|$y|jy|lt|Ff|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|Ff},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 $s(e){return t=>{Vy[t]=S(S({},e),Vy[t])}}["address","main","div","figure","p","pre"].forEach($s({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($s({content:lt,type:ke|lt|or}));["p","pre"].forEach($s({content:lt,type:ke|or}));["s","small","span","del","ins"].forEach($s({content:lt,type:ke|lt}));["article","aside","footer","header","nav","section","blockquote"].forEach($s({content:ke,type:ke|$y|or}));["h1","h2","h3","h4","h5","h6"].forEach($s({content:lt,type:ke|jy|or}));["audio","canvas","iframe","img","video"].forEach($s({type:ke|lt|Ff|or}));var xc=Object.freeze(Vy),Ky=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Wy=Object.keys(xc).filter(e=>e!=="canvas"&&e!=="iframe"),_e=1,qy=2,Vs=3,Jo=4,Hf=5,Bf=Object.freeze({alt:_e,cite:_e,class:_e,colspan:Vs,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:Vs,scope:_e,sizes:_e,span:Vs,start:Vs,style:Hf,src:_e,srclang:_e,srcset:_e,tabindex:_e,target:_e,title:_e,type:_e,width:_e}),Gy=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function zf(){return zf=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},zf.apply(this,arguments)}function Uf({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let s=o;return r?Df.default.createElement(s,zf({className:t},e)):Df.default.createElement(s,zf({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?Df.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 js=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,Yy=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 Vf=class{constructor(t,n={},r=[],o=[]){var s;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 Yy],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((s=n.allowList)!==null&&s!==void 0?s:Wy),this.banned=new Set(Ky),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,s=t,i=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(;s&&(a=l.match(s));){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(i);p>0&&(d+=s.slice(0,p)),x?(d+=y?`{{{${h}/}}}`:`{{{${h}}}}${m}{{{/${h}}}}`,this.keyIndex+=1,i+=1,r[h]={children:m,matcher:l,props:P(S(S({},o),g),{key:this.keyIndex})}):d+=m,l.greedy?(s=d+s.slice(p+v),d=""):s=s.slice(p+(v||m.length))}l.greedy||(s=d+s)}),i===0?t:this.replaceTokens(s,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,`
17
16
  `);return o=o.replace(/\n{3,}/g,`
18
17
 
19
18
 
20
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global!="undefined"&&global.INTERWEAVE_SSR_POLYFILL||x_)();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(h_)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,IC.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==AC||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=dp[l]||dp[s];if(!this.isSafe(t)||!l.match(y_)&&(!n&&(!u||u===Ov)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===jo?c=!0:u===Ai?c=Number.parseFloat(String(c)):u!==cp&&(c=String(c)),r[Mv[l]||l]=this.applyAttributeFilters(l,c),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 Au[t]?P(b(b({},n),Au[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=[],u="";return[...t.childNodes].forEach(c=>{if(c.nodeType===AC){let d=c.nodeName.toLowerCase(),p=this.getTagConfig(d);u&&(l.push(u),u="");let y=this.applyNodeFilters(d,c);if(!y)return;let h;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;h=this.parseNode(y,p);let m=s(y,h,p);if(m===null)return;if(typeof m!="undefined"){l.push(Li.default.cloneElement(m,{key:g}));return}this.keyIndex=g-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,p))){var f;this.keyIndex+=1;let g=this.extractAttributes(y),m={tagName:d};g&&(m.attributes=g),p.void&&(m.selfClose=p.void),l.push(Li.default.createElement(fp,P(b({},m),{key:this.keyIndex}),(f=h)!==null&&f!==void 0?f:this.parseNode(y,p)))}else l=[...l,...this.parseNode(y,p.tagName?p:n)]}else if(c.nodeType===g_){let d=r&&!o?c.textContent:this.applyMatchers(c.textContent||"",n);Array.isArray(d)?l=[...l,...d]:u+=d}}),u&&l.push(u),l}replaceTokens(t,n){if(!t.includes("{{{"))return t;let r=[],o=t,i=null;for(;i=o.match(v_);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:f,props:d}=n[a],p;if(u)p=s.length,r.push(f.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));p=y.index+y[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}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 w_(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o!=null?o:l)!==null&&t!==void 0?t:"span",f=c==="fragment"?!0:u,d;if(a)d=a;else{let p=new pp(i!=null?i:"",e).parse();p.length>0&&(d=p)}return d||(d=s),f?Li.default.createElement(Li.default.Fragment,null,d):Li.default.createElement(fp,{attributes:n,className:r,tagName:c},d)}function Oi(e){let C=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:f="span",noWrap:d=!1}=C,p=se(C,["attributes","className","content","disableFilters","disableMatchers","emptyContent","filters","matchers","onAfterParse","onBeforeParse","tagName","noWrap"]),y=i?[]:l,h=o?[]:a,g=c?[c]:[],m=u?[u]:[];y.forEach(E=>{E.onBeforeParse&&g.push(E.onBeforeParse.bind(E)),E.onAfterParse&&m.push(E.onAfterParse.bind(E))});let v=g.reduce((E,k)=>k(E,e),r!=null?r:""),x=new pp(v,p,y,h),w=m.reduce((E,k)=>k(E,e),x.parse());return Li.default.createElement(w_,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:w.length===0?void 0:w,tagName:f})}var Uu=S($());var S_=/[.*+?^${}()|[\]\\]/g,b_=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function E_(e){return e.replace(S_,"\\$&")}function T_(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function C_(e){return e.search(b_)}function LC(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${E_(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function OC(e){return e.replace(Fc,'<mark data-type="placeholder">$1</mark>')}function ca(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function k_(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 _v(e,t,n={}){if(t){let r=T_(t.toLowerCase(),e.toLowerCase()),o=ca(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=C_(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Ow).length>3||t.length>30?k_(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ca(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var R_=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function mp(e){return R_.test(e)}function MC(e){var n;let t=document.createElement("template");return t.innerHTML=e,(n=t.content.textContent)!=null?n:""}var gp=S($()),DC=S(R()),NC=gp.default.createContext(void 0);function Vo(){let e=gp.default.useContext(NC);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var _C=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=gp.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,DC.jsx)(NC.Provider,{value:s,children:e})};var Sr=S($());var O=S($(),1),ba=S($(),1);function yp(){return typeof window!="undefined"}function wr(e){return FC(e)?(e.nodeName||"").toLowerCase():"#document"}function Bt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gn(e){var t;return(t=(FC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FC(e){return yp()?e instanceof Node||e instanceof Bt(e).Node:!1}function De(e){return yp()?e instanceof Element||e instanceof Bt(e).Element:!1}function Je(e){return yp()?e instanceof HTMLElement||e instanceof Bt(e).HTMLElement:!1}function hp(e){return!yp()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Bt(e).ShadowRoot}function da(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=sn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function HC(e){return["table","td","th"].includes(wr(e))}function Iu(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(n){return!1}})}function vp(e){let t=fa(),n=De(e)?sn(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 zC(e){let t=qn(e);for(;Je(t)&&!Yn(t);){if(vp(t))return t;if(Iu(t))return null;t=qn(t)}return null}function fa(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yn(e){return["html","body","#document"].includes(wr(e))}function sn(e){return Bt(e).getComputedStyle(e)}function Lu(e){return De(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qn(e){if(wr(e)==="html")return e;let t=e.assignedSlot||e.parentNode||hp(e)&&e.host||Gn(e);return hp(t)?t.host:t}function BC(e){let t=qn(e);return Yn(t)?e.ownerDocument?e.ownerDocument.body:e.body:Je(t)&&da(t)?t:BC(t)}function gn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);let o=BC(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=Bt(o);if(i){let a=xp(s);return t.concat(s,s.visualViewport||[],da(o)?o:[],a&&n?gn(a):[])}return t.concat(o,gn(o,[],n))}function xp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Wo(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 pt(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&hp(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function UC(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Fv(){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 jC(e){return e.mozInputSource===0&&e.isTrusted?!0:Dv()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function VC(e){return P_()?!1:!Dv()&&e.width===0&&e.height===0||Dv()&&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 WC(){return/apple/i.test(navigator.vendor)}function Dv(){let e=/android/i;return e.test(UC())||e.test(Fv())}function P_(){return Fv().includes("jsdom/")}function pa(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function KC(e){return"nativeEvent"in e}function $C(e){return e.matches("html,body")}function Lt(e){return(e==null?void 0:e.ownerDocument)||document}function wp(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 Yr(e){return"composedPath"in e?e.composedPath()[0]:e.target}var A_="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Hv(e){return Je(e)&&e.matches(A_)}function Sp(e){e.preventDefault(),e.stopPropagation()}function qC(e){return e?e.getAttribute("role")==="combobox"&&Hv(e):!1}var ma=Math.min,Xr=Math.max,Mu=Math.round,Nu=Math.floor,Xn=e=>({x:e,y:e}),I_={left:"right",right:"left",bottom:"top",top:"bottom"},L_={start:"end",end:"start"};function zv(e,t,n){return Xr(e,ma(t,n))}function _u(e,t){return typeof e=="function"?e(t):e}function Ko(e){return e.split("-")[0]}function Du(e){return e.split("-")[1]}function Bv(e){return e==="x"?"y":"x"}function Uv(e){return e==="y"?"height":"width"}function Mi(e){return["top","bottom"].includes(Ko(e))?"y":"x"}function jv(e){return Bv(Mi(e))}function GC(e,t,n){n===void 0&&(n=!1);let r=Du(e),o=jv(e),i=Uv(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ou(s)),[s,Ou(s)]}function YC(e){let t=Ou(e);return[bp(e),t,bp(t)]}function bp(e){return e.replace(/start|end/g,t=>L_[t])}function O_(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 XC(e,t,n,r){let o=Du(e),i=O_(Ko(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(bp)))),i}function Ou(e){return e.replace(/left|right|bottom|top/g,t=>I_[t])}function M_(e){return b({top:0,right:0,bottom:0,left:0},e)}function QC(e){return typeof e!="number"?M_(e):{top:e,right:e,bottom:e,left:e}}function Ni(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 ln=S(R(),1);var N_=["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])"],Ep=N_.join(","),JC=typeof Element=="undefined",ga=JC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Tp=!JC&&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},Cp=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},__=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},D_=function(t,n,r){if(Cp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Ep));return n&&ga.call(t,Ep)&&o.unshift(t),o=o.filter(r),o},F_=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Cp(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,u=e(l,!0,r);r.flatten?o.push.apply(o,u):o.push({scopeParent:s,candidates:u})}else{var c=ga.call(s,Ep);c&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),d=!Cp(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&d){var p=e(f===!0?s.children:f.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},ek=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},tk=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||__(t))&&!ek(t)?0:t.tabIndex},H_=function(t,n){var r=tk(t);return r<0&&n&&!ek(t)?0:r},z_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},nk=function(t){return t.tagName==="INPUT"},B_=function(t){return nk(t)&&t.type==="hidden"},U_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},j_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},V_=function(t){if(!t.name)return!0;var n=t.form||Tp(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=j_(o,t.form);return!i||i===t},W_=function(t){return nk(t)&&t.type==="radio"},K_=function(t){return W_(t)&&!V_(t)},$_=function(t){var n,r=t&&Tp(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 u,c,f;r=Tp(o),o=(u=r)===null||u===void 0?void 0:u.host,i=!!((c=o)!==null&&c!==void 0&&(f=c.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},ZC=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},q_=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ga.call(t,"details>summary:first-of-type"),s=i?t.parentElement:t;if(ga.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,u=Tp(t);if(l&&!l.shadowRoot&&o(l)===!0)return ZC(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=a}if($_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ZC(t);return!1},G_=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 ga.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},Y_=function(t,n){return!(n.disabled||Cp(n)||B_(n)||q_(n,t)||U_(n)||G_(n))},Vv=function(t,n){return!(K_(n)||tk(n)<0||!Y_(t,n))},X_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Q_=function e(t){var n=[],r=[];return t.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,l=H_(a,s),u=s?e(o.candidates):a;l===0?s?n.push.apply(n,u):n.push(a):r.push({documentOrder:i,tabIndex:l,item:o,isScope:s,content:u})}),r.sort(z_).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},Fu=function(t,n){n=n||{};var r;return n.getShadowRoot?r=F_([t],n.includeContainer,{filter:Vv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:X_}):r=D_(t,n.includeContainer,Vv.bind(null,n)),Q_(r)};var rk=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ga.call(t,Ep)===!1?!1:Vv(n,t)};var i0=S($s(),1);function ok(e,t,n){let{reference:r,floating:o}=e,i=Mi(t),s=jv(t),a=Uv(s),l=Ko(t),u=i==="y",c=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2,p;switch(l){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Du(t)){case"start":p[s]-=d*(n&&u?-1:1);break;case"end":p[s]+=d*(n&&u?-1:1);break}return p}var ik=(e,t,n)=>A(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),u=yield s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=ok(u,r,l),d=r,p={},y=0;for(let h=0;h<a.length;h++){let{name:g,fn:m}=a[h],{x:v,y:x,data:w,reset:C}=yield m({x:c,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=v!=null?v:c,f=x!=null?x:f,p=P(b({},p),{[g]:b(b({},p[g]),w)}),C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(d=C.placement),C.rects&&(u=C.rects===!0?yield s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:c,y:f}=ok(u,d,l)),h=-1)}return{x:c,y:f,placement:d,strategy:o,middlewareData:p}});function Wv(e,t){return A(this,null,function*(){var n;t===void 0&&(t={});let{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=_u(t,e),y=QC(p),g=a[d?f==="floating"?"reference":"floating":f],m=Ni(yield i.getClippingRect({element:(n=yield i.isElement==null?void 0:i.isElement(g))==null||n?g:g.contextElement||(yield i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=yield i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating),w=(yield i.isElement==null?void 0:i.isElement(x))?(yield i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=Ni(i.convertOffsetParentRelativeRectToViewportRelativeRect?yield i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:l}):v);return{top:(m.top-C.top+y.top)/w.y,bottom:(C.bottom-m.bottom+y.bottom)/w.y,left:(m.left-C.left+y.left)/w.x,right:(C.right-m.right+y.right)/w.x}})}var sk=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return A(this,null,function*(){var r,o;let{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=n,X=_u(e,n),{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0}=X,m=se(X,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=s.arrow)!=null&&r.alignmentOffset)return{};let v=Ko(i),x=Mi(l),w=Ko(l)===l,C=yield u.isRTL==null?void 0:u.isRTL(c.floating),E=p||(w||!g?[Ou(l)]:YC(l)),k=h!=="none";!p&&k&&E.push(...XC(l,g,h,C));let I=[l,...E],L=yield Wv(n,m),G=[],F=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&G.push(L[v]),d){let te=GC(i,a,C);G.push(L[te[0]],L[te[1]])}if(F=[...F,{placement:i,overflows:G}],!G.every(te=>te<=0)){var j,M;let te=(((j=s.flip)==null?void 0:j.index)||0)+1,q=I[te];if(q)return{data:{index:te,overflows:F},reset:{placement:q}};let W=(M=F.filter(B=>B.overflows[0]<=0).sort((B,N)=>B.overflows[1]-N.overflows[1])[0])==null?void 0:M.placement;if(!W)switch(y){case"bestFit":{var _;let B=(_=F.filter(N=>{if(k){let H=Mi(N.placement);return H===x||H==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(H=>H>0).reduce((H,ce)=>H+ce,0)]).sort((N,H)=>N[1]-H[1])[0])==null?void 0:_[0];B&&(W=B);break}case"initialPlacement":W=l;break}if(i!==W)return{reset:{placement:W}}}return{}})}}};function Z_(e,t){return A(this,null,function*(){let{placement:n,platform:r,elements:o}=e,i=yield r.isRTL==null?void 0:r.isRTL(o.floating),s=Ko(n),a=Du(n),l=Mi(n)==="y",u=["left","top"].includes(s)?-1:1,c=i&&l?-1:1,f=_u(t,e),{mainAxis:d,crossAxis:p,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(p=a==="end"?y*-1:y),l?{x:p*c,y:d*u}:{x:d*u,y:p*c}})}var ak=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return A(this,null,function*(){var r,o;let{x:i,y:s,placement:a,middlewareData:l}=n,u=yield Z_(n,e);return a===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:P(b({},u),{placement:a})}})}}},lk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return A(this,null,function*(){let{x:r,y:o,placement:i}=n,m=_u(e,n),{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x,y:w}=v;return{x,y:w}}}}=m,u=se(m,["mainAxis","crossAxis","limiter"]),c={x:r,y:o},f=yield Wv(n,u),d=Mi(Ko(i)),p=Bv(d),y=c[p],h=c[d];if(s){let v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",w=y+f[v],C=y-f[x];y=zv(w,y,C)}if(a){let v=d==="y"?"top":"left",x=d==="y"?"bottom":"right",w=h+f[v],C=h-f[x];h=zv(w,h,C)}let g=l.fn(P(b({},n),{[p]:y,[d]:h}));return P(b({},g),{data:{x:g.x-r,y:g.y-o,enabled:{[p]:s,[d]:a}}})})}}};function dk(e){let t=sn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Je(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=Mu(n)!==i||Mu(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function $v(e){return De(e)?e:e.contextElement}function ha(e){let t=$v(e);if(!Je(t))return Xn(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=dk(t),s=(i?Mu(n.width):n.width)/r,a=(i?Mu(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var J_=Xn(0);function fk(e){let t=Bt(e);return!fa()||!t.visualViewport?J_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bt(e)?!1:t}function _i(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),i=$v(e),s=Xn(1);t&&(r?De(r)&&(s=ha(r)):s=ha(e));let a=eD(i,n,r)?fk(i):Xn(0),l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,f=o.height/s.y;if(i){let d=Bt(i),p=r&&De(r)?Bt(r):r,y=d,h=xp(y);for(;h&&r&&p!==y;){let g=ha(h),m=h.getBoundingClientRect(),v=sn(h),x=m.left+(h.clientLeft+parseFloat(v.paddingLeft))*g.x,w=m.top+(h.clientTop+parseFloat(v.paddingTop))*g.y;l*=g.x,u*=g.y,c*=g.x,f*=g.y,l+=x,u+=w,y=Bt(h),h=xp(y)}}return Ni({width:c,height:f,x:l,y:u})}function qv(e,t){let n=Lu(e).scrollLeft;return t?t.left+n:_i(Gn(e)).left+n}function pk(e,t,n){n===void 0&&(n=!1);let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:qv(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function tD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=Gn(r),a=t?Iu(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=Xn(1),c=Xn(0),f=Je(r);if((f||!f&&!i)&&((wr(r)!=="body"||da(s))&&(l=Lu(r)),Je(r))){let p=_i(r);u=ha(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let d=s&&!f&&!i?pk(s,l,!0):Xn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+d.x,y:n.y*u.y-l.scrollTop*u.y+c.y+d.y}}function nD(e){return Array.from(e.getClientRects())}function rD(e){let t=Gn(e),n=Lu(e),r=e.ownerDocument.body,o=Xr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Xr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-n.scrollLeft+qv(e),a=-n.scrollTop;return sn(r).direction==="rtl"&&(s+=Xr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function oD(e,t){let n=Bt(e),r=Gn(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let u=fa();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function iD(e,t){let n=_i(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Je(e)?ha(e):Xn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function uk(e,t,n){let r;if(t==="viewport")r=oD(e,n);else if(t==="document")r=rD(Gn(e));else if(De(t))r=iD(t,n);else{let o=fk(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ni(r)}function mk(e,t){let n=qn(e);return n===t||!De(n)||Yn(n)?!1:sn(n).position==="fixed"||mk(n,t)}function sD(e,t){let n=t.get(e);if(n)return n;let r=gn(e,[],!1).filter(a=>De(a)&&wr(a)!=="body"),o=null,i=sn(e).position==="fixed",s=i?qn(e):e;for(;De(s)&&!Yn(s);){let a=sn(s),l=vp(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||da(s)&&!l&&mk(e,s))?r=r.filter(c=>c!==s):o=a,s=qn(s)}return t.set(e,r),r}function aD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?Iu(t)?[]:sD(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{let f=uk(t,c,o);return u.top=Xr(f.top,u.top),u.right=ma(f.right,u.right),u.bottom=ma(f.bottom,u.bottom),u.left=Xr(f.left,u.left),u},uk(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lD(e){let{width:t,height:n}=dk(e);return{width:t,height:n}}function uD(e,t,n){let r=Je(t),o=Gn(t),i=n==="fixed",s=_i(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=Xn(0);if(r||!r&&!i)if((wr(t)!=="body"||da(o))&&(a=Lu(t)),r){let d=_i(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&(l.x=qv(o));let u=o&&!r&&!i?pk(o,a):Xn(0),c=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:c,y:f,width:s.width,height:s.height}}function Kv(e){return sn(e).position==="static"}function ck(e,t){if(!Je(e)||sn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Gn(e)===n&&(n=n.ownerDocument.body),n}function gk(e,t){let n=Bt(e);if(Iu(e))return n;if(!Je(e)){let o=qn(e);for(;o&&!Yn(o);){if(De(o)&&!Kv(o))return o;o=qn(o)}return n}let r=ck(e,t);for(;r&&HC(r)&&Kv(r);)r=ck(r,t);return r&&Yn(r)&&Kv(r)&&!vp(r)?n:r||zC(e)||n}var cD=function(e){return A(this,null,function*(){let t=this.getOffsetParent||gk,n=this.getDimensions,r=yield n(e.floating);return{reference:uD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function dD(e){return sn(e).direction==="rtl"}var Gv={convertOffsetParentRelativeRectToViewportRelativeRect:tD,getDocumentElement:Gn,getClippingRect:aD,getOffsetParent:gk,getElementRects:cD,getClientRects:nD,getDimensions:lD,getScale:ha,isElement:De,isRTL:dD};function hk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fD(e,t){let n=null,r,o=Gn(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 u=e.getBoundingClientRect(),{left:c,top:f,width:d,height:p}=u;if(a||t(),!d||!p)return;let y=Nu(f),h=Nu(o.clientWidth-(c+d)),g=Nu(o.clientHeight-(f+p)),m=Nu(c),x={rootMargin:-y+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Xr(0,ma(1,l))||1},w=!0;function C(E){let k=E[0].intersectionRatio;if(k!==l){if(!w)return s();k?s(!1,k):r=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!hk(u,e.getBoundingClientRect())&&s(),w=!1}try{n=new IntersectionObserver(C,P(b({},x),{root:o.ownerDocument}))}catch(E){n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),i}function kp(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,u=$v(e),c=o||i?[...u?gn(u):[],...gn(t)]:[];c.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});let f=u&&a?fD(u,n):null,d=-1,p=null;s&&(p=new ResizeObserver(m=>{let[v]=m;v&&v.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let y,h=l?_i(e):null;l&&g();function g(){let m=_i(e);h&&!hk(h,m)&&n(),h=m,y=requestAnimationFrame(g)}return n(),()=>{var m;c.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),f==null||f(),(m=p)==null||m.disconnect(),p=null,l&&cancelAnimationFrame(y)}}var yk=ak;var vk=lk,xk=sk;var Rp=(e,t,n)=>{let r=new Map,o=b({platform:Gv},n),i=P(b({},o.platform),{_c:r});return ik(e,t,P(b({},o),{platform:i}))};var tt=S($(),1),Ip=S($(),1),bk=S($s(),1);var Pp=typeof document!="undefined"?Ip.useLayoutEffect:Ip.useEffect;function Ap(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(!Ap(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)&&!Ap(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ek(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wk(e,t){let n=Ek(e);return Math.round(t*n)/n}function Yv(e){let t=tt.useRef(e);return Pp(()=>{t.current=e}),t}function Tk(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:u}=e,[c,f]=tt.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=tt.useState(r);Ap(d,r)||p(r);let[y,h]=tt.useState(null),[g,m]=tt.useState(null),v=tt.useCallback(W=>{W!==E.current&&(E.current=W,h(W))},[]),x=tt.useCallback(W=>{W!==k.current&&(k.current=W,m(W))},[]),w=i||y,C=s||g,E=tt.useRef(null),k=tt.useRef(null),I=tt.useRef(c),L=l!=null,G=Yv(l),F=Yv(o),j=Yv(u),M=tt.useCallback(()=>{if(!E.current||!k.current)return;let W={placement:t,strategy:n,middleware:d};F.current&&(W.platform=F.current),Rp(E.current,k.current,W).then(B=>{let N=P(b({},B),{isPositioned:j.current!==!1});_.current&&!Ap(I.current,N)&&(I.current=N,bk.flushSync(()=>{f(N)}))})},[d,t,n,F,j]);Pp(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,f(W=>P(b({},W),{isPositioned:!1})))},[u]);let _=tt.useRef(!1);Pp(()=>(_.current=!0,()=>{_.current=!1}),[]),Pp(()=>{if(w&&(E.current=w),C&&(k.current=C),w&&C){if(G.current)return G.current(w,C,M);M()}},[w,C,M,G,L]);let X=tt.useMemo(()=>({reference:E,floating:k,setReference:v,setFloating:x}),[v,x]),te=tt.useMemo(()=>({reference:w,floating:C}),[w,C]),q=tt.useMemo(()=>{let W={position:n,left:0,top:0};if(!te.floating)return W;let B=wk(te.floating,c.x),N=wk(te.floating,c.y);return a?b(P(b({},W),{transform:"translate("+B+"px, "+N+"px)"}),Ek(te.floating)>=1.5&&{willChange:"transform"}):{position:n,left:B,top:N}},[n,a,te.floating,c.x,c.y]);return tt.useMemo(()=>P(b({},c),{update:M,refs:X,elements:te,floatingStyles:q}),[c,M,X,te,q])}var Lp=(e,t)=>P(b({},yk(e)),{options:[e,t]}),Xv=(e,t)=>P(b({},vk(e)),{options:[e,t]});var Qv=(e,t)=>P(b({},xk(e)),{options:[e,t]});function zu(e){return O.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}var Uk=b({},O),pD=Uk.useInsertionEffect,mD=pD||(e=>e());function Ln(e){let t=O.useRef(()=>{});return mD(()=>{t.current=e}),O.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 gD="ArrowUp",hD="ArrowDown",yD="ArrowLeft",vD="ArrowRight";var an=typeof document!="undefined"?ba.useLayoutEffect:ba.useEffect;var xD=[yD,vD],wD=[gD,hD],_U=[...xD,...wD];var Ck=!1,SD=0,kk=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+SD++;function bD(){let[e,t]=O.useState(()=>Ck?kk():void 0);return an(()=>{e==null&&t(kk())},[]),O.useEffect(()=>{Ck=!0},[]),e}var ED=Uk.useId,s0=ED||bD;function TD(){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 CD=O.createContext(null),kD=O.createContext(null),a0=()=>{var e;return((e=O.useContext(CD))==null?void 0:e.id)||null},_p=()=>O.useContext(kD);function Sa(e){return"data-floating-ui-"+e}function xa(e){let t=(0,ba.useRef)(e);return an(()=>{t.current=e}),t}var Rk=Sa("safe-polygon");function Zv(e,t,n){return n&&!pa(n)?0:typeof e=="number"?e:e==null?void 0:e[t]}function jk(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:u=null,mouseOnly:c=!1,restMs:f=0,move:d=!0}=t,p=_p(),y=a0(),h=xa(u),g=xa(l),m=xa(n),v=O.useRef(),x=O.useRef(-1),w=O.useRef(),C=O.useRef(-1),E=O.useRef(!0),k=O.useRef(!1),I=O.useRef(()=>{}),L=O.useRef(!1),G=O.useCallback(()=>{var q;let W=(q=o.current.openEvent)==null?void 0:q.type;return(W==null?void 0:W.includes("mouse"))&&W!=="mousedown"},[o]);O.useEffect(()=>{if(!a)return;function q(W){let{open:B}=W;B||(clearTimeout(x.current),clearTimeout(C.current),E.current=!0,L.current=!1)}return i.on("openchange",q),()=>{i.off("openchange",q)}},[a,i]),O.useEffect(()=>{if(!a||!h.current||!n)return;function q(B){G()&&r(!1,B,"hover")}let W=Lt(s.floating).documentElement;return W.addEventListener("mouseleave",q),()=>{W.removeEventListener("mouseleave",q)}},[s.floating,n,r,a,h,G]);let F=O.useCallback(function(q,W,B){W===void 0&&(W=!0),B===void 0&&(B="hover");let N=Zv(g.current,"close",v.current);N&&!w.current?(clearTimeout(x.current),x.current=window.setTimeout(()=>r(!1,q,B),N)):W&&(clearTimeout(x.current),r(!1,q,B))},[g,r]),j=Ln(()=>{I.current(),w.current=void 0}),M=Ln(()=>{if(k.current){let q=Lt(s.floating).body;q.style.pointerEvents="",q.removeAttribute(Rk),k.current=!1}}),_=Ln(()=>o.current.openEvent?["click","mousedown"].includes(o.current.openEvent.type):!1);O.useEffect(()=>{if(!a)return;function q(H){if(clearTimeout(x.current),E.current=!1,c&&!pa(v.current)||f>0&&!Zv(g.current,"open"))return;let ce=Zv(g.current,"open",v.current);ce?x.current=window.setTimeout(()=>{m.current||r(!0,H,"hover")},ce):n||r(!0,H,"hover")}function W(H){if(_())return;I.current();let ce=Lt(s.floating);if(clearTimeout(C.current),L.current=!1,h.current&&o.current.floatingContext){n||clearTimeout(x.current),w.current=h.current(P(b({},o.current.floatingContext),{tree:p,x:H.clientX,y:H.clientY,onClose(){M(),j(),_()||F(H,!0,"safe-polygon")}}));let me=w.current;ce.addEventListener("mousemove",me),I.current=()=>{ce.removeEventListener("mousemove",me)};return}(v.current==="touch"?!pt(s.floating,H.relatedTarget):!0)&&F(H)}function B(H){_()||o.current.floatingContext&&(h.current==null||h.current(P(b({},o.current.floatingContext),{tree:p,x:H.clientX,y:H.clientY,onClose(){M(),j(),_()||F(H)}}))(H))}if(De(s.domReference)){var N;let H=s.domReference;return n&&H.addEventListener("mouseleave",B),(N=s.floating)==null||N.addEventListener("mouseleave",B),d&&H.addEventListener("mousemove",q,{once:!0}),H.addEventListener("mouseenter",q),H.addEventListener("mouseleave",W),()=>{var ce;n&&H.removeEventListener("mouseleave",B),(ce=s.floating)==null||ce.removeEventListener("mouseleave",B),d&&H.removeEventListener("mousemove",q),H.removeEventListener("mouseenter",q),H.removeEventListener("mouseleave",W)}}},[s,a,e,c,f,d,F,j,M,r,n,m,p,g,h,o,_]),an(()=>{var q;if(a&&n&&(q=h.current)!=null&&q.__options.blockPointerEvents&&G()){k.current=!0;let B=s.floating;if(De(s.domReference)&&B){var W;let N=Lt(s.floating).body;N.setAttribute(Rk,"");let H=s.domReference,ce=p==null||(W=p.nodesRef.current.find(V=>V.id===y))==null||(W=W.context)==null?void 0:W.elements.floating;return ce&&(ce.style.pointerEvents=""),N.style.pointerEvents="none",H.style.pointerEvents="auto",B.style.pointerEvents="auto",()=>{N.style.pointerEvents="",H.style.pointerEvents="",B.style.pointerEvents=""}}}},[a,n,y,s,p,h,G]),an(()=>{n||(v.current=void 0,L.current=!1,j(),M())},[n,j,M]),O.useEffect(()=>()=>{j(),clearTimeout(x.current),clearTimeout(C.current),M()},[a,s.domReference,j,M]);let X=O.useMemo(()=>{function q(W){v.current=W.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(W){let{nativeEvent:B}=W;function N(){!E.current&&!m.current&&r(!0,B,"hover")}c&&!pa(v.current)||n||f===0||L.current&&Gm(W.movementX,2)+Gm(W.movementY,2)<2||(clearTimeout(C.current),v.current==="touch"?N():(L.current=!0,C.current=window.setTimeout(N,f)))}}},[c,r,n,m,f]),te=O.useMemo(()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(q){_()||F(q.nativeEvent,!1)}}),[F,_]);return O.useMemo(()=>a?{reference:X,floating:te}:{},[a,X,te])}var Pk=0;function ya(e,t){t===void 0&&(t={});let{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Pk);let i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():Pk=requestAnimationFrame(i)}function Ak(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 wa(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 va=new WeakMap,Op=new WeakSet,Mp={},Jv=0,RD=()=>typeof HTMLElement!="undefined"&&"inert"in HTMLElement.prototype,Vk=e=>e&&(e.host||Vk(e.parentNode)),PD=(e,t)=>t.map(n=>{if(e.contains(n))return n;let r=Vk(n);return e.contains(r)?r:null}).filter(n=>n!=null);function AD(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),u=[];Mp[o]||(Mp[o]=new WeakMap);let c=Mp[o];s.forEach(f),d(t),a.clear();function f(p){!p||a.has(p)||(a.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||l.has(p)||[].forEach.call(p.children,y=>{if(wr(y)!=="script")if(a.has(y))d(y);else{let h=i?y.getAttribute(i):null,g=h!==null&&h!=="false",m=va.get(y)||0,v=i?m+1:m,x=(c.get(y)||0)+1;va.set(y,v),c.set(y,x),u.push(y),v===1&&g&&Op.add(y),x===1&&y.setAttribute(o,""),!g&&i&&y.setAttribute(i,"true")}})}return Jv++,()=>{u.forEach(p=>{let y=va.get(p)||0,h=i?y-1:y,g=(c.get(p)||0)-1;va.set(p,h),c.set(p,g),h||(!Op.has(p)&&i&&p.removeAttribute(i),Op.delete(p)),g||p.removeAttribute(o)}),Jv--,Jv||(va=new WeakMap,va=new WeakMap,Op=new WeakSet,Mp={})}}function Ik(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);let r=Lt(e[0]).body;return AD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}var Dp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Wk(e,t){let n=Fu(e,Dp());t==="prev"&&n.reverse();let r=n.indexOf(Wo(Lt(e)));return n.slice(r+1)[0]}function Kk(){return Wk(document.body,"next")}function $k(){return Wk(document.body,"prev")}function Hu(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!pt(n,r)}function ID(e){Fu(e,Dp()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Lk(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 Fp={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},LD;function Ok(e){e.key==="Tab"&&(e.target,clearTimeout(LD))}var Np=O.forwardRef(function(t,n){let[r,o]=O.useState();an(()=>(WC()&&o("button"),document.addEventListener("keydown",Ok),()=>{document.removeEventListener("keydown",Ok)}),[]);let i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Sa("focus-guard")]:"",style:Fp};return(0,ln.jsx)("span",b(b({},t),i))}),qk=O.createContext(null),Mk=Sa("portal");function OD(e){e===void 0&&(e={});let{id:t,root:n}=e,r=s0(),o=Yk(),[i,s]=O.useState(null),a=O.useRef(null);return an(()=>()=>{i==null||i.remove(),queueMicrotask(()=>{a.current=null})},[i]),an(()=>{if(!r||a.current)return;let l=t?document.getElementById(t):null;if(!l)return;let u=document.createElement("div");u.id=r,u.setAttribute(Mk,""),l.appendChild(u),a.current=u,s(u)},[t,r]),an(()=>{if(n===null||!r||a.current)return;let l=n||(o==null?void 0:o.portalNode);l&&!De(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));let c=document.createElement("div");c.id=r,c.setAttribute(Mk,""),l=u||l,l.appendChild(c),a.current=c,s(c)},[t,n,r,o]),i}function Gk(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=OD({id:n,root:r}),[s,a]=O.useState(null),l=O.useRef(null),u=O.useRef(null),c=O.useRef(null),f=O.useRef(null),d=s==null?void 0:s.modal,p=s==null?void 0:s.open,y=!!s&&!s.modal&&s.open&&o&&!!(r||i);return O.useEffect(()=>{if(!i||!o||d)return;function h(g){i&&Hu(g)&&(g.type==="focusin"?Lk:ID)(i)}return i.addEventListener("focusin",h,!0),i.addEventListener("focusout",h,!0),()=>{i.removeEventListener("focusin",h,!0),i.removeEventListener("focusout",h,!0)}},[i,o,d]),O.useEffect(()=>{i&&(p||Lk(i))},[p,i]),(0,ln.jsxs)(qk.Provider,{value:O.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:c,afterInsideRef:f,portalNode:i,setFocusManagerState:a}),[o,i]),children:[y&&i&&(0,ln.jsx)(Np,{"data-type":"outside",ref:l,onFocus:h=>{if(Hu(h,i)){var g;(g=c.current)==null||g.focus()}else{let m=$k()||(s==null?void 0:s.domReference);m==null||m.focus()}}}),y&&i&&(0,ln.jsx)("span",{"aria-owns":i.id,style:Fp}),i&&i0.createPortal(t,i),y&&i&&(0,ln.jsx)(Np,{"data-type":"outside",ref:u,onFocus:h=>{if(Hu(h,i)){var g;(g=f.current)==null||g.focus()}else{let m=Kk()||(s==null?void 0:s.domReference);m==null||m.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,h.nativeEvent,"focus-out"))}}})]})}var Yk=()=>O.useContext(qk),o0="data-floating-ui-focusable";function Nk(e){return e?e.hasAttribute(o0)?e:e.querySelector("["+o0+"]")||e:null}var _k=20,Di=[];function e0(e){Di=Di.filter(t=>t.isConnected),e&&wr(e)!=="body"&&(Di.push(e),Di.length>_k&&(Di=Di.slice(-_k)))}function Dk(){return Di.slice().reverse().find(e=>e.isConnected)}function MD(e){let t=Dp();return rk(e,t)?e:Fu(e,t)[0]||e}var ND=O.forwardRef(function(t,n){return(0,ln.jsx)("button",P(b({},t),{type:"button",ref:n,tabIndex:-1,style:Fp}))});function Xk(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:u=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:f=!0,outsideElementsInert:d=!1}=e,{open:p,onOpenChange:y,events:h,dataRef:g,elements:{domReference:m,floating:v}}=t,x=Ln(()=>{var Q;return(Q=g.current.floatingContext)==null?void 0:Q.nodeId}),w=typeof s=="number"&&s<0,C=qC(m)&&w,E=RD(),k=E?i:!0,I=!k||E&&d,L=xa(o),G=xa(s),F=xa(a),j=_p(),M=Yk(),_=O.useRef(null),X=O.useRef(null),te=O.useRef(!1),q=O.useRef(!1),W=O.useRef(-1),B=M!=null,N=Nk(v),H=Ln(function(Q){return Q===void 0&&(Q=N),Q?Fu(Q,Dp()):[]}),ce=Ln(Q=>{let ie=H(Q);return L.current.map(oe=>m&&oe==="reference"?m:N&&oe==="floating"?N:ie).filter(Boolean).flat()});O.useEffect(()=>{if(r||!u)return;function Q(oe){if(oe.key==="Tab"){pt(N,Wo(Lt(N)))&&H().length===0&&!C&&Sp(oe);let ae=ce(),ye=Yr(oe);L.current[0]==="reference"&&ye===m&&(Sp(oe),oe.shiftKey?ya(ae[ae.length-1]):ya(ae[1])),L.current[1]==="floating"&&ye===N&&oe.shiftKey&&(Sp(oe),ya(ae[0]))}}let ie=Lt(N);return ie.addEventListener("keydown",Q),()=>{ie.removeEventListener("keydown",Q)}},[r,m,N,u,L,C,H,ce]),O.useEffect(()=>{if(r||!v)return;function Q(ie){let oe=Yr(ie),ye=H().indexOf(oe);ye!==-1&&(W.current=ye)}return v.addEventListener("focusin",Q),()=>{v.removeEventListener("focusin",Q)}},[r,v,H]),O.useEffect(()=>{if(r||!f)return;function Q(){q.current=!0,setTimeout(()=>{q.current=!1})}function ie(oe){let ae=oe.relatedTarget;queueMicrotask(()=>{let ye=x(),Ee=!(pt(m,ae)||pt(v,ae)||pt(ae,v)||pt(M==null?void 0:M.portalNode,ae)||ae!=null&&ae.hasAttribute(Sa("focus-guard"))||j&&(wa(j.nodesRef.current,ye).find(ze=>{var Nt,Ge;return pt((Nt=ze.context)==null?void 0:Nt.elements.floating,ae)||pt((Ge=ze.context)==null?void 0:Ge.elements.domReference,ae)})||Ak(j.nodesRef.current,ye).find(ze=>{var Nt,Ge,yn;return[(Nt=ze.context)==null?void 0:Nt.elements.floating,Nk((Ge=ze.context)==null?void 0:Ge.elements.floating)].includes(ae)||((yn=ze.context)==null?void 0:yn.elements.domReference)===ae})));if(l&&Ee&&Wo(Lt(N))===Lt(N).body){Je(N)&&N.focus();let ze=W.current,Nt=H(),Ge=Nt[ze]||Nt[Nt.length-1]||N;Je(Ge)&&Ge.focus()}(C||!u)&&ae&&Ee&&!q.current&&ae!==Dk()&&(te.current=!0,y(!1,oe,"focus-out"))})}if(v&&Je(m))return m.addEventListener("focusout",ie),m.addEventListener("pointerdown",Q),v.addEventListener("focusout",ie),()=>{m.removeEventListener("focusout",ie),m.removeEventListener("pointerdown",Q),v.removeEventListener("focusout",ie)}},[r,m,v,N,u,j,M,y,f,l,H,C,x]);let V=O.useRef(null),me=O.useRef(null),pe=zu([V,M==null?void 0:M.beforeInsideRef]),Se=zu([me,M==null?void 0:M.afterInsideRef]);O.useEffect(()=>{var Q;if(r||!v)return;let ie=Array.from((M==null||(Q=M.portalNode)==null?void 0:Q.querySelectorAll("["+Sa("portal")+"]"))||[]),oe=j&&!u?Ak(j==null?void 0:j.nodesRef.current,x()).map(Ee=>{var ze;return(ze=Ee.context)==null?void 0:ze.elements.floating}):[],ae=[v,...ie,...oe,_.current,X.current,V.current,me.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,L.current.includes("reference")||C?m:null].filter(Ee=>Ee!=null),ye=u||C?Ik(ae,!I,I):Ik(ae);return()=>{ye()}},[r,m,v,u,L,M,C,k,I,j,x]),an(()=>{if(r||!Je(N))return;let Q=Lt(N),ie=Wo(Q);queueMicrotask(()=>{let oe=ce(N),ae=G.current,ye=(typeof ae=="number"?oe[ae]:ae.current)||N,Ee=pt(N,ie);!w&&!Ee&&p&&ya(ye,{preventScroll:ye===N})})},[r,p,N,w,ce,G]),an(()=>{if(r||!N)return;let Q=!1,ie=Lt(N),oe=Wo(ie),ye=g.current.openEvent;e0(oe);function Ee(Ge){let{open:yn,reason:Ar,event:Ir,nested:ir}=Ge;yn&&(ye=Ir),Ar==="escape-key"&&m&&e0(m),["hover","safe-polygon"].includes(Ar)&&Ir.type==="mouseleave"&&(te.current=!0),Ar==="outside-press"&&(ir?(te.current=!1,Q=!0):te.current=!(jC(Ir)||VC(Ir)))}h.on("openchange",Ee);let ze=ie.createElement("span");ze.setAttribute("tabindex","-1"),ze.setAttribute("aria-hidden","true"),Object.assign(ze.style,Fp),B&&m&&m.insertAdjacentElement("afterend",ze);function Nt(){return typeof F.current=="boolean"?Dk()||ze:F.current.current||ze}return()=>{h.off("openchange",Ee);let Ge=Wo(ie),yn=pt(v,Ge)||j&&wa(j.nodesRef.current,x()).some(ir=>{var wc;return pt((wc=ir.context)==null?void 0:wc.elements.floating,Ge)});(yn||ye&&["click","mousedown"].includes(ye.type))&&m&&e0(m);let Ir=Nt();queueMicrotask(()=>{let ir=MD(Ir);F.current&&!te.current&&Je(ir)&&(!(ir!==Ge&&Ge!==ie.body)||yn)&&ir.focus({preventScroll:Q}),ze.remove()})}},[r,v,N,F,g,h,j,B,m,x]),O.useEffect(()=>{queueMicrotask(()=>{te.current=!1})},[r]),an(()=>{if(!r&&M)return M.setFocusManagerState({modal:u,closeOnFocusOut:f,open:p,onOpenChange:y,domReference:m}),()=>{M.setFocusManagerState(null)}},[r,M,u,p,y,f,m]),an(()=>{if(r||!N||typeof MutationObserver!="function"||w)return;let Q=()=>{let oe=N.getAttribute("tabindex"),ae=H(),ye=Wo(Lt(v)),Ee=ae.indexOf(ye);Ee!==-1&&(W.current=Ee),L.current.includes("floating")||ye!==m&&ae.length===0?oe!=="0"&&N.setAttribute("tabindex","0"):oe!=="-1"&&N.setAttribute("tabindex","-1")};Q();let ie=new MutationObserver(Q);return ie.observe(N,{childList:!0,subtree:!0,attributes:!0}),()=>{ie.disconnect()}},[r,v,N,m,L,H,w]);function fe(Q){return r||!c||!u?null:(0,ln.jsx)(ND,{ref:Q==="start"?_:X,onClick:ie=>y(!1,ie.nativeEvent),children:typeof c=="string"?c:"Dismiss"})}let ne=!r&&k&&(u?!C:!0)&&(B||u);return(0,ln.jsxs)(ln.Fragment,{children:[ne&&(0,ln.jsx)(Np,{"data-type":"inside",ref:pe,onFocus:Q=>{if(u){let oe=ce();ya(o[0]==="reference"?oe[0]:oe[oe.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(te.current=!1,Hu(Q,M.portalNode)){let oe=Kk()||m;oe==null||oe.focus()}else{var ie;(ie=M.beforeOutsideRef.current)==null||ie.focus()}}}),!C&&fe("start"),n,fe("end"),ne&&(0,ln.jsx)(Np,{"data-type":"inside",ref:Se,onFocus:Q=>{if(u)ya(ce()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(f&&(te.current=!0),Hu(Q,M.portalNode)){let oe=$k()||m;oe==null||oe.focus()}else{var ie;(ie=M.afterOutsideRef.current)==null||ie.focus()}}})]})}function Fk(e){return Je(e.target)&&e.target.tagName==="BUTTON"}function Hk(e){return Hv(e)}function Qk(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:u=!1,keyboardHandlers:c=!0,stickIfOpen:f=!0}=t,d=O.useRef(),p=O.useRef(!1),y=O.useMemo(()=>({onPointerDown(h){d.current=h.pointerType},onMouseDown(h){let g=d.current;h.button===0&&a!=="click"&&(pa(g,!0)&&u||(n&&l&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="mousedown")?r(!1,h.nativeEvent,"click"):(h.preventDefault(),r(!0,h.nativeEvent,"click"))))},onClick(h){let g=d.current;if(a==="mousedown"&&d.current){d.current=void 0;return}pa(g,!0)&&u||(n&&l&&(!(o.current.openEvent&&f)||o.current.openEvent.type==="click")?r(!1,h.nativeEvent,"click"):r(!0,h.nativeEvent,"click"))},onKeyDown(h){d.current=void 0,!(h.defaultPrevented||!c||Fk(h))&&(h.key===" "&&!Hk(i)&&(h.preventDefault(),p.current=!0),h.key==="Enter"&&r(!(n&&l),h.nativeEvent,"click"))},onKeyUp(h){h.defaultPrevented||!c||Fk(h)||Hk(i)||h.key===" "&&p.current&&(p.current=!1,r(!(n&&l),h.nativeEvent,"click"))}}),[o,i,a,u,c,r,n,f,l]);return O.useMemo(()=>s?{reference:y}:{},[s,y])}var _D={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},DD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},zk=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 Zk(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:u="pointerdown",referencePress:c=!1,referencePressEvent:f="pointerdown",ancestorScroll:d=!1,bubbles:p,capture:y}=t,h=_p(),g=Ln(typeof l=="function"?l:()=>!1),m=typeof l=="function"?g:l,v=O.useRef(!1),x=O.useRef(!1),{escapeKey:w,outsidePress:C}=zk(p),{escapeKey:E,outsidePress:k}=zk(y),I=O.useRef(!1),L=Ln(X=>{var te;if(!n||!s||!a||X.key!=="Escape"||I.current)return;let q=(te=i.current.floatingContext)==null?void 0:te.nodeId,W=h?wa(h.nodesRef.current,q):[];if(!w&&(X.stopPropagation(),W.length>0)){let B=!0;if(W.forEach(N=>{var H;if((H=N.context)!=null&&H.open&&!N.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}r(!1,KC(X)?X.nativeEvent:X,"escape-key")}),G=Ln(X=>{var te;let q=()=>{var W;L(X),(W=Yr(X))==null||W.removeEventListener("keydown",q)};(te=Yr(X))==null||te.addEventListener("keydown",q)}),F=Ln(X=>{var te;let q=v.current;v.current=!1;let W=x.current;if(x.current=!1,u==="click"&&W||q||typeof m=="function"&&!m(X))return;let B=Yr(X),N="["+Sa("inert")+"]",H=Lt(o.floating).querySelectorAll(N),ce=De(B)?B:null;for(;ce&&!Yn(ce);){let Se=qn(ce);if(Yn(Se)||!De(Se))break;ce=Se}if(H.length&&De(B)&&!$C(B)&&!pt(B,o.floating)&&Array.from(H).every(Se=>!pt(ce,Se)))return;if(Je(B)&&_){let Se=Yn(B),fe=sn(B),ne=/auto|scroll/,Q=Se||ne.test(fe.overflowX),ie=Se||ne.test(fe.overflowY),oe=Q&&B.clientWidth>0&&B.scrollWidth>B.clientWidth,ae=ie&&B.clientHeight>0&&B.scrollHeight>B.clientHeight,ye=fe.direction==="rtl",Ee=ae&&(ye?X.offsetX<=B.offsetWidth-B.clientWidth:X.offsetX>B.clientWidth),ze=oe&&X.offsetY>B.clientHeight;if(Ee||ze)return}let V=(te=i.current.floatingContext)==null?void 0:te.nodeId,me=h&&wa(h.nodesRef.current,V).some(Se=>{var fe;return wp(X,(fe=Se.context)==null?void 0:fe.elements.floating)});if(wp(X,o.floating)||wp(X,o.domReference)||me)return;let pe=h?wa(h.nodesRef.current,V):[];if(pe.length>0){let Se=!0;if(pe.forEach(fe=>{var ne;if((ne=fe.context)!=null&&ne.open&&!fe.context.dataRef.current.__outsidePressBubbles){Se=!1;return}}),!Se)return}r(!1,X,"outside-press")}),j=Ln(X=>{var te;let q=()=>{var W;F(X),(W=Yr(X))==null||W.removeEventListener(u,q)};(te=Yr(X))==null||te.addEventListener(u,q)});O.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=C;let X=-1;function te(H){r(!1,H,"ancestor-scroll")}function q(){window.clearTimeout(X),I.current=!0}function W(){X=window.setTimeout(()=>{I.current=!1},fa()?5:0)}let B=Lt(o.floating);a&&(B.addEventListener("keydown",E?G:L,E),B.addEventListener("compositionstart",q),B.addEventListener("compositionend",W)),m&&B.addEventListener(u,k?j:F,k);let N=[];return d&&(De(o.domReference)&&(N=gn(o.domReference)),De(o.floating)&&(N=N.concat(gn(o.floating))),!De(o.reference)&&o.reference&&o.reference.contextElement&&(N=N.concat(gn(o.reference.contextElement)))),N=N.filter(H=>{var ce;return H!==((ce=B.defaultView)==null?void 0:ce.visualViewport)}),N.forEach(H=>{H.addEventListener("scroll",te,{passive:!0})}),()=>{a&&(B.removeEventListener("keydown",E?G:L,E),B.removeEventListener("compositionstart",q),B.removeEventListener("compositionend",W)),m&&B.removeEventListener(u,k?j:F,k),N.forEach(H=>{H.removeEventListener("scroll",te)}),window.clearTimeout(X)}},[i,o,a,m,u,n,r,d,s,w,C,L,E,G,F,k,j]),O.useEffect(()=>{v.current=!1},[m,u]);let M=O.useMemo(()=>b({onKeyDown:L},c&&b({[_D[f]]:X=>{r(!1,X.nativeEvent,"reference-press")}},f!=="click"&&{onClick(X){r(!1,X.nativeEvent,"reference-press")}})),[L,r,c,f]),_=O.useMemo(()=>({onKeyDown:L,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[DD[u]]:()=>{v.current=!0}}),[L,u]);return O.useMemo(()=>s?{reference:M,floating:_}:{},[s,M,_])}function FD(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=s0(),i=O.useRef({}),[s]=O.useState(()=>TD()),a=a0()!=null,[l,u]=O.useState(r.reference),c=Ln((p,y,h)=>{i.current.openEvent=p?y:void 0,s.emit("openchange",{open:p,event:y,reason:h,nested:a}),n==null||n(p,y,h)}),f=O.useMemo(()=>({setPositionReference:u}),[]),d=O.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return O.useMemo(()=>({dataRef:i,open:t,onOpenChange:c,elements:d,events:s,floatingId:o,refs:f}),[t,c,d,s,o,f])}function Jk(e){e===void 0&&(e={});let{nodeId:t}=e,n=FD(P(b({},e),{elements:b({reference:null,floating:null},e.elements)})),r=e.rootContext||n,o=r.elements,[i,s]=O.useState(null),[a,l]=O.useState(null),c=(o==null?void 0:o.domReference)||i,f=O.useRef(null),d=_p();an(()=>{c&&(f.current=c)},[c]);let p=Tk(P(b({},e),{elements:b(b({},o),a&&{reference:a})})),y=O.useCallback(x=>{let w=De(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(w),p.refs.setReference(w)},[p.refs]),h=O.useCallback(x=>{(De(x)||x===null)&&(f.current=x,s(x)),(De(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!De(x))&&p.refs.setReference(x)},[p.refs]),g=O.useMemo(()=>P(b({},p.refs),{setReference:h,setPositionReference:y,domReference:f}),[p.refs,h,y]),m=O.useMemo(()=>P(b({},p.elements),{domReference:c}),[p.elements,c]),v=O.useMemo(()=>P(b(b({},p),r),{refs:g,elements:m,nodeId:t}),[p,g,m,t,r]);return an(()=>{r.dataRef.current.floatingContext=v;let x=d==null?void 0:d.nodesRef.current.find(w=>w.id===t);x&&(x.context=v)}),O.useMemo(()=>P(b({},p),{context:v,refs:g,elements:m}),[p,g,m,v])}var t0="active",n0="selected";function r0(e,t,n){let r=new Map,o=n==="item",i=e;if(o&&e){let s=e,{[t0]:a,[n0]:l}=s;i=se(s,[Ym(t0),Ym(n0)])}return b(b(b({},n==="floating"&&{tabIndex:-1,[o0]:""}),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(u=>{let[c,f]=u;if(!(o&&[t0,n0].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof f=="function"){var d;(d=r.get(c))==null||d.push(f),a[c]=function(){for(var p,y=arguments.length,h=new Array(y),g=0;g<y;g++)h[g]=arguments[g];return(p=r.get(c))==null?void 0:p.map(m=>m(...h)).find(m=>m!==void 0)}}}else a[c]=f}),a),{}))}function eR(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=O.useCallback(a=>r0(a,e,"reference"),t),i=O.useCallback(a=>r0(a,e,"floating"),n),s=O.useCallback(a=>r0(a,e,"item"),r);return O.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}var HD=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function tR(e,t){var n;t===void 0&&(t={});let{open:r,floatingId:o}=e,{enabled:i=!0,role:s="dialog"}=t,a=(n=HD.get(s))!=null?n:s,l=s0(),c=a0()!=null,f=O.useMemo(()=>a==="tooltip"||s==="label"?{["aria-"+(s==="label"?"labelledby":"describedby")]:r?o:void 0}:b(b(b(b(b({"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"&&c&&{role:"menuitem"}),s==="select"&&{"aria-autocomplete":"none"}),s==="combobox"&&{"aria-autocomplete":"list"}),[a,o,c,r,l,s]),d=O.useMemo(()=>{let y=b({id:o},a&&{role:a});return a==="tooltip"||s==="label"?y:b(b({},y),a==="menu"&&{"aria-labelledby":l})},[a,o,l,s]),p=O.useCallback(y=>{let{active:h,selected:g}=y,m=b({role:"option"},h&&{id:o+"-option"});switch(s){case"select":return P(b({},m),{"aria-selected":h&&g});case"combobox":return b(b({},m),h&&{"aria-selected":!0})}return{}},[o,s]);return O.useMemo(()=>i?{reference:f,floating:d,item:p}:{},[i,f,d,p])}function Bk(e,t){let[n,r]=e,o=!1,i=t.length;for(let s=0,a=i-1;s<i;a=s++){let[l,u]=t[s]||[0,0],[c,f]=t[a]||[0,0];u>=r!=f>=r&&n<=(c-l)*(r-u)/(f-u)+l&&(o=!o)}return o}function zD(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function nR(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 u(f,d){let p=performance.now(),y=p-l;if(s===null||a===null||y===0)return s=f,a=d,l=p,null;let h=f-s,g=d-a,v=Math.sqrt(h*h+g*g)/y;return s=f,a=d,l=p,v}let c=f=>{let{x:d,y:p,placement:y,elements:h,onClose:g,nodeId:m,tree:v}=f;return function(w){function C(){clearTimeout(o),g()}if(clearTimeout(o),!h.domReference||!h.floating||y==null||d==null||p==null)return;let{clientX:E,clientY:k}=w,I=[E,k],L=Yr(w),G=w.type==="mouseleave",F=pt(h.floating,L),j=pt(h.domReference,L),M=h.domReference.getBoundingClientRect(),_=h.floating.getBoundingClientRect(),X=y.split("-")[0],te=d>_.right-_.width/2,q=p>_.bottom-_.height/2,W=zD(I,M),B=_.width>M.width,N=_.height>M.height,H=(B?M:_).left,ce=(B?M:_).right,V=(N?M:_).top,me=(N?M:_).bottom;if(F&&(i=!0,!G))return;if(j&&(i=!1),j&&!G){i=!0;return}if(G&&De(w.relatedTarget)&&pt(h.floating,w.relatedTarget)||v&&wa(v.nodesRef.current,m).some(fe=>{let{context:ne}=fe;return ne==null?void 0:ne.open}))return;if(X==="top"&&p>=M.bottom-1||X==="bottom"&&p<=M.top+1||X==="left"&&d>=M.right-1||X==="right"&&d<=M.left+1)return C();let pe=[];switch(X){case"top":pe=[[H,M.top+1],[H,_.bottom-1],[ce,_.bottom-1],[ce,M.top+1]];break;case"bottom":pe=[[H,_.top+1],[H,M.bottom-1],[ce,M.bottom-1],[ce,_.top+1]];break;case"left":pe=[[_.right-1,me],[_.right-1,V],[M.left+1,V],[M.left+1,me]];break;case"right":pe=[[M.right-1,me],[M.right-1,V],[_.left+1,V],[_.left+1,me]];break}function Se(fe){let[ne,Q]=fe;switch(X){case"top":{let ie=[B?ne+t/2:te?ne+t*4:ne-t*4,Q+t+1],oe=[B?ne-t/2:te?ne+t*4:ne-t*4,Q+t+1],ae=[[_.left,te||B?_.bottom-t:_.top],[_.right,te?B?_.bottom-t:_.top:_.bottom-t]];return[ie,oe,...ae]}case"bottom":{let ie=[B?ne+t/2:te?ne+t*4:ne-t*4,Q-t],oe=[B?ne-t/2:te?ne+t*4:ne-t*4,Q-t],ae=[[_.left,te||B?_.top+t:_.bottom],[_.right,te?B?_.top+t:_.bottom:_.top+t]];return[ie,oe,...ae]}case"left":{let ie=[ne+t+1,N?Q+t/2:q?Q+t*4:Q-t*4],oe=[ne+t+1,N?Q-t/2:q?Q+t*4:Q-t*4];return[...[[q||N?_.right-t:_.left,_.top],[q?N?_.right-t:_.left:_.right-t,_.bottom]],ie,oe]}case"right":{let ie=[ne-t,N?Q+t/2:q?Q+t*4:Q-t*4],oe=[ne-t,N?Q-t/2:q?Q+t*4:Q-t*4],ae=[[q||N?_.left+t:_.right,_.top],[q?N?_.left+t:_.right:_.left+t,_.bottom]];return[ie,oe,...ae]}}}if(!Bk([E,k],pe)){if(i&&!W)return C();if(!G&&r){let fe=u(w.clientX,w.clientY);if(fe!==null&&fe<.1)return C()}Bk([E,k],Se([d,p]))?!i&&r&&(o=window.setTimeout(C,40)):C()}}};return c.__options={blockPointerEvents:n},c}var Hp={tooltip:"dd-XpCXd",tooltipTrigger:"dd-8TKeF",arrow:"dd-ZEu2Y"};var On=S(R());function BD({initialOpen:e=!1,placement:t="bottom",modal:n,tooltip:r,open:o,onOpenChange:i}={}){let[s,a]=Sr.useState(e),l=o!=null?o:s,u=i!=null?i:a,c=Jk({placement:t,open:l,onOpenChange:u,whileElementsMounted:kp,middleware:[Lp(5),Qv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),Xv({padding:10})]}),f=c.context,d=Qk(f,{enabled:o==null}),p=Zk(f),y=tR(f),h=jk(f,{enabled:r!=null?r:!1,handleClose:nR()}),g=eR([d,p,y,h]);return Sr.useMemo(()=>P(b(b({open:l,setOpen:u},g),c),{modal:n}),[l,u,g,c,n])}var rR=Sr.createContext(null),l0=()=>{let e=Sr.useContext(rR);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},Fi=r=>{var o=r,{children:e,modal:t=!1}=o,n=se(o,["children","modal"]);let i=BD(b({modal:t},n));return(0,On.jsx)(rR.Provider,{value:i,children:e})};function UD(r){var o=r,{as:e,children:t}=o,n=se(o,["as","children"]);let i=l0(),s=e||"button",a=t.ref,l=zu([i.refs.setReference,a]);return(0,On.jsx)(s,P(b({ref:l,type:"button"},i.getReferenceProps(n)),{children:t}))}var jD=Sr.forwardRef(function(o,r){var i=o,{style:t}=i,n=se(i,["style"]);let u=l0(),{context:s}=u,a=se(u,["context"]),l=zu([a.refs.setFloating,r]);return s.open?(0,On.jsx)(Gk,{children:(0,On.jsx)(Xk,{context:s,modal:a.modal,children:(0,On.jsx)("div",P(b({ref:l,style:b(P(b({},a.floatingStyles),{zIndex:1e7}),t)},a.getFloatingProps(n)),{children:n.children}))})}):null});function VD(o){var i=o,{as:e,children:t,onClick:n}=i,r=se(i,["as","children","onClick"]);let{setOpen:s}=l0();return(0,On.jsx)(e||"button",P(b({type:"button",onClick:u=>{n(u),s(!1),u.stopPropagation()}},r),{children:t}))}function oR({trigger:e,children:t,placement:n="top"}){return(0,On.jsxs)(Fi,{tooltip:!0,placement:n,children:[(0,On.jsxs)(Fi.Content,{className:Hp.tooltip,children:[t,(0,On.jsx)("div",{className:Hp.arrow})]}),(0,On.jsx)(Fi.Trigger,{className:Hp.tooltipTrigger,children:e})]})}Fi.Trigger=UD;Fi.Content=jD;Fi.Button=VD;var mt=Fi;var Ut=S(R()),WD=3,KD=90,iR=({children:e})=>{let t=D("CommandPalette",mn);return(0,Ut.jsx)("div",{className:t.listItemActions,children:e})};function u0(p){var y=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:i,onSourceClick:s,description:a,sources:l,id:u,styles:c,defaultSourcesAmount:f=WD}=y,d=se(y,["closeOnSelect","lineClamp","tooltip","children","onClick","extra","onSourceClick","description","sources","id","styles","defaultSourcesAmount"]);var I;let h=ue($r),[g,m]=(0,Uu.useState)(!1),{selected:v,onChangeOpen:x}=Vo(),[w,C]=(0,Uu.useState)(!1),E=D("CommandPalette",mn);function k(L){o(L),e&&x(!1)}return(0,Uu.useEffect)(()=>{C(v===u)},[v]),(0,Ut.jsxs)("div",{className:(0,Bu.default)(E.listItem,u===v&&E.listItemSelected),children:[(0,Ut.jsxs)(mt,{placement:"right-start",tooltip:!0,onOpenChange:C,open:w,children:[(0,Ut.jsx)(mt.Trigger,P(b({className:E.listItemAction,"aria-disabled":(I=d.disabled)!=null?I:!1,onClick:k,"data-command-palette-item":!0,"data-item-id":u},d),{children:(0,Ut.jsxs)("div",{className:E.listItemContent,children:[typeof r=="string"?(0,Ut.jsx)("p",{className:(0,Bu.default)(E.listItemText,E.truncate,c==null?void 0:c.title),children:r}):r,a&&typeof a=="string"?(0,Ut.jsx)(Oi,{tagName:"p",allowList:[],content:mp(a)?MC(a):a,className:(0,Bu.default)(E.listItemDescription,c==null?void 0:c.description,t?E.lineClamp:E.truncate)}):a]})})),n&&n.toString().length>KD&&(0,Ut.jsx)(mt.Content,{className:E.listItemTooltip,children:(0,Ut.jsx)(Oi,{className:E.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p"],tagName:"div",content:n})})]}),u===v&&i,l&&l.length>0&&(0,Ut.jsxs)("div",{className:E.sources,children:[(0,Ut.jsx)("span",{className:E.sourcesTitle,children:h("sources")}),l.slice(0,g?l.length:f).map(L=>(0,Ut.jsx)("a",{className:E.source,href:L.url,target:"_blank",title:L.url,rel:"noopener noreferrer","data-testid":"source",onClick:()=>s==null?void 0:s(L),children:L.name},L.url)),!g&&l.length>f&&(0,Ut.jsx)("button",{className:(0,Bu.default)(E.source,E.sourceShowMore),type:"button",onClick:()=>m(!0),children:h("showMore",{amount:l.length-f})})]})]})}var ju=S(R()),sR=()=>(0,ju.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,ju.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,ju.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 Hi=S(R());function c0({children:e,title:t,id:n,onDismiss:r}){let o=ue($r),i=D("CommandPalette",mn),{page:s}=Vo();return s!==n?null:(0,Hi.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Hi.jsxs)("div",{className:i.pageNav,children:[(0,Hi.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,Hi.jsx)(sR,{}),o("back")]}),t&&(0,Hi.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var aR=S($());var Vu=S(R()),Ea=()=>(0,Vu.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Vu.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Vu.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 Qn=S(R());function $D({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=D("CommandPalette",mn);return(0,Qn.jsxs)("div",{className:l.search,children:[(0,Qn.jsx)("div",{className:l.searchIcon,children:(0,Qn.jsx)(Ea,{})}),(0,Qn.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Qn.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,Qn.jsx)("div",{className:l.selectWrapper,children:(0,Qn.jsxs)("select",{"data-testid":"command-palette-type-select",className:l.select,onChange:u=>t(u.target.value===r?void 0:u.target.value),value:s||r,children:[r&&(0,Qn.jsx)("option",{children:r}),o.map(u=>(0,Qn.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var lR=(0,aR.forwardRef)($D);var d0=S(Fe());var zp=S(R()),qD=o=>{var i=o,{onClick:e,shortKeys:t,children:n}=i,r=se(i,["onClick","shortKeys","children"]);let s=D("CommandPalette",mn);return(0,zp.jsxs)("button",P(b({type:"button"},r),{onClick:e,className:(0,d0.default)(s.actionButton,r.className,{[s.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,zp.jsx)("span",{className:(0,d0.default)(s.actionShortcut,a===8629&&s.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},uR=qD;var Wu=S(R()),GD="[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:u,children:c,isOpen:f,search:d,updateDeps:p=[]}){let[y,h]=(0,Qr.useState)(),g=(0,Qr.useRef)(null),m=()=>{o&&o(n),s(void 0),i(""),a(!1)},v=()=>{var F;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(F=g.current)==null||F.focus();return}if(d.length>0){i("");return}a(!1)},x=()=>{let F=w();F.length!==0&&h(F[0].dataset.itemId)},w=()=>Array.from(document.querySelectorAll(GD)||[]),C=F=>document.querySelector(`[data-item-id=${F}]`),E=F=>{let j=C(F);j&&h(j.dataset.itemId)},k=F=>{let j=C(F);j&&j.scrollIntoView({behavior:"smooth"})},I=()=>{if(!y)return;let F=w(),j=C(y);if(!j)return;let M=F.indexOf(j),_=F[M+1];_!=null&&_.dataset.itemId?E(_.dataset.itemId):x()},L=()=>{if(!y)return;let F=w(),j=C(y);if(!j)return;let M=F.indexOf(j),_=F[M-1];_!=null&&_.dataset.itemId?E(_.dataset.itemId):E(F[F.length-1].dataset.itemId)},G=(0,Qr.useCallback)(F=>{switch(F.key){case"ArrowDown":{F.preventDefault(),I();break}case"ArrowUp":{F.preventDefault(),L();break}case"Enter":{if(y){let j=C(y);j==null||j.click()}break}}},[y]);return(0,Qr.useEffect)(()=>{x()},[d,r,l,f,...p]),(0,Qr.useEffect)(()=>{y&&k(y)},[y]),(0,Wu.jsx)(tp,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:v,onClose:m,onKeyDown:G,children:(0,Wu.jsxs)(_C,{selected:y,setSelected:h,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,Wu.jsx)(lR,{ref:g,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}zi.Page=c0;zi.List=kv;zi.Image=EC;zi.ListItem=u0;zi.ListItemActions=iR;zi.Button=uR;var qe=zi;var cR=S($());function dR(e,t){(0,cR.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 Ku=S($());var fR={data:null,fetchState:"idle"},YD=e=>{var t;return(t=e.entities.data)!=null?t:null},Bp=Un([YD,aa,LT],(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}),Zn=ge("entities/getEntities",(e,t)=>A(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)})),XD=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),QD=Ce({name:"entities",initialState:fR,reducers:{},extraReducers:e=>{e.addCase(Zn.pending,t=>{t.fetchState="loading"}).addCase(Zn.rejected,t=>{t.fetchState="error"}).addCase(Zn.fulfilled,(t,n)=>{t.fetchState="done",t.data=XD(t.data?[...t.data,...n.payload]:n.payload)}).addCase(it,()=>fR)}}),pR=QD.reducer;var f0={};bt(f0,{enUS:()=>ZD,nlNL:()=>JD});var ZD={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},JD={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var mR={root:"dd-TYTKs",empty:"dd-AU7uT"};var Ta=S(R()),e3=({onCopy:e})=>{let t=(0,Ku.useRef)(null),n=D("EntitiesList",mR),r=K(Bp),{setSelected:o}=Vo(),i=ue(f0),s=he();return(0,Ku.useEffect)(()=>{s(Zn())},[]),(0,Ku.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,Ta.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,Ta.jsx)(qe.List,{children:r.map((a,l)=>(0,Ta.jsx)(qe.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,Ta.jsx)("p",{className:n.empty,children:i("noResults")})]})},gR=e3;var qi=S($());var Ca=S($());function Zr(e,t){let n=(0,Ca.useRef)(e);n.current=e;let[r,o]=(0,Ca.useState)(void 0),[i,s]=(0,Ca.useState)(void 0),[a,l]=(0,Ca.useState)("idle"),u=he();return{error:i,state:a,data:r,call:d=>A(this,null,function*(){l("loading"),yield u(n.current(d)).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 Up=S(Fe()),xR=S($());var p0=S(R()),m0=e=>(0,p0.jsx)("svg",P(b({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,p0.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 g0=S(R()),hR=e=>(0,g0.jsx)("svg",P(b({width:"16",height:"16",fill:"#000000"},e),{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,g0.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 ka(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 h0={};bt(h0,{enUS:()=>t3,nlNL:()=>n3});var t3={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]},n3={thumbsUp:[{type:0,value:"Thumbs up"}],thumbsDown:[{type:0,value:"Thumbs down"}]};function yR(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(b({conversationId:r},o),{data:t.data}))})(e)}function at(){let e=he();return(t,n)=>A(this,null,function*(){yield e(yR({name:t,data:n}))})}var vR={thumbs:"dd-5F1zq",fadeup:"dd-eTmY-",fadedown:"dd-sS85z",selected:"dd-rid-f",thumbsUp:"dd-4poEf",thumbsDown:"dd-3KozS"};var Ra=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 Jr=S(R()),r3=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=D("FeedbackThumbs",vR),i=J("enableFeedbackForm"),s=K(yr),a=K(Ra(`/admin/feedback?conversationId=${s}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=ue(h0),u=at(),[c,f]=(0,xR.useState)(null),d=y=>{y.stopPropagation(),ka(y.target,o.fadeup),f("up"),u(e,P(b({},t),{rating:"up"}))},p=y=>{y.stopPropagation(),ka(y.target,o.fadedown),f("down"),u(e,P(b({},t),{rating:"down"}))};return(0,Jr.jsxs)("div",{className:o.thumbs,children:[(0,Jr.jsx)(be.Button,{title:l("thumbsUp"),onClick:d,icon:(0,Jr.jsx)(hR,{}),className:(0,Up.default)(o.thumbsUp,c==="up"&&o.selected),disabled:!!c}),i&&a?(0,Jr.jsx)(be.Button,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:p,icon:(0,Jr.jsx)(m0,{}),className:(0,Up.default)(o.thumbsDown,c==="down"&&o.selected),disabled:!!c}):(0,Jr.jsx)(be.Button,{title:l("thumbsDown"),onClick:p,icon:(0,Jr.jsx)(m0,{}),className:(0,Up.default)(o.thumbsDown,c==="down"&&o.selected),disabled:!!c})]})},Bi=r3;var $u=S(R()),wR=()=>(0,$u.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,$u.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,$u.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 y0={};bt(y0,{enUS:()=>o3,nlNL:()=>i3});var o3={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"}]},i3={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 SR={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:LR,setPrototypeOf:bR,isFrozen:s3,getPrototypeOf:a3,getOwnPropertyDescriptor:l3}=Object,{freeze:Vt,seal:Mn,create:OR}=Object,{apply:E0,construct:T0}=typeof Reflect!="undefined"&&Reflect;Vt||(Vt=function(t){return t});Mn||(Mn=function(t){return t});E0||(E0=function(t,n,r){return t.apply(n,r)});T0||(T0=function(t,n){return new t(...n)});var jp=Wt(Array.prototype.forEach),u3=Wt(Array.prototype.lastIndexOf),ER=Wt(Array.prototype.pop),qu=Wt(Array.prototype.push),c3=Wt(Array.prototype.splice),Wp=Wt(String.prototype.toLowerCase),v0=Wt(String.prototype.toString),TR=Wt(String.prototype.match),Gu=Wt(String.prototype.replace),d3=Wt(String.prototype.indexOf),f3=Wt(String.prototype.trim),Jn=Wt(Object.prototype.hasOwnProperty),jt=Wt(RegExp.prototype.test),Yu=p3(TypeError);function Wt(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return E0(e,t,r)}}function p3(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return T0(e,n)}}function ve(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wp;bR&&bR(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(s3(t)||(t[r]=i),o=i)}e[o]=!0}return e}function m3(e){for(let t=0;t<e.length;t++)Jn(e,t)||(e[t]=null);return e}function Ui(e){let t=OR(null);for(let[n,r]of LR(e))Jn(e,n)&&(Array.isArray(r)?t[n]=m3(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Ui(r):t[n]=r);return t}function Xu(e,t){for(;e!==null;){let r=l3(e,t);if(r){if(r.get)return Wt(r.get);if(typeof r.value=="function")return Wt(r.value)}e=a3(e)}function n(){return null}return n}var CR=Vt(["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"]),x0=Vt(["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"]),w0=Vt(["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"]),g3=Vt(["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"]),S0=Vt(["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"]),h3=Vt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kR=Vt(["#text"]),RR=Vt(["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"]),b0=Vt(["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"]),PR=Vt(["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"]),Vp=Vt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),y3=Mn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),v3=Mn(/<%[\w\W]*|[\w\W]*%>/gm),x3=Mn(/\$\{[\w\W]*/gm),w3=Mn(/^data-[\-\w.\u00B7-\uFFFF]+$/),S3=Mn(/^aria-[\-\w]+$/),MR=Mn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),b3=Mn(/^(?:\w+script|data):/i),E3=Mn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),NR=Mn(/^html$/i),T3=Mn(/^[a-z][.\w]*(-[.\w]+)+$/i),AR=Object.freeze({__proto__:null,ARIA_ATTR:S3,ATTR_WHITESPACE:E3,CUSTOM_ELEMENT:T3,DATA_ATTR:w3,DOCTYPE_NAME:NR,ERB_EXPR:v3,IS_ALLOWED_URI:MR,IS_SCRIPT_OR_DATA:b3,MUSTACHE_EXPR:y3,TMPLIT_EXPR:x3}),Qu={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},k3=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}},IR=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function _R(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:C3(),t=re=>_R(re);if(t.version="3.2.4",t.removed=[],!e||!e.document||e.document.nodeType!==Qu.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:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:p}=e,y=l.prototype,h=Xu(y,"cloneNode"),g=Xu(y,"remove"),m=Xu(y,"nextSibling"),v=Xu(y,"childNodes"),x=Xu(y,"parentNode");if(typeof s=="function"){let re=n.createElement("template");re.content&&re.content.ownerDocument&&(n=re.content.ownerDocument)}let w,C="",{implementation:E,createNodeIterator:k,createDocumentFragment:I,getElementsByTagName:L}=n,{importNode:G}=r,F=IR();t.isSupported=typeof LR=="function"&&typeof x=="function"&&E&&E.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:j,ERB_EXPR:M,TMPLIT_EXPR:_,DATA_ATTR:X,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:W,CUSTOM_ELEMENT:B}=AR,{IS_ALLOWED_URI:N}=AR,H=null,ce=ve({},[...CR,...x0,...w0,...S0,...kR]),V=null,me=ve({},[...RR,...b0,...PR,...Vp]),pe=Object.seal(OR(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,fe=null,ne=!0,Q=!0,ie=!1,oe=!0,ae=!1,ye=!0,Ee=!1,ze=!1,Nt=!1,Ge=!1,yn=!1,Ar=!1,Ir=!0,ir=!1,wc="user-content-",Bm=!0,Wa=!1,is={},ss=null,Ex=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"]),Tx=null,Cx=ve({},["audio","video","img","source","image","track"]),Um=null,kx=ve({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Sc="http://www.w3.org/1998/Math/MathML",bc="http://www.w3.org/2000/svg",Lr="http://www.w3.org/1999/xhtml",as=Lr,jm=!1,Vm=null,II=ve({},[Sc,bc,Lr],v0),Ec=ve({},["mi","mo","mn","ms","mtext"]),Tc=ve({},["annotation-xml"]),LI=ve({},["title","style","font","a","script"]),Ka=null,OI=["application/xhtml+xml","text/html"],MI="text/html",ct=null,ls=null,NI=n.createElement("form"),Rx=function(T){return T instanceof RegExp||T instanceof Function},Wm=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ls&&ls===T)){if((!T||typeof T!="object")&&(T={}),T=Ui(T),Ka=OI.indexOf(T.PARSER_MEDIA_TYPE)===-1?MI:T.PARSER_MEDIA_TYPE,ct=Ka==="application/xhtml+xml"?v0:Wp,H=Jn(T,"ALLOWED_TAGS")?ve({},T.ALLOWED_TAGS,ct):ce,V=Jn(T,"ALLOWED_ATTR")?ve({},T.ALLOWED_ATTR,ct):me,Vm=Jn(T,"ALLOWED_NAMESPACES")?ve({},T.ALLOWED_NAMESPACES,v0):II,Um=Jn(T,"ADD_URI_SAFE_ATTR")?ve(Ui(kx),T.ADD_URI_SAFE_ATTR,ct):kx,Tx=Jn(T,"ADD_DATA_URI_TAGS")?ve(Ui(Cx),T.ADD_DATA_URI_TAGS,ct):Cx,ss=Jn(T,"FORBID_CONTENTS")?ve({},T.FORBID_CONTENTS,ct):Ex,Se=Jn(T,"FORBID_TAGS")?ve({},T.FORBID_TAGS,ct):{},fe=Jn(T,"FORBID_ATTR")?ve({},T.FORBID_ATTR,ct):{},is=Jn(T,"USE_PROFILES")?T.USE_PROFILES:!1,ne=T.ALLOW_ARIA_ATTR!==!1,Q=T.ALLOW_DATA_ATTR!==!1,ie=T.ALLOW_UNKNOWN_PROTOCOLS||!1,oe=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=T.SAFE_FOR_TEMPLATES||!1,ye=T.SAFE_FOR_XML!==!1,Ee=T.WHOLE_DOCUMENT||!1,Ge=T.RETURN_DOM||!1,yn=T.RETURN_DOM_FRAGMENT||!1,Ar=T.RETURN_TRUSTED_TYPE||!1,Nt=T.FORCE_BODY||!1,Ir=T.SANITIZE_DOM!==!1,ir=T.SANITIZE_NAMED_PROPS||!1,Bm=T.KEEP_CONTENT!==!1,Wa=T.IN_PLACE||!1,N=T.ALLOWED_URI_REGEXP||MR,as=T.NAMESPACE||Lr,Ec=T.MATHML_TEXT_INTEGRATION_POINTS||Ec,Tc=T.HTML_INTEGRATION_POINTS||Tc,pe=T.CUSTOM_ELEMENT_HANDLING||{},T.CUSTOM_ELEMENT_HANDLING&&Rx(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(pe.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&Rx(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(pe.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(Q=!1),yn&&(Ge=!0),is&&(H=ve({},kR),V=[],is.html===!0&&(ve(H,CR),ve(V,RR)),is.svg===!0&&(ve(H,x0),ve(V,b0),ve(V,Vp)),is.svgFilters===!0&&(ve(H,w0),ve(V,b0),ve(V,Vp)),is.mathMl===!0&&(ve(H,S0),ve(V,PR),ve(V,Vp))),T.ADD_TAGS&&(H===ce&&(H=Ui(H)),ve(H,T.ADD_TAGS,ct)),T.ADD_ATTR&&(V===me&&(V=Ui(V)),ve(V,T.ADD_ATTR,ct)),T.ADD_URI_SAFE_ATTR&&ve(Um,T.ADD_URI_SAFE_ATTR,ct),T.FORBID_CONTENTS&&(ss===Ex&&(ss=Ui(ss)),ve(ss,T.FORBID_CONTENTS,ct)),Bm&&(H["#text"]=!0),Ee&&ve(H,["html","head","body"]),H.table&&(ve(H,["tbody"]),delete Se.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Yu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Yu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=T.TRUSTED_TYPES_POLICY,C=w.createHTML("")}else w===void 0&&(w=k3(p,o)),w!==null&&typeof C=="string"&&(C=w.createHTML(""));Vt&&Vt(T),ls=T}},Px=ve({},[...x0,...w0,...g3]),Ax=ve({},[...S0,...h3]),_I=function(T){let z=x(T);(!z||!z.tagName)&&(z={namespaceURI:as,tagName:"template"});let Z=Wp(T.tagName),je=Wp(z.tagName);return Vm[T.namespaceURI]?T.namespaceURI===bc?z.namespaceURI===Lr?Z==="svg":z.namespaceURI===Sc?Z==="svg"&&(je==="annotation-xml"||Ec[je]):!!Px[Z]:T.namespaceURI===Sc?z.namespaceURI===Lr?Z==="math":z.namespaceURI===bc?Z==="math"&&Tc[je]:!!Ax[Z]:T.namespaceURI===Lr?z.namespaceURI===bc&&!Tc[je]||z.namespaceURI===Sc&&!Ec[je]?!1:!Ax[Z]&&(LI[Z]||!Px[Z]):!!(Ka==="application/xhtml+xml"&&Vm[T.namespaceURI]):!1},sr=function(T){qu(t.removed,{element:T});try{x(T).removeChild(T)}catch(z){g(T)}},Cc=function(T,z){try{qu(t.removed,{attribute:z.getAttributeNode(T),from:z})}catch(Z){qu(t.removed,{attribute:null,from:z})}if(z.removeAttribute(T),T==="is")if(Ge||yn)try{sr(z)}catch(Z){}else try{z.setAttribute(T,"")}catch(Z){}},Ix=function(T){let z=null,Z=null;if(Nt)T="<remove></remove>"+T;else{let gt=TR(T,/^[\r\n\t ]+/);Z=gt&&gt[0]}Ka==="application/xhtml+xml"&&as===Lr&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let je=w?w.createHTML(T):T;if(as===Lr)try{z=new d().parseFromString(je,Ka)}catch(gt){}if(!z||!z.documentElement){z=E.createDocument(as,"template",null);try{z.documentElement.innerHTML=jm?C:je}catch(gt){}}let St=z.body||z.documentElement;return T&&Z&&St.insertBefore(n.createTextNode(Z),St.childNodes[0]||null),as===Lr?L.call(z,Ee?"html":"body")[0]:Ee?z.documentElement:St},Lx=function(T){return k.call(T.ownerDocument||T,T,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Km=function(T){return T instanceof f&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof c)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},Ox=function(T){return typeof a=="function"&&T instanceof a};function Or(re,T,z){jp(re,Z=>{Z.call(t,T,z,ls)})}let Mx=function(T){let z=null;if(Or(F.beforeSanitizeElements,T,null),Km(T))return sr(T),!0;let Z=ct(T.nodeName);if(Or(F.uponSanitizeElement,T,{tagName:Z,allowedTags:H}),T.hasChildNodes()&&!Ox(T.firstElementChild)&&jt(/<[/\w]/g,T.innerHTML)&&jt(/<[/\w]/g,T.textContent)||T.nodeType===Qu.progressingInstruction||ye&&T.nodeType===Qu.comment&&jt(/<[/\w]/g,T.data))return sr(T),!0;if(!H[Z]||Se[Z]){if(!Se[Z]&&_x(Z)&&(pe.tagNameCheck instanceof RegExp&&jt(pe.tagNameCheck,Z)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(Z)))return!1;if(Bm&&!ss[Z]){let je=x(T)||T.parentNode,St=v(T)||T.childNodes;if(St&&je){let gt=St.length;for(let Yt=gt-1;Yt>=0;--Yt){let ar=h(St[Yt],!0);ar.__removalCount=(T.__removalCount||0)+1,je.insertBefore(ar,m(T))}}}return sr(T),!0}return T instanceof l&&!_I(T)||(Z==="noscript"||Z==="noembed"||Z==="noframes")&&jt(/<\/no(script|embed|frames)/i,T.innerHTML)?(sr(T),!0):(ae&&T.nodeType===Qu.text&&(z=T.textContent,jp([j,M,_],je=>{z=Gu(z,je," ")}),T.textContent!==z&&(qu(t.removed,{element:T.cloneNode()}),T.textContent=z)),Or(F.afterSanitizeElements,T,null),!1)},Nx=function(T,z,Z){if(Ir&&(z==="id"||z==="name")&&(Z in n||Z in NI))return!1;if(!(Q&&!fe[z]&&jt(X,z))){if(!(ne&&jt(te,z))){if(!V[z]||fe[z]){if(!(_x(T)&&(pe.tagNameCheck instanceof RegExp&&jt(pe.tagNameCheck,T)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(T))&&(pe.attributeNameCheck instanceof RegExp&&jt(pe.attributeNameCheck,z)||pe.attributeNameCheck instanceof Function&&pe.attributeNameCheck(z))||z==="is"&&pe.allowCustomizedBuiltInElements&&(pe.tagNameCheck instanceof RegExp&&jt(pe.tagNameCheck,Z)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(Z))))return!1}else if(!Um[z]){if(!jt(N,Gu(Z,W,""))){if(!((z==="src"||z==="xlink:href"||z==="href")&&T!=="script"&&d3(Z,"data:")===0&&Tx[T])){if(!(ie&&!jt(q,Gu(Z,W,"")))){if(Z)return!1}}}}}}return!0},_x=function(T){return T!=="annotation-xml"&&TR(T,B)},Dx=function(T){Or(F.beforeSanitizeAttributes,T,null);let{attributes:z}=T;if(!z||Km(T))return;let Z={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V,forceKeepAttr:void 0},je=z.length;for(;je--;){let St=z[je],{name:gt,namespaceURI:Yt,value:ar}=St,$a=ct(gt),_t=gt==="value"?ar:f3(ar);if(Z.attrName=$a,Z.attrValue=_t,Z.keepAttr=!0,Z.forceKeepAttr=void 0,Or(F.uponSanitizeAttribute,T,Z),_t=Z.attrValue,ir&&($a==="id"||$a==="name")&&(Cc(gt,T),_t=wc+_t),ye&&jt(/((--!?|])>)|<\/(style|title)/i,_t)){Cc(gt,T);continue}if(Z.forceKeepAttr||(Cc(gt,T),!Z.keepAttr))continue;if(!oe&&jt(/\/>/i,_t)){Cc(gt,T);continue}ae&&jp([j,M,_],Hx=>{_t=Gu(_t,Hx," ")});let Fx=ct(T.nodeName);if(Nx(Fx,$a,_t)){if(w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Yt)switch(p.getAttributeType(Fx,$a)){case"TrustedHTML":{_t=w.createHTML(_t);break}case"TrustedScriptURL":{_t=w.createScriptURL(_t);break}}try{Yt?T.setAttributeNS(Yt,gt,_t):T.setAttribute(gt,_t),Km(T)?sr(T):ER(t.removed)}catch(Hx){}}}Or(F.afterSanitizeAttributes,T,null)},DI=function re(T){let z=null,Z=Lx(T);for(Or(F.beforeSanitizeShadowDOM,T,null);z=Z.nextNode();)Or(F.uponSanitizeShadowNode,z,null),Mx(z),Dx(z),z.content instanceof i&&re(z.content);Or(F.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(re){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z=null,Z=null,je=null,St=null;if(jm=!re,jm&&(re="<!-->"),typeof re!="string"&&!Ox(re))if(typeof re.toString=="function"){if(re=re.toString(),typeof re!="string")throw Yu("dirty is not a string, aborting")}else throw Yu("toString is not a function");if(!t.isSupported)return re;if(ze||Wm(T),t.removed=[],typeof re=="string"&&(Wa=!1),Wa){if(re.nodeName){let ar=ct(re.nodeName);if(!H[ar]||Se[ar])throw Yu("root node is forbidden and cannot be sanitized in-place")}}else if(re instanceof a)z=Ix("<!---->"),Z=z.ownerDocument.importNode(re,!0),Z.nodeType===Qu.element&&Z.nodeName==="BODY"||Z.nodeName==="HTML"?z=Z:z.appendChild(Z);else{if(!Ge&&!ae&&!Ee&&re.indexOf("<")===-1)return w&&Ar?w.createHTML(re):re;if(z=Ix(re),!z)return Ge?null:Ar?C:""}z&&Nt&&sr(z.firstChild);let gt=Lx(Wa?re:z);for(;je=gt.nextNode();)Mx(je),Dx(je),je.content instanceof i&&DI(je.content);if(Wa)return re;if(Ge){if(yn)for(St=I.call(z.ownerDocument);z.firstChild;)St.appendChild(z.firstChild);else St=z;return(V.shadowroot||V.shadowrootmode)&&(St=G.call(r,St,!0)),St}let Yt=Ee?z.outerHTML:z.innerHTML;return Ee&&H["!doctype"]&&z.ownerDocument&&z.ownerDocument.doctype&&z.ownerDocument.doctype.name&&jt(NR,z.ownerDocument.doctype.name)&&(Yt="<!DOCTYPE "+z.ownerDocument.doctype.name+`>
21
- `+Yt),ae&&jp([j,M,_],ar=>{Yt=Gu(Yt,ar," ")}),w&&Ar?w.createHTML(Yt):Yt},t.setConfig=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wm(re),ze=!0},t.clearConfig=function(){ls=null,ze=!1},t.isValidAttribute=function(re,T,z){ls||Wm({});let Z=ct(re),je=ct(T);return Nx(Z,je,z)},t.addHook=function(re,T){typeof T=="function"&&qu(F[re],T)},t.removeHook=function(re,T){if(T!==void 0){let z=u3(F[re],T);return z===-1?void 0:c3(F[re],z,1)[0]}return ER(F[re])},t.removeHooks=function(re){F[re]=[]},t.removeAllHooks=function(){F=IR()},t}var DR=_R();var to=S($());var k0=S(Fe()),Nn=S($());var Kp=S($()),R3=["bottom","height","left","right","top","width"],P3=(e={},t={})=>R3.some(n=>e[n]!==t[n]),eo=new Map,FR,HR=()=>{let e=[],t=[];eo.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();P3(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{eo.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),FR=window.requestAnimationFrame(HR)};function A3(e,t){return{observe(){let n=eo.size===0;if(eo.has(e)){let r=eo.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else eo.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&HR()},unobserve(){let n=eo.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||eo.delete(e),eo.size||cancelAnimationFrame(FR)}}}}function C0(e){let[t,n]=(0,Kp.useState)(null);return(0,Kp.useLayoutEffect)(()=>{if(!e.current)return;let r=A3(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Pa=S($()),UR=S($s());var zR=S($());function $o(e){(0,zR.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ji(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var BR={root:"dd-r-dgo"};var jR=({children:e,parentNode:t})=>{let[n,r]=(0,Pa.useState)(null),o=(0,Pa.useContext)(Ya);return(0,Pa.useLayoutEffect)(()=>{let i=document.createElement("div");return ji(i),i.classList.add(BR.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,UR.createPortal)(e,n):null};var br={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 $p=S(R()),qp=(e=!1)=>{let[t,n]=(0,Nn.useState)(e),r=(0,Nn.useCallback)(()=>n(!0),[]),o=(0,Nn.useCallback)(()=>n(!1),[]),i=(0,Nn.useCallback)(()=>n(a=>!a),[]),s=(0,Nn.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function R0(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 Aa=u=>{var c=u,{className:e,triggerRef:t,boundaryRef:n=(0,Nn.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=R0,parentNode:a}=c,l=se(c,["className","triggerRef","boundaryRef","position","align","children","toStyle","parentNode"]);let f=C0(t),d=C0(n),p=(0,Nn.useMemo)(()=>s(f,d,0),[f,d]);return(0,$p.jsx)(jR,{parentNode:a,children:(0,$p.jsx)("div",P(b({className:(0,k0.default)(br.ref,{[br.positionAbove]:r==="above",[br.positionBelow]:r==="below",[br.positionLeft]:r==="left",[br.positionRight]:r==="right",[br.alignStart]:o==="start",[br.alignCenter]:o==="center",[br.alignEnd]:o==="end"}),style:p},l),{role:"dialog",children:(0,$p.jsx)("div",{className:(0,k0.default)(e,br.root),children:i})}))})};var VR={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 I0(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ki=I0();function YR(e){Ki=e}var ec={exec:()=>null};function Le(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(Kt.caret,"$1"),n=n.replace(o,s),r},getRegex:()=>new RegExp(n,t)};return r}var Kt={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")},I3=/^(?:[ \t]*(?:\n|$))+/,L3=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,O3=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,nc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,M3=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,XR=/(?:[*+-]|\d{1,9}[.)])/,QR=Le(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,XR).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/).getRegex(),L0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,N3=/^[^\n]+/,O0=/(?!\s*\])(?:\\.|[^\[\]\\])+/,_3=Le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",O0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),D3=Le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,XR).getRegex(),Xp="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",M0=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,F3=Le("^ {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",M0).replace("tag",Xp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ZR=Le(L0).replace("hr",nc).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",Xp).getRegex(),H3=Le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ZR).getRegex(),N0={blockquote:H3,code:L3,def:_3,fences:O3,heading:M3,hr:nc,html:F3,lheading:QR,list:D3,newline:I3,paragraph:ZR,table:ec,text:N3},WR=Le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",nc).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",Xp).getRegex(),z3=P(b({},N0),{table:WR,paragraph:Le(L0).replace("hr",nc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",WR).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",Xp).getRegex()}),B3=P(b({},N0),{html:Le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",M0).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:ec,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Le(L0).replace("hr",nc).replace("heading",` *#{1,6} *[^
22
- ]`).replace("lheading",QR).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),U3=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,j3=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,JR=/^( {2,}|\\)\n(?!\s*$)/,V3=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qp=/[\p{P}\p{S}]/u,_0=/[\s\p{P}\p{S}]/u,eP=/[^\s\p{P}\p{S}]/u,W3=Le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_0).getRegex(),tP=/(?!~)[\p{P}\p{S}]/u,K3=/(?!~)[\s\p{P}\p{S}]/u,$3=/(?:[^\s\p{P}\p{S}]|~)/u,q3=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,nP=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,G3=Le(nP,"u").replace(/punct/g,Qp).getRegex(),Y3=Le(nP,"u").replace(/punct/g,tP).getRegex(),rP="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",X3=Le(rP,"gu").replace(/notPunctSpace/g,eP).replace(/punctSpace/g,_0).replace(/punct/g,Qp).getRegex(),Q3=Le(rP,"gu").replace(/notPunctSpace/g,$3).replace(/punctSpace/g,K3).replace(/punct/g,tP).getRegex(),Z3=Le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,eP).replace(/punctSpace/g,_0).replace(/punct/g,Qp).getRegex(),J3=Le(/\\(punct)/,"gu").replace(/punct/g,Qp).getRegex(),e4=Le(/^<(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(),t4=Le(M0).replace("(?:-->|$)","-->").getRegex(),n4=Le("^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",t4).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yp=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,r4=Le(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Yp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),oP=Le(/^!?\[(label)\]\[(ref)\]/).replace("label",Yp).replace("ref",O0).getRegex(),iP=Le(/^!?\[(ref)\](?:\[\])?/).replace("ref",O0).getRegex(),o4=Le("reflink|nolink(?!\\()","g").replace("reflink",oP).replace("nolink",iP).getRegex(),D0={_backpedal:ec,anyPunctuation:J3,autolink:e4,blockSkip:q3,br:JR,code:j3,del:ec,emStrongLDelim:G3,emStrongRDelimAst:X3,emStrongRDelimUnd:Z3,escape:U3,link:r4,nolink:iP,punctuation:W3,reflink:oP,reflinkSearch:o4,tag:n4,text:V3,url:ec},i4=P(b({},D0),{link:Le(/^!?\[(label)\]\((.*?)\)/).replace("label",Yp).getRegex(),reflink:Le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yp).getRegex()}),P0=P(b({},D0),{emStrongRDelimAst:Q3,emStrongLDelim:Y3,url:Le(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),s4=P(b({},P0),{br:Le(JR).replace("{2,}","*").getRegex(),text:Le(P0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Gp={normal:N0,gfm:z3,pedantic:B3},Zu={normal:D0,gfm:P0,breaks:s4,pedantic:i4},a4={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},KR=e=>a4[e];function Er(e,t){if(t){if(Kt.escapeTest.test(e))return e.replace(Kt.escapeReplace,KR)}else if(Kt.escapeTestNoEncode.test(e))return e.replace(Kt.escapeReplaceNoEncode,KR);return e}function $R(e){try{e=encodeURI(e).replace(Kt.percentDecode,"%")}catch(t){return null}return e}function qR(e,t){var i;let n=e.replace(Kt.findPipe,(s,a,l)=>{let u=!1,c=a;for(;--c>=0&&l[c]==="\\";)u=!u;return u?"|":" |"}),r=n.split(Kt.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(Kt.slashPipe,"|");return r}function Ju(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 l4(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 GR(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 u4(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
23
- `).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(`
24
- `)}var Ia=class{constructor(t){Ne(this,"options");Ne(this,"rules");Ne(this,"lexer");this.options=t||Ki}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:Ju(r,`
25
- `)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],o=u4(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=Ju(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:Ju(n[0],`
26
- `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=Ju(n[0],`
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 s=(n=this.props.containerTagName)!==null&&n!==void 0?n:"body",i=s==="body"||s==="fragment"?o.body:o.createElement(s);return t.match(t2)||(i.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,BT.default)(t):t)),i}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==HT||!t.attributes||([...t.attributes].forEach(s=>{let{name:i,value:a}=s,l=i.toLowerCase(),c=Bf[l]||Bf[i];if(!this.isSafe(t)||!l.match(n2)&&(!n&&(!c||c===qy)||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===Vs?u=Number.parseFloat(String(u)):c!==Hf&&(u=String(u)),r[Gy[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,(s,i)=>String(i).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:s,transform:i,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(i&&!(a&&!this.isTagAllowed(f))){this.keyIndex+=1;let x=this.keyIndex;m=this.parseNode(v,p);let y=i(v,m,p);if(y===null)return;if(typeof y!="undefined"){l.push(js.default.cloneElement(y,{key:x}));return}this.keyIndex=x-1}if(this.banned.has(f))return;if(!(r||o&&f!=="br")&&this.isTagAllowed(f)&&(s||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(js.default.createElement(Uf,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,s=null;for(;s=o.match(r2);){let[i,a]=s,l=s.index,c=i.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=i.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(i.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 s2(e){var t;let{attributes:n,className:r,containerTagName:o,content:s,emptyContent:i,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 Vf(s!=null?s:"",e).parse();p.length>0&&(f=p)}return f||(f=i),d?js.default.createElement(js.default.Fragment,null,f):js.default.createElement(Uf,{attributes:n,className:r,tagName:u},f)}function Ks(e){let E=e,{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:s=!1,emptyContent:i=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=s?[]: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 Vf(g,p,v,m),w=y.reduce((C,k)=>k(C,e),h.parse());return js.default.createElement(s2,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:i,noWrap:f,parsedContent:w.length===0?void 0:w,tagName:d})}var Ic=b(Z());var i2=/[.*+?^${}()|[\]\\]/g,a2=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function l2(e){return e.replace(i2,"\\$&")}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((i,a)=>({char:i,index:a})).filter(({char:i,index:a})=>/\s/.test(i)&&a<=t).map(({index:i})=>i).reverse()[0]}function Xy(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 i=t.split(Vx).length>3||t.length>30?d2(t.trim(),r):0;return`${`${i>0?"\u2026":""}${da(e.substring(i,r))}`}<strong>${o}</strong>`}return e}var f2=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function $f(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 jf=b(Z()),WT=b(R()),jT=jf.default.createContext(void 0);function es(){let e=jf.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:s})=>{let i=jf.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:s}),[n,t,o]);return(0,WT.jsx)(jT.Provider,{value:i,children:e})};var _r=b(Z());var _=b(Z(),1),Ea=b(Z(),1);function Wf(){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 ir(e){var t;return(t=(qT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qT(e){return Wf()?e instanceof Node||e instanceof $t(e).Node:!1}function Oe(e){return Wf()?e instanceof Element||e instanceof $t(e).Element:!1}function Xe(e){return Wf()?e instanceof HTMLElement||e instanceof $t(e).HTMLElement:!1}function Kf(e){return!Wf()||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 qf(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=sr(e);for(;Xe(t)&&!ar(t);){if(qf(t))return t;if(wc(t))return null;t=sr(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 sr(e){if(Lr(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=sr(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),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=$t(o);if(s){let a=Gf(i);return t.concat(i,i.visualViewport||[],fa(o)?o:[],a&&n?Cn(a):[])}return t.concat(o,Cn(o,[],n))}function Gf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ts(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 p2()?!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 p2(){return Zy().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 Yf(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 Jy(e){return Xe(e)&&e.matches(m2)}function Xf(e){e.preventDefault(),e.stopPropagation()}function ev(e){return e?e.getAttribute("role")==="combobox"&&Jy(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 tv(e,t,n){return uo(e,ga(t,n))}function Cc(e,t){return typeof e=="function"?e(t):e}function ns(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 Ws(e){return["top","bottom"].includes(ns(e))?"y":"x"}function ov(e){return nv(Ws(e))}function rC(e,t,n){n===void 0&&(n=!1);let r=kc(e),o=ov(e),s=rv(o),i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=bc(i)),[i,bc(i)]}function oC(e){let t=bc(e);return[Qf(e),t,Qf(t)]}function Qf(e){return e.replace(/start|end/g,t=>h2[t])}function y2(e,t,n){let r=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?s:i;default:return[]}}function sC(e,t,n,r){let o=kc(e),s=y2(ns(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Qf)))),s}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 iC(e){return typeof e!="number"?v2(e):{top:e,right:e,bottom:e,left:e}}function qs(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])"],Zf=x2.join(","),lC=typeof Element=="undefined",ha=lC?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Jf=!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},ep=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"),s=o===""||o==="true",i=s||n&&t&&e(t.parentNode);return i},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(ep(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Zf));return n&&ha.call(t,Zf)&&o.unshift(t),o=o.filter(r),o},b2=function e(t,n,r){for(var o=[],s=Array.from(t);s.length;){var i=s.shift();if(!ep(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:i,candidates:c})}else{var u=ha.call(i,Zf);u&&r.filter(i)&&(n||!t.includes(i))&&o.push(i);var d=i.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(i),f=!ep(d,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(i));if(d&&f){var p=e(d===!0?i.children:d.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:i,candidates:p})}else s.unshift.apply(s,i.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||Jf(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(i){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",i.message),!1}var s=R2(o,t.form);return!s||s===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&&Jf(t),o=(n=r)===null||n===void 0?void 0:n.host,s=!1;if(r&&r!==t){var i,a,l;for(s=!!((i=o)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&o;){var c,u,d;r=Jf(o),o=(c=r)===null||c===void 0?void 0:c.host,s=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return s},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 s=ha.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(ha.call(i,"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=Jf(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||ep(n)||C2(n)||_2(n,t)||k2(n)||O2(n))},sv=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,s){var i=!!o.scopeParent,a=i?o.scopeParent:o,l=E2(a,i),c=i?e(o.candidates):a;l===0?i?n.push.apply(n,c):n.push(a):r.push({documentOrder:s,tabIndex:l,item:o,isScope:i,content:c})}),r.sort(T2).reduce(function(o,s){return s.isScope?o.push.apply(o,s.content):o.push(s.content),o},[]).concat(n)},Rc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=b2([t],n.includeContainer,{filter:sv.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:M2}):r=S2(t,n.includeContainer,sv.bind(null,n)),D2(r)};var fC=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return ha.call(t,Zf)===!1?!1:sv(n,t)};var wv=b(Ul(),1);function pC(e,t,n){let{reference:r,floating:o}=e,s=Ws(t),i=ov(t),a=rv(i),l=ns(t),c=s==="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[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=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:s=[],platform:i}=n,a=s.filter(Boolean),l=yield i.isRTL==null?void 0:i.isRTL(t),c=yield i.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:i,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 i.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:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Cc(t,e),v=iC(p),x=a[f?d==="floating"?"reference":"floating":d],y=qs(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(x))==null||n?x:x.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),g=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,h=yield s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating),w=(yield s.isElement==null?void 0:s.isElement(h))?(yield s.getScale==null?void 0:s.getScale(h))||{x:1,y:1}:{x:1,y:1},E=qs(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.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:s,middlewareData:i,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=i.arrow)!=null&&r.alignmentOffset)return{};let g=ns(s),h=Ws(l),w=ns(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(...sC(l,x,m,E));let A=[l,...C],F=yield iv(n,y),N=[],O=((o=i.flip)==null?void 0:o.overflows)||[];if(d&&N.push(F[g]),f){let se=rC(s,a,E);N.push(F[se[0]],F[se[1]])}if(O=[...O,{placement:s,overflows:N}],!N.every(se=>se<=0)){var G,W;let se=(((G=i.flip)==null?void 0:G.index)||0)+1,Y=A[se];if(Y)return{data:{index:se,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 $=Ws(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(s!==V)return{reset:{placement:V}}}return{}})}}};function F2(e,t){return I(this,null,function*(){let{placement:n,platform:r,elements:o}=e,s=yield r.isRTL==null?void 0:r.isRTL(o.floating),i=ns(n),a=kc(n),l=Ws(n)==="y",c=["left","top"].includes(i)?-1:1,u=s&&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:s,y:i,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:s+c.x,y:i+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:s}=n,y=Cc(e,n),{mainAxis:i=!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=Ws(ns(s)),p=nv(f),v=u[p],m=u[f];if(i){let g=p==="y"?"top":"left",h=p==="y"?"bottom":"right",w=v+d[g],E=v-d[h];v=tv(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=tv(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]:i,[f]:a}}})})}}};function wC(e){let t=fn(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=Xe(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Ec(n)!==s||Ec(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function lv(e){return Oe(e)?e:e.contextElement}function ya(e){let t=lv(e);if(!Xe(t))return lr(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:s}=wC(t),i=(s?Ec(n.width):n.width)/r,a=(s?Ec(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,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 Gs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let o=e.getBoundingClientRect(),s=lv(e),i=lr(1);t&&(r?Oe(r)&&(i=ya(r)):i=ya(e));let a=H2(s,n,r)?SC(s):lr(0),l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){let f=$t(s),p=r&&Oe(r)?$t(r):r,v=f,m=Gf(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=Gf(v)}}return qs({width:u,height:d,x:l,y:c})}function cv(e,t){let n=Sc(e).scrollLeft;return t?t.left+n:Gs(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)),s=r.top+t.scrollTop;return{x:o,y:s}}function B2(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,s=o==="fixed",i=ir(r),a=t?wc(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=lr(1),u=lr(0),d=Xe(r);if((d||!d&&!s)&&((Lr(r)!=="body"||fa(i))&&(l=Sc(r)),Xe(r))){let p=Gs(r);c=ya(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}let f=i&&!d&&!s?bC(i,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=ir(e),n=Sc(e),r=e.ownerDocument.body,o=uo(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=uo(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+cv(e),a=-n.scrollTop;return fn(r).direction==="rtl"&&(i+=uo(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function $2(e,t){let n=$t(e),r=ir(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;let c=pa();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function j2(e,t){let n=Gs(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Xe(e)?ya(e):lr(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,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(ir(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 qs(r)}function EC(e,t){let n=sr(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,s=fn(e).position==="fixed",i=s?sr(e):e;for(;Oe(i)&&!ar(i);){let a=fn(i),l=qf(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||fa(i)&&!l&&EC(e,i))?r=r.filter(u=>u!==i):o=a,i=sr(i)}return t.set(e,r),r}function W2(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,i=[...n==="clippingAncestors"?wc(t)?[]:K2(t,this._c):[].concat(n),r],a=i[0],l=i.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=ir(t),s=n==="fixed",i=Gs(e,!0,s,t),a={scrollLeft:0,scrollTop:0},l=lr(0);if(r||!r&&!s)if((Lr(t)!=="body"||fa(o))&&(a=Sc(t)),r){let f=Gs(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=cv(o));let c=o&&!r&&!s?bC(o,a):lr(0),u=i.left+a.scrollLeft-l.x-c.x,d=i.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:i.width,height:i.height}}function av(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 ir(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=sr(e);for(;o&&!ar(o);){if(Oe(o)&&!av(o))return o;o=sr(o)}return n}let r=xC(e,t);for(;r&&GT(r)&&av(r);)r=xC(r,t);return r&&ar(r)&&av(r)&&!qf(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 uv={convertOffsetParentRelativeRectToViewportRelativeRect:B2,getDocumentElement:ir,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=ir(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();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 i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!CC(c,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(E,P(S({},h),{root:o.ownerDocument}))}catch(C){n=new IntersectionObserver(E,h)}n.observe(e)}return i(!0),s}function tp(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=lv(e),u=o||s?[...c?Cn(c):[],...Cn(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});let d=c&&a?Q2(c,n):null,f=-1,p=null;i&&(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?Gs(e):null;l&&x();function x(){let y=Gs(e);m&&!CC(m,y)&&n(),m=y,v=requestAnimationFrame(x)}return n(),()=>{var y;u.forEach(g=>{o&&g.removeEventListener("scroll",n),s&&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 np=(e,t,n)=>{let r=new Map,o=S({platform:uv},n),s=P(S({},o.platform),{_c:r});return mC(e,t,P(S({},o),{platform:s}))};var nt=b(Z(),1),sp=b(Z(),1),LC=b(Ul(),1);var rp=typeof document!="undefined"?sp.useLayoutEffect:sp.useEffect;function op(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(!op(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!op(e[s],t[s]))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 dv(e){let t=nt.useRef(e);return rp(()=>{t.current=e}),t}function OC(e){e===void 0&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},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);op(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=s||v,E=i||x,C=nt.useRef(null),k=nt.useRef(null),A=nt.useRef(u),F=l!=null,N=dv(l),O=dv(o),G=dv(c),W=nt.useCallback(()=>{if(!C.current||!k.current)return;let V={placement:t,strategy:n,middleware:f};O.current&&(V.platform=O.current),np(C.current,k.current,V).then(U=>{let q=P(S({},U),{isPositioned:G.current!==!1});L.current&&!op(A.current,q)&&(A.current=q,LC.flushSync(()=>{d(q)}))})},[f,t,n,O,G]);rp(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(V=>P(S({},V),{isPositioned:!1})))},[c]);let L=nt.useRef(!1);rp(()=>(L.current=!0,()=>{L.current=!1}),[]),rp(()=>{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]),se=nt.useMemo(()=>({reference:w,floating:E}),[w,E]),Y=nt.useMemo(()=>{let V={position:n,left:0,top:0};if(!se.floating)return V;let U=AC(se.floating,u.x),q=AC(se.floating,u.y);return a?S(P(S({},V),{transform:"translate("+U+"px, "+q+"px)"}),_C(se.floating)>=1.5&&{willChange:"transform"}):{position:n,left:U,top:q}},[n,a,se.floating,u.x,u.y]);return nt.useMemo(()=>P(S({},u),{update:W,refs:z,elements:se,floatingStyles:Y}),[u,W,z,se,Y])}var ip=(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=_.useRef(void 0),n=_.useCallback(r=>{let o=e.map(s=>{if(s!=null){if(typeof s=="function"){let i=s,a=i(r);return typeof a=="function"?a:()=>{i(null)}}return s.current=r,()=>{s.current=null}}});return()=>{o.forEach(s=>s==null?void 0:s())}},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],sD=[eD,tD],H7=[...oD,...sD];var NC=!1,iD=0,MC=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+iD++;function aD(){let[e,t]=_.useState(()=>NC?MC():void 0);return pn(()=>{e==null&&t(MC())},[]),_.useEffect(()=>{NC=!0},[]),e}var lD=YC.useId,bv=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),Ev=()=>{var e;return((e=_.useContext(uD))==null?void 0:e.id)||null},up=()=>_.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 mv(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:s,elements:i}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=up(),v=Ev(),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 s.on("openchange",Y),()=>{s.off("openchange",Y)}},[a,s]),_.useEffect(()=>{if(!a||!m.current||!n)return;function Y(U){N()&&r(!1,U,"hover")}let V=ht(i.floating).documentElement;return V.addEventListener("mouseleave",Y),()=>{V.removeEventListener("mouseleave",Y)}},[i.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=mv(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(i.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&&!mv(x.current,"open"))return;let K=mv(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(i.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(i.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(i.domReference)){var q;let $=i.domReference;return n&&$.addEventListener("mouseleave",U),(q=i.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=i.floating)==null||K.removeEventListener("mouseleave",U),f&&$.removeEventListener("mousemove",Y),$.removeEventListener("mouseenter",Y),$.removeEventListener("mouseleave",V)}}},[i,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=i.floating;if(Oe(i.domReference)&&U){var V;let q=ht(i.floating).body;q.setAttribute(DC,"");let $=i.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,i,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,i.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&&bm(V.movementX,2)+bm(V.movementY,2)<2||(cr(E),g.current==="touch"?q():(F.current=!0,E.current=window.setTimeout(q,d)))}}},[u,r,n,y,d]),se=_.useMemo(()=>({onMouseEnter(){cr(h)},onMouseLeave(Y){L()||O(Y.nativeEvent,!1)}}),[O,L]);return _.useMemo(()=>a?{reference:z,floating:se}:{},[a,z,se])}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 s=()=>e==null?void 0:e.focus({preventScroll:n});o?s():FC=requestAnimationFrame(s)}function zC(e,t){var n;let r=[],o=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;o;){let s=e.find(i=>i.id===o);o=s==null?void 0:s.parentId,s&&(r=r.concat(s))}return r}function Sa(e,t){let n=e.filter(o=>{var s;return o.parentId===t&&((s=o.context)==null?void 0:s.open)}),r=n;for(;r.length;)r=e.filter(o=>{var s;return(s=r)==null?void 0:s.some(i=>{var a;return o.parentId===i.id&&((a=o.context)==null?void 0:a.open)})}),n=n.concat(r);return n}var xa=new WeakMap,ap=new WeakSet,lp={},gv=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",s=r?"inert":n?"aria-hidden":null,i=pD(t,e),a=new Set,l=new Set(i),c=[];lp[o]||(lp[o]=new WeakMap);let u=lp[o];i.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=s?v.getAttribute(s):null,x=m!==null&&m!=="false",y=xa.get(v)||0,g=s?y+1:y,h=(u.get(v)||0)+1;xa.set(v,g),u.set(v,h),c.push(v),g===1&&x&&ap.add(v),h===1&&v.setAttribute(o,""),!x&&s&&v.setAttribute(s,s==="inert"?"":"true")}})}return gv++,()=>{c.forEach(p=>{let v=xa.get(p)||0,m=s?v-1:v,x=(u.get(p)||0)-1;xa.set(p,m),u.set(p,x),m||(!ap.has(p)&&s&&p.removeAttribute(s),ap.delete(p)),x||p.removeAttribute(o)}),gv--,gv||(xa=new WeakMap,xa=new WeakMap,ap=new WeakSet,lp={})}}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 dp=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ZC(e,t){let n=Rc(e,dp());t==="prev"&&n.reverse();let r=n.indexOf(ts(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,dp()).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 fp={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},cp=_.forwardRef(function(t,n){let[r,o]=_.useState();pn(()=>{eC()&&o("button")},[]);let s={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ba("focus-guard")]:"",style:fp};return(0,mn.jsx)("span",S(S({},t),s))}),tk=_.createContext(null),UC=ba("portal");function hD(e){e===void 0&&(e={});let{id:t,root:n}=e,r=bv(),o=rk(),[s,i]=_.useState(null),a=_.useRef(null);return pn(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{a.current=null})},[s]),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,i(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,i(u)},[t,n,r,o]),s}function nk(e){let{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,s=hD({id:n,root:r}),[i,a]=_.useState(null),l=_.useRef(null),c=_.useRef(null),u=_.useRef(null),d=_.useRef(null),f=i==null?void 0:i.modal,p=i==null?void 0:i.open,v=!!i&&!i.modal&&i.open&&o&&!!(r||s);return _.useEffect(()=>{if(!s||!o||f)return;function m(x){s&&Pc(x)&&(x.type==="focusin"?BC:gD)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,o,f]),_.useEffect(()=>{s&&(p||BC(s))},[p,s]),(0,mn.jsxs)(tk.Provider,{value:_.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:s,setFocusManagerState:a}),[o,s]),children:[v&&s&&(0,mn.jsx)(cp,{"data-type":"outside",ref:l,onFocus:m=>{if(Pc(m,s)){var x;(x=u.current)==null||x.focus()}else{let y=i?i.domReference:null,g=ek(y);g==null||g.focus()}}}),v&&s&&(0,mn.jsx)("span",{"aria-owns":s.id,style:fp}),s&&wv.createPortal(t,s),v&&s&&(0,mn.jsx)(cp,{"data-type":"outside",ref:c,onFocus:m=>{if(Pc(m,s)){var x;(x=d.current)==null||x.focus()}else{let y=i?i.domReference:null,g=JC(y);g==null||g.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,m.nativeEvent,"focus-out"))}}})]})}var rk=()=>_.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 _.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}var yD=20,Ys=[];function vD(e){Ys=Ys.filter(t=>t.isConnected),e&&Lr(e)!=="body"&&(Ys.push(e),Ys.length>yD&&(Ys=Ys.slice(-20)))}function jC(){return Ys.slice().reverse().find(e=>e.isConnected)}function xD(e){let t=dp();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:fp}))});function ok(e){let{context:t,children:n,disabled:r=!1,order:o=["content"],guards:s=!0,initialFocus:i=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 ie;return(ie=y.current.floatingContext)==null?void 0:ie.nodeId}),E=kn(p),C=typeof i=="number"&&i<0,k=ev(g)&&C,A=fD(),F=A?s:!0,N=!F||A&&f,O=wa(o),G=wa(i),W=wa(a),L=up(),z=rk(),se=_.useRef(null),Y=_.useRef(null),V=_.useRef(!1),U=_.useRef(!1),q=_.useRef(-1),$=z!=null,K=VC(h),H=kn(function(ie){return ie===void 0&&(ie=K),ie?Rc(ie,dp()):[]}),de=kn(ie=>{let Q=H(ie);return O.current.map(ae=>g&&ae==="reference"?g:K&&ae==="floating"?K:Q).filter(Boolean).flat()});_.useEffect(()=>{if(r||!c)return;function ie(ae){if(ae.key==="Tab"){gt(K,ts(ht(K)))&&H().length===0&&!k&&Xf(ae);let pe=de(),je=co(ae);O.current[0]==="reference"&&je===g&&(Xf(ae),ae.shiftKey?va(pe[pe.length-1]):va(pe[1])),O.current[1]==="floating"&&je===K&&ae.shiftKey&&(Xf(ae),va(pe[0]))}}let Q=ht(K);return Q.addEventListener("keydown",ie),()=>{Q.removeEventListener("keydown",ie)}},[r,g,K,c,O,k,H,de]),_.useEffect(()=>{if(r||!h)return;function ie(Q){let ae=co(Q),je=H().indexOf(ae);je!==-1&&(q.current=je)}return h.addEventListener("focusin",ie),()=>{h.removeEventListener("focusin",ie)}},[r,h,H]),_.useEffect(()=>{if(r||!d)return;function ie(){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&&ts(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",ie),h.addEventListener("focusout",Q),()=>{g.removeEventListener("focusout",Q),g.removeEventListener("pointerdown",ie),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 ie,Q;if(r||!h)return;let ae=Array.from((z==null||(ie=z.portalNode)==null?void 0:ie.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 ev(((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(),se.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 ie=ht(K),Q=ts(ie);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 ie=!1,Q=!1,ae=ht(K),pe=ts(ae),vt=y.current.openEvent;vD(pe);function Qe(dt){let{open:fs,reason:ps,event:Zt,nested:vr}=dt;if(fs&&(vt=Zt),ps==="escape-key"&&(Q=!0),["hover","safe-polygon"].includes(ps)&&Zt.type==="mouseleave"&&(V.current=!0),ps==="outside-press")if(vr)V.current=!1,ie=!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,ie=!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,fp),$&&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=ts(ae),fs=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)});(fs||vt&&["click","mousedown"].includes(vt.type))&&(Q=!0);let ps=Ze();queueMicrotask(()=>{let Zt=xD(ps);W.current&&!V.current&&Xe(Zt)&&(!(Zt!==dt&&dt!==ae.body)||fs)&&Zt.focus({preventScroll:ie}),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 ie=()=>{let ae=K.getAttribute("tabindex"),pe=H(),je=ts(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")};ie();let Q=new MutationObserver(ie);return Q.observe(K,{childList:!0,subtree:!0,attributes:!0}),()=>{Q.disconnect()}},[r,h,K,g,O,H,C]);function Te(ie){return r||!u||!c?null:(0,mn.jsx)(wD,{ref:ie==="start"?se: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)(cp,{"data-type":"inside",ref:me,onFocus:ie=>{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(ie,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)(cp,{"data-type":"inside",ref:re,onFocus:ie=>{if(c)va(de()[0]);else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(d&&(V.current=!0),Pc(ie,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 Jy(e)}function sk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:o,elements:{domReference:s}}=e,{enabled:i=!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(s)&&(m.preventDefault(),p.current=!0),!SD(m)&&m.key==="Enter"&&r(!(n&&l),m.nativeEvent,"click"))},onKeyUp(m){m.defaultPrevented||!u||KC(m)||WC(s)||m.key===" "&&p.current&&(p.current=!1,r(!(n&&l),m.nativeEvent,"click"))}}),[o,s,a,c,u,r,n,d,l]);return _.useMemo(()=>i?{reference:v}:{},[i,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 ik(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:o,dataRef:s}=e,{enabled:i=!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=up(),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 se;if(!n||!i||!a||z.key!=="Escape"||A.current)return;let Y=(se=s.current.floatingContext)==null?void 0:se.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 se;let Y=()=>{var V;F(z),(V=co(z))==null||V.removeEventListener("keydown",Y)};(se=co(z))==null||se.addEventListener("keydown",Y)}),O=kn(z=>{var se;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=sr(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),ie=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=ie&&z.offsetY>U.clientHeight;if(pe||je)return}let H=(se=s.current.floatingContext)==null?void 0:se.nodeId,de=m&&Sa(m.nodesRef.current,H).some(Se=>{var me;return Yf(z,(me=Se.context)==null?void 0:me.elements.floating)});if(Yf(z,o.floating)||Yf(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 se;let Y=()=>{var V;O(z),(V=co(z))==null||V.removeEventListener(c,Y)};(se=co(z))==null||se.addEventListener(c,Y)});_.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=E;let z=-1;function se($){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",se,{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",se)}),window.clearTimeout(z)}},[s,o,a,y,c,n,r,f,i,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(()=>i?{reference:W,floating:L}:{},[i,W,L])}function TD(e){let{open:t=!1,onOpenChange:n,elements:r}=e,o=bv(),s=_.useRef({}),[i]=_.useState(()=>cD()),a=Ev()!=null,[l,c]=_.useState(r.reference),u=kn((p,v,m)=>{s.current.openEvent=p?v:void 0,i.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:s,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,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,[s,i]=_.useState(null),[a,l]=_.useState(null),u=(o==null?void 0:o.domReference)||s,d=_.useRef(null),f=up();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,i(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 hv="active",yv="selected";function vv(e,t,n){let r=new Map,o=n==="item",s=e;if(o&&e){let i=e,{[hv]:a,[yv]:l}=i;s=oe(i,[Em(hv),Em(yv)])}return S(S(S({},n==="floating"&&{tabIndex:-1,[xv]:""}),s),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,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=>vv(a,e,"reference"),t),s=_.useCallback(a=>vv(a,e,"floating"),n),i=_.useCallback(a=>vv(a,e,"item"),r);return _.useMemo(()=>({getReferenceProps:o,getFloatingProps:s,getItemProps:i}),[o,s,i])}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:s=!0,role:i="dialog"}=t,a=(n=CD.get(i))!=null?n:i,l=bv(),u=Ev()!=null,d=_.useMemo(()=>a==="tooltip"||i==="label"?{["aria-"+(i==="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"}),i==="select"&&{"aria-autocomplete":"none"}),i==="combobox"&&{"aria-autocomplete":"list"}),[a,o,u,r,l,i]),f=_.useMemo(()=>{let v=S({id:o},a&&{role:a});return a==="tooltip"||i==="label"?v:S(S({},v),a==="menu"&&{"aria-labelledby":l})},[a,o,l,i]),p=_.useCallback(v=>{let{active:m,selected:x}=v,y=S({role:"option"},m&&{id:o+"-option"});switch(i){case"select":return P(S({},y),{"aria-selected":m&&x});case"combobox":return S(S({},y),m&&{"aria-selected":!0})}return{}},[o,i]);return _.useMemo(()=>s?{reference:d,floating:f,item:p}:{},[s,d,f,p])}function GC(e,t){let[n,r]=e,o=!1,s=t.length;for(let i=0,a=s-1;i<s;a=i++){let[l,c]=t[i]||[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,s=!1,i=null,a=null,l=performance.now();function c(d,f){let p=performance.now(),v=p-l;if(i===null||a===null||v===0)return i=d,a=f,l=p,null;let m=d-i,x=f-a,g=Math.sqrt(m*m+x*x)/v;return i=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],se=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&&(s=!0,!N))return;if(G&&(s=!1),G&&!N){s=!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:se?re+t*4:re-t*4,Te+t+1],ie=[U?re-t/2:se?re+t*4:re-t*4,Te+t+1],Q=[[L.left,se||U?L.bottom-t:L.top],[L.right,se?U?L.bottom-t:L.top:L.bottom-t]];return[rt,ie,...Q]}case"bottom":{let rt=[U?re+t/2:se?re+t*4:re-t*4,Te-t],ie=[U?re-t/2:se?re+t*4:re-t*4,Te-t],Q=[[L.left,se||U?L.top+t:L.bottom],[L.right,se?U?L.top+t:L.bottom:L.top+t]];return[rt,ie,...Q]}case"left":{let rt=[re+t+1,q?Te+t/2:Y?Te+t*4:Te-t*4],ie=[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,ie]}case"right":{let rt=[re-t,q?Te+t/2:Y?Te+t*4:Te-t*4],ie=[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,ie,...Q]}}}if(!GC([C,k],ue)){if(s&&!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]))?!s&&r&&(o=window.setTimeout(E,40)):E()}}};return u.__options={blockPointerEvents:n},u}var pp={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:s}={}){let[i,a]=_r.useState(e),l=o!=null?o:i,c=s!=null?s:a,u=ak({placement:t,open:l,onOpenChange:c,whileElementsMounted:tp,middleware:[ip(5),pv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"end",padding:5}),fv({padding:10})]}),d=u.context,f=sk(d,{enabled:o==null}),p=ik(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),Tv=()=>{let e=_r.useContext(dk);if(e==null)throw new Error("Popover components must be wrapped in <Popover />");return e},Xs=r=>{var o=r,{children:e,modal:t=!1}=o,n=oe(o,["children","modal"]);let s=RD(S({modal:t},n));return(0,Hn.jsx)(dk.Provider,{value:s,children:e})};function PD(r){var o=r,{as:e,children:t}=o,n=oe(o,["as","children"]);let s=Tv(),i=e||"button",a=t.ref,l=Sv([s.refs.setReference,a]);return(0,Hn.jsx)(i,P(S({ref:l,type:"button"},s.getReferenceProps(n)),{children:t}))}var AD=_r.forwardRef(function(o,r){var s=o,{style:t}=s,n=oe(s,["style"]);let c=Tv(),{context:i}=c,a=oe(c,["context"]),l=Sv([a.refs.setFloating,r]);return i.open?(0,Hn.jsx)(nk,{children:(0,Hn.jsx)(ok,{context:i,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 s=o,{as:e,children:t,onClick:n}=s,r=oe(s,["as","children","onClick"]);let{setOpen:i}=Tv();return(0,Hn.jsx)(e||"button",P(S({type:"button",onClick:c=>{n(c),i(!1),c.stopPropagation()}},r),{children:t}))}function fk({trigger:e,children:t,placement:n="top"}){return(0,Hn.jsxs)(Xs,{tooltip:!0,placement:n,children:[(0,Hn.jsxs)(Xs.Content,{className:pp.tooltip,children:[t,(0,Hn.jsx)("div",{className:pp.arrow})]}),(0,Hn.jsx)(Xs.Trigger,{className:pp.tooltipTrigger,children:e})]})}Xs.Trigger=PD;Xs.Content=AD;Xs.Button=ID;var yt=Xs;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 Cv(p){var v=p,{closeOnSelect:e=!0,lineClamp:t,tooltip:n,children:r,onClick:o,extra:s,onSourceClick:i,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(io),[x,y]=(0,Ic.useState)(!1),{selected:g,onChangeOpen:h}=es(),[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)(Ks,{tagName:"p",allowList:[],content:$f(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)(Ks,{className:C.listItemTooltipContent,allowList:["h1","h2","h3","h4","h5","h6","a","p"],tagName:"div",content:n})})]}),c===g&&s,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:()=>i==null?void 0:i(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 Qs=b(R());function kv({children:e,title:t,id:n,onDismiss:r}){let o=ce(io),s=M("CommandPalette",Tn),{page:i}=es();return i!==n?null:(0,Qs.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Qs.jsxs)("div",{className:s.pageNav,children:[(0,Qs.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,Qs.jsx)(mk,{}),o("back")]}),t&&(0,Qs.jsx)("h3",{className:s.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:s,selectedType:i},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:s,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:i||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 Rv=b(Ne());var mp=b(R()),ND=o=>{var s=o,{onClick:e,shortKeys:t,children:n}=s,r=oe(s,["onClick","shortKeys","children"]);let i=M("CommandPalette",Tn);return(0,mp.jsxs)("button",P(S({type:"button"},r),{onClick:e,className:(0,Rv.default)(i.actionButton,r.className,{[i.hasShortKeys]:t&&t.length>0}),children:[n,t==null?void 0:t.map(a=>(0,mp.jsx)("span",{className:(0,Rv.default)(i.actionShortcut,a===8629&&i.actionShortcutFixKerning),children:typeof a=="number"?String.fromCharCode(a):a},a))]}))},yk=ND;var Oc=b(R()),MD="[data-command-palette-item]";function Zs({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:s,onChangeType:i,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),i(void 0),s(""),a(!1)},g=()=>{var O;if(r!==n&&o){o(n);return}if(l&&i){i(void 0),(O=x.current)==null||O.focus();return}if(f.length>0){s("");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)(If,{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:s,onChangeType:i,placeholder:e,value:f,selectedType:l,types:c,typePlaceholder:t}),u]})})}Zs.Page=kv;Zs.List=Uy;Zs.Image=OT;Zs.ListItem=Cv;Zs.ListItemActions=pk;Zs.Button=yk;var Ge=Zs;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},gp=Dn([DD,la,U1],(e,t,n)=>{var a;let r=[],{visitorName:o}=n!=null?n:{},{agentName:s,agentNickname:i}=t!=null?t:{};return s&&s!==o&&r.push(s),i&&i!==o&&r.push(i),(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,s=yield o();return s.length===0?Promise.resolve([]):n.getEntities(s)})),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 Pv={};Rt(Pv,{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(gp),{setSelected:o}=es(),s=ce(Pv),i=ye();return(0,Nc.useEffect)(()=>{i(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:s("noResults")})]})},Ek=UD;var ii=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),[s,i]=(0,ka.useState)(void 0),[a,l]=(0,ka.useState)("idle"),c=ye();return{error:s,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=>{i(p),l("error"),t!=null&&t.onError&&(t==null||t.onError(p))})}),reset:()=>{l("idle"),o(void 0),i(void 0)}}}var hp=b(Ne()),Rk=b(Z());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 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(s=>{n.classList.add(s)}),n.addEventListener("animationend",()=>n.remove()),(o=e.parentElement)==null||o.appendChild(n)}var _v={};Rt(_v,{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 s,i,a;let r=(i=(s=n.getState())==null?void 0:s.conversation.current)==null?void 0:i.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,s=o||window.location.origin;return r&&!n?null:r&&n?`${s}/apis/admin/session/passwordless/login/?token=${n}&redirect=${encodeURIComponent(e)}`:`${s}${e}`};var mo=b(R()),jD=({eventName:e,eventData:t,feedbackType:n,feedbackText:r})=>{let o=M("FeedbackThumbs",kk),s=ee("enableFeedbackForm"),i=j(Pr),a=j(Pa(`/admin/feedback?conversationId=${i}&type=${n}&text=${r}&data=${JSON.stringify(t)}`)),l=ce(_v),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,hp.default)(o.thumbsUp,u==="up"&&o.selected),disabled:!!u}),s&&a?(0,mo.jsx)(Ee.Button,{as:"a",title:l("thumbsDown"),href:a,target:"_blank",rel:"noreferrer",onClick:p,icon:(0,mo.jsx)(Iv,{}),className:(0,hp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u}):(0,mo.jsx)(Ee.Button,{title:l("thumbsDown"),onClick:p,icon:(0,mo.jsx)(Iv,{}),className:(0,hp.default)(o.thumbsDown,u==="down"&&o.selected),disabled:!!u})]})},Js=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 Ov={};Rt(Ov,{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:Hv,construct:Bv}=typeof Reflect!="undefined"&&Reflect;Wt||(Wt=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 yp=qt(Array.prototype.forEach),XD=qt(Array.prototype.lastIndexOf),Lk=qt(Array.prototype.pop),Dc=qt(Array.prototype.push),QD=qt(Array.prototype.splice),xp=qt(String.prototype.toLowerCase),Nv=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 Hv(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 Bv(e,n)}}function ve(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:xp;Ik&&Ik(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let s=n(o);s!==o&&(qD(t)||(t[r]=s),o=s)}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 ei(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]=ei(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"]),Mv=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"]),Dv=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"]),Fv=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"]),zv=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"]),vp=Wt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),o3=Bn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),s3=Bn(/<%[\w\W]*|[\w\W]*%>/gm),i3=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:s3,IS_ALLOWED_URI:Uk,IS_SCRIPT_OR_DATA:c3,MUSTACHE_EXPR:o3,TMPLIT_EXPR:i3}),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 s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML(i){return i},createScriptURL(i){return i}})}catch(i){return console.warn("TrustedTypes policy "+s+" 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:s,HTMLTemplateElement:i,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 i=="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:se,IS_SCRIPT_OR_DATA:Y,ATTR_WHITESPACE:V,CUSTOM_ELEMENT:U}=Fk,{IS_ALLOWED_URI:q}=Fk,$=null,K=ve({},[...Ok,...Mv,...Dv,...Fv,...Nk]),H=null,de=ve({},[...Mk,...zv,...Dk,...vp]),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,ie=!0,Q=!1,ae=!0,pe=!1,je=!1,vt=!1,Qe=!1,He=!1,Ze=!1,dt=!0,fs=!1,ps="user-content-",Zt=!0,vr=!1,Br={},vi=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"]),gm=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",xi=Ur,hm=!1,ym=null,zA=ve({},[cu,uu,Ur],Nv),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,wi=null,VA=n.createElement("form"),j0=function(T){return T instanceof RegExp||T instanceof Function},vm=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(wi&&wi===T)){if((!T||typeof T!="object")&&(T={}),T=ei(T),Ka=BA.indexOf(T.PARSER_MEDIA_TYPE)===-1?UA:T.PARSER_MEDIA_TYPE,ft=Ka==="application/xhtml+xml"?Nv:xp,$=fr(T,"ALLOWED_TAGS")?ve({},T.ALLOWED_TAGS,ft):K,H=fr(T,"ALLOWED_ATTR")?ve({},T.ALLOWED_ATTR,ft):de,ym=fr(T,"ALLOWED_NAMESPACES")?ve({},T.ALLOWED_NAMESPACES,Nv):zA,gm=fr(T,"ADD_URI_SAFE_ATTR")?ve(ei($0),T.ADD_URI_SAFE_ATTR,ft):$0,U0=fr(T,"ADD_DATA_URI_TAGS")?ve(ei(V0),T.ADD_DATA_URI_TAGS,ft):V0,vi=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,ie=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,fs=T.SANITIZE_NAMED_PROPS||!1,Zt=T.KEEP_CONTENT!==!1,vr=T.IN_PLACE||!1,q=T.ALLOWED_URI_REGEXP||Uk,xi=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($,Mv),ve(H,zv),ve(H,vp)),Br.svgFilters===!0&&(ve($,Dv),ve(H,zv),ve(H,vp)),Br.mathMl===!0&&(ve($,Fv),ve(H,Dk),ve(H,vp))),T.ADD_TAGS&&($===K&&($=ei($)),ve($,T.ADD_TAGS,ft)),T.ADD_ATTR&&(H===de&&(H=ei(H)),ve(H,T.ADD_ATTR,ft)),T.ADD_URI_SAFE_ATTR&&ve(gm,T.ADD_URI_SAFE_ATTR,ft),T.FORBID_CONTENTS&&(vi===B0&&(vi=ei(vi)),ve(vi,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),wi=T}},K0=ve({},[...Mv,...Dv,...n3]),W0=ve({},[...Fv,...r3]),$A=function(T){let B=h(T);(!B||!B.tagName)&&(B={namespaceURI:xi,tagName:"template"});let J=xp(T.tagName),Be=xp(B.tagName);return ym[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"&&ym[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"&&xi===Ur&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let Be=w?w.createHTML(T):T;if(xi===Ur)try{B=new f().parseFromString(Be,Ka)}catch(xt){}if(!B||!B.documentElement){B=C.createDocument(xi,"template",null);try{B.documentElement.innerHTML=hm?E:Be}catch(xt){}}let kt=B.body||B.documentElement;return T&&J&&kt.insertBefore(n.createTextNode(J),kt.childNodes[0]||null),xi===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)},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")},Y0=function(T){return typeof a=="function"&&T instanceof a};function Vr(ne,T,B){yp(ne,J=>{J.call(t,T,B,wi)})}let X0=function(T){let B=null;if(Vr(O.beforeSanitizeElements,T,null),xm(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&&!vi[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,yp([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(se,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(!gm[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||xm(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,fs&&(Wa==="id"||Wa==="name")&&(pu(xt,T),Dt=ps+Dt),ae&&Kt(/((--!?|])>)|<\/(style|title)/i,Dt)){pu(xt,T);continue}if(J.forceKeepAttr||(pu(xt,T),!J.keepAttr))continue;if(!ie&&Kt(/\/>/i,Dt)){pu(xt,T);continue}Q&&yp([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),xm(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 s&&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(hm=!ne,hm&&(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||vm(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 s&&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&&yp([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]:{};vm(ne),je=!0},t.clearConfig=function(){wi=null,je=!1},t.isValidAttribute=function(ne,T,B){wi||vm({});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 Vv=b(Ne()),Un=b(Z());var wp=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 Uv(e){let[t,n]=(0,wp.useState)(null);return(0,wp.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 rs(e){(0,qk.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ti(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 s=document.createElement("div");return ti(s),s.classList.add(Gk.root),o!=null&&o.portalRootNode&&s.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(s),r(s),()=>{s.isConnected&&s.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 Sp=b(R()),bp=(e=!1)=>{let[t,n]=(0,Un.useState)(e),r=(0,Un.useCallback)(()=>n(!0),[]),o=(0,Un.useCallback)(()=>n(!1),[]),s=(0,Un.useCallback)(()=>n(a=>!a),[]),i=(0,Un.useRef)(null);return{opened:t,open:r,close:o,toggle:s,triggerRef:i}};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 Ia=c=>{var u=c,{className:e,triggerRef:t,boundaryRef:n=(0,Un.createRef)(),position:r="above",align:o="center",children:s,toStyle:i=$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)(()=>i(d,f,0),[d,f]);return(0,Sp.jsx)(Xk,{parentNode:a,children:(0,Sp.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,Sp.jsx)("div",{className:(0,Vv.default)(e,Or.root),children:s})}))})};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 Wv(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var oi=Wv();function rR(e){oi=e}var $c={exec:()=>null};function Pe(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,s)=>{let i=typeof s=="string"?s:s.source;return i=i.replace(Gt.caret,"$1"),n=n.replace(o,i),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+|$)/,qv=/(?:[*+-]|\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+|$)/,sR=Pe(oR).replace(/bull/g,qv).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,qv).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(),Gv=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,b3=/^[^\n]+/,Yv=/(?!\s*\])(?:\\.|[^\[\]\\])+/,E3=Pe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Yv).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),T3=Pe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,qv).getRegex(),Cp="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]*?(?:-->|$))/,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",Xv).replace("tag",Cp).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),iR=Pe(Gv).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",Cp).getRegex(),k3=Pe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",iR).getRegex(),Qv={blockquote:k3,code:v3,def:E3,fences:x3,heading:w3,hr:Kc,html:C3,lheading:sR,list:T3,newline:y3,paragraph:iR,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",Cp).getRegex(),R3=P(S({},Qv),{lheading:S3,table:Zk,paragraph:Pe(Gv).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",Cp).getRegex()}),P3=P(S({},Qv),{html:Pe(`^ *(?: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:Pe(Gv).replace("hr",Kc).replace("heading",` *#{1,6} *[^
21
+ ]`).replace("lheading",sR).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)))/,kp=/[\p{P}\p{S}]/u,Zv=/[\s\p{P}\p{S}]/u,lR=/[^\s\p{P}\p{S}]/u,_3=Pe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zv).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,kp).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,Zv).replace(/punct/g,kp).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,Zv).replace(/punct/g,kp).getRegex(),U3=Pe(/\\(punct)/,"gu").replace(/punct/g,kp).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(Xv).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(),Tp=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,K3=Pe(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Tp).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fR=Pe(/^!?\[(label)\]\[(ref)\]/).replace("label",Tp).replace("ref",Yv).getRegex(),pR=Pe(/^!?\[(ref)\](?:\[\])?/).replace("ref",Yv).getRegex(),W3=Pe("reflink|nolink(?!\\()","g").replace("reflink",fR).replace("nolink",pR).getRegex(),Jv={_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({},Jv),{link:Pe(/^!?\[(label)\]\((.*?)\)/).replace("label",Tp).getRegex(),reflink:Pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Tp).getRegex()}),jv=P(S({},Jv),{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({},jv),{br:Pe(aR).replace("{2,}","*").getRegex(),text:Pe(jv.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Ep={normal:Qv,gfm:R3,pedantic:P3},Uc={normal:Jv,gfm:jv,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 s;let n=e.replace(Gt.findPipe,(i,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&&!((s=r.at(-1))!=null&&s.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 s=t.href,i=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:s,title:i,text:a,tokens:r.inlineTokens(a)};return r.state.inLink=!1,l}return{type:"image",raw:n,href:s,title:i,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
+ `).map(s=>{let i=s.match(n.other.beginningSpace);if(i===null)return s;let[a]=i;return a.length>=o.length?s.slice(o.length):s}).join(`
23
+ `)}var La=class{constructor(t){be(this,"options");be(this,"rules");be(this,"lexer");this.options=t||oi}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
+ `)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=Vc(n[0],`
27
26
  `).split(`
28
- `),o="",i="",s=[];for(;r.length>0;){let a=!1,l=[],u;for(u=0;u<r.length;u++)if(this.rules.other.blockquoteStart.test(r[u]))l.push(r[u]),a=!0;else if(!a)l.push(r[u]);else break;r=r.slice(u);let c=l.join(`
29
- `),f=c.replace(this.rules.other.blockquoteSetextReplace,`
27
+ `),o="",s="",i=[];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
+ `),d=u.replace(this.rules.other.blockquoteSetextReplace,`
30
29
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");o=o?`${o}
31
- ${c}`:c,i=i?`${i}
32
- ${f}`:f;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(f,s,!0),this.lexer.state.top=d,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 y=p,h=y.raw+`
30
+ ${u}`:u,s=s?`${s}
31
+ ${d}`:d;let f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,i,!0),this.lexer.state.top=f,r.length===0)break;let p=i.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+`
33
32
  `+r.join(`
34
- `),g=this.blockquote(h);s[s.length-1]=g,o=o.substring(0,o.length-y.raw.length)+g.raw,i=i.substring(0,i.length-y.text.length)+g.text;break}else if((p==null?void 0:p.type)==="list"){let y=p,h=y.raw+`
33
+ `),x=this.blockquote(m);i[i.length-1]=x,o=o.substring(0,o.length-v.raw.length)+x.raw,s=s.substring(0,s.length-v.text.length)+x.text;break}else if((p==null?void 0:p.type)==="list"){let v=p,m=v.raw+`
35
34
  `+r.join(`
36
- `),g=this.list(h);s[s.length-1]=g,o=o.substring(0,o.length-p.raw.length)+g.raw,i=i.substring(0,i.length-y.raw.length)+g.raw,r=h.substring(s.at(-1).raw.length).split(`
37
- `);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 u=!1,c="",f="";if(!(n=s.exec(t))||this.rules.block.hr.test(t))break;c=n[0],t=t.substring(c.length);let d=n[2].split(`
38
- `,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),p=t.split(`
39
- `,1)[0],y=!d.trim(),h=0;if(this.options.pedantic?(h=2,f=d.trimStart()):y?h=n[1].length+1:(h=n[2].search(this.rules.other.nonSpaceChar),h=h>4?1:h,f=d.slice(h),h+=n[1].length),y&&this.rules.other.blankLine.test(p)&&(c+=p+`
40
- `,t=t.substring(p.length+1),u=!0),!u){let v=this.rules.other.nextBulletRegex(h),x=this.rules.other.hrRegex(h),w=this.rules.other.fencesBeginRegex(h),C=this.rules.other.headingBeginRegex(h),E=this.rules.other.htmlBeginRegex(h);for(;t;){let k=t.split(`
41
- `,1)[0],I;if(p=k,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),I=p):I=p.replace(this.rules.other.tabCharGlobal," "),w.test(p)||C.test(p)||E.test(p)||v.test(p)||x.test(p))break;if(I.search(this.rules.other.nonSpaceChar)>=h||!p.trim())f+=`
42
- `+I.slice(h);else{if(y||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(d)||C.test(d)||x.test(d))break;f+=`
43
- `+p}!y&&!p.trim()&&(y=!0),c+=k+`
44
- `,t=t.substring(k.length+1),d=I.slice(h)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let g=null,m;this.options.gfm&&(g=this.rules.other.listIsTask.exec(f),g&&(m=g[0]!=="[ ] ",f=f.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!g,checked:m,loose:!1,text:f,tokens:[]}),i.raw+=c}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 u=0;u<i.items.length;u++)if(this.lexer.state.top=!1,i.items[u].tokens=this.lexer.blockTokens(i.items[u].text,[]),!i.loose){let c=i.items[u].tokens.filter(d=>d.type==="space"),f=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));i.loose=f}if(i.loose)for(let u=0;u<i.items.length;u++)i.items[u].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=qR(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(`
45
- `):[],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(qR(l,s.header.length).map((u,c)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[c]})));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)===`
46
- `?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=Ju(r.slice(0,-1),"\\");if((r.length-s.length)%2===0)return}else{let s=l4(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)),GR(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 GR(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,u=s,c=0,f=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(f.lastIndex=0,n=n.slice(-1*t.length+s);(o=f.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]){u+=l;continue}else if((o[5]||o[6])&&s%3&&!((s+l)%3)){c+=l;continue}if(u-=l,u>0)continue;l=Math.min(l,l+u+c);let d=[...o[0]][0].length,p=t.slice(0,s+o.index+d+l);if(Math.min(s,l)%2){let h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}let y=p.slice(2,-2);return{type:"strong",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}}}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}}}},er=class e{constructor(t){Ne(this,"tokens");Ne(this,"options");Ne(this,"state");Ne(this,"tokenizer");Ne(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ki,this.options.tokenizer=this.options.tokenizer||new Ia,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:Kt,block:Gp.normal,inline:Zu.normal};this.options.pedantic?(n.block=Gp.pedantic,n.inline=Zu.pedantic):this.options.gfm&&(n.block=Gp.gfm,this.options.breaks?n.inline=Zu.breaks:n.inline=Zu.gfm),this.tokenizer.rules=n}static get rules(){return{block:Gp,inline:Zu}}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(Kt.carriageReturn,`
47
- `),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(Kt.tabCharGlobal," ").replace(Kt.spaceLine,""));t;){let a;if((i=(o=this.options.extensions)==null?void 0:o.block)!=null&&i.some(u=>(a=u.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 u=n.at(-1);a.raw.length===1&&u!==void 0?u.raw+=`
48
- `:n.push(a);continue}if(a=this.tokenizer.code(t)){t=t.substring(a.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
49
- `+a.raw,u.text+=`
50
- `+a.text,this.inlineQueue.at(-1).src=u.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 u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
51
- `+a.raw,u.text+=`
52
- `+a.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let l=t;if((s=this.options.extensions)!=null&&s.startBlock){let u=1/0,c=t.slice(1),f;this.options.extensions.startBlock.forEach(d=>{f=d.call({lexer:this},c),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=t.substring(0,u+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let u=n.at(-1);r&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=`
53
- `+a.raw,u.text+=`
54
- `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.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 u=n.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=`
55
- `+a.raw,u.text+=`
56
- `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(a);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var a,l,u;let r=t,o=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)c.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.blockSkip.exec(r))!=null;)r=r.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.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);let i=!1,s="";for(;t;){i||(s=""),i=!1;let c;if((l=(a=this.options.extensions)==null?void 0:a.inline)!=null&&l.some(d=>(c=d.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);let d=n.at(-1);c.type==="text"&&(d==null?void 0:d.type)==="text"?(d.raw+=c.raw,d.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(t,r,s)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),n.push(c);continue}let f=t;if((u=this.options.extensions)!=null&&u.startInline){let d=1/0,p=t.slice(1),y;this.options.extensions.startInline.forEach(h=>{y=h.call({lexer:this},p),typeof y=="number"&&y>=0&&(d=Math.min(d,y))}),d<1/0&&d>=0&&(f=t.substring(0,d+1))}if(c=this.tokenizer.inlineText(f)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(s=c.raw.slice(-1)),i=!0;let d=n.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=c.raw,d.text+=c.text):n.push(c);continue}if(t){let d="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return n}},La=class{constructor(t){Ne(this,"options");Ne(this,"parser");this.options=t||Ki}space(t){return""}code({text:t,lang:n,escaped:r}){var s;let o=(s=(n||"").match(Kt.notSpaceStart))==null?void 0:s[0],i=t.replace(Kt.endingNewline,"")+`
57
- `;return o?'<pre><code class="language-'+Er(o)+'">'+(r?i:Er(i,!0))+`</code></pre>
58
- `:"<pre><code>"+(r?i:Er(i,!0))+`</code></pre>
35
+ `),x=this.list(m);i[i.length-1]=x,o=o.substring(0,o.length-p.raw.length)+x.raw,s=s.substring(0,s.length-v.raw.length)+x.raw,r=m.substring(i.at(-1).raw.length).split(`
36
+ `);continue}}return{type:"blockquote",raw:o,tokens:i,text:s}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim(),o=r.length>1,s={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 i=this.rules.other.listItemRegex(r),a=!1;for(;t;){let c=!1,u="",d="";if(!(n=i.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+=`
42
+ `+p}!v&&!p.trim()&&(v=!0),u+=k+`
43
+ `,t=t.substring(k.length+1),f=A.slice(m)}}s.loose||(a?s.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,""))),s.items.push({type:"list_item",raw:u,task:!!x,checked:y,loose:!1,text:d,tokens:[]}),s.raw+=u}let l=s.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c=0;c<s.items.length;c++)if(this.lexer.state.top=!1,s.items[c].tokens=this.lexer.blockTokens(s.items[c].text,[]),!s.loose){let u=s.items[c].tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));s.loose=d}if(s.loose)for(let c=0;c<s.items.length;c++)s.items[c].loose=!0;return s}}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"):"",s=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:s}}}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("|"),s=(a=n[3])!=null&&a.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
44
+ `):[],i={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(let l of o)this.rules.other.tableAlignRight.test(l)?i.align.push("right"):this.rules.other.tableAlignCenter.test(l)?i.align.push("center"):this.rules.other.tableAlignLeft.test(l)?i.align.push("left"):i.align.push(null);for(let l=0;l<r.length;l++)i.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:i.align[l]});for(let l of s)i.rows.push(tR(l,i.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:i.align[u]})));return i}}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 i=Vc(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=X3(n[2],"()");if(i>-1){let l=(n[0].indexOf("!")===0?5:4)+n[1].length+i;n[2]=n[2].substring(0,i),n[0]=n[0].substring(0,l).trim(),n[3]=""}}let o=n[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(o);i&&(o=i[1],s=i[3])}else s=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:s&&s.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," "),s=n[o.toLowerCase()];if(!s){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return nR(r,s,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 i=[...o[0]].length-1,a,l,c=i,u=0,d=o[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+i);(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])&&i%3&&!((i+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,i+o.index+f+l);if(Math.min(i,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),s=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return o&&s&&(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 s,i;if(n[2]==="@")s=n[0],i="mailto:"+s;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]);s=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:s,href:i,tokens:[{type:"text",raw:s,text:s}]}}}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||oi,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:Ep.normal,inline:Uc.normal};this.options.pedantic?(n.block=Ep.pedantic,n.inline=Uc.pedantic):this.options.gfm&&(n.block=Ep.gfm,this.options.breaks?n.inline=Uc.breaks:n.inline=Uc.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ep,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,s,i;for(this.options.pedantic&&(t=t.replace(Gt.tabCharGlobal," ").replace(Gt.spaceLine,""));t;){let a;if((s=(o=this.options.extensions)==null?void 0:o.block)!=null&&s.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
+ `: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
+ `+a.raw,c.text+=`
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+=`
50
+ `+a.raw,c.text+=`
51
+ `+a.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(t)){t=t.substring(a.raw.length),n.push(a);continue}if(a=this.tokenizer.lheading(t)){t=t.substring(a.raw.length),n.push(a);continue}let l=t;if((i=this.options.extensions)!=null&&i.startBlock){let c=1/0,u=t.slice(1),d;this.options.extensions.startBlock.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(a=this.tokenizer.paragraph(l))){let c=n.at(-1);r&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
52
+ `+a.raw,c.text+=`
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
+ `+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 s=!1,i="";for(;t;){s||(i=""),s=!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,i)){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)!=="_"&&(i=u.raw.slice(-1)),s=!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||oi}space(t){return""}code({text:t,lang:n,escaped:r}){var i;let o=(i=(n||"").match(Gt.notSpaceStart))==null?void 0:i[0],s=t.replace(Gt.endingNewline,"")+`
56
+ `;return o?'<pre><code class="language-'+Nr(o)+'">'+(r?s:Nr(s,!0))+`</code></pre>
57
+ `:"<pre><code>"+(r?s:Nr(s,!0))+`</code></pre>
59
58
  `}blockquote({tokens:t}){return`<blockquote>
60
59
  ${this.parser.parse(t)}</blockquote>
61
60
  `}html({text:t}){return t}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
62
61
  `}hr(t){return`<hr>
63
- `}list(t){let n=t.ordered,r=t.start,o="";for(let a=0;a<t.items.length;a++){let l=t.items[a];o+=this.listitem(l)}let i=n?"ol":"ul",s=n&&r!==1?' start="'+r+'"':"";return"<"+i+s+`>
64
- `+o+"</"+i+`>
65
- `}listitem(t){var r;let n="";if(t.task){let o=this.checkbox({checked:!!t.checked});t.loose?((r=t.tokens[0])==null?void 0:r.type)==="paragraph"?(t.tokens[0].text=o+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=o+" "+Er(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):n+=o+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
62
+ `}list(t){let n=t.ordered,r=t.start,o="";for(let a=0;a<t.items.length;a++){let l=t.items[a];o+=this.listitem(l)}let s=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+s+i+`>
63
+ `+o+"</"+s+`>
64
+ `}listitem(t){var r;let n="";if(t.task){let o=this.checkbox({checked:!!t.checked});t.loose?((r=t.tokens[0])==null?void 0:r.type)==="paragraph"?(t.tokens[0].text=o+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=o+" "+Nr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:o+" ",text:o+" ",escaped:!0}):n+=o+" "}return n+=this.parser.parse(t.tokens,!!t.loose),`<li>${n}</li>
66
65
  `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
67
- `}table(t){let n="",r="";for(let i=0;i<t.header.length;i++)r+=this.tablecell(t.header[i]);n+=this.tablerow({text:r});let o="";for(let i=0;i<t.rows.length;i++){let s=t.rows[i];r="";for(let a=0;a<s.length;a++)r+=this.tablecell(s[a]);o+=this.tablerow({text:r})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
66
+ `}table(t){let n="",r="";for(let s=0;s<t.header.length;s++)r+=this.tablecell(t.header[s]);n+=this.tablerow({text:r});let o="";for(let s=0;s<t.rows.length;s++){let i=t.rows[s];r="";for(let a=0;a<i.length;a++)r+=this.tablecell(i[a]);o+=this.tablerow({text:r})}return o&&(o=`<tbody>${o}</tbody>`),`<table>
68
67
  <thead>
69
68
  `+n+`</thead>
70
69
  `+o+`</table>
71
70
  `}tablerow({text:t}){return`<tr>
72
71
  ${t}</tr>
73
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}>
74
- `}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>${Er(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=$R(t);if(i===null)return o;t=i;let s='<a href="'+t+'"';return n&&(s+=' title="'+Er(n)+'"'),s+=">"+o+"</a>",s}image({href:t,title:n,text:r}){let o=$R(t);if(o===null)return Er(r);t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${Er(n)}"`),i+=">",i}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Er(t.text)}},tc=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""}},tr=class e{constructor(t){Ne(this,"options");Ne(this,"renderer");Ne(this,"textRenderer");this.options=t||Ki,this.options.renderer=this.options.renderer||new La,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new tc}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 u=a,c=this.options.extensions.renderers[u.type].call({parser:this},u);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){r+=c||"";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 u=l,c=this.renderer.text(u);for(;s+1<t.length&&t[s+1].type==="text";)u=t[++s],c+=`
75
- `+this.renderer.text(u);n?r+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):r+=c;continue}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}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 u=this.options.extensions.renderers[a.type].call({parser:this},a);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){r+=u||"";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 u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return r}},Vi=class{constructor(t){Ne(this,"options");Ne(this,"block");this.options=t||Ki}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?er.lex:er.lexInline}provideParser(){return this.block?tr.parse:tr.parseInline}};Ne(Vi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var A0=class{constructor(...t){Ne(this,"defaults",I0());Ne(this,"options",this.setOptions);Ne(this,"parse",this.parseMarkdown(!0));Ne(this,"parseInline",this.parseMarkdown(!1));Ne(this,"Parser",tr);Ne(this,"Renderer",La);Ne(this,"TextRenderer",tc);Ne(this,"Lexer",er);Ne(this,"Tokenizer",Ia);Ne(this,"Hooks",Vi);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 u of l)r=r.concat(this.walkTokens(u.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 u=a[l].flat(1/0);r=r.concat(this.walkTokens(u,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=b({},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 La(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],u=i[a];i[a]=(...c)=>{let f=l.apply(i,c);return f===!1&&(f=u.apply(i,c)),f||""}}o.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new Ia(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],u=i[a];i[a]=(...c)=>{let f=l.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}o.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Vi;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],u=i[a];Vi.passThroughHooks.has(s)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(l.call(i,c)).then(d=>u.call(i,d));let f=l.call(i,c);return u.call(i,f)}:i[a]=(...c)=>{let f=l.apply(i,c);return f===!1&&(f=u.apply(i,c)),f}}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=b(b({},this.defaults),o)}),this}setOptions(t){return this.defaults=b(b({},this.defaults),t),this}lexer(t,n){return er.lex(t,n!=null?n:this.defaults)}parser(t,n){return tr.parse(t,n!=null?n:this.defaults)}parseMarkdown(t){return(r,o)=>{let i=b({},o),s=b(b({},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?er.lex:er.lexInline,u=s.hooks?s.hooks.provideParser():t?tr.parse:tr.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(r):r).then(c=>l(c,s)).then(c=>s.hooks?s.hooks.processAllTokens(c):c).then(c=>s.walkTokens?Promise.all(this.walkTokens(c,s.walkTokens)).then(()=>c):c).then(c=>u(c,s)).then(c=>s.hooks?s.hooks.postprocess(c):c).catch(a);try{s.hooks&&(r=s.hooks.preprocess(r));let c=l(r,s);s.hooks&&(c=s.hooks.processAllTokens(c)),s.walkTokens&&this.walkTokens(c,s.walkTokens);let f=u(c,s);return s.hooks&&(f=s.hooks.postprocess(f)),f}catch(c){return a(c)}}}onError(t,n){return r=>{if(r.message+=`
76
- Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+Er(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}}},Wi=new A0;function Re(e,t){return Wi.parse(e,t)}Re.options=Re.setOptions=function(e){return Wi.setOptions(e),Re.defaults=Wi.defaults,YR(Re.defaults),Re};Re.getDefaults=I0;Re.defaults=Ki;Re.use=function(...e){return Wi.use(...e),Re.defaults=Wi.defaults,YR(Re.defaults),Re};Re.walkTokens=function(e,t){return Wi.walkTokens(e,t)};Re.parseInline=Wi.parseInline;Re.Parser=tr;Re.parser=tr.parse;Re.Renderer=La;Re.TextRenderer=tc;Re.Lexer=er;Re.lexer=er.lex;Re.Tokenizer=Ia;Re.Hooks=Vi;Re.parse=Re;var bW=Re.options,EW=Re.setOptions,TW=Re.use,CW=Re.walkTokens,kW=Re.parseInline;var RW=tr.parse,PW=er.lex;var nr=S(R());function c4(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 F0(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 d4(e){return e.replace(/\r\n/g,`
77
- `)}var f4=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=D("Markdown",VR),s=(0,to.useRef)(null),[a,l]=(0,to.useState)(null),u=(0,to.useMemo)(()=>{let h=Re.parse(d4(e));return DR.sanitize(h.toString()).replaceAll("</code>",`${c4(i.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),c=h=>{var v;let g=h.target,m=!!((v=s.current)!=null&&v.querySelector("code"));if(["A","BUTTON"].includes(g.tagName)){l(null);return}a||m&&g.tagName!=="CODE"||!m&&g!==s.current||(g.addEventListener("mouseleave",()=>l(null),{once:!0}),l(g))},f=()=>{if(!a)return;l(null);let h=a.querySelector("button");h&&(ka(h,i.fadeup),r==null||r(F0(a)))},d=h=>{let g=h.target;if(g.tagName==="A"){h.stopPropagation();return}"copyIcon"in g.dataset&&(ka(g,i.fadeup),r==null||r(F0(g.parentElement)))},p=()=>{!a||!o||(l(null),o(F0(a)))},y=h=>{if(h===null)return;let g=h.getBoundingClientRect();g.left<0?h.style.transform=`translateX(${-g.left+2}px)`:g.right>window.innerWidth&&(h.style.transform=`translateX(${window.innerWidth-g.right-2}px)`)};return(0,nr.jsxs)(to.Fragment,{children:[a&&(r||o)&&(0,nr.jsxs)(Aa,{triggerRef:{current:a},className:i.popover,parentNode:a,children:[(0,nr.jsxs)("div",{className:i.options,ref:y,children:[r&&(0,nr.jsx)("button",{type:"button",className:i.option,onClick:f,children:n}),o&&(0,nr.jsxs)(to.Fragment,{children:[(0,nr.jsx)("div",{className:i.divider}),(0,nr.jsx)("button",{type:"button",className:i.option,onClick:p,children:t})]})]}),(0,nr.jsx)("div",{className:i.arrow})]}),(0,nr.jsx)("div",{ref:s,"data-testid":"widget-markdown-content",className:i.root,dangerouslySetInnerHTML:{__html:u},onMouseOver:c,onClick:d})]})},$i=f4;var Ot=S(R()),p4=({threadId:e,onEvaluate:t,onUse:n,onResetQuestion:r,question:o})=>{var g;let[i,s]=qi.default.useState(""),{setSelected:a}=Vo(),l=(0,qi.useRef)(null),u=D("KnowledgeSearchStyles",SR),c=ue(y0),f=at(),d=(g=K(bu(e!=null?e:-1)))!=null?g:[],p=Zr(t,{onSuccess(m){f("knowledge assist question answered",{question:i||o||"",sources:m.answer.sources,answer:m.answer.answer,isFollowUpQuestion:d.length>=1,isAutoInitiated:!i&&!!o}),a(`knowledge-assist-${d.length}`),s("")}}),y=m=>A(void 0,null,function*(){m.preventDefault(),m.stopPropagation(),i!==""&&p.call(i)}),h=(m,v)=>{f("knowledge assist source viewed",{question:v,sourceViewed:m.url||m.name})};return(0,qi.useEffect)(()=>{var m;o&&p.state==="idle"?p.call(o):(m=l.current)==null||m.focus()},[l,p.state]),(0,qi.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth"})},[l,d]),(0,Ot.jsxs)("div",{className:u.root,children:[d.length>0&&(0,Ot.jsx)("div",{className:u.alignRight,children:(0,Ot.jsx)(qe.Button,{onClick:r,children:c("reset")})}),d.map(({question:m,answer:v},x)=>(0,Ot.jsx)(qe.List,{children:(0,Ot.jsx)(qe.ListItem,{id:`knowledge-assist-${x}`,"data-testid":"knowledge-search-answer",description:(0,Ot.jsx)($i,{content:v.answer}),closeOnSelect:!0,onClick:()=>n(v.answer),onSourceClick:w=>h(w,m),sources:v.sources,styles:{title:u.question,description:u.answer},extra:(0,Ot.jsx)("div",{className:u.listItemFeedback,children:(0,Ot.jsx)(Bi,{feedbackText:v.answer,feedbackType:"knowledge-assist-answer",eventName:"knowledge assist feedback",eventData:b({question:m,isAgent:o!==m,isFollowUpQuestion:d.length>1},v)})}),children:m})},`${v.answer}_${x}`)),p.state==="loading"&&(0,Ot.jsx)("p",{className:u.status,children:c("loading")}),p.state==="error"&&(0,Ot.jsx)("p",{className:u.status,children:c("error")}),(0,Ot.jsxs)("form",{className:u.form,onSubmit:y,children:[(0,Ot.jsx)("input",{ref:l,placeholder:c("anotherQuestion"),className:u.input,type:"text",value:i,onFocus:()=>{a(void 0)},onChange:m=>{a(void 0),s(m.target.value)}}),(0,Ot.jsx)("button",{type:"submit",className:u.submit,disabled:p.state==="loading",children:(0,Ot.jsx)(wR,{})})]})]})},sP=p4;var H0=S(R()),Zp=e=>(0,H0.jsx)("svg",P(b({xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512"},e),{children:(0,H0.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 rc={};bt(rc,{enUS:()=>m4,nlNL:()=>g4});var m4={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"}]},g4={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 Jp={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var Gi=S(R()),h4=({suggestion:e,source:t,context:n})=>{let r=ue(rc),o=K(yr),i=he(),s=J("enableSuggestionFeedback"),a=`${e.text}`,l=K(Ra(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),u=()=>{i(Wr({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!s||!l?null:(0,Gi.jsxs)(mt,{placement:"top-end",children:[(0,Gi.jsx)(mt.Trigger,{className:Jp.trigger,children:(0,Gi.jsx)(Zp,{"data-testid":"feedback-dropdown-trigger"})}),(0,Gi.jsx)(mt.Content,{className:Jp.content,children:(0,Gi.jsx)(mt.Button,{className:Jp.item,as:"a",onClick:u,target:"_blank",href:l,children:r("giveFeedback")})})]})},em=h4;var oc={};bt(oc,{enUS:()=>y4,nlNL:()=>v4});var y4={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?"}]},v4={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 gP=S($());var x4=["{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}"],w4=new RegExp(x4.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function aP(e,t){let n=e.split(w4),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 u=r;if(l){let f=a.charAt(0),d=0;do u=f?t.indexOf(f,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function lP(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var cP={suggestions:[],fetchState:"idle"},uP={default:cP},dP=e=>t=>{var n,r;return(r=(n=t.textSuggestions[e])==null?void 0:n.suggestions)!=null?r:[]},tm=e=>e.textSuggestions,fP=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},nm=ot("textSuggestions/refresh"),rr=ge("textSuggestions/recommendations",(e,t)=>A(void 0,null,function*(){var u,c;let{deepdeskAPI:n}=t.extra,r=t.getState(),{platformVariables:o}=r.info,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=ia(r),l=[];if(e==="sticky-messages"){let f=(u=r.profile.data)==null?void 0:u.code;if(!f)throw new Error("No current profile to fetch pinned messages");l=yield n.getPinnedMessages(f)}else{let f=(c=r.conversation.current)==null?void 0:c.id;if(!f)throw new Error("No current conversation to fetch text suggestions");l=yield n.getTextSuggestions(f,au(r),e)}if(o&&(l=l.map(f=>b(P(b({},f),{text:rn(f.text,o)}),f.title?{title:rn(f.title,o)}:{}))),e==="default"){let f=s?l.filter(fP(a)):l;t.dispatch(zo(f.slice(0,i)))}return l})),ic=ge("textSuggestions/autocompletions",(e,t)=>A(void 0,null,function*(){var c;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(c=r.conversation.current)==null?void 0:c.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 u=yield n.getAutocompleteSuggestions(o,P(b({},au(r)),{input:e}));if(!t.getState().input.text)throw new Error("Abort");return l&&(u=u.filter(fP(e))),i&&(u=u.map(f=>P(b({},f),{text:rn(f.text,i)}))),a&&(u=u.map(f=>P(b({},f),{text:f.source!=="trie-with-typos"?aP(f.text,e):f.text}))),u=lP(u,s),t.dispatch(zo(u)),u})),pP=Ce({name:"textSuggestions",initialState:uP,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(rr.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||cP;return P(b({},t),{[r]:P(b({},o),{fetchState:"loading"})})}).addCase(rr.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(rr.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(ic.pending,t=>{t.default.fetchState="loading"}).addCase(ic.rejected,t=>{t.default.fetchState="error"}).addCase(ic.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(it,()=>uP)}}),{setTextSuggestions:LK}=pP.actions,mP=pP.reducer;var Yi=S(R()),S4=({types:e,commands:t,onClick:n})=>{let r=he(),o=ue(oc),i=K(tm);return(0,gP.useEffect)(()=>{e.forEach(({type:s})=>{(!i[s]||i[s].suggestions.length===0)&&r(rr(s))})},[]),(0,Yi.jsxs)("div",{children:[t.length>0&&(0,Yi.jsx)(qe.List,{heading:o("commands"),children:t.map((s,a)=>(0,Yi.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,Yi.jsx)(qe.List,{heading:a,orientation:"vertical",children:(l=i[s])==null?void 0:l.suggestions.map((u,c)=>(0,Yi.jsx)(qe.ListItem,{id:`${s}-${c}`,closeOnSelect:!1,description:u.title&&u.text,onClick:()=>n(u.text,u),"data-testid":"search-overlay-suggestion",children:u.title||u.text},`${u.id}-${u.text}`))},s)})]})},hP=S4;var xt=S(R()),E4=200,T4=5,C4=4,z0=(e,t,n)=>e.slice(0,n?10:t.toLowerCase()==="image"?C4:T4),k4=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),R4=()=>{var N,H,ce;let e=he(),t=on(),n=ue(oc),[r,o]=(0,$t.useState)(!1),[i,s]=(0,$t.useState)(""),[a,l]=(0,$t.useState)(null),u=K(zT),c=K(Ri),[f,d]=(0,$t.useState)(),p=K(zt),y=J("showSearch"),h=J("enableSuggestionFeedback"),g=J("showEntitiesCommand"),m=J("showKnowledgeSearch"),v=J("showImageSearch"),x=J("searchTriggerKey"),w=K(op),C=K(ip),E=K(hC),k=K(lv),I=K(BT),L=K(HT),G=((ce=(H=(N=c==null?void 0:c.uiConfig)==null?void 0:N.search)==null?void 0:H.initialTypes)==null?void 0:ce.filter(({isActive:V})=>V))||[],F=at(),j=(0,$t.useMemo)(()=>{let V=fe=>z0(k.filter(ne=>ne.type===fe.toUpperCase()),fe,f),me=(E==null?void 0:E.map(fe=>({value:fe.code.toUpperCase(),label:`${fe.name}s`,list:V(fe.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[];if(me.push({value:"PERSONAL",label:n("personalSuggestions"),list:V("PERSONAL"),lineClamp:!1,listOrientation:"vertical"},{value:"URL",label:n("urlSuggestions"),list:V("URL"),lineClamp:!1,listOrientation:"vertical"},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:V("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical"}),v&&me.push({value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:V("IMAGE"),listOrientation:"horizontal"}),G.length===0)return me;let pe=G.map(fe=>me.find(ne=>ne.value.toLowerCase()===fe.type)).filter(fe=>!!fe),Se=me.filter(fe=>!pe.find(ne=>ne.value===fe.value));return[...pe,...Se]},[E,G,v,f]),M=[{label:n("entitiesClipboard"),onClick:()=>e(Kr("entities")),shouldShow:g&&k4(n("entitiesClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>{e(Kr("knowledgeAssist")),F("open knowledge assistant",{via:"search-command"})},shouldShow:m}].filter(V=>V.shouldShow).filter(()=>!f),_=(0,$t.useCallback)((0,yP.default)((V,me)=>{e(Ei({query:V,type:me,tags:["search-overlay"],size:f?50:20}))},E4),[f]),X=(0,$t.useCallback)((V,me)=>{switch(me.type){case"IMAGE":t.send(cv,{suggestion:me});break;default:t.send(vr,{text:V,suggestion:me})}e(An(!1))},[e]),te=V=>{xr(V.text),e(Wr({name:"entity copied",data:{entity:V,type:"copy"}})),e(An(!1))},q=V=>{t.send(vr,{text:V,suggestion:{source:"knowledge-assist",text:V}}),e(Wr({name:"answer used",data:{originalText:V},options:{includeConversationData:!0}})),s(""),a&&e(ua(a)),e(Kr("search")),e(An(!1))},W=V=>{let me={input:V,threadId:a,onNewThreadId:pe=>l(pe)};if(C)return Ci(b({assistantCode:C},me));if(w)return ki(b({assistantCode:w},me))};function B(V){return me=>{r?window.confirm(n("warning"))&&(V(me),o(!1)):V(me)}}return(0,$t.useEffect)(()=>{i?_(i,f):e(Kf())},[i,f]),(0,$t.useEffect)(()=>{p&&e(Eu())},[p]),dR(x,()=>{e(An(!0)),F("open search",{via:"ctrl+k"})}),!y||!c?null:(0,xt.jsxs)(qe,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:B(V=>e(An(V))),onChangeType:V=>d(V),onChangePage:B(V=>e(Kr(V))),selectedType:f,search:i,page:u,isOpen:L,types:j,updateDeps:[k],children:[(0,xt.jsxs)(qe.Page,{id:"search",children:[i.length===0&&(0,xt.jsx)(hP,{types:G,commands:M,onClick:X}),i.length>0&&(0,xt.jsxs)($t.Fragment,{children:[M.length>0&&(0,xt.jsx)(qe.List,{heading:n("commands"),children:M.map((V,me)=>(0,xt.jsx)(qe.ListItem,{closeOnSelect:!1,onClick:V.onClick,id:`commands-${me}`,children:V.label},V.label))}),j.map(({value:V,label:me,list:pe,lineClamp:Se,listOrientation:fe})=>(0,xt.jsx)(qe.List,{heading:me,orientation:fe==="horizontal"?"horizontal":"vertical",onShowAll:()=>d(V),hasMore:!f&&I[V.toLowerCase()]>z0(pe,V,f).length,children:z0(pe,V,f).map(ne=>(0,xt.jsx)(qe.ListItem,{id:`${V}-${ne.id}`,closeOnSelect:!1,lineClamp:Se,onClick:()=>X(ne.text,ne),description:V!=="IMAGE"?ne.title&&ne.text:void 0,tooltip:ne.text,extra:h&&(0,xt.jsx)(qe.ListItemActions,{children:(0,xt.jsx)(em,{context:i,source:"search",suggestion:ne})}),children:V==="IMAGE"?(0,xt.jsx)(qe.Image,{title:ne.title||ne.text,src:ne.image}):ne.title||ne.text},`${ne.id}-${ne.text}`))},V))]})]}),(0,xt.jsx)(qe.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:B(()=>{e(Kr("search"))}),children:(0,xt.jsx)(gR,{onCopy:te})}),(w!=null?w:C)&&(0,xt.jsx)(qe.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:B(()=>{a&&e(ua(a)),e(Kr("search"))}),children:(0,xt.jsx)(sP,{threadId:a,onEvaluate:W,question:i,onUse:q,onResetQuestion:()=>{a&&e(ua(a)),s(""),l(null)}})})]})},vP=R4;var sc=S(R()),P4=()=>{let e=J("showSearch"),t=J("isEmbedded");return(0,sc.jsxs)(xP.Fragment,{children:[e&&(0,sc.jsx)(vP,{}),t&&(0,sc.jsx)(sC,{})]})},wP=P4;var TP=S(Fe());var rm=S(R()),SP=({className:e})=>(0,rm.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,rm.jsx)("g",{children:(0,rm.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),s=eR(t);if(s===null)return o;t=s;let i='<a href="'+t+'"';return n&&(i+=' title="'+Nr(n)+'"'),i+=">"+o+"</a>",i}image({href:t,title:n,text:r}){let o=eR(t);if(o===null)return Nr(r);t=o;let s=`<img src="${t}" alt="${r}"`;return n&&(s+=` title="${Nr(n)}"`),s+=">",s}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||oi,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,s;let r="";for(let i=0;i<t.length;i++){let a=t[i];if((s=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&s[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(;i+1<t.length&&t[i+1].type==="text";)c=t[++i],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,s;let r="";for(let i=0;i<t.length;i++){let a=t[i];if((s=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&s[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}},ni=class{constructor(t){be(this,"options");be(this,"block");this.options=t||oi}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(ni,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"]));var Kv=class{constructor(...t){be(this,"defaults",Wv());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",ni);this.use(...t)}walkTokens(t,n){var o,s;let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let a=i;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=i;r=r.concat(this.walkTokens(a.items,n));break}default:{let a=i;(s=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&s[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(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let i=n.renderers[s.name];i?n.renderers[s.name]=function(...a){let l=s.renderer.apply(this,a);return l===!1&&(l=i.apply(this,a)),l}:n.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=n[s.level];i?i.unshift(s.tokenizer):n[s.level]=[s.tokenizer],s.start&&(s.level==="block"?n.startBlock?n.startBlock.push(s.start):n.startBlock=[s.start]:s.level==="inline"&&(n.startInline?n.startInline.push(s.start):n.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(n.childTokens[s.name]=s.childTokens)}),o.extensions=n),r.renderer){let s=this.defaults.renderer||new _a(this.defaults);for(let i in r.renderer){if(!(i in s))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,l=r.renderer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d||""}}o.renderer=s}if(r.tokenizer){let s=this.defaults.tokenizer||new La(this.defaults);for(let i in r.tokenizer){if(!(i in s))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,l=r.tokenizer[a],c=s[a];s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}o.tokenizer=s}if(r.hooks){let s=this.defaults.hooks||new ni;for(let i in r.hooks){if(!(i in s))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,l=r.hooks[a],c=s[a];ni.passThroughHooks.has(i)?s[a]=u=>{if(this.defaults.async)return Promise.resolve(l.call(s,u)).then(f=>c.call(s,f));let d=l.call(s,u);return c.call(s,d)}:s[a]=(...u)=>{let d=l.apply(s,u);return d===!1&&(d=c.apply(s,u)),d}}o.hooks=s}if(r.walkTokens){let s=this.defaults.walkTokens,i=r.walkTokens;o.walkTokens=function(a){let l=[];return l.push(i.call(this,a)),s&&(l=l.concat(s.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 s=S({},o),i=S(S({},this.defaults),s),a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.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"));i.hooks&&(i.hooks.options=i,i.hooks.block=t);let l=i.hooks?i.hooks.provideLexer():t?pr.lex:pr.lexInline,c=i.hooks?i.hooks.provideParser():t?mr.parse:mr.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(r):r).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>c(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(r=i.hooks.preprocess(r));let u=l(r,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let d=c(u,i);return i.hooks&&(d=i.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}}},ri=new Kv;function Re(e,t){return ri.parse(e,t)}Re.options=Re.setOptions=function(e){return ri.setOptions(e),Re.defaults=ri.defaults,rR(Re.defaults),Re};Re.getDefaults=Wv;Re.defaults=oi;Re.use=function(...e){return ri.use(...e),Re.defaults=ri.defaults,rR(Re.defaults),Re};Re.walkTokens=function(e,t){return ri.walkTokens(e,t)};Re.parseInline=ri.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=ni;Re.parse=Re;var kV=Re.options,RV=Re.setOptions,PV=Re.use,AV=Re.walkTokens,IV=Re.parseInline;var LV=mr.parse,_V=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 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 J3(e){return e.replace(/\r\n/g,`
76
+ `)}var e4=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let s=M("Markdown",Qk),i=(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(s.copyIcon)}</code>`).replaceAll('<a href="','<a target="_blank" rel="noreferrer noopener" href="')},[e]),u=m=>{var g;let x=m.target,y=!!((g=i.current)!=null&&g.querySelector("code"));if(["A","BUTTON"].includes(x.tagName)){l(null);return}a||y&&x.tagName!=="CODE"||!y&&x!==i.current||(x.addEventListener("mouseleave",()=>l(null),{once:!0}),l(x))},d=()=>{if(!a)return;l(null);let m=a.querySelector("button");m&&(Ra(m,s.fadeup),r==null||r(e0(a)))},f=m=>{let x=m.target;if(x.tagName==="A"){m.stopPropagation();return}"copyIcon"in x.dataset&&(Ra(x,s.fadeup),r==null||r(e0(x.parentElement)))},p=()=>{!a||!o||(l(null),o(e0(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:s.popover,parentNode:a,children:[(0,gr.jsxs)("div",{className:s.options,ref:v,children:[r&&(0,gr.jsx)("button",{type:"button",className:s.option,onClick:d,children:n}),o&&(0,gr.jsxs)(ho.Fragment,{children:[(0,gr.jsx)("div",{className:s.divider}),(0,gr.jsx)("button",{type:"button",className:s.option,onClick:p,children:t})]})]}),(0,gr.jsx)("div",{className:s.arrow})]}),(0,gr.jsx)("div",{ref:i,"data-testid":"widget-markdown-content",className:s.root,dangerouslySetInnerHTML:{__html:c},onMouseOver:u,onClick:f})]})},si=e4;var Nt=b(R()),t4=({threadId:e,onEvaluate:t,onUse:n,onResetQuestion:r,question:o})=>{var x;let[s,i]=ii.default.useState(""),{setSelected:a}=es(),l=(0,ii.useRef)(null),c=M("KnowledgeSearchStyles",Ak),u=ce(Ov),d=ct(),f=(x=j(fc(e!=null?e:-1)))!=null?x:[],p=po(t,{onSuccess(y){d("knowledge assist question answered",{question:s||o||"",sources:y.answer.sources,answer:y.answer.answer,isFollowUpQuestion:f.length>=1,isAutoInitiated:!s&&!!o}),a(`knowledge-assist-${f.length}`),i("")}}),v=y=>I(void 0,null,function*(){y.preventDefault(),y.stopPropagation(),s!==""&&p.call(s)}),m=(y,g)=>{d("knowledge assist source viewed",{question:g,sourceViewed:y.url||y.name})};return(0,ii.useEffect)(()=>{var y;o&&p.state==="idle"?p.call(o):(y=l.current)==null||y.focus()},[l,p.state]),(0,ii.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)(si,{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)(Js,{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:s,onFocus:()=>{a(void 0)},onChange:y=>{a(void 0),i(y.target.value)}}),(0,Nt.jsx)("button",{type:"submit",className:c.submit,disabled:p.state==="loading",children:(0,Nt.jsx)(Pk,{})})]})]})},mR=t4;var t0=b(R()),Rp=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 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 Pp={trigger:"dd-dQ-OH",content:"dd-9k0N3",item:"dd-va6pa"};var ai=b(R()),o4=({suggestion:e,source:t,context:n})=>{let r=ce(Wc),o=j(Pr),s=ye(),i=ee("enableSuggestionFeedback"),a=`${e.text}`,l=j(Pa(`/admin/feedback?conversationId=${o}&type=${t}&text=${a}&data=${JSON.stringify({context:n})}`)),c=()=>{s(oo({name:"suggestion feedback",data:{text:e.text,source:t,context:n},options:{includeConversationData:!0}}))};return!i||!l?null:(0,ai.jsxs)(yt,{placement:"top-end",children:[(0,ai.jsx)(yt.Trigger,{className:Pp.trigger,children:(0,ai.jsx)(Rp,{"data-testid":"feedback-dropdown-trigger"})}),(0,ai.jsx)(yt.Content,{className:Pp.content,children:(0,ai.jsx)(yt.Button,{className:Pp.item,as:"a",onClick:c,target:"_blank",href:l,children:r("giveFeedback")})})]})},Ap=o4;var qc={};Rt(qc,{enUS:()=>s4,nlNL:()=>i4});var s4={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?"}]},i4={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 s=0;s<n.length;s++){let i=n[s];if(o.push(i),s===n.length-1)break;if(t.indexOf(i)===-1)return e;let a=n[s+1],l=s===n.length-2;r+=i.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:[]},Ip=e=>e.textSuggestions,wR=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Lp=it("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:s,inlineSuggestions:i}=r.settings,a=ia(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=i?l.filter(wR(a)):l;t.dispatch(Xo(d.slice(0,s)))}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:s}=r.info,{textSuggestionsCount:i,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))),s&&(c=c.map(d=>P(S({},d),{text:un(d.text,s)}))),a&&(c=c.map(d=>P(S({},d),{text:d.source!=="trie-with-typos"?gR(d.text,e):d.text}))),c=hR(c,i),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:M$}=SR.actions,bR=SR.reducer;var li=b(R()),c4=({types:e,commands:t,onClick:n})=>{let r=ye(),o=ce(qc),s=j(Ip);return(0,ER.useEffect)(()=>{e.forEach(({type:i})=>{(!s[i]||s[i].suggestions.length===0)&&r(hr(i))})},[]),(0,li.jsxs)("div",{children:[t.length>0&&(0,li.jsx)(Ge.List,{heading:o("commands"),children:t.map((i,a)=>(0,li.jsx)(Ge.ListItem,{id:`command-${a}`,closeOnSelect:!1,onClick:i.onClick,children:i.label},i.label))}),e.map(({type:i,title:a})=>{var l;return(0,li.jsx)(Ge.List,{heading:a,orientation:"vertical",children:(l=s[i])==null?void 0:l.suggestions.map((c,u)=>(0,li.jsx)(Ge.ListItem,{id:`${i}-${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}`))},i)})]})},TR=c4;var Tt=b(R()),d4=200,f4=5,p4=4,n0=(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),[s,i]=(0,Yt.useState)(""),[a,l]=(0,Yt.useState)(null),c=j(Y1),u=j(Bs),[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(Of),E=j(Nf),C=j(kT),k=j(Ey),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=>n0(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(so("entities")),shouldShow:x&&m4(n("entitiesClipboard"),s)},{label:s?`${n("knowledgeAssist")}: ${s}`:n("knowledgeAssist"),onClick:()=>{e(so("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(Ds({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(Cy,{suggestion:de});break;default:t.send(Ar,{text:H,suggestion:de})}e(Fn(!1))},[e]),se=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}})),i(""),a&&e(ua(a)),e(so("search")),e(Fn(!1))},V=H=>{let de={input:H,threadId:a,onNewThreadId:ue=>l(ue)};if(E)return zs(S({assistantCode:E},de));if(w)return Hs(S({assistantCode:w},de))};function U(H){return de=>{r?window.confirm(n("warning"))&&(H(de),o(!1)):H(de)}}return(0,Yt.useEffect)(()=>{s?L(s,d):e(wf())},[s,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:i,onChangeOpen:U(H=>e(Fn(H))),onChangeType:H=>f(H),onChangePage:U(H=>e(so(H))),selectedType:d,search:s,page:c,isOpen:F,types:G,updateDeps:[k],children:[(0,Tt.jsxs)(Ge.Page,{id:"search",children:[s.length===0&&(0,Tt.jsx)(TR,{types:N,commands:W,onClick:z}),s.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()]>n0(ue,H,d).length,children:n0(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)(Ap,{context:s,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(so("search"))}),children:(0,Tt.jsx)(Ek,{onCopy:se})}),(w!=null?w:E)&&(0,Tt.jsx)(Ge.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:U(()=>{a&&e(ua(a)),e(so("search"))}),children:(0,Tt.jsx)(mR,{threadId:a,onEvaluate:V,question:s,onUse:Y,onResetQuestion:()=>{a&&e(ua(a)),i(""),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 _p=b(R()),AR=({className:e})=>(0,_p.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,_p.jsx)("g",{children:(0,_p.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
78
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
79
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
80
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
81
- 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 B0=S(R()),A4={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},bP=({className:e,color:t})=>(0,B0.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,B0.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:A4[t||"pink"]})});var EP={root:"dd-LbeUM",text:"dd-Dpfn1",isLoggedIn:"dd-XvHAn",isLoggedOut:"dd-21y-z",icon:"dd-8rLqS",logo:"dd-slXhD",lock:"dd-ByzlR"};var U0={};bt(U0,{enUS:()=>I4,nlNL:()=>L4});var I4={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},L4={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var Xi=S(R()),CP=({onLogIn:e})=>{let t=ue(U0),n=J("floatingMenu"),r=J("productName"),o=he(),i=K(zt),s=D("FloatingMenu",EP);if(i===null||n===!1)return null;let a=()=>{i===!0?o(An(!0)):e()};return(0,Xi.jsxs)("button",{type:"button",className:(0,TP.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,Xi.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,Xi.jsxs)("div",{className:s.icon,children:[(0,Xi.jsx)(bP,{className:s.logo,color:"pink"}),i===!1&&(0,Xi.jsx)(SP,{className:s.lock})]})]})};var am=S($());function Tr(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 O4={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},om=({ui:e})=>e.overlayCollapsed,kP=Ce({name:"ui",initialState:O4,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:ac,setInputFocus:im,setOverlayCollapsed:qo,setOpenOverlayWhenTyping:RP,setOverlayCollapsedUserOverwrite:PP}=kP.actions,AP=kP.reducer;var NP=S($());var Go=S($());var IP=S($());function LP(e,t,n){(0,IP.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var OP={root:"dd-1MBCO",actions:"dd--x4cy",badge:"dd-4Fpkz",formattedText:"dd-EzvTB"};var Qi=S(R()),N4=["search","personal-collection-search","search-autocomplete"];function _4(e,t,n,r={}){var i;let o="";return N4.includes(t)?o=LC(_v(e,n,{stripAgentPart:!0}),(i=r.searchKeywords)!=null?i:[n]):o=_v(e,n,r),r.placeholders===!0&&(o=OC(o)),o}var D4=()=>{},F4=({selected:e,suggestion:t})=>{let n=J("inlineSuggestions"),r=K(ia),[o,i]=(0,Go.useState)(!1),s=J("enableSuggestionFeedback"),a=K(d=>d.input.text),l=he(),u=D("TextSuggestion",OP),c=(0,Go.useRef)(null);(0,Go.useEffect)(()=>{let d=setTimeout(()=>{l(wT({text:t.text,suggestion:t}))},500);return()=>{clearTimeout(d)}},[t]),LP(c,"click",()=>{l(jn({suggestion:t,text:t.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let f=(0,Go.useMemo)(()=>_4(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,Qi.jsxs)("div",{className:u.root,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,Qi.jsx)(be,{ref:c,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:D4,children:(0,Qi.jsx)(Oi,{containerTagName:"div",noWrap:!1,tagName:"span",className:u.formattedText,content:f})}),s&&o&&(0,Qi.jsx)("div",{className:u.actions,children:(0,Qi.jsx)(em,{source:"overlay",context:a,suggestion:t})})]})},MP=F4;var _P=S(R()),H4=({suggestions:e,selectedIndex:t,reverse:n})=>(0,NP.useMemo)(()=>{let o=e.map((i,s)=>(0,_P.jsx)(MP,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]),sm=H4;var DP={root:"dd-PfvRI",paper:"dd-HYlyY"};var lc=S(R()),z4=({textSuggestions:e,selectedIndex:t})=>{let n=(0,am.useRef)(null),r=D("InlineSuggestionsOverlay",DP),o=K(Tr),i=he(),s=K(zt),a=K(oa),l=K(om),u=J("showTextSuggestions");return $o(()=>{setTimeout(()=>{i(qo({collapse:!0,skipWhenInputFocus:!0}))})}),(0,am.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let f=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-f.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,lc.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,lc.jsx)("div",{ref:n,className:r.paper,children:(0,lc.jsx)(Zt,{children:(0,lc.jsx)(sm,{suggestions:e,selectedIndex:t})})})})},B4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),FP=wi(B4)(z4);var uc=S(R()),U4=({children:e})=>{let n=J("locale").replace("-","");return(0,uc.jsx)(xv.Provider,{value:n,children:e})},j4=({store:e,customStyles:t={},children:n})=>(0,uc.jsx)(Jy,{store:e,children:(0,uc.jsx)(U4,{children:(0,uc.jsx)(Ya.Provider,{value:t,children:n})})}),Yo=j4;var um=S(Fe()),Oa=S($());var HP=S($());function zP(e,t){let[n,r]=(0,HP.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 BP=()=>/Mac/i.test(navigator.platform);var jP=S(Fe()),no=S($());var j0={};bt(j0,{enUS:()=>V4,nlNL:()=>W4});var V4={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"}]}]},W4={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 UP={root:"dd-uTPjX",anchor:"dd-C8lsZ",anchorButton:"dd-IoSx9"};var Xo=S(R()),V0=(e,t,n)=>r=>(0,Xo.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),K4=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=ue(j0),s=on(),a=D("Login",UP),l=J("productName"),u=(0,no.useCallback)(g=>{g.preventDefault(),r&&r(Number.parseInt(g.target.value,10))},[]),c=(0,no.useCallback)(g=>{g.preventDefault(),s.send(la,!0)},[t]),f=(0,no.useMemo)(()=>g=>(0,Xo.jsx)("a",{onClick:v=>{v.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:g},"login"),[t]),d=(0,no.useCallback)(g=>(0,Xo.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:g},"prompt"),[c]),{min:p,hour:y,day:h}=(0,no.useMemo)(()=>({min:V0(a,60*10,u),hour:V0(a,60*60,u),day:V0(a,60*60*12,u)}),[]);return(0,Xo.jsxs)("div",{className:(0,jP.default)(e,a.root),children:[i("loginPlease",{login:n?d:f,productName:l}),r&&(0,Xo.jsxs)(no.Fragment,{children:[(0,Xo.jsx)("br",{}),i("snooze",{min:p,hour:y,day:h})]})]})},lm=K4;var VP={root:"dd-DoQhb",text:"dd-Jwnev"};var cc=S(R()),$4=({title:e})=>{let t=D("SearchTrigger",VP),n=he(),r=at();return(0,cc.jsxs)("button",{type:"button",className:t.root,onClick:()=>{n(An(!0)),r("open search",{via:"autocomplete-overlay"})},children:[(0,cc.jsx)(Ea,{}),(0,cc.jsx)("span",{className:t.text,children:e})]})},WP=$4;var W0={};bt(W0,{enUS:()=>q4,nlNL:()=>G4});var q4={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"}]},G4={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 KP={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 Ke=S(R()),Y4=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=D("SuggestionsOverlay",KP),o=ue(W0),i=K(Tr),s=xT(),a=he(),l=(0,Oa.useRef)(null),u=J("searchTriggerKey"),c=J("productName"),f=K(om),d=K(zt),p=K(oa),[y,h]=(0,Oa.useState)(null),g=J("showSearch"),m=J("showTextSuggestions"),v=J("adminUrl"),x=J("isEmbedded"),[w,C]=zP("dd-snooze-until-ms",0),E=f||w>Date.now(),k=e.filter(G=>G.source!=="gpt").length,I=()=>{E&&C(0),a(PP(!E))},L=G=>{let F=Date.now()+G*1e3;C(F),ee.info(`Snooze until: ${new Date(F)}`),a(qo({collapse:!0}))};return(0,Oa.useEffect)(()=>{k===0&&h(null)},[e,k]),$o(()=>{a(qo({collapse:!0,skipWhenInputFocus:!0}))}),d===null||p===!1?null:d===!1?(0,Ke.jsxs)("div",{ref:l,className:(0,um.default)(r.root,{[r.isCollapsed]:E}),children:[!E&&(0,Ke.jsxs)("div",{className:r.triggers,children:[(0,Ke.jsx)("div",{style:{flex:1}}),(0,Ke.jsx)("div",{className:r.triggersRight,children:(0,Ke.jsx)(ni,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})})]}),(0,Ke.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ke.jsx)(ni,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),(0,Ke.jsx)("div",{className:r.collapsible,children:(0,Ke.jsx)(lm,{loginUrl:v,isEmbedded:x,onLogIn:n,onSnooze:L})})]}):!s||!i?null:(0,Ke.jsxs)("div",{ref:l,className:(0,um.default)(r.root,{[r.isCollapsed]:E}),children:[!E&&(0,Ke.jsxs)("div",{className:r.triggers,children:[(0,Ke.jsx)("div",{style:{flex:1},children:g&&(0,Ke.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>h(o(BP()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>h(null),children:(0,Ke.jsx)(WP,{title:o("search")})})}),(0,Ke.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,Ke.jsx)("div",{className:(0,um.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,Ke.jsx)(ni,{className:r.toggleButton,title:o("collapse"),onClick:I,isCollapsed:!1})]})]}),(0,Ke.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ke.jsx)(ni,{className:r.toggleButton,title:o("open",{productName:c}),onClick:I,isCollapsed:!0})}),k>0&&m&&(0,Ke.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,Ke.jsx)(Zt,{children:(0,Ke.jsx)(sm,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},X4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),$P=wi(X4)(Y4);var Sm=S(Fe());var io=S($());var Ma=S($());function cm(e){return e.contentEditable==="true"}function Q4(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 qP(e){let{selectionStart:t,selectionEnd:n}=cm(e)?Q4(e):e;return[t,n]}function GP(e){let[,t]=(0,Ma.useState)(),n=(0,Ma.useRef)(null);return n.current=qP(e),(0,Ma.useEffect)(()=>{let r=()=>{var a;let[o,i]=(a=n.current)!=null?a:[],s=qP(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 YP(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Fc);if(!s||s.length===0)return;let a=0;s.find(l=>{let u=r.indexOf(l,a);return o>u&&i<u+l.length?(n.selectionStart=u,n.selectionEnd=u+l.length,!0):(a=u+l.length,!1)})}var XP=S($()),Z4=["div","span","mark","strong","b","i","u","em"];function K0(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(Z4.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,XP.cloneElement)(r,{children:K0(s,t,n+1)})]}return[...e,...t]}function Zi(e){return e.tagName.toLowerCase()==="textarea"}var QP={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 nA=S(Fe());var hm=S($());var Na=S($());function ZP(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function dm(e){let t=(0,Na.useRef)(null),[n,r]=(0,Na.useState)(!1);return(0,Na.useEffect)(()=>{var c;let o=!1,i=Number.parseFloat((c=window.getComputedStyle(document.body).zoom)!=null?c:"1"),[s,a]=ZP((f,d)=>{let p=t.current;if(!p)return;let y=f/i,h=d/i,g=p.getBoundingClientRect(),m=y>g.x&&y<g.x+g.width&&h>g.y&&h<g.y+g.height;m&&!o?(o=!0,r(!0)):!m&&o&&(o=!1,r(!1))},({clientX:f,clientY:d})=>[f,d]),[l,u]=ZP(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),u(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function JP(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function fm(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function eA(e){return e!=null}var tA=S(Fe()),pm=S($());var ro={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 $0=S(R()),mm=(0,pm.forwardRef)((o,r)=>{var i=o,{className:e,children:t}=i,n=se(i,["className","children"]);let s=(0,pm.useRef)(null),a=D("TabCompletion",ro);return(0,$0.jsx)("div",P(b({ref:fm([s,r]),className:(0,tA.default)(e,a.popoverContentContainer)},n),{children:(0,$0.jsx)("div",{className:a.popoverContent,children:t})}))});var Qo=S(R()),J4=e=>t=>{let n=R0(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},eF=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=D("TabCompletion",ro),s=qp(),a=(0,hm.useMemo)(()=>J4(e.getBoundingClientRect()),[e]),[l,u]=dm(e);return(0,hm.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Qo.jsxs)("span",{children:[(0,Qo.jsx)("mark",{ref:fm([l,s.triggerRef]),className:(0,nA.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Qo.jsx)(Aa,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Qo.jsx)(mm,{style:n,children:(0,Qo.jsx)("div",{className:i.hintText,children:o})})})]})},gm=class extends qr{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(b({},o),{keywordRegex:new RegExp(`\\b${JP(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(eA);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,Qo.jsx)(eF,{inputElement:r.inputElement,suggestion:r.suggestion,inputStyle:r.inputStyle,boundaryRef:r.boundaryRef,children:n},`keyword_${r.matchString}_${r.key}`)}asTag(){return"mark"}};var rA=S(Fe());var q0=S(R()),tF=({inputElement:e,children:t})=>{let n=D("TabCompletion",ro),[r,o]=dm(e);return(0,q0.jsx)("mark",{ref:r,className:(0,rA.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},ym=class extends qr{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,q0.jsx)(tF,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var xm=S(Fe());var Gt=S($());var G0=S(R()),oA=()=>(0,G0.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,G0.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 Cr=S($());var sA=S(Tv());var iA={root:"dd-ky-Bv",content:"dd-kV5e1"};function vm(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 Y0(e){return e.replace("https://www.","").replace("https://","")}var _n=S(R()),nF=3,rF=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),oF=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=nF})=>{let i=D("LinkSearch",iA),[s,a]=(0,Cr.useState)(""),l=he(),u=K(dP("url")),c=K(UT("URL")),f=(0,Cr.useMemo)(()=>c.map(rF),[c]),[d,p]=(0,Cr.useState)(f.length-1),y=J("fallbackImage"),h=x=>{let w=x.target;a(w.value)},g=(x,w)=>{x.stopPropagation(),x.preventDefault(),window.open(w,"_blank")},m=x=>{var E;let w=d-1<0?f.length-1:d-1,C=d+1===f.length?0:d+1;x.code==="Escape"&&(a(""),t()),x.code==="ArrowUp"&&p(w),x.code==="ArrowDown"&&p(C),x.code==="Enter"&&e(((E=f[d])==null?void 0:E.text)||s)},v=(0,Cr.useCallback)((0,sA.default)(x=>{l(Ei({query:x,type:"URL",tags:["link-search"]}))},300),[]);return(0,Cr.useEffect)(()=>{s&&v(s)},[s]),(0,Cr.useEffect)(()=>()=>{l(Kf())},[]),(0,_n.jsxs)("div",{className:i.root,children:[(0,_n.jsx)(Zt,{withDivider:!0,children:(s?f:u).slice(0,o).map((x,w)=>(0,_n.jsx)(be,{selected:d===w,onClick:()=>e(x.text),"data-testid":"linksearch-suggestion",children:(0,_n.jsxs)(Oe,{children:[(0,_n.jsx)(Oe.Image,{src:vm(x,"small",y||void 0),title:x.title||x.text}),(0,_n.jsxs)(Oe.Content,{className:i.content,cropText:!0,children:[(0,_n.jsx)(Oe.Title,{children:x.title||Y0(x.text)}),x.title&&Y0(x.text)]}),(0,_n.jsx)(be.Actions,{children:(0,_n.jsx)(be.ActionButton,{label:r,onClick:C=>g(C,x.text)})})]})},x.text))}),(0,_n.jsx)(wu,{value:s,onChange:h,autoFocus:!0,placeholder:n,onKeyUp:m})]})},aA=oF;var X0={};bt(X0,{enUS:()=>iF,nlNL:()=>sF});var iF={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},sF={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var qt=S(R()),aF=(0,Gt.forwardRef)((e,t)=>{let n=D("TabCompletion",ro);return(0,qt.jsx)("mark",{ref:t,className:(0,xm.default)(n.matchSelection)},"selection-start")}),lF=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=ue(X0),s=D("TabCompletion",ro),a=(0,Gt.useRef)(null),l=(0,Gt.useRef)(null),[u,c]=(0,Gt.useState)(null),f=he(),d=qp(document.activeElement===r),[p]=(0,Gt.useState)(()=>document.createRange());d.triggerRef.current=p,(0,Gt.useEffect)(()=>()=>p.detach(),[]),(0,Gt.useEffect)(()=>{let h=e.current,g=a.current;!h||!g||(p.setStart(h,0),p.setEnd(g,0))},[e.current,a.current]),$o(()=>{d.close()});let y=(0,Gt.useCallback)(h=>{let g=p.toString(),m=/^http(s?):\/\//.test(h)?h:`https://${h}`;f(zf({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,qt.jsxs)("span",{children:[(0,qt.jsx)("mark",{ref:a,className:(0,xm.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,qt.jsx)(Aa,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,qt.jsxs)(mm,{style:n,ref:l,children:[(0,qt.jsx)("div",{className:(0,xm.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,qt.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,qt.jsx)(oA,{}),(0,qt.jsx)("span",{children:"\xA0"}),(0,qt.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,qt.jsx)(aA,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},wm=class extends qr{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,Gt.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?b({isStart:a},s):null}replaceWith(n,r){return r.isStart?(0,qt.jsx)(aF,{ref:this.startRef}):(0,qt.jsx)(lF,{inputElement:r.inputElement,startRef:this.startRef,boundaryRef:r.boundaryRef,inputStyle:r.inputStyle})}asTag(){return"mark"}};var oo=S(R()),uF=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=D("TabCompletion",QP),c=J("insertLink"),f=J("showMidSentenceSuggestions"),d=J("inlineSuggestions"),p=GP(a),y=(0,io.useRef)(null),h=K(zt);(0,io.useEffect)(()=>{Zi(a)&&p&&YP(a,p)},[p]);let g=(0,io.useCallback)(x=>{if(!o||!n)return x;let w=[(0,oo.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,oo.jsx)("span",{"data-testid":"tab-completion",className:(0,Sm.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,oo.jsx)("span",{className:(0,Sm.default)(u.hint,u.resetIndent),children:(0,oo.jsx)(_c,{keyCode:"tab"},"tabHint")})),K0(x,w)},[o,n,r]),m=(0,io.useMemo)(()=>{let x=[];return c&&x.push(new wm("selection")),x.push(new ym("placeholders")),i&&x.push(new gm("keywords")),x},[d,c,i]),v=(0,io.useMemo)(()=>{let x=window.getComputedStyle(a);return{"--dd-color":x.color,"--dd-font-size":x.fontSize,"--dd-font-family":x.fontFamily,"--dd-font-variant":x.fontVariant}},[]);return!e||!h?null:(0,oo.jsxs)("div",{ref:x=>{x!=null&&x.parentElement&&(y.current=x==null?void 0:x.parentElement)},className:u.root,style:v,children:[(0,oo.jsx)(Oi,{tagName:"span",containerTagName:"div",className:(0,Sm.default)(u.container,u.agentText),disableLineBreaks:Zi(a),content:t||"\u200B",onAfterParse:g,matchers:m,selection:p,keywordMatches:s,inputElement:a,inputStyle:v,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!f}),(0,oo.jsx)("br",{})]})},cF=e=>{var g,m,v;let{input:t,ui:n,settings:r,styleSuggestions:o,conversation:i}=e,s=sa({input:t}),a=(s==null?void 0:s.text)||"",l=(s==null?void 0:s.source)||"",u=(g=t.html)!=null?g:ca(t.text),c=a.indexOf(t.text)===0?a.slice(t.text.length):"",{showTabHint:f}=n,{isSupported:d}=i,{showTabCompletion:p,visible:y,showStyleSuggestions:h}=r;return{showTabHint:f,showStyleSuggestions:h,showTabCompletion:p&&Tr(e),content:u,tabText:c,source:l,keywordMatches:(v=(m=o.list)==null?void 0:m.keywordMatches)!=null?v:[],enabled:y&&d!==!1}},lA=wi(cF)(uF);var Ha=S($());var dF={token:null,interval:null},Q0=ge("passwordlessToken/getTemporaryPasswordlessToken",(e,t)=>A(void 0,null,function*(){let{deepdeskAPI:n}=t.extra;return{token:yield n.requestPasswordlessToken()}})),Z0=ge("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(Q0()),setInterval(()=>r(Q0()),n)}),uA=Ce({name:"passwordlessToken",initialState:dF,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Q0.fulfilled,(t,n)=>{t.token=n.payload.token}),e.addCase(Z0.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:cA}=uA.actions,dA=uA.reducer;function fF(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}var fA=Un([fC],e=>e.map(n=>({text:n.response,title:n.name,callToAction:n.callToAction,isLoading:n.isLoading,specialType:n.specialType,rule:{id:fF(n.code),label:n.code,name:n.name,description:n.name}})));var bm=S($());var ex=S(Fe());var J0=S(R()),dc=()=>(0,J0.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,J0.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 pA={root:"dd-WcEru",entity:"dd-LfP8y",entityText:"dd-L-v0f",iconWrapper:"dd-9Deh1",icon:"dd-tM7E2",iconClicked:"dd-EEdDL"};var kr=S(R()),pF=({entities:e})=>{let t=D("EntitiesWidgetList",pA),[n,r]=(0,bm.useState)(void 0),o=he(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),xr(a.text),o(Wr({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,bm.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,kr.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,kr.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,kr.jsx)("span",{className:t.entityText,children:a.text}),(0,kr.jsxs)("span",{className:t.iconWrapper,children:[(0,kr.jsx)("span",{className:(0,ex.default)(t.icon),children:(0,kr.jsx)(dc,{})}),(0,kr.jsx)("span",{className:(0,ex.default)(t.icon,n===l&&t.iconClicked),children:(0,kr.jsx)(dc,{})})]})]},a.text))})},mA=pF;var tx=S(R()),gA=()=>(0,tx.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,tx.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 nx=S(R()),hA=()=>(0,nx.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,nx.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 rx=S(R()),yA=()=>(0,rx.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,rx.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 vA={root:"dd-ohnXe",trigger:"dd-7i-S3",button:"dd-t53Cg",nav:"dd-qZFnm",item:"dd-FZC0F"};var xA={root:"dd-nazq3",rotation:"dd-3EHTv"};var SA=S(R()),mF=({size:e=12})=>{let t=D("LoadingSpinner",xA);return(0,SA.jsx)("span",{"data-testid":"loading-spinner",style:{width:`${e}px`,height:`${e}px`},className:t.root})},wA=mF;var ox=S(R()),bA=()=>(0,ox.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,ox.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 fc=S(R()),EA=e=>(0,fc.jsxs)("svg",P(b({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 448 512","aria-labelledby":"checkTitle"},e),{children:[(0,fc.jsx)("title",{id:"checkTitle",children:"Check"}),(0,fc.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 ix={};bt(ix,{enUS:()=>gF,nlNL:()=>hF});var gF={error:[{type:0,value:"Something went wrong"}]},hF={error:[{type:0,value:"Er ging iets fout"}]};var hn=S(R()),TA,yF=3e3,vF=({assistantOptions:e})=>{let t=D("OnDemandAssistants",vA),n=ue(ix),r=Zr(Kn),o=Zr(Wn),i=K(vC),s=K(xC),a=at(),l=s.filter(f=>f.isPinned),u=s.filter(f=>!f.isPinned),c=f=>A(void 0,null,function*(){if(clearTimeout(TA),a("trigger on demand assistant",{assistantCode:f}),f===i){o.call({transcript:e.transcript});return}r.call(P(b({},e),{assistantCode:f})),TA=setTimeout(()=>r.reset(),yF)});return s.length===0?null:(0,hn.jsxs)("div",{className:t.root,children:[l.map(({assistant:f,assistantName:d})=>(0,hn.jsx)("button",{type:"button",className:t.button,disabled:r.state==="loading",onClick:()=>c(f),children:d},f)),r.state==="loading"&&(0,hn.jsx)(wA,{}),r.state==="done"&&(0,hn.jsx)(EA,{"data-testid":"trigger-done"}),r.state==="error"&&(0,hn.jsx)(oR,{trigger:(0,hn.jsx)(bA,{}),children:n("error")}),u.length>0&&r.state==="idle"&&(0,hn.jsxs)(mt,{placement:"top-end",children:[(0,hn.jsx)(mt.Trigger,{className:t.trigger,children:(0,hn.jsx)(Zp,{"data-testid":"trigger"})}),(0,hn.jsx)(mt.Content,{className:t.nav,"data-testid":"popover",children:u.map(({assistant:f,assistantName:d})=>(0,hn.jsx)(mt.Button,{className:t.item,disabled:r.state==="loading",onClick:()=>c(f),children:d},f))})]})]})},CA=vF;var PA=S($());var kA={loadingBar:"dd-6as-V",placeHolderShimmer:"dd-TFYmA"};var RA=S(R()),xF=({width:e})=>{let t=D("LoadingProgressBar",kA);return(0,RA.jsx)("div",{className:t.loadingBar,style:{width:e}})},Em=xF;var so=S(R()),Tm=({title:e})=>{let t=(0,PA.useRef)(null);return bw(t),(0,so.jsx)(be,{ref:t,children:(0,so.jsx)(Oe,{children:(0,so.jsxs)(Oe.Content,{children:[(0,so.jsx)(Oe.Title,{children:e}),(0,so.jsx)(Em,{width:"60%"}),(0,so.jsx)(Em,{width:"90%"}),(0,so.jsx)(Em,{width:"50%"})]})})})};var pc={};bt(pc,{enUS:()=>wF,nlNL:()=>SF});var wF={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 Ji=S($());var sx={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=S(R()),bF=500,EF=100,TF=({content:e,onChange:t,onCopy:n})=>{let r=(0,Ji.useRef)(null),o=D("WidgetCue",sx);return(0,Ji.useEffect)(()=>{let i=r.current;if(!i)return;i.style.setProperty("height","0px");let s=Math.min(Math.max(i.scrollHeight,EF),bF);i.style.setProperty("height",`${s}px`)},[e]),(0,Mt.jsx)("textarea",{ref:r,className:o.editableCue,onCopy:n,onChange:t,value:e})},CF=({cue:e,onCallToAction:t,onRemove:n,onCopy:r,onUse:o})=>{var h;let i=D("WidgetCue",sx),s=ue(pc),a=at(),l=J("hasKeyboardInput"),[u,c]=(0,Ji.useState)(e.text),f=()=>{t&&t(e),n(e)},d=g=>{r&&r(g,e)},p=g=>{o&&o(g,e)},y=g=>{g.preventDefault(),g.stopPropagation(),n(e)};return(0,Ji.useEffect)(()=>{a("Assistant response displayed",{name:e.rule.name,description:e.rule.description,group:e.rule.label,cueText:e.text})},[]),(0,Mt.jsxs)(be,{"data-testid":"cue",children:[(0,Mt.jsx)(Oe,{children:(0,Mt.jsxs)(Oe.Content,{children:[e.title&&(0,Mt.jsx)(Oe.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)(TF,{content:u,onCopy:()=>{let g=document.getSelection();g&&d(g.toString())},onChange:g=>{var m;return c((m=g.target.value)!=null?m:"")}}):(0,Mt.jsx)($i,{content:e.text,useLabel:s("useCue"),copyLabel:s("copyCue"),onCopy:d,onUse:l?p:void 0})]})}),(0,Mt.jsxs)(be.ButtonsContainer,{children:[(0,Mt.jsxs)("div",{className:i.actions,children:[e.specialType==="summary"&&(0,Mt.jsx)(be.Button,{onClick:()=>d(u),children:s("copyCue")}),e.callToAction&&(0,Mt.jsx)(be.Button,{onClick:f,children:e.callToAction.label}),(0,Mt.jsx)(be.Button,{onClick:y,children:s("removeCue")})]}),e.specialType==="summary"?(0,Mt.jsx)(Bi,{eventName:"summary feedback",feedbackText:(h=e.text)!=null?h:"",feedbackType:"summary",eventData:{summary:e.text}}):(0,Mt.jsx)(Bi,{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"})]})]})},AA=CF;var _a=S(R()),kF=({cues:e})=>{let t=he(),n=on(),r=ue(pc),o=at(),i=u=>{t(mC({code:u.rule.label})),o("Assistant response closed",{name:u.rule.name,group:u.rule.label,description:u.rule.description,cueText:u.text})},s=(u,c)=>{switch(xr(u),c.specialType){case"summary":o("summary copied to clipboard",{originalText:c.text,finalText:u,assistant:c.rule.label});break;default:o("Assistant response copied",{name:c.rule.name,group:c.rule.label,description:c.rule.description,copiedText:u})}},a=u=>{u.callToAction&&(t(rp(u)),o("Assistant call to action",{name:u.rule.name,group:u.rule.label,description:u.rule.description,eventName:u.callToAction.event,value:u.callToAction.value}))},l=(u,c)=>{n.send(vr,{text:u,suggestion:{source:"cue",sourceText:u}}),o("Assistant response used",{name:c.rule.name,group:c.rule.label,description:c.rule.description,usedText:u})};return(0,_a.jsx)(_a.Fragment,{children:e.map(u=>u.isLoading?(0,_a.jsx)(Tm,{title:u.rule.label.startsWith("__")?r(u.rule.label):u.title},u.rule.id):(0,_a.jsx)(AA,{cue:u,onCallToAction:a,onRemove:i,onCopy:s,onUse:l},u.rule.id))})},IA=kF;var Cm=S($());var LA={root:"dd-cvTAY",label:"dd-QWQxD",value:"dd-WSUHF",copyButton:"dd-67o9H",copyButtonText:"dd-oos-l",isTrue:"dd--1g2O",isFalse:"dd-sz2ir"};var or=S(R());function RF(e,t){return t.split(".").reduce((n,r)=>!n||typeof n!="object"||!(r in n)?null:n[r],e)}var OA=({data:e,schema:t})=>{let n=D("WidgetCustomData",LA),r=o=>{xr(o)};return(0,Cm.useEffect)(()=>{ee.info("Custom data",e,t)},[e]),(0,or.jsx)("dl",{className:n.root,children:t.map(o=>{let i=RF(e,o.path);return(0,or.jsxs)(Cm.Fragment,{children:[(0,or.jsx)("dt",{className:n.label,children:o.label}),(0,or.jsx)("dd",{className:n.value,children:o.type==="boolean"&&i?(0,or.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!i?(0,or.jsx)("span",{className:n.isFalse,children:o.falseValue}):i?(0,or.jsxs)("button",{type:"button",onClick:()=>r(i),className:n.copyButton,children:[(0,or.jsx)("span",{className:n.copyButtonText,children:i}),(0,or.jsx)(dc,{})]}):"-"})]},o.label)})})};var lt=S($());var Da={};bt(Da,{enUS:()=>PF,nlNL:()=>AF});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"}]},AF={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 km={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=S(R()),IF=3,LF=({sources:e,onClick:t})=>{let n=ue(Da),r=D("WidgetKnowledgeAssistant",km),[o,i]=(0,lt.useState)(!1),s=o?e:e.slice(0,IF);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)(mt,{tooltip:!0,placement:"top-start",children:[(0,xe.jsx)(mt.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)(mt.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})})]})},OF=({title:e,description:t})=>(0,xe.jsx)(be,{"data-testid":"knowledge-assist-empty-state",children:(0,xe.jsx)(Oe,{children:(0,xe.jsxs)(Oe.Content,{children:[(0,xe.jsx)(Oe.Title,{children:e}),(0,xe.jsx)($i,{content:t})]})})}),MF=({innerRef:e,item:t,index:n,hasKeyboardInput:r,onCopy:o,onUse:i,onSourceClick:s})=>{var l;let a=ue(Da);return(0,xe.jsxs)(be,{"data-testid":"knowledge-assist-answer",ref:e,children:[(0,xe.jsx)(Oe,{children:(0,xe.jsxs)(Oe.Content,{children:[(0,xe.jsx)(Oe.Title,{children:t.question}),(0,xe.jsx)($i,{content:t.answer.answer,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:o,onUse:r?i:void 0}),(0,xe.jsx)(LF,{sources:(l=t.answer.sources)!=null?l:[],onClick:u=>s(u,t.question)})]})}),(0,xe.jsxs)(be.ButtonsContainer,{children:[(0,xe.jsx)("div",{}),(0,xe.jsx)(Bi,{eventName:"knowledge assist feedback",eventData:{question:t.question,isFollowUpQuestion:n>0,isAgent:!0,answer:t.answer.answer},feedbackText:t.answer.answer,feedbackType:"assistant"})]})]})},ax=(0,lt.createContext)(null),Rm=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,i]=(0,lt.useState)(null),[s,a]=(0,lt.useState)(!1),[l,u]=(0,lt.useState)(!!n),[c,f]=(0,lt.useState)(null),d=he(),p=at(),y=Zr(m=>{if(!e)throw new Error("No knowledge assistant was defined");return t({assistantCode:e,input:m,threadId:o,onNewThreadId(v){i(v)}})},{onSuccess(m){var v;p("knowledge assist question answered",{question:m.question,answer:m.answer.answer,sources:(v=m.answer.sources)!=null?v:[],isFollowUpQuestion:m.threadId===o,isAutoInitiated:l}),u(!1)}}),h=m=>A(void 0,null,function*(){a(!0),f(m),yield y.call(m),a(!1),f(null)}),g={isEnabled:!!e,isSubmitting:s,threadId:o,pendingInput:c,onSubmit:h,onReset(){o&&d(ua(o)),i(null)}};return(0,lt.useEffect)(()=>{n&&h(n)},[n]),(0,xe.jsx)(ax.Provider,{value:g,children:r})},Pm=()=>{let e=ue(Da),t=D("WidgetKnowledgeAssistant",km),n=(0,lt.useContext)(ax),r=(0,lt.useRef)(null),[o,i]=(0,lt.useState)(""),s=l=>{i(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var u;r.current&&((u=r.current)==null||u.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},Am=({title:e,emptyState:t})=>{var y,h;let n=ue(Da),r=at(),o=D("WidgetKnowledgeAssistant",km),i=(0,lt.useRef)(null),s=(0,lt.useContext)(ax),a=(h=K(bu((y=s.threadId)!=null?y:-1)))!=null?h:[],l=J("hasKeyboardInput"),u=on(),c=g=>{xr(g),r("Assistant response copied",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",copiedText:g})},f=(g,m)=>{r("knowledge assist source viewed",{question:m,sourceViewed:g.url||g.name})},d=g=>{var m;g.preventDefault(),s.onReset(),r("knowledge assist reset",{threadId:(m=s.threadId)!=null?m:void 0})},p=g=>{u.send(vr,{text:g,suggestion:{source:"cue",sourceText:g}}),r("Assistant response used",{name:"Knowledge Assistant",group:"knowlegde-assist",description:"",usedText:g})};return!s.isEnabled||(a==null?void 0:a.length)===0&&!s.isSubmitting&&!t?null:(0,xe.jsxs)(lt.Fragment,{children:[(0,xe.jsx)(lr,{type:"knowledge",title:e,"data-testid":"knowledge",children:(0,xe.jsxs)(Zt,{withDivider:!0,children:[t&&a.length===0&&!s.pendingInput&&(0,xe.jsx)(OF,b({},t)),a.map((g,m)=>(0,xe.jsx)(MF,{innerRef:m===a.length-1?i:void 0,item:g,index:m,hasKeyboardInput:l,onCopy:c,onUse:p,onSourceClick:f},`${g.question}_${g.answer}_${m}`)),s.pendingInput&&(0,xe.jsx)(Tm,{title:s.pendingInput})]})}),a.length>0&&(0,xe.jsx)("div",{className:o.resetContainer,children:(0,xe.jsx)(be.Button,{disabled:s.threadId===null||s.isSubmitting,onClick:d,children:n("resetLabel")})})]})};var _A=S($());var NF=/(https?:\/\/[^\s]+)/,NA=e=>e.split(" ").find(t=>NF.test(t));var Dn=S(R()),_F=({suggestion:e,lines:t,onUse:n})=>{var f;let r=e.text||e.url||e.message,o=NA(r),i=ue(rc),s=J("showImages"),a=J("fallbackImage"),l=J("hasKeyboardInput"),u=d=>{d.preventDefault(),d.stopPropagation(),l&&n(r)},c=(0,_A.useCallback)(d=>{window.open(o,"_blank"),d.stopPropagation(),d.preventDefault()},[o]);return(0,Dn.jsxs)(be,{onClick:l?u:void 0,"data-testid":"edit-suggestion",children:[(0,Dn.jsxs)(Oe,{children:[s&&e.image&&(0,Dn.jsx)(Oe.Image,{src:vm(e,"small",a||void 0),title:e.title}),(0,Dn.jsxs)(Oe.Content,{children:[e.title&&(0,Dn.jsx)(Oe.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((f=e.searchKeywords)==null?void 0:f.length)>0&&(0,Dn.jsx)(be.Labels,{labels:e.searchKeywords}),(0,Dn.jsx)(Oe.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,Dn.jsxs)(be.Actions,{children:[o&&(0,Dn.jsx)(be.ActionButton,{onClick:c,label:i("visitUrl")}),l&&(0,Dn.jsx)(be.ActionButton,{primary:!0,onClick:u,label:i("useSuggestion")})]})]})},DA=_F;var mc=S(R()),DF=({lines:e,suggestions:t})=>{let n=on(),r=(o,i)=>{n.send(vr,{text:o,suggestion:P(b({},i),{source:i.source,sourceText:i.text})})};return(0,mc.jsx)(mc.Fragment,{children:t.map(o=>(0,mc.jsx)(DA,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},FA=DF;var Im={};bt(Im,{enUS:()=>FF,nlNL:()=>HF});var FF={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"}]},HF={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 Fa={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 de=S(R()),zA=(e,t)=>{let n=K(zt);(0,Ha.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},zF=({onLogIn:e})=>{let t=D("Widget",Fa),n=J("isEmbedded"),r=J("adminUrl");return(0,de.jsx)("div",{className:t.loginText,children:(0,de.jsx)("div",{children:(0,de.jsx)(lm,{isEmbedded:n,loginUrl:r,onLogIn:e})})},"login")},HA=({text:e})=>{let t=D("Widget",Fa);return(0,de.jsx)("div",{className:t.stateText,children:(0,de.jsx)("div",{children:(0,de.jsx)("p",{children:e})})},"notification")},BF=()=>{let e=ue(Im),t=he(),n=D("Widget",Fa),r=J("showSearch"),o=J("showSummaryCommand"),i=J("showKnowledgeSearch"),s=K(Cv("knowledge-assist")),a=J("isEmbedded"),l=K(Ra("/admin/")),u=on(),c=J("productName"),f=J("hasKeyboardInput"),d=Zr(()=>Wn({})),p=at(),y=r||o||i||l;return zA(()=>{if(a)return t(Z0()),()=>{t(cA())}},[t,a]),!y||!f?null:(0,de.jsx)(lr,{title:e("actions"),type:"shortcuts",children:(0,de.jsxs)("div",{className:n.shortcutList,children:[r&&(0,de.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-search","aria-label":e("linkSearch"),onClick:()=>{u.send("ShowCommandPalette",{isOpen:!0}),p("open search",{via:"widget-shortcut"})},children:[(0,de.jsx)(Ea,{}),e("linkSearch")]}),o&&!s&&(0,de.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-summary","aria-label":e("linkSummary"),disabled:d.state==="loading",onClick:()=>d.call(),children:[(0,de.jsx)(yA,{}),e("linkSummary")]}),i&&!s&&(0,de.jsxs)("button",{type:"button",className:n.shortcut,"data-testid":"shortcut-knowledge-assist","aria-label":e("linkKnowledgeSearch"),onClick:()=>{u.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),p("open knowledge assistant",{via:"widget-shortcut"})},children:[(0,de.jsx)(hA,{}),e("linkKnowledgeSearch")]}),l&&(0,de.jsxs)("a",{className:n.shortcut,target:"_blank",href:l,"data-testid":"shortcut-studio-login","aria-label":e("linkStudioLogin",{productName:c}),rel:"noreferrer",onClick:()=>{p("open my deepdesk",{via:"widget-shortcut"})},children:[(0,de.jsx)(gA,{}),e("linkStudioLogin",{productName:c})]})]})})},UF=()=>{let e=he(),t=K(Cu),n=K(wC),r=K(fA),o=K(OT),i=K(Bp),s=K(tm),a=K(Ri),l=K(yr);return(0,Ha.useEffect)(()=>{!!o&&!n&&ee.warn("Custom data provided, but no schema.")},[o,n]),zA(()=>{t.forEach(({type:u})=>{u==="entities"?e(Zn()):Hc.includes(u)||e(rr(u))})},[e,l,a]),(0,Ha.useEffect)(()=>{r.length>0&&!t.some(u=>u.type==="cues")&&ee.warn("Received cues, but cues are not configured in widget.")},[t,r]),(0,de.jsx)(Ha.Fragment,{children:t.map(({type:u,title:c,amount:f,lines:d,schema:p})=>{var y,h;switch(u){case"entities":return i&&i.length>0&&(0,de.jsx)(lr,{type:u,title:c,"data-testid":`type-${u}`,children:(0,de.jsx)(mA,{entities:i})},u);case"cues":return r&&r.length>0&&(0,de.jsx)(lr,{type:u,title:c,"data-testid":`type-${u}`,children:(0,de.jsx)(Zt,{withDivider:!0,children:(0,de.jsx)(IA,{cues:r})})},u);case"custom-data":return o&&p&&(0,de.jsx)(lr,{type:u,title:c,"data-testid":`type-${u}`,children:(0,de.jsx)(Zt,{withDivider:!0,children:(0,de.jsx)(OA,{data:o,schema:p})})},u);default:return((h=(y=s[u])==null?void 0:y.suggestions)==null?void 0:h.length)>0&&(0,de.jsx)(lr,{type:u,title:c,"data-testid":`type-${u}`,children:(0,de.jsx)(Zt,{withDivider:!0,children:(0,de.jsx)(FA,{lines:d,contentType:u,suggestions:s[u].suggestions.slice(0,f)||[]})})},u)}})})},lx=({children:e})=>{let t=D("Widget",Fa);return(0,de.jsx)("div",{className:t.footer,children:e})},ux=({children:e})=>{let t=D("Widget",Fa);return(0,de.jsx)("div",{className:t.root,"data-testid":"widget",children:e})},jF=({onLogIn:e,knowledgeAssistOptions:t={},assistantOptions:n={transcript:"in-memory-transcript",expectFormat:"json-schema:cues"}})=>{let r=ue(Im),o=K(oa),i=K(zt),s=K(hT),a=K(Ri),l=K(Cv("knowledge-assist")),u=K(op),c=K(ip);return o===!1?(0,de.jsx)(HA,{text:r("notSupported")}):i===!1?(0,de.jsx)(zF,{onLogIn:e}):!a||!s||i===null?(0,de.jsx)(HA,{text:r("waiting")}):(0,de.jsx)(ux,{children:(0,de.jsxs)(Rm,{initialQuestion:t.initialQuestion,assistantCode:u!=null?u:c,evaluateKnowledgeAssistFn:c?Ci:ki,children:[(0,de.jsxs)(fs,{children:[(0,de.jsx)(BF,{}),(0,de.jsx)(UF,{}),l&&(0,de.jsx)(Am,{title:l.title,emptyState:t.emptyState})]}),(0,de.jsxs)(lx,{children:[l&&(0,de.jsx)(Pm,{}),(0,de.jsx)(CA,{assistantOptions:n})]})]})})},BA=jF;function za(e){let t=new Range;return t.selectNodeContents(e),t}function UA(e,t,n){try{return Zo(e,t,n),!0}catch(r){return!1}}function Lm(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function Om(e){return"tagName"in e&&e.tagName==="BR"}var gc=/[\u200B-\u200D\uFEFF]/g;function Zo(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,u){let c=-1,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return u;for(let d=0;d<=l.length;d++)if(f.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(gc,""),f=o+c.length,d=t>=o&&t<=f,p=n>=o&&n<=f;if(d){let y=s(u,t-o);y===0&&!p?r.setStartBefore(l):r.setStart(l,y)}p&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(Om(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;Lm(l)&&u&&!Lm(u)&&!Om(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function hc(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,u=0;function c(f){let d=f===e,p=f===n,y=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let h=f.textContent;p&&(a=u+h.substring(0,r).replace(gc,"").length),y&&(l=u+h.substring(0,i).replace(gc,"").length),u+=h.replace(gc,"").length;break}case Node.ELEMENT_NODE:{if(Om(f)&&f.nextSibling){u++;break}!d&&Lm(f)&&f.previousSibling&&u++;for(let h=0;h<f.childNodes.length;h++){let g=p&&h===r,m=y&&h===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(f.childNodes[h]),y&&h===i-1&&(l=u),l!==void 0))break}y&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a!=null?a:l,end:l}}function yc(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 u(c){let f=c===e,d=c===n,p=c===o;switch(d&&(a=1),c.nodeType){case Node.TEXT_NODE:{if(a!==1)return;let y=d?r:0,h=p?i:void 0;l+=c.textContent.replace(gc,"").substring(y,h);break}case Node.ELEMENT_NODE:{if(!s&&a===1&&Om(c)&&c.nextSibling){l+=`
82
- `;break}!f&&!s&&a===1&&Lm(c)&&c.previousSibling&&(l+=`
83
- `);let y=d?r:0,h=p?Math.min(i,c.childNodes.length):c.childNodes.length;for(let g=y;g<h&&(u(c.childNodes[g]),a!==2);g++);break}default:break}p&&(a=2)}return u(e),l}var jA=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(jA||{}),ao=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();Ho(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(jA).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 VA(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var es=class extends ao{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),yc(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!VA(r)&&(n.insertNode(this.element.ownerDocument.createTextNode("\u2060")),r=n.getBoundingClientRect(),n.deleteContents(),!VA(r))?null:{top:r.top+r.height,left:r.left}}getSelection(){let n=this.getRange();if(n)return hc(this.element,n);let r=this.lastKnownSelection;if(r&&UA(this.element,r.start,r.end))return r;let o=za(this.element);return o.collapse(!1),hc(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return yc(this.element,Zo(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 VF=["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 WA(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",VF.forEach(c=>{o[c]=i[c]}),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(),u={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),u}var ts=class extends ao{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 WA(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 KA(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 WF(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var cx=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()}},dx=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.disposeHandlers=[];this.iframe=KA(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()}},fx=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 dx(t,this.deepdeskUrl,{debug:!0}):new cx(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=WF(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(b({},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)}},$A=fx;function KF(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(b({},t),{[KF(n)]:$e(e[n])}),{}):e}function $F(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function wt(e){return Array.isArray(e)?e.map(wt):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>P(b({},t),{[$F(n)]:wt(e[n])}),{}):e}var Ba=class extends Error{constructor(n,r){super(n);this.body=r;this.name="CustomError"}};var px=e=>new Promise(t=>{setTimeout(t,e)});var Ua=class extends Ba{constructor(){super(...arguments);this.name="ClientError"}},gx=class extends Ba{constructor(){super(...arguments);this.name="ServerError"}},mx=new Map;function qF(e){return A(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 Jo=class Jo{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",E=n,{useCache:u=!1,abortLatest:c=!1,attempts:f=1,retryDelay:d=500,refreshTokenOn401:p=!0,retryOnError:y=k=>k instanceof TypeError,retryOnResponse:h=k=>k.status>=500,version:g=null}=E,m=se(E,["useCache","abortLatest","attempts","retryDelay","refreshTokenOn401","retryOnError","retryOnResponse","version"]);if(u){if(!l)throw new Error(`Can't use 'useCache' for ${n.method}`);if(mx.has(s)){r(mx.get(s));return}}let v=P(b({credentials:"include"},m),{headers:b({Accept:"application/json","Content-Type":"application/json"},m.headers)});!l&&this.csrfToken&&(v.headers=P(b({},v.headers),{"X-CSRFToken":this.csrfToken})),typeof g=="string"&&(v.headers=P(b({},v.headers),{"X-Deepdesk-API-Version":g}));let x=f,w=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&c&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let C=()=>A(this,null,function*(){return x--,a(s,v).then(k=>A(this,null,function*(){return h(k)&&!i.isAborted&&x>0?(yield px(d),C()):k.status===401&&p===!0&&w===!1?(w=!0,yield this.refreshToken(),C()):k})).catch(k=>A(this,null,function*(){if(y(k)&&!i.isAborted&&x>0)return yield px(d),C();throw k}))});C().then(k=>A(this,null,function*(){let I=yield qF(k);if(delete this.latestRequestByUrl[s],k.status>=500){o(new gx("Server Error",I));return}if(k.status===401){o(new Ua("Unauthorized",I));return}if(k.status===403){o(new Ua("Forbidden",I));return}if(k.status===404){o(new Ua("Not Found",I));return}if(k.status>=400){o(new Ua("Bad Request",I));return}u&&mx.set(s,I),r(I)})).catch(k=>{o(k)})})}validateToken(){return A(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 Jo.refreshingToken||(Jo.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{Jo.refreshingToken=null},1e3*60)})),Jo.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,b({method:"POST",body:JSON.stringify(n)},r))}patch(t,n,r){return this.request(t,b({method:"PATCH",body:JSON.stringify(n)},r))}put(t,n,r){return this.request(t,b({method:"PUT",body:JSON.stringify(n)},r))}delete(t,n){return this.request(t,b({method:"DELETE"},n))}};Jo.refreshingToken=null;var ns=Jo;var qA;(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={}))})(qA||(qA={}));function Mm(e){return P(b({},$e(e)),{metadata:e.metadata})}var rs=class rs{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new ns(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,i)=>A(this,null,function*(){let s=yield r(o,i);return this.handleDeepdeskVersionHeaders(s),s}))}preflight(){return A(this,null,function*(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=yield this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(rs.exchangeTokenPromise||(rs.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),rs.exchangeTokenPromise):Promise.resolve()})}createConversation(t){return A(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(b({chat_start_time:new Date().toISOString()},wt(t)),{metadata:(r=t.metadata)!=null?r:{}}));return Mm(n)})}getMe(){return A(this,null,function*(){let t=yield this.client.get("/apis/admin/session/me/");return $e(t)})}postIdentity(t){return A(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/me/identities/",wt(t))})}patchMe(t){return A(this,null,function*(){yield this.preflight();let n=yield this.client.patch("/apis/admin/session/me/",wt(t));return $e(n)})}getProfile(t){return A(this,null,function*(){let n=yield this.client.get(`/apis/admin/profiles/${t}/`,{useCache:!0});return $e(n)})}getKnowledgeAssistant(t){return A(this,null,function*(){let n=yield this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{useCache:!0});return $e(n)})}getContentTypes(){return A(this,null,function*(){let t=yield this.client.get("/apis/admin/content-types/",{useCache:!0});return $e(t)})}getAccount(){return A(this,null,function*(){let t=yield this.client.get("/apis/admin/account/",{useCache:!0});return $e(t)})}getPlatformConfig(t){return A(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 A(this,null,function*(){let{exists:n}=yield this.client.get(`/apis/admin/users/exists?external_id=${t}`,{version:"v1"});return n})}getConversationByExternalId(r){return A(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}`),Mm(s)})}isConversationSupported(r){return A(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 A(this,null,function*(){var i;yield this.preflight();let r=wt(n);n.metadata&&(r.metadata=(i=n.metadata)!=null?i:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return Mm(o)})}postMessages(t,n){return A(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(o=>P(b({},wt(o)),{metadata:o.metadata})))).map(o=>Mm(o))})}sendEvent(t,n){return A(this,null,function*(){yield this.preflight();let s=n,{data:r}=s,o=se(s,["data"]),i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((a,[l,u])=>P(b({},a),{[l]:u}),{});return this.client.post("/api/events",wt(P(b(b({},i),o),{data:r,name:t})),{version:"v2"})})}sendEventV1(t,n){return A(this,null,function*(){yield this.preflight();let r=Object.entries(this.latestReceivedDeepdeskVersions).reduce((o,[i,s])=>P(b({},o),{[i]:s}),{});return this.client.post("/api/events",{event:t,data:wt(b(b({},n),r))},{version:"v1"})})}getEntities(t){return A(this,null,function*(){return yield this.preflight(),(yield this.client.post("/api/entities",{messages:t.filter(r=>r.text)},{version:"v1"})).entities})}getTemporaryExchangeToken(){return A(this,null,function*(){return(yield this.client.get("/auth/exchange-token")).jwt})}exchangeTokenForAccessCookie(t){return A(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 A(this,null,function*(){yield this.preflight(),yield this.client.post("/apis/admin/session/api-key/",wt(n),{refreshTokenOn401:!1,headers:{apikey:t}})})}getTextSuggestions(o){return A(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}`,wt(n),{abortLatest:!0})).map(s=>P(b({},$e(s)),{text:s.text||s.url||s.message,source:r,type:r})).filter((s,a,l)=>a===l.findIndex(u=>u.text===s.text))})}isLoggedIn(){return A(this,null,function*(){return yield this.preflight(),this.client.validateToken()})}getAutocompleteSuggestions(t,n){return A(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/autocomplete`,wt(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 A(this,null,function*(){let n=yield this.client.get(`/api/v2/profiles/${t}/pinned-messages`,{abortLatest:!0});return $e(n).map(r=>P(b({},r),{text:r.message,source:"sticky-messages",type:"pinned-message"}))})}getStyleSuggestions(t){return A(this,null,function*(){let n=yield this.client.post("/api/style-suggestions",wt(t),{abortLatest:!0,version:"v1"});return $e(n)})}search(t){return A(this,null,function*(){let n=yield this.client.post(`/api/profiles/${t.profile}/search`,wt(t),{version:"v2"});return $e(n)})}knowledgeAssist(i,s,a){return A(this,arguments,function*(t,n,r,o={}){yield this.preflight();let l=yield this.client.post(`/api/knowledge-assist/assistants/${r}/search`,wt({question:t.question,doNotKnowAnswer:t.doNotKnowAnswer,customerInstruction:t.customerInstruction,chatHistory:n.map(u=>({question:u.question,answer:u.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return $e(l)})}requestLoginByEmail(t){return A(this,null,function*(){yield this.preflight();let n=yield this.client.post("/apis/admin/session/passwordless/request/",{email:t});return $e(n)})}requestPasswordlessToken(){return A(this,null,function*(){let t=yield this.client.get("/apis/admin/session/passwordless/request/");return $e(t.token)})}getCsrfToken(){return A(this,null,function*(){let{token:t}=yield this.client.get("/apis/admin/session/csrf/");return t})}verifyLoginToken(t){return A(this,null,function*(){let n=yield this.client.post("/apis/admin/session/passwordless/login/",{token:t});return $e(n)})}getSummary(r){return A(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 A(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 A(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 A(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 A(this,null,function*(){yield this.preflight();let n=yield this.client.post("/api/translate",wt(t),{version:"v2"});return $e(n)})}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Mw);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})}};rs.exchangeTokenPromise=null;var lo=rs;var GA={startTime:null,stopTime:null},YA=e=>e.handlingTime,XA=Ce({name:"handlingTime",initialState:GA,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(it,()=>GA)}}),{handlingTimeStart:QA,handlingTimeStop:Nm,handlingTimeReset:ZA}=XA.actions,JA=XA.reducer;var eI=(e={})=>{let t=b({onAuthError:ra(!1)},e);return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var _m={list:{keywordMatches:[]},fetchState:"idle"};var os=ge("styleSuggestions/getAll",(n,r)=>A(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 _m.list;if(!a)throw new Error("No current conversation to fetch pinned messages");return o.getStyleSuggestions({profileCode:a,message:e})})),GF=Ce({name:"styleSuggestions",initialState:_m,reducers:{},extraReducers:e=>{e.addCase(os.pending,t=>{t.fetchState="loading"}).addCase(os.rejected,t=>{t.fetchState="error"}).addCase(os.fulfilled,(t,n)=>{t.fetchState="done",Ho(t.list,n.payload)||(t.list=n.payload)}).addCase(bi,t=>{t.list=_m.list}).addCase(it,()=>_m)}}),tI=GF.reducer;var nI=(e={})=>{let t,n=!0,r=b({getStyleSuggestions:os,debounce:500},e);return o=>i=>s=>{var p;let a=o.getState().input.text,l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:c}=u.settings;if(!((p=u.conversation.current)==null?void 0:p.id)||!c)return l;let{text:d}=u.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function YF(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var rI=(e={})=>{let t=b({getTextSuggestions:rr,getAutocompleteSuggestions:ic,debounce:200,check:Tr},e),n;return r=>o=>i=>{var h;let{input:s}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,f=(h=l.conversation.current)==null?void 0:h.id,d=i.type===nm.toString();if(!f||!u&&!c)return a;let{input:p}=l;return YF(p,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=ia(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var oI=os.fulfilled.toString();function XF(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 iI=e=>t=>n=>r=>{var u;if(r.type!==oI){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=XF(o,s);r.type===oI&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var QF=nf({assistants:gC,auth:sT,conversation:yT,contentTypes:yC,passwordlessToken:dA,entities:pR,handlingTime:JA,info:FT,input:AT,settings:JE,profile:SC,search:VT,styleSuggestions:tI,ui:AP,textSuggestions:mP});function sI(e){return oE({reducer:QF,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI}},serializableCheck:!1}),eI(),rI({debounce:200}),nI({debounce:500}),iI(e.deepdeskAPI),...e.middleware?e.middleware:[]],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"},JF=e=>t=>n=>r=>{var a,l,u,c,f,d;let o=t.getState(),i=ru("inlineSuggestions")(o);switch(r.type){case ra.toString():{!r.payload&&e.emit("logout",void 0);break}case Zn.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 Wr.toString():e.sendEvent(r.payload.name,{conversationId:((l=r.payload.options)==null?void 0:l.includeConversationData)&&((u=o.conversation.current)==null?void 0:u.id),data:r.payload.data});break;case bi.toString():e.logSendMessage(r.payload);break;case rp.toString():e.emit("call-to-action",{cue:r.payload});break;case Kn.fulfilled.toString():r.isBroadcasted||e.broadcast(uv,r,!1);break;default:break}let s=n(r);switch(r.type){case bi.toString():e.handleAfterSendMessage(r.payload);break;case ac.toString():e.onUpdateShowTabHint(r.payload);break;case Nm.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case zf.toString():{let{start:p,end:y}=o.input.selection;e.emit("replace",P(b({},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:y}:{start:0,end:y}}));break}case jn.toString():{let{start:p,end:y}=o.input.selection;e.emit("select-suggestion",P(b({type:ZF(r.payload.suggestion)},r.payload),{replace:r.payload.replace==="selection"?{start:p,end:y}:{start:0,end:y}})),i&&t.dispatch(zo([]));break}case Bf.toString():e.emit("select-image",r.payload),e.sendEvent("Image attached",{conversationId:(c=o.conversation.current)==null?void 0:c.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case zo.toString():{i&&r.payload.length>0&&t.dispatch(Uf(0));break}case Wn.fulfilled.toString():{e.sendEvent("conversation summarized",{conversationId:(f=o.conversation.current)==null?void 0:f.id,data:{summary:r.payload,assistant:(d=t.getState().profile.data)==null?void 0:d.summarizerAssistantNew}}),e.emit("summary-generated",{summary:r.payload});break}default:break}return s},aI=JF;function hx(e){return e.toISOString().replace("T"," ").replace("Z","")}var e5=(e,t)=>t.version,lI=Un([aa,yr,YA,e5],(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:hx(o),timeStop:hx(i)}});function uI(e,t,n){var I,L,G,F;let r=(I=t.conversation.current)==null?void 0:I.id;if(!r)return ee.warn("No conversationId for send message metrics"),null;let{text:o,metrics:{numCharsTyped:i,numCharsPasted:s,numCharsCut:a,numCharsDeleted:l,numPaste:u,agentStartedTypingTimestamp:c,externalTimeTotalSeconds:f,pastes:d,cuts:p,deletions:y,textSuggestions:h,offeredTextSuggestions:g}}=t[e],m=o.length,x=h.reduce((j,{text:M,searchTerm:_})=>j+M.length-(_?_.length:0),0),w=c!=null?c:Date.now(),C=(Date.now()-w)/1e3+(f||0),E=i/C,k=h.reduce((j,{searchTerm:M})=>j+(M?M.length:0),0);return{conversationId:r,source:"agent",text:o,clientVersion:n.version,pastes:d,cuts:p,deletions:y,lenTextTyped:i+k,lenTextTotal:m,lenTextAssisted:x,lenTextPasted:s,lenTextCut:a,lenTextDeleted:l,timeTotalSeconds:C,charsPerSecond:E,numPastes:u,textSuggestionsV2:h,suggestionsCounters:[{source:"gpt",countOffered:g.filter(j=>j.source==="gpt").length}],agentId:(L=t.info.agentInfo)==null?void 0:L.agentId,agentName:(G=t.info.agentInfo)==null?void 0:G.agentName,agentEmail:(F=t.info.agentInfo)==null?void 0:F.agentEmail}}function yx(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return yx(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?yx(o,t):null}function vx(e,t){return yx(e,t)}function cI(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function t5(e){return typeof e=="object"&&e!==null&&"tagName"in e}function Dm(e){return t5(e)&&(Zi(e)||cm(e))}var fI,Rr=new Map,n5=["bottom","height","left","right","top","width"],dI=(e,t)=>!e&&!t?!1:e&&!t||!e&&t?!0:n5.some(n=>e[n]!==t[n]);function pI(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,...pI(t)]:[]}function mI(e,t){return!e||!t?null:P(b({},e),{top:e.top+t.top,left:e.left+t.left})}var Fm=!1,gI=()=>{Fm=!0;let e=[];if(Rr.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),Rr.delete(n);return}let r=n.getBoundingClientRect();dI(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(mI,t.rect):t.rect;dI(n,t.totalRect)&&t.callbacks.forEach(r=>r(n)),t.totalRect=n}),Rr.size===0){Fm=!1;return}fI=window.requestAnimationFrame(gI)};function xx(e,t){let n=pI(e),r=[],o=n.map((i,s)=>xx(i,a=>{r[s]=a;let l=Rr.get(e);if(!l)return;let u=r.reduce(mI,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),Rr.has(e)){let s=Rr.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else Rr.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!Fm&&gI()},unobserve(){o.forEach(s=>s.unobserve());let i=Rr.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||Rr.delete(e),Rr.size||(cancelAnimationFrame(fI),Fm=!1)}}}}var hI,Pr=new Map,yI=()=>{Pr.forEach((e,t)=>{if(!t.isConnected){Pr.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)))}),Pr.size!==0&&(hI=window.requestAnimationFrame(yI))};function vI(e,t){return{observe(){let n=Pr.size===0;Pr.has(e)?Pr.get(e).callbacks.push(t):Pr.set(e,{visible:void 0,callbacks:[t]}),n&&yI()},unobserve(){let n=Pr.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Pr.delete(e),Pr.size||cancelAnimationFrame(hI)}}}}var wx=["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 Sx(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function ja(e){return Number.parseFloat(e)}function Hm(e){return Math.round(e*1e6)}function xI(e){return e/1e6}function bx(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=ja(e.width),i=ja(e.borderLeftWidth),s=ja(e.borderRightWidth),a=ja(e.paddingRight),l=xI(Hm(o)-Hm(i)-Hm(s)),u=xI(Hm(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function vc(e,t={}){var c,f;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=(c=t.position)!=null?c:"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ji(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};Sx(r,n,wx),bx(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=vI(e,()=>{Sx(r,n,wx),bx(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=xx(e,d=>{if(d===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),d.height===0&&d.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(Sx(r,n,wx),bx(r,e,n),i(),n.style.top=`${d.top}px`,n.style.left=`${d.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let p=t.closestScrollElement.getBoundingClientRect(),y=window.getComputedStyle(t.closestScrollElement),h=ja(y.borderTopWidth),g=ja(y.borderBottomWidth),m=p.top+h-d.top,v=d.top+d.height+-(p.top+p.height-g);n.style.clipPath=`inset(${m}px 0px ${v}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(f=e.parentElement)==null||f.appendChild(n),u.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),u.unobserve(),s.unobserve()}]}var wI=(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 r5(e){return e.offsetParent!==null}function SI(e){if(!r5(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 zm(e,t,n=100){let r=SI(e);t({isVisible:r});let o=setInterval(()=>{let i=SI(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Me=S(R());var bI=wI("showTabHint",!0),Va=class Va{constructor({deepdeskUrl:t,version:n=Va.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.widgetRoot=null;this.dynamicThunkObject={};this.isMounted=!1;this.shouldRender=!0;this.loadProfileConfigPromise=null;let l=t.replace(/\/api$/,"");this.deepdeskApi=new lo(l,{token:o,fetch:i}),this.version=n,this.instanceId=Va.count++;let u={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[aI({broadcast:(c,f,d)=>{this.broadcastEvents.send(c,f,d)},emit:(c,f)=>this.emit(c,f),handleAfterSendMessage:c=>this.handleAfterSendMessage(c),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:c=>this.logSendMessage(c),onUpdateShowTabHint:c=>bI.update(c),sendEvent:(c,f)=>this.deepdeskApi.sendEvent(c,f)})]};this.store=sI(u),this.broadcastEvents=new $A({debug:!0,deepdeskUrl:l,eventMap:WT(this.store),createCustomChannel:a}),this.store.dispatch(ac(bI.value())),this.store.dispatch(Mf({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(ra(null)),this.store.dispatch(jr());let t=n=>zt(n)&&eT(n)!=="loading";return new Promise(n=>{let r=this.subscribe(t,o=>{o&&(r(),n())});this.unmountHandlers.push(()=>{r()})})}isLoggedIn(){return A(this,null,function*(){return(yield this.store.dispatch(jr())).payload})}isConversationSupported(t,n){return A(this,null,function*(){return(yield this.store.dispatch(rv({externalId:t,options:n}))).payload})}createConversation(t){return A(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(_f(P(b({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}getConversationByExternalId(t,n){return A(this,null,function*(){return this.hasConversation()&&this.externalId()!==t&&this.resetConversation(),(yield this.store.dispatch(Df({externalId:t,options:n}))).payload})}upsertConversation(t){return A(this,null,function*(){var r;return this.hasConversation()&&this.externalId()!==t.externalId&&this.resetConversation(),(yield this.store.dispatch(ov(P(b({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return A(this,null,function*(){return(yield this.store.dispatch(Hf(t))).payload})}updateConversation(t){return A(this,null,function*(){return(yield this.store.dispatch(Ff(t))).payload})}resetConversation(){this.store.dispatch(it()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}configure(t){this.store.dispatch(Mf(t))}setVisitorInfo(t){this.store.dispatch(NT(t))}setCustomData(t){this.store.dispatch(_T(t))}setAgentInfo(t,n){return A(this,null,function*(){yield this.store.dispatch(su(b(b({},t),n)))})}setAgentSettings(t){return A(this,null,function*(){yield this.store.dispatch(sv(t))})}getAgentSettings(){return A(this,null,function*(){return(yield this.store.dispatch(av())).payload})}refresh(){return A(this,null,function*(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.store.dispatch(jf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()}));let t=[];return this.store.dispatch(nm()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})})}notifyExternalSuggestion(t){this.store.dispatch(jn(t))}evaluateAssistant(t,n){return A(this,null,function*(){let c=n||{},{input:r={},transcript:o,showCuesInWidget:i=!0,includeMetadata:s,expectFormat:a}=c,l=se(c,["input","transcript","showCuesInWidget","includeMetadata","expectFormat"]);Object.assign(r,l);let u=yield this.store.dispatch(Kn({assistantCode:t,expectFormat:a||"json-schema:cues",transcript:o,includeMetadata:s,input:r,skipState:!i}));if(u.error)throw new Error(u.error.message);return u.payload})}evaluateConversationAssistant(t,n){return A(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}yield this.evaluateAssistant(i,b({includeMetadata:!0},n))})}getSummary(){return A(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(Wn(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,u=a?"below":"above",c=o.length>0;if(this.store.dispatch(bT(iv(t))),!Tr(this.state)||t.key!=="Tab"&&!l)return;let f=()=>{n||!c||s&&(t.shiftKey||(this.store.dispatch(CT()),t.preventDefault()))},d=()=>{n||!c||a&&i<=0||s&&(t.shiftKey||(this.store.dispatch(kT()),t.preventDefault()))};switch(t.key){case"ArrowUp":u==="below"?d():f();break;case"ArrowDown":{u==="below"?f():d();break}case"Escape":{n||(this.store.dispatch(Uf(-1)),this.store.dispatch(qo({collapse:!0})),this.store.dispatch(RP(!0)),t.preventDefault());break}case"Tab":{t.preventDefault();let p=sa(this.state);if(!p)return;this.store.dispatch(ac(!1)),this.store.dispatch(jn({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=sa(this.state);if(!p)return;this.store.dispatch(jn({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=sa(this.state);if(!p)return;this.store.dispatch(jn({text:p.text,suggestion:p,eventMetrics:{inputType:"enter"},replace:"until-selection-end"})),t.preventDefault();break}default:}n&&r&&this.store.dispatch(qo({collapse:!1}))}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(zo([]))}handlingTimeStart(){this.state.handlingTime.startTime||(ee.info("Start handling time"),this.store.dispatch(QA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(ee.info("Stop handling time"),this.store.dispatch(Nm()))}logSendMessage(t){let n=uI("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=lI(this.state,{version:this.version});t&&(this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(ZA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(bi((n=t.text)!=null?n:this.state.input.text)),this.store.dispatch(PT()))}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(DT(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]=vc(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,ut.unmountComponentAtNode)(i),s(),i.remove()}),i}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,u]=vc(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});l.dataset.testid=n,l.style.zIndex="2",l.appendChild(r),this.unmountHandlers.push(()=>{(0,ut.unmountComponentAtNode)(o),u()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ji(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),this.unmountHandlers.push(()=>{(0,ut.unmountComponentAtNode)(o),o.remove()}),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(RT(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(!Dm(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let d=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s,inputMediator:a}=d,l=se(d,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),u={customStyles:r,closestScrollSelector:o,floatingMenuParent:i,appendOverlayTo:s};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),ji(t),this.inputMediator=a||(Zi(t)?new ts(t):new es(t)),this.inputMediator.on("change",({plainText:p,rawHTML:y})=>{this.store.dispatch(jf({text:p,html:y}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(ET(iv(p)))}),this.inputMediator.on("keydown",p=>{this.handleKeyDown(p)}),this.inputMediator.on("paste",({pastedText:p,selectionText:y})=>{this.store.dispatch(TT({text:p,selectionText:y}))}),this.inputMediator.on("cut",({selectionText:p})=>{this.store.dispatch(ST(p))});let c;this.inputMediator.on("selection",p=>{clearTimeout(c),p===null?c=setTimeout(()=>{p!==null&&this.store.dispatch(Vf(p))},500):this.store.dispatch(Vf(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(im(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(im(!0))}),this.renderSuggestions(t,u),this.subscribe(ru("inlineSuggestions"),()=>{this.renderSuggestions(t,u)});let f=this.renderOverlays(n);this.unmountHandlers.push(()=>{f.unmount()}),this.store.dispatch(jf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()})),this.store.dispatch(Vf(this.inputMediator.getSelection())),this.store.dispatch(im(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");(0,ut.render)((0,Me.jsx)(Yo,{store:this.store,customStyles:r,children:(0,Me.jsx)(Bo,{broadcastEvents:this.broadcastEvents,children:(0,Me.jsx)(FP,{})})}),o);let i=s=>{s?(o.style.display="block",o.style.top=`${s.top}px`,o.style.left=`${s.left}px`):o.style.display="none"};return this.inputMediator.on("caretposition",i),{unmount:()=>{var s;(0,ut.unmountComponentAtNode)(o),(s=this.inputMediator)==null||s.off("caretposition",i),o.remove()}}}renderAboveSuggestions(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i}=n,s=o&&vx(t,o)||void 0,a=this.overlayContainerFactory("deepdesk-tab-completion",s||t,{appendTo:i,closestScrollElement:s,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),l=this.overlayContainerFactory("deepdesk-suggestions-overlay",s||t,{appendTo:i},r==null?void 0:r.suggestionsRootNode);return(0,ut.render)((0,Me.jsx)(Yo,{store:this.store,customStyles:r,children:(0,Me.jsx)(Bo,{broadcastEvents:this.broadcastEvents,children:(0,Me.jsx)(lA,{inputElement:t})})}),a),(0,ut.render)((0,Me.jsx)(Yo,{store:this.store,customStyles:r,children:(0,Me.jsx)(Bo,{broadcastEvents:this.broadcastEvents,children:(0,Me.jsx)($P,{onLogIn:()=>this.loginViaPopup().catch(u=>ee.warn(u.message))})})}),l),{unmount(){(0,ut.unmountComponentAtNode)(a),(0,ut.unmountComponentAtNode)(l),a.remove(),l.remove()}}}renderFloatingMenu(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:i,floatingMenuParent:s}=n,a=o&&vx(t,o)||void 0,l=this.overlayContainerFactory("floating-menu",a||t,{appendTo:s!=null?s:i},r==null?void 0:r.floatingMenuParent);return(0,ut.render)((0,Me.jsx)(Yo,{store:this.store,customStyles:r,children:(0,Me.jsx)(Bo,{broadcastEvents:this.broadcastEvents,children:(0,Me.jsx)(CP,{onLogIn:()=>this.loginViaPopup().catch(u=>ee.warn(u.message))})})}),l),{unmount(){(0,ut.unmountComponentAtNode)(l),l.remove()}}}renderOverlays(t){let{customStyles:n}=t,r=this.createContainer("deepdesk-overlays");return(0,ut.render)((0,Me.jsx)(Yo,{store:this.store,customStyles:n,children:(0,Me.jsx)(Bo,{broadcastEvents:this.broadcastEvents,children:(0,Me.jsx)(wP,{})})}),r),{unmount(){(0,ut.unmountComponentAtNode)(r),r.remove()}}}renderWidget(t,n={}){if(this.widgetRoot&&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.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,ut.render)((0,Me.jsx)(Yo,{store:this.store,customStyles:r,children:(0,Me.jsx)(Bo,{broadcastEvents:this.broadcastEvents,children:(0,Me.jsx)(BA,{assistantOptions:n.assistantOptions,knowledgeAssistOptions:n.knowledgeAssist,onLogIn:()=>this.loginViaPopup().catch(s=>ee.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setExternalId((s=this.state.conversation.current)==null?void 0:s.externalId)})}unmountWidget(){this.widgetRoot&&(0,ut.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}renderKnowledgeAssistantWidget(t,n,r={}){let{customStyles:o,initialQuestion:i}=r;return(0,ut.render)((0,Me.jsx)(Yo,{store:this.store,customStyles:o,children:(0,Me.jsx)(Bo,{broadcastEvents:this.broadcastEvents,children:(0,Me.jsx)(ux,{children:(0,Me.jsxs)(Rm,{assistantCode:t,initialQuestion:i,evaluateKnowledgeAssistFn:r.isLegacyKnowledgeAssist?Ci:ki,children:[(0,Me.jsx)(fs,{children:(0,Me.jsx)(Am,{emptyState:r.emptyState})}),(0,Me.jsx)(lx,{children:(0,Me.jsx)(Pm,{})})]})})})}),n),{unmount(){(0,ut.unmountComponentAtNode)(n),n.remove()}}}setupHandlingTime(t){let n=zm(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){cI(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(()=>A(this,null,function*(){yield this.store.dispatch(Tu());let t=Ri(this.state);t&&this.store.dispatch(Mf({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 A(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,u=()=>{c&&!c.closed&&c.close(),window.removeEventListener("message",f),clearInterval(d)};i.onmessage=p=>A(this,null,function*(){var y,h;if((y=p.data)!=null&&y.jwt)try{yield this.deepdeskApi.exchangeTokenForAccessCookie((h=p.data)==null?void 0:h.jwt),yield this.isLoggedIn(),this.broadcastEvents.send(lu),l=!0,o.port1.close(),n()}catch(g){console.error(g),r(g)}finally{l=!0,u()}});let c=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");c===null&&r(new Error("Popup blocked by browser"));let f=p=>A(this,null,function*(){var y;if(p.origin===a.origin)switch((y=p.data)==null?void 0:y.type){case"deepdesk-popup-loaded":{try{let h=JSON.stringify({type:"deepdesk-popup-create-channel"});c==null||c.postMessage(h,a.origin,[o.port2])}catch(h){ee.error("Error posting message to popup",h),r(h)}break}case"deepdesk-popup-error":{u(),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",f);let d=setInterval(()=>{c&&!c.closed||(u(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(u)})})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}checkForTrialMode(t){return A(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 A(this,null,function*(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Cu(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Zn()):Hc.includes(r)||this.store.dispatch(rr(r))})}catch(r){this.handleError(r)}})}};Va.version="17.0.0-rc.7",Va.count=0;var xc=Va;function o5(e){return A(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 EI(e,t){return A(this,null,function*(){let n=yield o5(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 TI(e,t,n){return A(this,null,function*(){yield new lo(e).authenticateWithKey(t,n)})}function CI(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}function kI(r,o){return A(this,arguments,function*(e,t,n={}){var f,d;let{value:i}=e,{start:s,end:a}=(f=n.replace)!=null?f:{start:0,end:i.length},l=`${i.slice(0,s)}${t}${i.slice(a)}`,u=(d=n.selectionAfter)!=null?d:{start:s+t.length,end:s+t.length},c=()=>{if(n.setValue)return n.setValue(l);e.value=l};return Promise.resolve(c()).then(()=>{e.selectionStart=u.start,e.selectionEnd=u.end,e.blur(),e.focus()})})}function RI(r,o){return A(this,arguments,function*(e,t,n={}){let i=n.replace?Zo(e,n.replace.start,n.replace.end):za(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(`
84
- `).reverse().forEach((l,u)=>{u>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?Zo(e,n.selectionAfter.start,n.selectionAfter.end):(i.collapse(!1),i),u=window.getSelection();u==null||u.removeAllRanges(),u==null||u.addRange(l)}if(!s)return;s.scrollIntoView&&s.scrollIntoView({block:"nearest",inline:"nearest"})}finally{s&&s.remove()}})})}function i5(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 s5(e){let t=document.createDocumentFragment();return e.split(`
85
- `).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 PI(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):PI(n,t)}function AI(o,i){return A(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 d;let l=(d=e.ownerDocument.defaultView)!=null?d:window,u=l.getSelection();if((!u||u.rangeCount===0)&&(e.focus(),u=l.getSelection()),!u||u.rangeCount===0)return;let c=u.getRangeAt(0);if(!c)return;s=document.createElement("span"),c.insertNode(s);let f=r?i5(t):s5(t);n?PI(c.startContainer,f):(c.insertNode(f),c.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 VI(a5);})();
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()),y4={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: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 o0={};Rt(o0,{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 ci=b(R()),OR=({onLogIn:e})=>{let t=ce(o0),n=ee("floatingMenu"),r=ee("productName"),o=ye(),s=j(Vt),i=M("FloatingMenu",LR);if(s===null||n===!1)return null;let a=()=>{s===!0?o(Fn(!0)):e()};return(0,ci.jsxs)("button",{type:"button",className:(0,_R.default)(i.root,{[i.isLoggedIn]:s,[i.isLoggedOut]:!s}),onClick:a,children:[(0,ci.jsx)("div",{className:i.text,children:t(s?"search":"signin",{productName:r})}),(0,ci.jsxs)("div",{className:i.icon,children:[(0,ci.jsx)(IR,{className:i.logo,color:"pink"}),s===!1&&(0,ci.jsx)(AR,{className:i.lock})]})]})};var Dp=b(Z());function Mr(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:s}=e.input;return s.start!==s.end?!1:s.end>=o.length?!0:t?n&&new RegExp(n).test(o.substring(s.end))||r&&new RegExp(r).test(o.substring(0,s.end))?!0:n===!1&&r===!1:!1}var w4={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1},Op=({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:Np,setOverlayCollapsed:os,setOpenOverlayWhenTyping:MR,setOverlayCollapsedUserOverwrite:DR}=NR.actions,FR=NR.reducer;var VR=b(Z());var ss=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 ui=b(R()),b4=["search","personal-collection-search","search-autocomplete"];function E4(e,t,n,r={}){var s;let o="";return b4.includes(t)?o=UT(Xy(e,n,{stripAgentPart:!0}),(s=r.searchKeywords)!=null?s:[n]):o=Xy(e,n,r),r.placeholders===!0&&(o=VT(o)),o}var T4=()=>{},C4=({selected:e,suggestion:t})=>{let n=ee("inlineSuggestions"),r=j(ia),[o,s]=(0,ss.useState)(!1),i=ee("enableSuggestionFeedback"),a=j(f=>f.input.text),l=ye(),c=M("TextSuggestion",BR),u=(0,ss.useRef)(null);(0,ss.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,ss.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,ui.jsxs)("div",{className:c.root,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,ui.jsx)(Ee,{ref:u,as:"button","data-testid":"suggestions-overlay-item",selected:e,onClick:T4,children:(0,ui.jsx)(Ks,{containerTagName:"div",noWrap:!1,tagName:"span",className:c.formattedText,content:d})}),i&&o&&(0,ui.jsx)("div",{className:c.actions,children:(0,ui.jsx)(Ap,{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((s,i)=>(0,$R.jsx)(UR,{index:i,selected:i===t,suggestion:s},`${s.text}-${s.source}`));return n?o.reverse():o},[e,t,n]),Mp=k4;var jR={root:"dd-PfvRI",paper:"dd-HYlyY"};var Qc=b(R()),R4=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Dp.useRef)(null),r=M("InlineSuggestionsOverlay",jR),o=j(Mr),s=ye(),i=j(Vt),a=j(sa),l=j(Op),c=ee("showTextSuggestions");return rs(()=>{setTimeout(()=>{s(os({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Dp.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||i!==!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)(Mp,{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)(Ny.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})})}),is=I4;var zp=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 s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch(s){return te.error(s),t}});return[n,s=>{try{let i=s instanceof Function?s(n):s;r(i),typeof window!="undefined"&&window.localStorage.setItem(e,JSON.stringify(i))}catch(i){te.error(i)}}]}var GR=()=>/Mac/i.test(navigator.platform);var XR=b(Ne()),yo=b(Z());var s0={};Rt(s0,{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 as=b(R()),i0=(e,t,n)=>r=>(0,as.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 s=ce(s0),i=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(),i.send(ca,!0)},[t]),d=(0,yo.useMemo)(()=>x=>(0,as.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,as.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,as.jsxs)("div",{className:(0,XR.default)(e,a.root),children:[s("loginPlease",{login:n?f:d,productName:l}),r&&(0,as.jsxs)(yo.Fragment,{children:[(0,as.jsx)("br",{}),s("snooze",{min:p,hour:v,day:m})]})]})},Fp=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 a0={};Rt(a0,{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(a0),s=j(Mr),i=A1(),a=ye(),l=(0,Oa.useRef)(null),c=ee("searchTriggerKey"),u=ee("productName"),d=j(Op),f=j(Vt),p=j(sa),[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(os({collapse:!0}))};return(0,Oa.useEffect)(()=>{k===0&&m(null)},[e,k]),rs(()=>{a(os({collapse:!0,skipWhenInputFocus:!0}))}),f===null||p===!1?null:f===!1?(0,Ve.jsxs)("div",{ref:l,className:(0,zp.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)(hs,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(hs,{className:r.toggleButton,title:o("open",{productName:u}),onClick:A,isCollapsed:!0})}),(0,Ve.jsx)("div",{className:r.collapsible,children:(0,Ve.jsx)(Fp,{loginUrl:g,isEmbedded:h,onLogIn:n,onSnooze:F})})]}):!i||!s?null:(0,Ve.jsxs)("div",{ref:l,className:(0,zp.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,zp.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,Ve.jsx)(hs,{className:r.toggleButton,title:o("collapse"),onClick:A,isCollapsed:!1})]})]}),(0,Ve.jsx)("div",{className:r.toggleButtonWrapper,children:(0,Ve.jsx)(hs,{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)(Mp,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},z4=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),eP=ra(z4)(F4);var Xp=b(Ne());var wo=b(Z());var Na=b(Z());function Hp(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),s=o.cloneRange();s.selectNodeContents(e),s.setEnd(o.endContainer,o.endOffset),n=s.toString().length,s.selectNodeContents(e),s.setEnd(o.startContainer,o.startOffset),t=s.toString().length}return{selectionStart:t,selectionEnd:n}}function tP(e){let{selectionStart:t,selectionEnd:n}=Hp(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,s]=(a=n.current)!=null?a:[],i=tP(e);(!i||o!==i[0]||s!==i[1])&&(n.current=i,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,s]=t,i=r.match(ku);if(!i||i.length===0)return;let a=0;i.find(l=>{let c=r.indexOf(l,a);return o>c&&s<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 l0(e,t,n=0){var s;let r=e[e.length-1],o=typeof r=="object"&&r!==null?(s=r.props)==null?void 0:s.tagName:void 0;if(o==="br")return e.pop(),[...e,...t,r];if(B4.includes(o)){let i=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,oP.cloneElement)(r,{children:l0(i,t,n+1)})]}return[...e,...t]}function di(e){return e.tagName.toLowerCase()==="textarea"}var sP={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 Kp=b(Z());var Ma=b(Z());function iP(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Bp(e){let t=(0,Ma.useRef)(null),[n,r]=(0,Ma.useState)(!1);return(0,Ma.useEffect)(()=>{var u;let o=!1,s=Number.parseFloat((u=window.getComputedStyle(document.body).zoom)!=null?u:"1"),[i,a]=iP((d,f)=>{let p=t.current;if(!p)return;let v=d/s,m=f/s,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]=iP(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",i),e.addEventListener("mouseleave",l),()=>{a(),c(),e.removeEventListener("mousemove",i),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function aP(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Up(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()),Vp=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 c0=b(R()),$p=(0,Vp.forwardRef)((o,r)=>{var s=o,{className:e,children:t}=s,n=oe(s,["className","children"]);let i=(0,Vp.useRef)(null),a=M("TabCompletion",vo);return(0,c0.jsx)("div",P(S({ref:Up([i,r]),className:(0,cP.default)(e,a.popoverContentContainer)},n),{children:(0,c0.jsx)("div",{className:a.popoverContent,children:t})}))});var ls=b(R()),U4=e=>t=>{let n=$v(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 s=M("TabCompletion",vo),i=bp(),a=(0,Kp.useMemo)(()=>U4(e.getBoundingClientRect()),[e]),[l,c]=Bp(e);return(0,Kp.useEffect)(()=>{c?i.open():i.close()},[c]),(0,ls.jsxs)("span",{children:[(0,ls.jsx)("mark",{ref:Up([l,i.triggerRef]),className:(0,uP.default)(s.matchKeyword,{[s.hover]:c}),"aria-haspopup":"dialog","aria-expanded":i.opened?"true":"false",children:r}),i.opened&&(0,ls.jsx)(Ia,{className:s.popover,triggerRef:i.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,ls.jsx)($p,{style:n,children:(0,ls.jsx)("div",{className:s.hintText,children:o})})})]})},jp=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(s=>{if(this.usedKeywordMatches.has(s))return null;let i=n.match(s.keywordRegex);if(!i)return null;let a=n.charAt(i.index-1),l=n.charAt(i.index+s.keyword.length);return a==="{"&&l==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:s.suggestion,preparedKeywordMatch:s,valid:!0}}).filter(lP);if(r.length===0)return null;let o=r.reduce((s,i)=>i.index<s.index?i:s);return this.usedKeywordMatches.add(o.preparedKeywordMatch),o}replaceWith(n,r){return(0,ls.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 u0=b(R()),$4=({inputElement:e,children:t})=>{let n=M("TabCompletion",vo),[r,o]=Bp(e);return(0,u0.jsx)("mark",{ref:r,className:(0,dP.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Wp=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,u0.jsx)($4,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Gp=b(Ne());var Qt=b(Z());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 Dr=b(Z());var mP=b(Hy());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(s){return null}}function f0(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 s=M("LinkSearch",pP),[i,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)||i)},g=(0,Dr.useCallback)((0,mP.default)(h=>{l(Ds({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,Dr.useEffect)(()=>{i&&g(i)},[i]),(0,Dr.useEffect)(()=>()=>{l(wf())},[]),(0,Vn.jsxs)("div",{className:s.root,children:[(0,Vn.jsx)(rn,{withDivider:!0,children:(i?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:qp(h,"small",v||void 0),title:h.title||h.text}),(0,Vn.jsxs)(Ie.Content,{className:s.content,cropText:!0,children:[(0,Vn.jsx)(Ie.Title,{children:h.title||f0(h.text)}),h.title&&f0(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:i,onChange:m,autoFocus:!0,placeholder:n,onKeyUp:y})]})},gP=W4;var p0={};Rt(p0,{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,Gp.default)(n.matchSelection)},"selection-start")}),X4=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let s=ce(p0),i=M("TabCompletion",vo),a=(0,Qt.useRef)(null),l=(0,Qt.useRef)(null),[c,u]=(0,Qt.useState)(null),d=ye(),f=bp(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]),rs(()=>{f.close()});let v=(0,Qt.useCallback)(m=>{let x=p.toString(),y=/^http(s?):\/\//.test(m)?m:`https://${m}`;d(mf({text:`[${x}](${y})`,replace:"selection"}))},[]);return(0,Xt.jsxs)("span",{children:[(0,Xt.jsx)("mark",{ref:a,className:(0,Gp.default)(i.matchSelection),"aria-haspopup":"dialog","aria-expanded":f.opened?"true":"false",children:o}),f.opened&&(0,Xt.jsx)(Ia,{className:i.popoverRoot,triggerRef:f.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Xt.jsxs)($p,{style:n,ref:l,children:[(0,Xt.jsx)("div",{className:(0,Gp.default)(i.selectionOptions,{[i.selectionOptionsIsHidden]:c!==null}),children:(0,Xt.jsxs)("button",{type:"button",tabIndex:c===null?-1:void 0,className:i.selectionOptionsButton,onClick:()=>u("insertLink"),children:[(0,Xt.jsx)(fP,{}),(0,Xt.jsx)("span",{children:"\xA0"}),(0,Xt.jsx)("span",{children:s("insertLink")})]})}),c==="insertLink"&&(0,Xt.jsx)(gP,{placeholder:s("linkInputPlaceholder"),visitUrlText:s("visitUrl"),onSelectLink:v,onDismiss:()=>{u(null),f.close()}})]})})]},"selection-end")},Yp=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 s=this.foundIndex===0?r:o,i=s>=this.charCount&&s<=this.charCount+n.length?{index:s-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let a=this.foundIndex===1;return i&&a?this.charCount+=s-this.charCount:this.charCount+=n.length,i?S({isStart:a},i):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:s,keywordMatches:i,inputElement:a,source:l})=>{let c=M("TabCompletion",sP),u=ee("insertLink"),d=ee("showMidSentenceSuggestions"),f=ee("inlineSuggestions"),p=nP(a),v=(0,wo.useRef)(null),m=j(Vt);(0,wo.useEffect)(()=>{di(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,Xp.default)(c.tabText,c.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,xo.jsx)("span",{className:(0,Xp.default)(c.hint,c.resetIndent),children:(0,xo.jsx)(Tu,{keyCode:"tab"},"tabHint")})),l0(h,w)},[o,n,r]),y=(0,wo.useMemo)(()=>{let h=[];return u&&h.push(new Yp("selection")),h.push(new Wp("placeholders")),s&&h.push(new jp("keywords")),h},[f,u,s]),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)(Ks,{tagName:"span",containerTagName:"div",className:(0,Xp.default)(c.container,c.agentText),disableLineBreaks:di(a),content:t||"\u200B",onAfterParse:x,matchers:y,selection:p,keywordMatches:i,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:s}=e,i=aa({input:t}),a=(i==null?void 0:i.text)||"",l=(i==null?void 0:i.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}=s,{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},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=Ce({name:"passwordlessToken",initialState:J4,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 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 Qp=b(Z());var y0=b(Ne());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 Fr=b(R()),tF=({entities:e})=>{let t=M("EntitiesWidgetList",SP),[n,r]=(0,Qp.useState)(void 0),o=ye(),s=()=>{r(void 0)},i=a=>{e&&(r(e.indexOf(a)),Ir(a.text),o(oo({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Qp.useEffect)(()=>{let a=setTimeout(s,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:()=>i(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,y0.default)(t.icon),children:(0,Fr.jsx)(eu,{})}),(0,Fr.jsx)("span",{className:(0,y0.default)(t.icon,n===l&&t.iconClicked),children:(0,Fr.jsx)(eu,{})})]})]},a.text))})},bP=tF;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 x0=b(R()),TP=()=>(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:"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 w0=b(R()),CP=()=>(0,w0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,w0.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 S0=b(R()),IP=()=>(0,S0.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 512 512",fill:"currentColor",children:(0,S0.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 b0={};Rt(b0,{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,sF=3e3,iF=({assistantOptions:e})=>{let t=M("OnDemandAssistants",kP),n=ce(b0),r=po(rr),o=po(nr),s=j(PT),i=j(AT),a=ct(),l=i.filter(d=>d.isPinned),c=i.filter(d=>!d.isPinned),u=d=>I(void 0,null,function*(){if(clearTimeout(_P),a("trigger on demand assistant",{assistantCode:d}),d===s){o.call({transcript:e.transcript});return}r.call(P(S({},e),{assistantCode:d})),_P=setTimeout(()=>r.reset(),sF)});return i.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)(Rp,{"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=iF;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}})},Zp=aF;var So=b(R()),Jp=({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)(Zp,{width:"60%"}),(0,So.jsx)(Zp,{width:"90%"}),(0,So.jsx)(Zp,{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 fi=b(Z());var E0={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,fi.useRef)(null),o=M("WidgetCue",E0);return(0,fi.useEffect)(()=>{let s=r.current;if(!s)return;s.style.setProperty("height","0px");let i=Math.min(Math.max(s.scrollHeight,dF),uF);s.style.setProperty("height",`${i}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 s=M("WidgetCue",E0),i=ce(nu),a=ct(),l=ee("hasKeyboardInput"),[c,u]=(0,fi.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,fi.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:s.title,"data-testid":"widget-cue-title",children:e.rule.label.startsWith("__")?i(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)(si,{content:e.text,useLabel:i("useCue"),copyLabel:i("copyCue"),onCopy:f,onUse:l?p:void 0})]})}),(0,Mt.jsxs)(Ee.ButtonsContainer,{children:[(0,Mt.jsxs)("div",{className:s.actions,children:[e.specialType==="summary"&&(0,Mt.jsx)(Ee.Button,{onClick:()=>f(c),children:i("copyCue")}),e.callToAction&&(0,Mt.jsx)(Ee.Button,{onClick:d,children:e.callToAction.label}),(0,Mt.jsx)(Ee.Button,{onClick:v,children:i("removeCue")})]}),e.specialType==="summary"?(0,Mt.jsx)(Js,{eventName:"summary feedback",feedbackText:(m=e.text)!=null?m:"",feedbackType:"summary",eventData:{summary:e.text}}):(0,Mt.jsx)(Js,{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(),s=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})},i=(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(_f(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)(Jp,{title:c.rule.label.startsWith("__")?r(c.rule.label):c.title},c.rule.id):(0,Da.jsx)(FP,{cue:c,onCallToAction:a,onRemove:s,onCopy:i,onUse:l},c.rule.id))})},zP=mF;var em=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,em.useEffect)(()=>{te.info("Custom data",e,t)},[e]),(0,yr.jsx)("dl",{className:n.root,children:t.map(o=>{let s=gF(e,o.path);return(0,yr.jsxs)(em.Fragment,{children:[(0,yr.jsx)("dt",{className:n.label,children:o.label}),(0,yr.jsx)("dd",{className:n.value,children:o.type==="boolean"&&s?(0,yr.jsx)("span",{className:n.isTrue,children:o.trueValue}):o.type==="boolean"&&!s?(0,yr.jsx)("span",{className:n.isFalse,children:o.falseValue}):typeof s=="string"||typeof s=="number"?(0,yr.jsxs)("button",{type:"button",onClick:()=>r(`${s}`),className:n.copyButton,children:[(0,yr.jsx)("span",{className:n.copyButtonText,children:s}),(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 tm={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",tm),[o,s]=(0,ut.useState)(!1),i=o?e:e.slice(0,vF);return i.length===0?null:(0,xe.jsxs)("ul",{className:r.sources,children:[i.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)),i<e&&(0,xe.jsx)("button",{type:"button",className:r.showMoreSources,onClick:()=>s(!0),children:n("showMore",{amount:e.length-i.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)(si,{content:t})]})})}),SF=({innerRef:e,item:t,index:n,hasKeyboardInput:r,onCopy:o,onUse:s,onSourceClick:i})=>{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)(si,{content:t.answer.answer,useLabel:a("useCue"),copyLabel:a("copyCue"),onCopy:o,onUse:r?s:void 0}),(0,xe.jsx)(xF,{sources:(l=t.answer.sources)!=null?l:[],onClick:c=>i(c,t.question)})]})}),(0,xe.jsxs)(Ee.ButtonsContainer,{children:[(0,xe.jsx)("div",{}),(0,xe.jsx)(Js,{eventName:"knowledge assist feedback",eventData:{question:t.question,isFollowUpQuestion:n>0,isAgent:!0,answer:t.answer.answer},feedbackText:t.answer.answer,feedbackType:"assistant"})]})]})},T0=(0,ut.createContext)(null),nm=({assistantCode:e,evaluateKnowledgeAssistFn:t,initialQuestion:n,children:r})=>{let[o,s]=(0,ut.useState)(null),[i,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){s(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:i,threadId:o,pendingInput:u,onSubmit:m,onReset(){o&&f(ua(o)),s(null)}};return(0,ut.useEffect)(()=>{n&&m(n)},[n]),(0,xe.jsx)(T0.Provider,{value:x,children:r})},rm=()=>{let e=ce(Fa),t=M("WidgetKnowledgeAssistant",tm),n=(0,ut.useContext)(T0),r=(0,ut.useRef)(null),[o,s]=(0,ut.useState)(""),i=l=>{s(l.target.value)},a=l=>{l.preventDefault(),n.onSubmit(o).then(()=>{var c;r.current&&((c=r.current)==null||c.focus(),s(""))})};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:i}),(0,xe.jsx)("button",{type:"submit",disabled:n.isSubmitting||o==="",className:t.formSubmit,children:e("submitLabel")})]}):null},om=({title:e,emptyState:t})=>{var v,m;let n=ce(Fa),r=ct(),o=M("WidgetKnowledgeAssistant",tm),s=(0,ut.useRef)(null),i=(0,ut.useContext)(T0),a=(m=j(fc((v=i.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(),i.onReset(),r("knowledge assist reset",{threadId:(y=i.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!i.isEnabled||(a==null?void 0:a.length)===0&&!i.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&&!i.pendingInput&&(0,xe.jsx)(wF,S({},t)),a.map((x,y)=>(0,xe.jsx)(SF,{innerRef:y===a.length-1?s:void 0,item:x,index:y,hasKeyboardInput:l,onCopy:u,onUse:p,onSourceClick:d},`${x.question}_${x.answer}_${y}`)),i.pendingInput&&(0,xe.jsx)(Jp,{title:i.pendingInput})]})}),a.length>0&&(0,xe.jsx)("div",{className:o.resetContainer,children:(0,xe.jsx)(Ee.Button,{disabled:i.threadId===null||i.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),s=ce(Wc),i=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:[i&&e.image&&(0,$n.jsx)(Ie.Image,{src:qp(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:s("visitUrl")}),l&&(0,$n.jsx)(Ee.ActionButton,{primary:!0,onClick:c,label:s("useSuggestion")})]})]})},jP=EF;var ru=b(R()),TF=({lines:e,suggestions:t})=>{let n=dn(),r=(o,s)=>{n.send(Ar,{text:o,suggestion:P(S({},s),{source:s.source,sourceText:s.text})})};return(0,ru.jsx)(ru.Fragment,{children:t.map(o=>(0,ru.jsx)(jP,{suggestion:o,lines:e,onUse:s=>r(s,o)},o.text||o.url||o.message))})},KP=TF;var sm={};Rt(sm,{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)(Fp,{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(sm),t=ye(),n=M("Widget",za),r=ee("showSearch"),o=ee("showSummaryCommand"),s=ee("showKnowledgeSearch"),i=j(By("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||s||l;return qP(()=>{if(a)return t(g0()),()=>{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&&!i&&(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")]}),s&&!i&&(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),s=j(gp),i=j(Ip),a=j(Bs),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 s&&s.length>0&&(0,fe.jsx)(Sr,{type:c,title:u,"data-testid":`type-${c}`,children:(0,fe.jsx)(bP,{entities:s})},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=i[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:i[c].suggestions.slice(0,d)||[]})})},c)}})})},C0=({children:e})=>{let t=M("Widget",za);return(0,fe.jsx)("div",{className:t.footer,children:e})},k0=({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(sm),o=j(sa),s=j(Vt),i=j(k1),a=j(Bs),l=j(By("knowledge-assist")),c=j(Of),u=j(Nf);return o===!1?(0,fe.jsx)(WP,{text:r("notSupported")}):s===!1?(0,fe.jsx)(RF,{onLogIn:e}):!a||!i||s===null?(0,fe.jsx)(WP,{text:r("waiting")}):(0,fe.jsx)(k0,{children:(0,fe.jsxs)(nm,{initialQuestion:t.initialQuestion,assistantCode:c!=null?c:u,evaluateKnowledgeAssistFn:u?zs:Hs,children:[(0,fe.jsxs)(Ei,{children:[(0,fe.jsx)(PF,{}),(0,fe.jsx)(AF,{}),l&&(0,fe.jsx)(om,{title:l.title,emptyState:t.emptyState})]}),(0,fe.jsxs)(C0,{children:[l&&(0,fe.jsx)(rm,{}),(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 cs(e,t,n),!0}catch(r){return!1}}function im(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function am(e){return"tagName"in e&&e.tagName==="BR"}var ou=/[\u200B-\u200D\uFEFF]/g;function cs(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,s=!1;function i(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=i(c,t-o);v===0&&!p?r.setStartBefore(l):r.setStart(l,v)}p&&(r.setEnd(l,i(c,n-o)),s=!0),o=d;break}case Node.ELEMENT_NODE:{if(am(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),s=!0;return}for(let u=0;u<l.childNodes.length&&(a(l.childNodes[u]),!s);u++);let c=l.lastChild;im(l)&&c&&!im(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:s,collapsed:i}=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,s).replace(ou,"").length),c+=m.replace(ou,"").length;break}case Node.ELEMENT_NODE:{if(am(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===s;if(x&&(a=c),y&&(l=c),l!==void 0||((!x||!i)&&u(d.childNodes[m]),v&&m===s-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 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:s,collapsed:i}=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?s:void 0;l+=u.textContent.replace(ou,"").substring(v,m);break}case Node.ELEMENT_NODE:{if(!i&&a===1&&am(u)&&u.nextSibling){l+=`
81
+ `;break}!d&&!i&&a===1&&im(u)&&u.previousSibling&&(l+=`
82
+ `);let v=f?r:0,m=p?Math.min(s,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=(i=>(i.CUT="Cut",i.BACKSPACE="Backspace",i.DELETE="Delete",i.ERASEEOF="EraseEof",i.UNDO="Undo",i.CLEAR="Clear",i))(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 s=this.getCaretPosition();Yo(s,this.cachedCaretPosition)||(this.cachedCaretPosition=s,this.emit("caretposition",s))}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 pi=class extends bo{constructor(){super(...arguments);this.lastKnownSelection=null}getRootNode(){return this.element.getRootNode()}getText(){let n=new Range;return n.selectNodeContents(this.element),iu(this.element,n)}getHTML(){return this.element.innerHTML||""}getRange(){var i;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?(i=r.getComposedRanges(n))==null?void 0:i[0]:r.rangeCount>0?r.getRangeAt(0):null;if(!o)return null;let s=this.element.ownerDocument.createRange();return s.setStart(o==null?void 0:o.startContainer,o==null?void 0:o.startOffset),s.setEnd(o==null?void 0:o.endContainer,o==null?void 0:o.endOffset),!s||!this.element.contains(s.startContainer)||!this.element.contains(s.endContainer)?null:s}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 su(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),su(this.element,o)}getSelectedText(){let{start:n,end:r}=this.getSelection();return iu(this.element,cs(this.element,n,r))}listen(){super.listen();let n=new MutationObserver(s=>{var i,a;s.length===2&&s[0].addedNodes.length===1&&((i=s[0].addedNodes[0])==null?void 0:i.textContent)==="\u2060"&&((a=s[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,s=window.getComputedStyle(e),i=e.ownerDocument.body;o.whiteSpace="pre-wrap",o.wordWrap="break-word",o.position="absolute",o.visibility="hidden",LF.forEach(u=>{o[u]=s[u]}),n?e.scrollHeight>Number.parseInt(s.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),i.appendChild(r);let l=e.getBoundingClientRect(),c={top:l.top-e.scrollTop+a.offsetTop+Number.parseInt(s.borderTopWidth)+a.offsetHeight,left:l.left-e.scrollLeft+a.offsetLeft+Number.parseInt(s.borderLeftWidth)};return i.removeChild(r),c}var mi=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 s;return(s=n==null?void 0:n.get)==null?void 0:s.call(this.element)},set:s=>{var i;(i=n==null?void 0:n.set)==null||i.call(this.element,s),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 s=document.createElement("iframe"),i=new URL(t);return Object.entries(n).forEach(([a,l])=>{i.searchParams.append(a,l)}),s.style.position="absolute",s.style.left="-999em",s.style.width="0px",s.style.height="0px",s.tabIndex=-1,s.id=r,s.title=`iframe-${e}`,s.src=i.toString(),window.document.body.appendChild(s),s}function _F(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch(t){return e}}var R0=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()}},P0=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()}},A0=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 P0(t,this.deepdeskUrl,{debug:!0}):new R0(t),r=o=>{var i,a;if(o.origin!==this.deepdeskUrl)return;let s=_F(o.data);typeof s!="object"||s.type!=="event"||s.channel!==t||(te.info("Received broadcast event",this.externalId,o),(a=(i=this.eventMap)[s.name])==null||a.call(i,s.payload))};return n.onMessage(r),n}send(t,n,r){var i,a;te.info("Broadcast event",{externalId:this.externalId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(i=this.eventMap)[t])==null||a.call(i,n));let s=this.externalId==="deepdesk-general"?this.defaultChannel:this.channel;s==null||s.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=A0;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 I0=e=>new Promise(t=>{setTimeout(t,e)});var Va=class extends Ua{constructor(){super(...arguments);this.name="ClientError"}},_0=class extends Ua{constructor(){super(...arguments);this.name="ServerError"}},L0=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 us=class us{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 s={isAborted:!1,reject:o},i=`${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(L0.has(i)){r(L0.get(i));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[i]&&u&&(this.latestRequestByUrl[i].isAborted=!0,this.latestRequestByUrl[i].reject(new Error("Aborted"))),this.latestRequestByUrl[i]=s;let E=()=>I(this,null,function*(){return h--,a(i,g).then(k=>I(this,null,function*(){return m(k)&&!s.isAborted&&h>0?(yield I0(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)&&!s.isAborted&&h>0)return yield I0(f),E();throw k}))});E().then(k=>I(this,null,function*(){let A=yield MF(k);if(delete this.latestRequestByUrl[i],k.status>=500){o(new _0("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&&L0.set(i,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 us.refreshingToken||(us.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{us.refreshingToken=null},1e3*60)})),us.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))}};us.refreshingToken=null;var gi=us;var tA;(t=>{let e;(i=>(i.SEND_MESSAGE="Send Message",i.HANDLING_TIME="Handling Time",i.ADD_TO_PERSONAL_COLLECTION="Add to personal collection",i.DELETE_FROM_PERSONAL_COLLECTION="Delete from personal collection"))(e=t.EventType||(t.EventType={}))})(tA||(tA={}));function lm(e){return P(S({},$e(e)),{metadata:e.metadata})}var hi=class hi{constructor(t,n={}){this.options=n;this.latestReceivedDeepdeskVersions={};this.shouldFetchCsrfToken=!0;this.client=new gi(t,{fetch:n.fetch}),this.client.patchFetch(r=>(o,s)=>I(this,null,function*(){let i=yield r(o,s);return this.handleDeepdeskVersionHeaders(i),i}))}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?(hi.exchangeTokenPromise||(hi.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),hi.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 lm(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:s=1e3}=n,i=yield this.client.get(`/api/v2/conversations/by_external_id/${t}`,{attempts:o,retryDelay:s,retryOnResponse:a=>a.status===404||a.status>=500,version:"v2"});return te.info(`Successfully retrieved conversation ${i.id} for session ${t}`),lm(i)})}isConversationSupported(r){return I(this,arguments,function*(t,n={}){te.info(`Check if conversation for session ${t} is supported`);let{attempts:o=1,retryDelay:s=1e3}=n;return(yield this.client.get(`/api/v2/conversations/by_external_id/${t}/has_active_profile`,{attempts:o,retryDelay:s,retryOnResponse:a=>a.status===404||a.status>=500})).has_active_profile})}updateConversation(t,n){return I(this,null,function*(){var s;yield this.preflight();let r=Ct(n);n.metadata&&(r.metadata=(s=n.metadata)!=null?s:{});let o=yield this.client.put(`/api/v2/conversations/${t}`,r);return lm(o)})}postMessages(t,n){return I(this,null,function*(){return yield this.preflight(),(yield this.client.post(`/api/v2/conversations/${t}/messages`,n.map(o=>P(S({},Ct(o)),{metadata:o.metadata})))).map(o=>lm(o))})}sendEvent(t,n){return I(this,null,function*(){yield this.preflight();let i=n,{data:r}=i,o=oe(i,["data"]),s=Object.entries(this.latestReceivedDeepdeskVersions).reduce((a,[l,c])=>P(S({},a),{[l]:c}),{});return this.client.post("/api/events",Ct(P(S(S({},s),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,[s,i])=>P(S({},o),{[s]:i}),{});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(i=>P(S({},$e(i)),{text:i.text||i.url||i.message,source:r,type:r})).filter((i,a,l)=>a===l.findIndex(c=>c.text===i.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,s,i)=>s===i.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(s,i,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(s=>s.text&&s.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 s=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()}`,i=yield this.client.post(s,{input:(a=n==null?void 0:n.input)!=null?a:{},conversation:n==null?void 0:n.transcript});return $e(i.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,s=yield this.client.post(`/apis/admin/assistants/${n}/threads/${r}/messages/`,{content:o,role:"user"});return $e(s)})}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(),s=o.match($x);if(!n||!s)return;let i=s[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[i];a&&n&&a!==n&&te.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[i]=n})}};hi.exchangeTokenPromise=null;var Eo=hi;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:sA,handlingTimeStop:cm,handlingTimeReset:iA}=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 um={list:{keywordMatches:[]},fetchState:"idle"};var yi=ge("styleSuggestions/getAll",(n,r)=>I(void 0,[n,r],function*({text:e},t){var l;let{deepdeskAPI:o}=t.extra,s=t.getState(),{showStyleSuggestions:i}=s.settings,a=(l=s.conversation.current)==null?void 0:l.profileCode;if(!i)return um.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:um,reducers:{},extraReducers:e=>{e.addCase(yi.pending,t=>{t.fetchState="loading"}).addCase(yi.rejected,t=>{t.fetchState="error"}).addCase(yi.fulfilled,(t,n)=>{t.fetchState="done",Yo(t.list,n.payload)||(t.list=n.payload)}).addCase(Ms,t=>{t.list=um.list}).addCase(at,()=>um)}}),cA=DF.reducer;var uA=(e={})=>{let t,n=!0,r=S({getStyleSuggestions:yi,debounce:500},e);return o=>s=>i=>{var p;let a=o.getState().input.text,l=s(i),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=>s=>{var m;let{input:i}=r.getState(),a=o(s),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=s.type===Lp.toString();if(!d||!c&&!u)return a;let{input:p}=l;return FF(p,i)&&!f||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let x=ia(l);x===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(x))},f?0:t.debounce)),a}};var fA=yi.fulfilled.toString();function zF(e,t){let n=new Set([...t.keywordMatches.map(o=>o.keyword)]),r=[];return n.forEach(o=>{let s=e.keywordMatches.filter(l=>l.keyword===o),i=t.keywordMatches.filter(l=>l.keyword===o),a=i.length-s.length;a<=0||r.push(...i.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 s=t.getState(),i=s.styleSuggestions.list,a=(c=s.conversation)==null?void 0:c.current;if(o===i)return;let l=zF(o,i);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,s)=>o.concat(s),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(),s=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 Ms.toString():e.logSendMessage(r.payload);break;case _f.toString():e.emit("call-to-action",{cue:r.payload});break;case rr.fulfilled.toString():r.isBroadcasted||e.broadcast(Ty,r,!1);break;default:break}let i=n(r);switch(r.type){case Ms.toString():e.handleAfterSendMessage(r.payload);break;case Xc.toString():e.onUpdateShowTabHint(r.payload);break;case cm.toString():e.logHandlingTime();break;case"analytics/logEvent/fulfilled":{e.emit("event",r.meta.arg);break}case mf.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}})),s&&t.dispatch(Xo([]));break}case gf.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():{s&&r.payload.length>0&&t.dispatch(hf(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 i},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:s}=n;return!o||!s?(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(s)}});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:s,numCharsPasted:i,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=s/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:s+k,lenTextTotal:y,lenTextAssisted:h,lenTextPasted:i,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 s;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return N0(r,t);let o=(s=e.ownerDocument.defaultView)==null?void 0:s.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 dm(e){return $F(e)&&(di(e)||Hp(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 fm=!1,EA=()=>{fm=!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){fm=!1;return}wA=window.requestAnimationFrame(EA)};function D0(e,t){let n=SA(e),r=[],o=n.map((s,i)=>D0(s,a=>{r[i]=a;let l=zr.get(e);if(!l)return;let c=r.reduce(bA,l.rect);l.callbacks.forEach(u=>u(c))}));return{observe(s=!0){if(o.forEach(i=>i.observe(!1)),zr.has(e)){let i=zr.get(e);i.callbacks.push(t),i.rect&&t(i.rect)}else zr.set(e,{rect:void 0,callbacks:[t],parentRects:r});s&&!fm&&EA()},unobserve(){o.forEach(i=>i.unobserve());let s=zr.get(e);if(s){let i=s.callbacks.indexOf(t);i>=0&&s.callbacks.splice(i,1),s.callbacks.length||zr.delete(e),zr.size||(cancelAnimationFrame(wA),fm=!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(s=>s(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 pm(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),s=$a(e.borderLeftWidth),i=$a(e.borderRightWidth),a=$a(e.paddingRight),l=RA(pm(o)-pm(s)-pm(i)),c=RA(pm(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",ti(n);let r=window.getComputedStyle(e),o=!0,s=()=>{n.scrollTop=e.scrollTop};z0(r,n,F0),H0(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",s));let i=kA(e,()=>{z0(r,n,F0),H0(r,e,n),s(),setTimeout(s,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),s(),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(),i.observe(),[n,()=>{e.removeEventListener("scroll",s),c.unobserve(),i.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 mm(e,t,n=100){let r=AA(e);t({isVisible:r});let o=setInterval(()=>{let s=AA(e);s!==r&&(r=s,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:s,productName:i,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:s}),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:i}))}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(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(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(xy(P(S({},t),{metadata:(r=t.metadata)!=null?r:{}})))).payload})}postMessages(t){return I(this,null,function*(){return(yield this.store.dispatch(pf(t))).payload})}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(Sy(t))})}getAgentSettings(){return I(this,null,function*(){return(yield this.store.dispatch(by())).payload})}refresh(){return I(this,null,function*(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.store.dispatch(yf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()}));let t=[];return this.store.dispatch(Lp()),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:s=!0,includeMetadata:i,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:i,input:r,skipState:!s}));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 s=r[{accepted:"conversationAcceptedAssistant","new-message":"conversationNewMessageAssistant",ended:"conversationEndedAssistant"}[t]];if(!s){te.warn(`No assistant set in profile for conversation event "${t}"`);return}yield this.evaluateAssistant(s,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:s,selection:i}=this.state.input,{inlineSuggestions:a,showTextSuggestions:l}=this.settings,c=a?"below":"above",u=o.length>0;if(this.store.dispatch(_1(wy(t))),!Mr(this.state)||t.key!=="Tab"&&!l)return;let d=()=>{n||!u||i&&(t.shiftKey||(this.store.dispatch(M1()),t.preventDefault()))},f=()=>{n||!u||a&&s<=0||i&&(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(hf(-1)),this.store.dispatch(os({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(os({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(sA()))}handlingTimeStop(){this.state.handlingTime.startTime&&(te.info("Stop handling time"),this.store.dispatch(cm()))}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(iA()))}notifySubmit(t={}){var n;this.shouldAbort()||(this.store.dispatch(Ms((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(s){te.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),te.error(s)}})}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 s;return(s=o.conversation.current)==null?void 0:s.id},r=()=>this.loadProfileConfig().then(()=>t());n(this.state)&&r(),this.subscribe(n,o=>{o&&r()})}overlayContainerFactory(t,n,r,o){let[s,i]=au(n,r);return s.setAttribute("translate","no"),s.dataset.testid=t,o&&s.classList.add(o),[s,i]}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 s=(a=t.ownerDocument.defaultView)==null?void 0:a.frameElement,i=s?s.ownerDocument.defaultView:null;if(s&&(i===window||(i==null?void 0:i.parent)===window)){let[l,c]=au(s,{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 ti(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(!dm(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let f=n,{customStyles:r,closestScrollSelector:o,floatingMenuParent:s,appendOverlayTo:i,inputMediator:a}=f,l=oe(f,["customStyles","closestScrollSelector","floatingMenuParent","appendOverlayTo","inputMediator"]),c={customStyles:r,closestScrollSelector:o,floatingMenuParent:s,appendOverlayTo:i};this.configure(l),this.settings.automaticHandlingTime&&this.setupHandlingTime(t),ti(t),this.inputMediator=a||(di(t)?new mi(t):new pi(t)),this.inputMediator.on("change",({plainText:p,rawHTML:v})=>{this.store.dispatch(yf({text:p,html:v}))}),this.inputMediator.on("keyup",p=>{this.store.dispatch(O1(wy(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(vf(p))},500):this.store.dispatch(vf(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(Np(!1))}),this.inputMediator.on("focus",()=>{this.store.dispatch(Np(!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(yf({text:this.inputMediator.getText(),html:this.inputMediator.getHTML()})),this.store.dispatch(vf(this.inputMediator.getSelection())),this.store.dispatch(Np(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(s=>s()),this.unmountHandlers=[],(o=this.inputMediator)==null||o.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderSuggestions(t,n){var r,o,s;(r=this.floatingMenu)==null||r.unmount(),(o=this.inlineSuggestions)==null||o.unmount(),(s=this.aboveSuggestions)==null||s.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"),s=(0,ds.createRoot)(o);s.render((0,Le.jsx)(is,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(KR,{})})}));let i=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",i),{unmount:()=>{var a;(a=this.inputMediator)==null||a.off("caretposition",i),s.unmount(),o.remove()}}}renderAboveSuggestions(t,n){let{customStyles:r,closestScrollSelector:o,appendOverlayTo:s}=n,i=o&&M0(t,o)||void 0,[a,l]=this.overlayContainerFactory("deepdesk-tab-completion",i||t,{appendTo:s,closestScrollElement:i,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),[c,u]=this.overlayContainerFactory("deepdesk-suggestions-overlay",i||t,{appendTo:s},r==null?void 0:r.suggestionsRootNode),d=(0,ds.createRoot)(a);d.render((0,Le.jsx)(is,{store:this.store,customStyles:r,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(hP,{inputElement:t})})}));let f=(0,ds.createRoot)(c);return f.render((0,Le.jsx)(is,{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:s,floatingMenuParent:i}=n,a=o&&M0(t,o)||void 0,[l,c]=this.overlayContainerFactory("floating-menu",a||t,{appendTo:i!=null?i:s},r==null?void 0:r.floatingMenuParent),u=(0,ds.createRoot)(l);return u.render((0,Le.jsx)(is,{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,ds.createRoot)(r);return o.render((0,Le.jsx)(is,{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:s}=n;this.widgetElement=t,this.configure({showImages:o,isEmbedded:s}),this.widgetRoot=(0,ds.createRoot)(t),this.widgetRoot.render((0,Le.jsx)(is,{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(i=>te.warn(i.message))})})})),this.whenConversationLoaded(()=>{var i;this.broadcastEvents.setExternalId((i=this.state.conversation.current)==null?void 0:i.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:s}=r,i=(0,ds.createRoot)(n);return i.render((0,Le.jsx)(is,{store:this.store,customStyles:o,children:(0,Le.jsx)(Qo,{broadcastEvents:this.broadcastEvents,children:(0,Le.jsx)(k0,{children:(0,Le.jsxs)(nm,{assistantCode:t,initialQuestion:s,evaluateKnowledgeAssistFn:r.isLegacyKnowledgeAssist?zs:Hs,children:[(0,Le.jsx)(Ei,{children:(0,Le.jsx)(om,{emptyState:r.emptyState})}),(0,Le.jsx)(C0,{children:(0,Le.jsx)(rm,{})})]})})})})),{unmount(){i.unmount()}}}setupHandlingTime(t){let n=mm(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=Bs(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,s=o.port1,i=this.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${i}/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)};s.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.8",ja.count=0;var lu=ja;function WF(e){return I(this,null,function*(){var o,s,i;let n=yield((o=e.fetch)!=null?o:window.fetch)(e.url),r=yield n.blob();return new File([r],e.name,{type:(i=(s=e.mimeType)!=null?s:n.headers.get("Content-Type"))!=null?i:"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:s}=e,{start:i,end:a}=(d=n.replace)!=null?d:{start:0,end:s.length},l=`${s.slice(0,i)}${t}${s.slice(a)}`,c=(f=n.selectionAfter)!=null?f:{start:i+t.length,end:i+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 s=n.replace?cs(e,n.replace.start,n.replace.end):Ba(e),i,a=()=>{if(n.setRange)return n.setRange(s.cloneRange());s.deleteContents(),i=document.createElement("span"),s.insertNode(i),n.insertBRs!==!1?t.split(`
83
+ `).reverse().forEach((l,c)=>{c>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(l))}):s.insertNode(document.createTextNode(t))};return Promise.resolve(a()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let l=n.selectionAfter?cs(e,n.selectionAfter.start,n.selectionAfter.end):(s.collapse(!1),s),c=window.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(l)}if(!i)return;i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}finally{i&&i.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},s=0;for(;o=n.slice(s).match(/(\[([^\]]+)])\(([^)]+)\)/);){let i=document.createElement("a");i.href=o[3],i.setAttribute("target","_blank"),i.setAttribute("rel","noopener noreferrer"),i.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(s,s+o.index))),t.appendChild(i),s=s+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(s)))}),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,s){return I(this,arguments,function*(e,t,{isBlock:n,isHTML:r}={}){let i;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;i=document.createElement("span"),u.insertNode(i);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(),!!i)try{i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"})}finally{i&&i.remove()}})})}return QA(YF);})();
86
85
  /*! Bundled license information:
87
86
 
88
87
  classnames/index.js:
@@ -92,15 +91,9 @@ classnames/index.js:
92
91
  http://jedwatson.github.io/classnames
93
92
  *)
94
93
 
95
- object-assign/index.js:
96
- (*
97
- object-assign
98
- (c) Sindre Sorhus
99
- @license MIT
100
- *)
101
-
102
94
  react/cjs/react.production.min.js:
103
- (** @license React v17.0.2
95
+ (**
96
+ * @license React
104
97
  * react.production.min.js
105
98
  *
106
99
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -110,7 +103,8 @@ react/cjs/react.production.min.js:
110
103
  *)
111
104
 
112
105
  react/cjs/react-jsx-runtime.production.min.js:
113
- (** @license React v17.0.2
106
+ (**
107
+ * @license React
114
108
  * react-jsx-runtime.production.min.js
115
109
  *
116
110
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -120,7 +114,8 @@ react/cjs/react-jsx-runtime.production.min.js:
120
114
  *)
121
115
 
122
116
  scheduler/cjs/scheduler.production.min.js:
123
- (** @license React v0.20.2
117
+ (**
118
+ * @license React
124
119
  * scheduler.production.min.js
125
120
  *
126
121
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -130,40 +125,9 @@ scheduler/cjs/scheduler.production.min.js:
130
125
  *)
131
126
 
132
127
  react-dom/cjs/react-dom.production.min.js:
133
- (** @license React v17.0.2
134
- * react-dom.production.min.js
135
- *
136
- * Copyright (c) Facebook, Inc. and its affiliates.
137
- *
138
- * This source code is licensed under the MIT license found in the
139
- * LICENSE file in the root directory of this source tree.
140
- *)
141
-
142
- use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
143
- (**
144
- * @license React
145
- * use-sync-external-store-shim.production.js
146
- *
147
- * Copyright (c) Meta Platforms, Inc. and affiliates.
148
- *
149
- * This source code is licensed under the MIT license found in the
150
- * LICENSE file in the root directory of this source tree.
151
- *)
152
-
153
- use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
154
128
  (**
155
129
  * @license React
156
- * use-sync-external-store-shim/with-selector.production.js
157
- *
158
- * Copyright (c) Meta Platforms, Inc. and affiliates.
159
- *
160
- * This source code is licensed under the MIT license found in the
161
- * LICENSE file in the root directory of this source tree.
162
- *)
163
-
164
- react-is/cjs/react-is.production.min.js:
165
- (** @license React v16.13.1
166
- * react-is.production.min.js
130
+ * react-dom.production.min.js
167
131
  *
168
132
  * Copyright (c) Facebook, Inc. and its affiliates.
169
133
  *
@@ -171,12 +135,12 @@ react-is/cjs/react-is.production.min.js:
171
135
  * LICENSE file in the root directory of this source tree.
172
136
  *)
173
137
 
174
- react-is/cjs/react-is.production.min.js:
138
+ use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js:
175
139
  (**
176
140
  * @license React
177
- * react-is.production.min.js
141
+ * use-sync-external-store-with-selector.production.js
178
142
  *
179
- * Copyright (c) Facebook, Inc. and its affiliates.
143
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
180
144
  *
181
145
  * This source code is licensed under the MIT license found in the
182
146
  * LICENSE file in the root directory of this source tree.
@@ -198,5 +162,5 @@ tabbable/dist/index.esm.js:
198
162
  *)
199
163
 
200
164
  dompurify/dist/purify.es.mjs:
201
- (*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE *)
165
+ (*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE *)
202
166
  */