@deepdesk/deepdesk-sdk 10.4.0 → 10.4.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
- "use strict";var Deepdesk=(()=>{var cC=Object.create;var Va=Object.defineProperty;var dC=Object.getOwnPropertyDescriptor;var fC=Object.getOwnPropertyNames;var pC=Object.getPrototypeOf,mC=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ce=(e,t)=>{for(var n in t)Va(e,n,{get:t[n],enumerable:!0})},Eh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of fC(t))!mC.call(e,o)&&o!==n&&Va(e,o,{get:()=>t[o],enumerable:!(r=dC(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?cC(pC(e)):{},Eh(t||!e||!e.__esModule?Va(n,"default",{value:e,enumerable:!0}):n,e)),gC=e=>Eh(Va({},"__esModule",{value:!0}),e);var X=pe(($L,Ka)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty,t="[native code]";function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}typeof Ka<"u"&&Ka.exports?(n.default=n,Ka.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Wa=pe((qL,bh)=>{"use strict";var Ch=Object.getOwnPropertySymbols,hC=Object.prototype.hasOwnProperty,yC=Object.prototype.propertyIsEnumerable;function vC(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function SC(){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{return!1}}bh.exports=SC()?Object.assign:function(e,t){for(var n,r=vC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)hC.call(n,s)&&(r[s]=n[s]);if(Ch){o=Ch(n);for(var a=0;a<o.length;a++)yC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Uh=pe(K=>{"use strict";var Pd=Wa(),po=60103,Ph=60106;K.Fragment=60107;K.StrictMode=60108;K.Profiler=60114;var Rh=60109,Ih=60110,Lh=60112;K.Suspense=60113;var Ah=60115,Oh=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,po=ft("react.element"),Ph=ft("react.portal"),K.Fragment=ft("react.fragment"),K.StrictMode=ft("react.strict_mode"),K.Profiler=ft("react.profiler"),Rh=ft("react.provider"),Ih=ft("react.context"),Lh=ft("react.forward_ref"),K.Suspense=ft("react.suspense"),Ah=ft("react.memo"),Oh=ft("react.lazy"));var ft,Th=typeof Symbol=="function"&&Symbol.iterator;function xC(e){return e===null||typeof e!="object"?null:(e=Th&&e[Th]||e["@@iterator"],typeof e=="function"?e:null)}function zi(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 Nh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mh={};function mo(e,t,n){this.props=e,this.context=t,this.refs=Mh,this.updater=n||Nh}mo.prototype.isReactComponent={};mo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(zi(85));this.updater.enqueueSetState(this,e,t,"setState")};mo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dh(){}Dh.prototype=mo.prototype;function Rd(e,t,n){this.props=e,this.context=t,this.refs=Mh,this.updater=n||Nh}var Id=Rd.prototype=new Dh;Id.constructor=Rd;Pd(Id,mo.prototype);Id.isPureReactComponent=!0;var Ld={current:null},Fh=Object.prototype.hasOwnProperty,jh={key:!0,ref:!0,__self:!0,__source:!0};function Hh(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)Fh.call(t,r)&&!jh.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:po,type:e,key:i,ref:s,props:o,_owner:Ld.current}}function _C(e,t){return{$$typeof:po,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ad(e){return typeof e=="object"&&e!==null&&e.$$typeof===po}function wC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var kh=/\/+/g;function kd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wC(""+e.key):t.toString(36)}function qa(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 po:case Ph:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+kd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(kh,"$&/")+"/"),qa(o,t,n,"",function(u){return u})):o!=null&&(Ad(o)&&(o=_C(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(kh,"$&/")+"/")+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+kd(i,a);s+=qa(i,t,n,l,o)}else if(l=xC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+kd(i,a++),s+=qa(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(zi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function $a(e,t,n){if(e==null)return e;var r=[],o=0;return qa(e,r,"","",function(i){return t.call(n,i,o++)}),r}function EC(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 Bh={current:null};function cn(){var e=Bh.current;if(e===null)throw Error(zi(321));return e}var CC={ReactCurrentDispatcher:Bh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Ld,IsSomeRendererActing:{current:!1},assign:Pd};K.Children={map:$a,forEach:function(e,t,n){$a(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $a(e,function(){t++}),t},toArray:function(e){return $a(e,function(t){return t})||[]},only:function(e){if(!Ad(e))throw Error(zi(143));return e}};K.Component=mo;K.PureComponent=Rd;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CC;K.cloneElement=function(e,t,n){if(e==null)throw Error(zi(267,e));var r=Pd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Ld.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Fh.call(t,l)&&!jh.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:po,type:e.type,key:o,ref:i,props:r,_owner:s}};K.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Ih,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Rh,_context:e},e.Consumer=e};K.createElement=Hh;K.createFactory=function(e){var t=Hh.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Lh,render:e}};K.isValidElement=Ad;K.lazy=function(e){return{$$typeof:Oh,_payload:{_status:-1,_result:e},_init:EC}};K.memo=function(e,t){return{$$typeof:Ah,type:e,compare:t===void 0?null:t}};K.useCallback=function(e,t){return cn().useCallback(e,t)};K.useContext=function(e,t){return cn().useContext(e,t)};K.useDebugValue=function(){};K.useEffect=function(e,t){return cn().useEffect(e,t)};K.useImperativeHandle=function(e,t,n){return cn().useImperativeHandle(e,t,n)};K.useLayoutEffect=function(e,t){return cn().useLayoutEffect(e,t)};K.useMemo=function(e,t){return cn().useMemo(e,t)};K.useReducer=function(e,t,n){return cn().useReducer(e,t,n)};K.useRef=function(e){return cn().useRef(e)};K.useState=function(e){return cn().useState(e)};K.version="17.0.2"});var O=pe((XL,zh)=>{"use strict";zh.exports=Uh()});var qh=pe(Ki=>{"use strict";Wa();var bC=O(),Wh=60103;Ki.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Od=Symbol.for,Wh=Od("react.element"),Ki.Fragment=Od("react.fragment"));var Od,TC=bC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,kC=Object.prototype.hasOwnProperty,PC={key:!0,ref:!0,__self:!0,__source:!0};function $h(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)kC.call(t,r)&&!PC.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:Wh,type:e,key:i,ref:s,props:o,_owner:TC.current}}Ki.jsx=$h;Ki.jsxs=$h});var w=pe((nA,Gh)=>{"use strict";Gh.exports=qh()});var Iy=pe($=>{"use strict";var xo,Zi,_l,Jd;typeof performance=="object"&&typeof performance.now=="function"?(by=performance,$.unstable_now=function(){return by.now()}):(qd=Date,Ty=qd.now(),$.unstable_now=function(){return qd.now()-Ty});var by,qd,Ty;typeof window>"u"||typeof MessageChannel!="function"?(So=null,Gd=null,Xd=function(){if(So!==null)try{var e=$.unstable_now();So(!0,e),So=null}catch(t){throw setTimeout(Xd,0),t}},xo=function(e){So!==null?setTimeout(xo,0,e):(So=e,setTimeout(Xd,0))},Zi=function(e,t){Gd=setTimeout(e,t)},_l=function(){clearTimeout(Gd)},$.unstable_shouldYield=function(){return!1},Jd=$.unstable_forceFrameRate=function(){}):(ky=window.setTimeout,Py=window.clearTimeout,typeof console<"u"&&(Ry=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 Ry!="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")),Qi=!1,Yi=null,vl=-1,Qd=5,Yd=0,$.unstable_shouldYield=function(){return $.unstable_now()>=Yd},Jd=function(){},$.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"):Qd=0<e?Math.floor(1e3/e):5},Zd=new MessageChannel,Sl=Zd.port2,Zd.port1.onmessage=function(){if(Yi!==null){var e=$.unstable_now();Yd=e+Qd;try{Yi(!0,e)?Sl.postMessage(null):(Qi=!1,Yi=null)}catch(t){throw Sl.postMessage(null),t}}else Qi=!1},xo=function(e){Yi=e,Qi||(Qi=!0,Sl.postMessage(null))},Zi=function(e,t){vl=ky(function(){e($.unstable_now())},t)},_l=function(){Py(vl),vl=-1});var So,Gd,Xd,ky,Py,Ry,Qi,Yi,vl,Qd,Yd,Zd,Sl;function ef(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<xl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Nt(e){return e=e[0],e===void 0?null:e}function wl(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>xl(s,n))l!==void 0&&0>xl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>xl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function xl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Gt=[],Vn=[],ob=1,yt=null,Ie=3,El=!1,Fr=!1,Ji=!1;function tf(e){for(var t=Nt(Vn);t!==null;){if(t.callback===null)wl(Vn);else if(t.startTime<=e)wl(Vn),t.sortIndex=t.expirationTime,ef(Gt,t);else break;t=Nt(Vn)}}function nf(e){if(Ji=!1,tf(e),!Fr)if(Nt(Gt)!==null)Fr=!0,xo(rf);else{var t=Nt(Vn);t!==null&&Zi(nf,t.startTime-e)}}function rf(e,t){Fr=!1,Ji&&(Ji=!1,_l()),El=!0;var n=Ie;try{for(tf(t),yt=Nt(Gt);yt!==null&&(!(yt.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=yt.callback;if(typeof r=="function"){yt.callback=null,Ie=yt.priorityLevel;var o=r(yt.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?yt.callback=o:yt===Nt(Gt)&&wl(Gt),tf(t)}else wl(Gt);yt=Nt(Gt)}if(yt!==null)var i=!0;else{var s=Nt(Vn);s!==null&&Zi(nf,s.startTime-t),i=!1}return i}finally{yt=null,Ie=n,El=!1}}var ib=Jd;$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(e){e.callback=null};$.unstable_continueExecution=function(){Fr||El||(Fr=!0,xo(rf))};$.unstable_getCurrentPriorityLevel=function(){return Ie};$.unstable_getFirstCallbackNode=function(){return Nt(Gt)};$.unstable_next=function(e){switch(Ie){case 1:case 2:case 3:var t=3;break;default:t=Ie}var n=Ie;Ie=t;try{return e()}finally{Ie=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=ib;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ie;Ie=e;try{return t()}finally{Ie=n}};$.unstable_scheduleCallback=function(e,t,n){var r=$.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:ob++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,ef(Vn,e),Nt(Gt)===null&&e===Nt(Vn)&&(Ji?_l():Ji=!0,Zi(nf,n-r))):(e.sortIndex=o,ef(Gt,e),Fr||El||(Fr=!0,xo(rf))),e};$.unstable_wrapCallback=function(e){var t=Ie;return function(){var n=Ie;Ie=t;try{return e.apply(this,arguments)}finally{Ie=n}}}});var Ay=pe((GO,Ly)=>{"use strict";Ly.exports=Iy()});var v0=pe(Et=>{"use strict";var hu=O(),ae=Wa(),xe=Ay();function T(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(!hu)throw Error(T(227));var Wv=new Set,Rs={};function Gr(e,t){Uo(e,t),Uo(e+"Capture",t)}function Uo(e,t){for(Rs[e]=t,e=0;e<t.length;e++)Wv.add(t[e])}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sb=/^[: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]*$/,Oy=Object.prototype.hasOwnProperty,Ny={},My={};function ab(e){return Oy.call(My,e)?!0:Oy.call(Ny,e)?!1:sb.test(e)?My[e]=!0:(Ny[e]=!0,!1)}function lb(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 ub(e,t,n,r){if(t===null||typeof t>"u"||lb(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 Ue(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 ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Ue(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){ke[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var pp=/[\-:]([a-z])/g;function mp(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(pp,mp);ke[t]=new Ue(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(pp,mp);ke[t]=new Ue(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(pp,mp);ke[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function gp(e,t,n,r){var o=ke.hasOwnProperty(t)?ke[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||(ub(t,n,o,r)&&(n=null),r||o===null?ab(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 Xr=hu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fs=60103,Hr=60106,Wn=60107,hp=60108,ys=60114,yp=60109,vp=60110,yu=60112,vs=60113,ql=60120,vu=60115,Sp=60116,xp=60121,_p=60128,$v=60129,wp=60130,kf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,fs=ye("react.element"),Hr=ye("react.portal"),Wn=ye("react.fragment"),hp=ye("react.strict_mode"),ys=ye("react.profiler"),yp=ye("react.provider"),vp=ye("react.context"),yu=ye("react.forward_ref"),vs=ye("react.suspense"),ql=ye("react.suspense_list"),vu=ye("react.memo"),Sp=ye("react.lazy"),xp=ye("react.block"),ye("react.scope"),_p=ye("react.opaque.id"),$v=ye("react.debug_trace_mode"),wp=ye("react.offscreen"),kf=ye("react.legacy_hidden"));var ye,Dy=typeof Symbol=="function"&&Symbol.iterator;function es(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}var of;function ps(e){if(of===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);of=t&&t[1]||""}return`
1
+ "use strict";var Deepdesk=(()=>{var cC=Object.create;var Va=Object.defineProperty;var dC=Object.getOwnPropertyDescriptor;var fC=Object.getOwnPropertyNames;var pC=Object.getPrototypeOf,mC=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ce=(e,t)=>{for(var n in t)Va(e,n,{get:t[n],enumerable:!0})},Eh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of fC(t))!mC.call(e,o)&&o!==n&&Va(e,o,{get:()=>t[o],enumerable:!(r=dC(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?cC(pC(e)):{},Eh(t||!e||!e.__esModule?Va(n,"default",{value:e,enumerable:!0}):n,e)),gC=e=>Eh(Va({},"__esModule",{value:!0}),e);var X=pe(($L,Ka)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty,t="[native code]";function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var s=typeof i;if(s==="string"||s==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var a=n.apply(null,i);a&&r.push(a)}}else if(s==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var l in i)e.call(i,l)&&i[l]&&r.push(l)}}}return r.join(" ")}typeof Ka<"u"&&Ka.exports?(n.default=n,Ka.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Wa=pe((qL,bh)=>{"use strict";var Ch=Object.getOwnPropertySymbols,hC=Object.prototype.hasOwnProperty,yC=Object.prototype.propertyIsEnumerable;function vC(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function SC(){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{return!1}}bh.exports=SC()?Object.assign:function(e,t){for(var n,r=vC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)hC.call(n,s)&&(r[s]=n[s]);if(Ch){o=Ch(n);for(var a=0;a<o.length;a++)yC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Uh=pe(K=>{"use strict";var Pd=Wa(),mo=60103,Ph=60106;K.Fragment=60107;K.StrictMode=60108;K.Profiler=60114;var Rh=60109,Ih=60110,Lh=60112;K.Suspense=60113;var Ah=60115,Oh=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,mo=ft("react.element"),Ph=ft("react.portal"),K.Fragment=ft("react.fragment"),K.StrictMode=ft("react.strict_mode"),K.Profiler=ft("react.profiler"),Rh=ft("react.provider"),Ih=ft("react.context"),Lh=ft("react.forward_ref"),K.Suspense=ft("react.suspense"),Ah=ft("react.memo"),Oh=ft("react.lazy"));var ft,Th=typeof Symbol=="function"&&Symbol.iterator;function xC(e){return e===null||typeof e!="object"?null:(e=Th&&e[Th]||e["@@iterator"],typeof e=="function"?e:null)}function Vi(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 Nh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mh={};function go(e,t,n){this.props=e,this.context=t,this.refs=Mh,this.updater=n||Nh}go.prototype.isReactComponent={};go.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Vi(85));this.updater.enqueueSetState(this,e,t,"setState")};go.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dh(){}Dh.prototype=go.prototype;function Rd(e,t,n){this.props=e,this.context=t,this.refs=Mh,this.updater=n||Nh}var Id=Rd.prototype=new Dh;Id.constructor=Rd;Pd(Id,go.prototype);Id.isPureReactComponent=!0;var Ld={current:null},Fh=Object.prototype.hasOwnProperty,jh={key:!0,ref:!0,__self:!0,__source:!0};function Hh(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)Fh.call(t,r)&&!jh.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:mo,type:e,key:i,ref:s,props:o,_owner:Ld.current}}function _C(e,t){return{$$typeof:mo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ad(e){return typeof e=="object"&&e!==null&&e.$$typeof===mo}function wC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var kh=/\/+/g;function kd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wC(""+e.key):t.toString(36)}function qa(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 mo:case Ph:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+kd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(kh,"$&/")+"/"),qa(o,t,n,"",function(u){return u})):o!=null&&(Ad(o)&&(o=_C(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(kh,"$&/")+"/")+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+kd(i,a);s+=qa(i,t,n,l,o)}else if(l=xC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+kd(i,a++),s+=qa(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Vi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function $a(e,t,n){if(e==null)return e;var r=[],o=0;return qa(e,r,"","",function(i){return t.call(n,i,o++)}),r}function EC(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 Bh={current:null};function dn(){var e=Bh.current;if(e===null)throw Error(Vi(321));return e}var CC={ReactCurrentDispatcher:Bh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Ld,IsSomeRendererActing:{current:!1},assign:Pd};K.Children={map:$a,forEach:function(e,t,n){$a(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return $a(e,function(){t++}),t},toArray:function(e){return $a(e,function(t){return t})||[]},only:function(e){if(!Ad(e))throw Error(Vi(143));return e}};K.Component=go;K.PureComponent=Rd;K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=CC;K.cloneElement=function(e,t,n){if(e==null)throw Error(Vi(267,e));var r=Pd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Ld.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Fh.call(t,l)&&!jh.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:mo,type:e.type,key:o,ref:i,props:r,_owner:s}};K.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Ih,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Rh,_context:e},e.Consumer=e};K.createElement=Hh;K.createFactory=function(e){var t=Hh.bind(null,e);return t.type=e,t};K.createRef=function(){return{current:null}};K.forwardRef=function(e){return{$$typeof:Lh,render:e}};K.isValidElement=Ad;K.lazy=function(e){return{$$typeof:Oh,_payload:{_status:-1,_result:e},_init:EC}};K.memo=function(e,t){return{$$typeof:Ah,type:e,compare:t===void 0?null:t}};K.useCallback=function(e,t){return dn().useCallback(e,t)};K.useContext=function(e,t){return dn().useContext(e,t)};K.useDebugValue=function(){};K.useEffect=function(e,t){return dn().useEffect(e,t)};K.useImperativeHandle=function(e,t,n){return dn().useImperativeHandle(e,t,n)};K.useLayoutEffect=function(e,t){return dn().useLayoutEffect(e,t)};K.useMemo=function(e,t){return dn().useMemo(e,t)};K.useReducer=function(e,t,n){return dn().useReducer(e,t,n)};K.useRef=function(e){return dn().useRef(e)};K.useState=function(e){return dn().useState(e)};K.version="17.0.2"});var O=pe((XL,zh)=>{"use strict";zh.exports=Uh()});var qh=pe(Wi=>{"use strict";Wa();var bC=O(),Wh=60103;Wi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Od=Symbol.for,Wh=Od("react.element"),Wi.Fragment=Od("react.fragment"));var Od,TC=bC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,kC=Object.prototype.hasOwnProperty,PC={key:!0,ref:!0,__self:!0,__source:!0};function $h(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)kC.call(t,r)&&!PC.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:Wh,type:e,key:i,ref:s,props:o,_owner:TC.current}}Wi.jsx=$h;Wi.jsxs=$h});var w=pe((nA,Gh)=>{"use strict";Gh.exports=qh()});var Iy=pe($=>{"use strict";var _o,Ji,_l,Jd;typeof performance=="object"&&typeof performance.now=="function"?(by=performance,$.unstable_now=function(){return by.now()}):(qd=Date,Ty=qd.now(),$.unstable_now=function(){return qd.now()-Ty});var by,qd,Ty;typeof window>"u"||typeof MessageChannel!="function"?(xo=null,Gd=null,Xd=function(){if(xo!==null)try{var e=$.unstable_now();xo(!0,e),xo=null}catch(t){throw setTimeout(Xd,0),t}},_o=function(e){xo!==null?setTimeout(_o,0,e):(xo=e,setTimeout(Xd,0))},Ji=function(e,t){Gd=setTimeout(e,t)},_l=function(){clearTimeout(Gd)},$.unstable_shouldYield=function(){return!1},Jd=$.unstable_forceFrameRate=function(){}):(ky=window.setTimeout,Py=window.clearTimeout,typeof console<"u"&&(Ry=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 Ry!="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")),Yi=!1,Zi=null,vl=-1,Qd=5,Yd=0,$.unstable_shouldYield=function(){return $.unstable_now()>=Yd},Jd=function(){},$.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"):Qd=0<e?Math.floor(1e3/e):5},Zd=new MessageChannel,Sl=Zd.port2,Zd.port1.onmessage=function(){if(Zi!==null){var e=$.unstable_now();Yd=e+Qd;try{Zi(!0,e)?Sl.postMessage(null):(Yi=!1,Zi=null)}catch(t){throw Sl.postMessage(null),t}}else Yi=!1},_o=function(e){Zi=e,Yi||(Yi=!0,Sl.postMessage(null))},Ji=function(e,t){vl=ky(function(){e($.unstable_now())},t)},_l=function(){Py(vl),vl=-1});var xo,Gd,Xd,ky,Py,Ry,Yi,Zi,vl,Qd,Yd,Zd,Sl;function ef(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<xl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Nt(e){return e=e[0],e===void 0?null:e}function wl(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>xl(s,n))l!==void 0&&0>xl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>xl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function xl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Gt=[],Vn=[],ob=1,yt=null,Ie=3,El=!1,Fr=!1,es=!1;function tf(e){for(var t=Nt(Vn);t!==null;){if(t.callback===null)wl(Vn);else if(t.startTime<=e)wl(Vn),t.sortIndex=t.expirationTime,ef(Gt,t);else break;t=Nt(Vn)}}function nf(e){if(es=!1,tf(e),!Fr)if(Nt(Gt)!==null)Fr=!0,_o(rf);else{var t=Nt(Vn);t!==null&&Ji(nf,t.startTime-e)}}function rf(e,t){Fr=!1,es&&(es=!1,_l()),El=!0;var n=Ie;try{for(tf(t),yt=Nt(Gt);yt!==null&&(!(yt.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=yt.callback;if(typeof r=="function"){yt.callback=null,Ie=yt.priorityLevel;var o=r(yt.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?yt.callback=o:yt===Nt(Gt)&&wl(Gt),tf(t)}else wl(Gt);yt=Nt(Gt)}if(yt!==null)var i=!0;else{var s=Nt(Vn);s!==null&&Ji(nf,s.startTime-t),i=!1}return i}finally{yt=null,Ie=n,El=!1}}var ib=Jd;$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(e){e.callback=null};$.unstable_continueExecution=function(){Fr||El||(Fr=!0,_o(rf))};$.unstable_getCurrentPriorityLevel=function(){return Ie};$.unstable_getFirstCallbackNode=function(){return Nt(Gt)};$.unstable_next=function(e){switch(Ie){case 1:case 2:case 3:var t=3;break;default:t=Ie}var n=Ie;Ie=t;try{return e()}finally{Ie=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=ib;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ie;Ie=e;try{return t()}finally{Ie=n}};$.unstable_scheduleCallback=function(e,t,n){var r=$.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:ob++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,ef(Vn,e),Nt(Gt)===null&&e===Nt(Vn)&&(es?_l():es=!0,Ji(nf,n-r))):(e.sortIndex=o,ef(Gt,e),Fr||El||(Fr=!0,_o(rf))),e};$.unstable_wrapCallback=function(e){var t=Ie;return function(){var n=Ie;Ie=t;try{return e.apply(this,arguments)}finally{Ie=n}}}});var Ay=pe((GO,Ly)=>{"use strict";Ly.exports=Iy()});var v0=pe(Et=>{"use strict";var hu=O(),ae=Wa(),xe=Ay();function T(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(!hu)throw Error(T(227));var Wv=new Set,Is={};function Gr(e,t){zo(e,t),zo(e+"Capture",t)}function zo(e,t){for(Is[e]=t,e=0;e<t.length;e++)Wv.add(t[e])}var yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sb=/^[: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]*$/,Oy=Object.prototype.hasOwnProperty,Ny={},My={};function ab(e){return Oy.call(My,e)?!0:Oy.call(Ny,e)?!1:sb.test(e)?My[e]=!0:(Ny[e]=!0,!1)}function lb(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 ub(e,t,n,r){if(t===null||typeof t>"u"||lb(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 Ue(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 ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ke[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ke[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new Ue(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){ke[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var pp=/[\-:]([a-z])/g;function mp(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(pp,mp);ke[t]=new Ue(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(pp,mp);ke[t]=new Ue(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(pp,mp);ke[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function gp(e,t,n,r){var o=ke.hasOwnProperty(t)?ke[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||(ub(t,n,o,r)&&(n=null),r||o===null?ab(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 Xr=hu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ps=60103,Hr=60106,Wn=60107,hp=60108,vs=60114,yp=60109,vp=60110,yu=60112,Ss=60113,ql=60120,vu=60115,Sp=60116,xp=60121,_p=60128,$v=60129,wp=60130,kf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,ps=ye("react.element"),Hr=ye("react.portal"),Wn=ye("react.fragment"),hp=ye("react.strict_mode"),vs=ye("react.profiler"),yp=ye("react.provider"),vp=ye("react.context"),yu=ye("react.forward_ref"),Ss=ye("react.suspense"),ql=ye("react.suspense_list"),vu=ye("react.memo"),Sp=ye("react.lazy"),xp=ye("react.block"),ye("react.scope"),_p=ye("react.opaque.id"),$v=ye("react.debug_trace_mode"),wp=ye("react.offscreen"),kf=ye("react.legacy_hidden"));var ye,Dy=typeof Symbol=="function"&&Symbol.iterator;function ts(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}var of;function ms(e){if(of===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);of=t&&t[1]||""}return`
2
2
  `+of+e}var sf=!1;function Cl(e,t){if(!e||sf)return"";sf=!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
3
  `),i=r.stack.split(`
4
4
  `),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a])return`
5
- `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{sf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ps(e):""}function cb(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=Cl(e.type,!1),e;case 11:return e=Cl(e.type.render,!1),e;case 22:return e=Cl(e.type._render,!1),e;case 1:return e=Cl(e.type,!0),e;default:return""}}function Lo(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 Wn:return"Fragment";case Hr:return"Portal";case ys:return"Profiler";case hp:return"StrictMode";case vs:return"Suspense";case ql:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vp:return(e.displayName||"Context")+".Consumer";case yp:return(e._context.displayName||"Context")+".Provider";case yu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case vu:return Lo(e.type);case xp:return Lo(e._render);case Sp:t=e._payload,e=e._init;try{return Lo(e(t))}catch{}}return null}function rr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function qv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function db(e){var t=qv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&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 bl(e){e._valueTracker||(e._valueTracker=db(e))}function Gv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Gl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Pf(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rr(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 Xv(e,t){t=t.checked,t!=null&&gp(e,"checked",t,!1)}function Rf(e,t){Xv(e,t);var n=rr(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")?If(e,t.type,n):t.hasOwnProperty("defaultValue")&&If(e,t.type,rr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jy(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 If(e,t,n){(t!=="number"||Gl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function fb(e){var t="";return hu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Lf(e,t){return e=ae({children:void 0},t),(t=fb(t.children))&&(e.children=t),e}function Ao(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=""+rr(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 Af(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Hy(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:rr(n)}}function Qv(e,t){var n=rr(t.value),r=rr(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 By(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Of={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Yv(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 Nf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Yv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tl,Zv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==Of.svg||"innerHTML"in e)e.innerHTML=t;else{for(Tl=Tl||document.createElement("div"),Tl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Is(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ss={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},pb=["Webkit","ms","Moz","O"];Object.keys(Ss).forEach(function(e){pb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ss[t]=Ss[e]})});function Jv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ss.hasOwnProperty(e)&&Ss[e]?(""+t).trim():t+"px"}function eS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Jv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var mb=ae({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 Mf(e,t){if(t){if(mb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function Df(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 Ep(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ff=null,Oo=null,No=null;function Uy(e){if(e=Ks(e)){if(typeof Ff!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Cu(t),Ff(e.stateNode,e.type,t))}}function tS(e){Oo?No?No.push(e):No=[e]:Oo=e}function nS(){if(Oo){var e=Oo,t=No;if(No=Oo=null,Uy(e),t)for(e=0;e<t.length;e++)Uy(t[e])}}function Cp(e,t){return e(t)}function rS(e,t,n,r,o){return e(t,n,r,o)}function bp(){}var oS=Cp,Br=!1,af=!1;function Tp(){(Oo!==null||No!==null)&&(bp(),nS())}function gb(e,t,n){if(af)return e(t,n);af=!0;try{return oS(e,t,n)}finally{af=!1,Tp()}}function Ls(e,t){var n=e.stateNode;if(n===null)return null;var r=Cu(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(T(231,t,typeof n));return n}var jf=!1;if(hn)try{_o={},Object.defineProperty(_o,"passive",{get:function(){jf=!0}}),window.addEventListener("test",_o,_o),window.removeEventListener("test",_o,_o)}catch{jf=!1}var _o;function hb(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 xs=!1,Xl=null,Ql=!1,Hf=null,yb={onError:function(e){xs=!0,Xl=e}};function vb(e,t,n,r,o,i,s,a,l){xs=!1,Xl=null,hb.apply(yb,arguments)}function Sb(e,t,n,r,o,i,s,a,l){if(vb.apply(this,arguments),xs){if(xs){var u=Xl;xs=!1,Xl=null}else throw Error(T(198));Ql||(Ql=!0,Hf=u)}}function Qr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function iS(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 zy(e){if(Qr(e)!==e)throw Error(T(188))}function xb(e){var t=e.alternate;if(!t){if(t=Qr(e),t===null)throw Error(T(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 zy(o),e;if(i===r)return zy(o),t;i=i.sibling}throw Error(T(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(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function sS(e){if(e=xb(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 Vy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var aS,kp,lS,uS,Bf=!1,Xt=[],Xn=null,Qn=null,Yn=null,As=new Map,Os=new Map,ts=[],Ky="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 Uf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Wy(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":As.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(t.pointerId)}}function ns(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Uf(t,n,r,o,i),t!==null&&(t=Ks(t),t!==null&&kp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function _b(e,t,n,r,o){switch(t){case"focusin":return Xn=ns(Xn,e,t,n,r,o),!0;case"dragenter":return Qn=ns(Qn,e,t,n,r,o),!0;case"mouseover":return Yn=ns(Yn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return As.set(i,ns(As.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Os.set(i,ns(Os.get(i)||null,e,t,n,r,o)),!0}return!1}function wb(e){var t=Ur(e.target);if(t!==null){var n=Qr(t);if(n!==null){if(t=n.tag,t===13){if(t=iS(n),t!==null){e.blockedOn=t,uS(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){lS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Ks(n),t!==null&&kp(t),e.blockedOn=n,!1;t.shift()}return!0}function $y(e,t,n){Fl(e)&&n.delete(t)}function Eb(){for(Bf=!1;0<Xt.length;){var e=Xt[0];if(e.blockedOn!==null){e=Ks(e.blockedOn),e!==null&&aS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Lp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Xt.shift()}Xn!==null&&Fl(Xn)&&(Xn=null),Qn!==null&&Fl(Qn)&&(Qn=null),Yn!==null&&Fl(Yn)&&(Yn=null),As.forEach($y),Os.forEach($y)}function rs(e,t){e.blockedOn===t&&(e.blockedOn=null,Bf||(Bf=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,Eb)))}function cS(e){function t(o){return rs(o,e)}if(0<Xt.length){rs(Xt[0],e);for(var n=1;n<Xt.length;n++){var r=Xt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Xn!==null&&rs(Xn,e),Qn!==null&&rs(Qn,e),Yn!==null&&rs(Yn,e),As.forEach(t),Os.forEach(t),n=0;n<ts.length;n++)r=ts[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ts.length&&(n=ts[0],n.blockedOn===null);)wb(n),n.blockedOn===null&&ts.shift()}function kl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bo={animationend:kl("Animation","AnimationEnd"),animationiteration:kl("Animation","AnimationIteration"),animationstart:kl("Animation","AnimationStart"),transitionend:kl("Transition","TransitionEnd")},lf={},dS={};hn&&(dS=document.createElement("div").style,"AnimationEvent"in window||(delete bo.animationend.animation,delete bo.animationiteration.animation,delete bo.animationstart.animation),"TransitionEvent"in window||delete bo.transitionend.transition);function Su(e){if(lf[e])return lf[e];if(!bo[e])return e;var t=bo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in dS)return lf[e]=t[n];return e}var fS=Su("animationend"),pS=Su("animationiteration"),mS=Su("animationstart"),gS=Su("transitionend"),hS=new Map,Pp=new Map,Cb=["abort","abort",fS,"animationEnd",pS,"animationIteration",mS,"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",gS,"transitionEnd","waiting","waiting"];function Rp(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)),Pp.set(r,t),hS.set(r,o),Gr(o,[r])}}var bb=xe.unstable_now;bb();var ne=8;function Eo(e){if(1&e)return ne=15,1;if(2&e)return ne=14,2;if(4&e)return ne=13,4;var t=24&e;return t!==0?(ne=12,t):e&32?(ne=11,32):(t=192&e,t!==0?(ne=10,t):e&256?(ne=9,256):(t=3584&e,t!==0?(ne=8,t):e&4096?(ne=7,4096):(t=4186112&e,t!==0?(ne=6,t):(t=62914560&e,t!==0?(ne=5,t):e&67108864?(ne=4,67108864):e&134217728?(ne=3,134217728):(t=805306368&e,t!==0?(ne=2,t):1073741824&e?(ne=1,1073741824):(ne=8,e))))))}function Tb(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 kb(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(T(358,e))}}function Ns(e,t){var n=e.pendingLanes;if(n===0)return ne=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=ne=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=Eo(l),o=ne):(a&=i,a!==0&&(r=Eo(a),o=ne))}else i=n&~s,i!==0?(r=Eo(i),o=ne):a!==0&&(r=Eo(a),o=ne);if(r===0)return 0;if(r=31-or(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(Eo(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-or(t),o=1<<n,r|=e[n],t&=~o;return r}function yS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=Co(24&~t),e===0?Yl(10,t):e;case 10:return e=Co(192&~t),e===0?Yl(8,t):e;case 8:return e=Co(3584&~t),e===0&&(e=Co(4186112&~t),e===0&&(e=512)),e;case 2:return t=Co(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function Co(e){return e&-e}function uf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xu(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-or(t),e[t]=n}var or=Math.clz32?Math.clz32:Ib,Pb=Math.log,Rb=Math.LN2;function Ib(e){return e===0?32:31-(Pb(e)/Rb|0)|0}var Lb=xe.unstable_UserBlockingPriority,Ab=xe.unstable_runWithPriority,jl=!0;function Ob(e,t,n,r){Br||bp();var o=Ip,i=Br;Br=!0;try{rS(o,e,t,n,r)}finally{(Br=i)||Tp()}}function Nb(e,t,n,r){Ab(Lb,Ip.bind(null,e,t,n,r))}function Ip(e,t,n,r){if(jl){var o;if((o=(t&4)===0)&&0<Xt.length&&-1<Ky.indexOf(e))e=Uf(null,e,t,n,r),Xt.push(e);else{var i=Lp(e,t,n,r);if(i===null)o&&Wy(e,r);else{if(o){if(-1<Ky.indexOf(e)){e=Uf(i,e,t,n,r),Xt.push(e);return}if(_b(i,e,t,n,r))return;Wy(e,r)}IS(e,t,r,null,n)}}}}function Lp(e,t,n,r){var o=Ep(r);if(o=Ur(o),o!==null){var i=Qr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=iS(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 IS(e,t,r,o,n),null}var $n=null,Ap=null,Hl=null;function vS(){if(Hl)return Hl;var e,t=Ap,n=t.length,r,o="value"in $n?$n.value:$n.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 Hl=o.slice(e,1<r?1-r:void 0)}function Bl(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 Pl(){return!0}function qy(){return!1}function rt(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)?Pl:qy,this.isPropagationStopped=qy,this}return ae(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=Pl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),t}var Wo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Op=rt(Wo),Vs=ae({},Wo,{view:0,detail:0}),Mb=rt(Vs),cf,df,os,_u=ae({},Vs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Np,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!==os&&(os&&e.type==="mousemove"?(cf=e.screenX-os.screenX,df=e.screenY-os.screenY):df=cf=0,os=e),cf)},movementY:function(e){return"movementY"in e?e.movementY:df}}),Gy=rt(_u),Db=ae({},_u,{dataTransfer:0}),Fb=rt(Db),jb=ae({},Vs,{relatedTarget:0}),ff=rt(jb),Hb=ae({},Wo,{animationName:0,elapsedTime:0,pseudoElement:0}),Bb=rt(Hb),Ub=ae({},Wo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zb=rt(Ub),Vb=ae({},Wo,{data:0}),Xy=rt(Vb),Kb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wb={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"},$b={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$b[e])?!!t[e]:!1}function Np(){return qb}var Gb=ae({},Vs,{key:function(e){if(e.key){var t=Kb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Np,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Xb=rt(Gb),Qb=ae({},_u,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qy=rt(Qb),Yb=ae({},Vs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Np}),Zb=rt(Yb),Jb=ae({},Wo,{propertyName:0,elapsedTime:0,pseudoElement:0}),eT=rt(Jb),tT=ae({},_u,{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}),nT=rt(tT),rT=[9,13,27,32],Mp=hn&&"CompositionEvent"in window,_s=null;hn&&"documentMode"in document&&(_s=document.documentMode);var oT=hn&&"TextEvent"in window&&!_s,SS=hn&&(!Mp||_s&&8<_s&&11>=_s),Yy=String.fromCharCode(32),Zy=!1;function xS(e,t){switch(e){case"keyup":return rT.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 To=!1;function iT(e,t){switch(e){case"compositionend":return _S(t);case"keypress":return t.which!==32?null:(Zy=!0,Yy);case"textInput":return e=t.data,e===Yy&&Zy?null:e;default:return null}}function sT(e,t){if(To)return e==="compositionend"||!Mp&&xS(e,t)?(e=vS(),Hl=Ap=$n=null,To=!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 SS&&t.locale!=="ko"?null:t.data;default:return null}}var aT={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 Jy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!aT[e.type]:t==="textarea"}function wS(e,t,n,r){tS(r),t=Zl(t,"onChange"),0<t.length&&(n=new Op("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ws=null,Ms=null;function lT(e){kS(e,0)}function wu(e){var t=Po(e);if(Gv(t))return e}function uT(e,t){if(e==="change")return t}var ES=!1;hn&&(hn?(Il="oninput"in document,Il||(pf=document.createElement("div"),pf.setAttribute("oninput","return;"),Il=typeof pf.oninput=="function"),Rl=Il):Rl=!1,ES=Rl&&(!document.documentMode||9<document.documentMode));var Rl,Il,pf;function ev(){ws&&(ws.detachEvent("onpropertychange",CS),Ms=ws=null)}function CS(e){if(e.propertyName==="value"&&wu(Ms)){var t=[];if(wS(t,Ms,e,Ep(e)),e=lT,Br)e(t);else{Br=!0;try{Cp(e,t)}finally{Br=!1,Tp()}}}}function cT(e,t,n){e==="focusin"?(ev(),ws=t,Ms=n,ws.attachEvent("onpropertychange",CS)):e==="focusout"&&ev()}function dT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wu(Ms)}function fT(e,t){if(e==="click")return wu(t)}function pT(e,t){if(e==="input"||e==="change")return wu(t)}function mT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:mT,gT=Object.prototype.hasOwnProperty;function Ds(e,t){if(vt(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(!gT.call(t,n[r])||!vt(e[n[r]],t[n[r]]))return!1;return!0}function tv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nv(e,t){var n=tv(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=tv(n)}}function bS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rv(){for(var e=window,t=Gl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gl(e.document)}return t}function zf(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 hT=hn&&"documentMode"in document&&11>=document.documentMode,ko=null,Vf=null,Es=null,Kf=!1;function ov(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kf||ko==null||ko!==Gl(r)||(r=ko,"selectionStart"in r&&zf(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}),Es&&Ds(Es,r)||(Es=r,r=Zl(Vf,"onSelect"),0<r.length&&(t=new Op("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ko)))}Rp("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);Rp("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);Rp(Cb,2);for(mf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ll=0;Ll<mf.length;Ll++)Pp.set(mf[Ll],0);var mf,Ll;Uo("onMouseEnter",["mouseout","mouseover"]);Uo("onMouseLeave",["mouseout","mouseover"]);Uo("onPointerEnter",["pointerout","pointerover"]);Uo("onPointerLeave",["pointerout","pointerover"]);Gr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ms="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ms));function iv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Sb(r,t,void 0,e),e.currentTarget=null}function kS(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;iv(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;iv(o,a,u),i=l}}}if(Ql)throw e=Hf,Ql=!1,Hf=null,e}function ie(e,t){var n=AS(t),r=e+"__bubble";n.has(r)||(RS(t,e,2,!1),n.add(r))}var sv="_reactListening"+Math.random().toString(36).slice(2);function PS(e){e[sv]||(e[sv]=!0,Wv.forEach(function(t){TS.has(t)||av(t,!1,e,null),av(t,!0,e,null)}))}function av(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&&TS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=AS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),RS(i,e,o,t),s.add(a))}function RS(e,t,n,r){var o=Pp.get(t);switch(o===void 0?2:o){case 0:o=Ob;break;case 1:o=Nb;break;default:o=Ip}n=o.bind(null,t,n,e),o=void 0,!jf||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 IS(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&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=Ur(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}gb(function(){var u=i,c=Ep(n),f=[];e:{var d=hS.get(e);if(d!==void 0){var y=Op,S=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":y=Xb;break;case"focusin":S="focus",y=ff;break;case"focusout":S="blur",y=ff;break;case"beforeblur":case"afterblur":y=ff;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":y=Gy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Fb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Zb;break;case fS:case pS:case mS:y=Bb;break;case gS:y=eT;break;case"scroll":y=Mb;break;case"wheel":y=nT;break;case"copy":case"cut":case"paste":y=zb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Qy}var h=(t&4)!==0,g=!h&&e==="scroll",m=h?d!==null?d+"Capture":null:d;h=[];for(var p=u,v;p!==null;){v=p;var _=v.stateNode;if(v.tag===5&&_!==null&&(v=_,m!==null&&(_=Ls(p,m),_!=null&&h.push(Fs(p,_,v)))),g)break;p=p.return}0<h.length&&(d=new y(d,S,null,n,c),f.push({event:d,listeners:h}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(S=n.relatedTarget||n.fromElement)&&(Ur(S)||S[$o]))break e;if((y||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,y?(S=n.relatedTarget||n.toElement,y=u,S=S?Ur(S):null,S!==null&&(g=Qr(S),S!==g||S.tag!==5&&S.tag!==6)&&(S=null)):(y=null,S=u),y!==S)){if(h=Gy,_="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(h=Qy,_="onPointerLeave",m="onPointerEnter",p="pointer"),g=y==null?d:Po(y),v=S==null?d:Po(S),d=new h(_,p+"leave",y,n,c),d.target=g,d.relatedTarget=v,_=null,Ur(c)===u&&(h=new h(m,p+"enter",S,n,c),h.target=v,h.relatedTarget=g,_=h),g=_,y&&S)t:{for(h=y,m=S,p=0,v=h;v;v=wo(v))p++;for(v=0,_=m;_;_=wo(_))v++;for(;0<p-v;)h=wo(h),p--;for(;0<v-p;)m=wo(m),v--;for(;p--;){if(h===m||m!==null&&h===m.alternate)break t;h=wo(h),m=wo(m)}h=null}else h=null;y!==null&&lv(f,d,y,h,!1),S!==null&&g!==null&&lv(f,g,S,h,!0)}}e:{if(d=u?Po(u):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=uT;else if(Jy(d))if(ES)C=pT;else{C=dT;var E=cT}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=fT);if(C&&(C=C(e,u))){wS(f,C,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&If(d,"number",d.value)}switch(E=u?Po(u):window,e){case"focusin":(Jy(E)||E.contentEditable==="true")&&(ko=E,Vf=u,Es=null);break;case"focusout":Es=Vf=ko=null;break;case"mousedown":Kf=!0;break;case"contextmenu":case"mouseup":case"dragend":Kf=!1,ov(f,n,c);break;case"selectionchange":if(hT)break;case"keydown":case"keyup":ov(f,n,c)}var b;if(Mp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else To?xS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(SS&&n.locale!=="ko"&&(To||R!=="onCompositionStart"?R==="onCompositionEnd"&&To&&(b=vS()):($n=c,Ap="value"in $n?$n.value:$n.textContent,To=!0)),E=Zl(u,R),0<E.length&&(R=new Xy(R,e,null,n,c),f.push({event:R,listeners:E}),b?R.data=b:(b=_S(n),b!==null&&(R.data=b)))),(b=oT?iT(e,n):sT(e,n))&&(u=Zl(u,"onBeforeInput"),0<u.length&&(c=new Xy("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=b))}kS(f,t)})}function Fs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ls(e,n),i!=null&&r.unshift(Fs(e,i,o)),i=Ls(e,t),i!=null&&r.push(Fs(e,i,o))),e=e.return}return r}function wo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lv(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=Ls(n,i),l!=null&&s.unshift(Fs(n,l,a))):o||(l=Ls(n,i),l!=null&&s.push(Fs(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Jl(){}var gf=null,hf=null;function LS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Wf(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 uv=typeof setTimeout=="function"?setTimeout:void 0,yT=typeof clearTimeout=="function"?clearTimeout:void 0;function Dp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Mo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function cv(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 yf=0;function vT(e){return{$$typeof:_p,toString:e,valueOf:e}}var Eu=Math.random().toString(36).slice(2),qn="__reactFiber$"+Eu,eu="__reactProps$"+Eu,$o="__reactContainer$"+Eu,dv="__reactEvents$"+Eu;function Ur(e){var t=e[qn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$o]||n[qn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cv(e);e!==null;){if(n=e[qn])return n;e=cv(e)}return t}e=n,n=e.parentNode}return null}function Ks(e){return e=e[qn]||e[$o],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Po(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Cu(e){return e[eu]||null}function AS(e){var t=e[dv];return t===void 0&&(t=e[dv]=new Set),t}var $f=[],Ro=-1;function lr(e){return{current:e}}function se(e){0>Ro||(e.current=$f[Ro],$f[Ro]=null,Ro--)}function de(e,t){Ro++,$f[Ro]=e.current,e.current=t}var ir={},Ne=lr(ir),qe=lr(!1),Wr=ir;function zo(e,t){var n=e.type.contextTypes;if(!n)return ir;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 Ge(e){return e=e.childContextTypes,e!=null}function tu(){se(qe),se(Ne)}function fv(e,t,n){if(Ne.current!==ir)throw Error(T(168));de(Ne,t),de(qe,n)}function OS(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(T(108,Lo(t)||"Unknown",o));return ae({},n,r)}function Ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ir,Wr=Ne.current,de(Ne,e),de(qe,qe.current),!0}function pv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=OS(e,t,Wr),r.__reactInternalMemoizedMergedChildContext=e,se(qe),se(Ne),de(Ne,e)):se(qe),de(qe,n)}var Fp=null,Kr=null,ST=xe.unstable_runWithPriority,jp=xe.unstable_scheduleCallback,qf=xe.unstable_cancelCallback,xT=xe.unstable_shouldYield,mv=xe.unstable_requestPaint,Gf=xe.unstable_now,_T=xe.unstable_getCurrentPriorityLevel,bu=xe.unstable_ImmediatePriority,NS=xe.unstable_UserBlockingPriority,MS=xe.unstable_NormalPriority,DS=xe.unstable_LowPriority,FS=xe.unstable_IdlePriority,vf={},wT=mv!==void 0?mv:function(){},dn=null,zl=null,Sf=!1,gv=Gf(),Ae=1e4>gv?Gf:function(){return Gf()-gv};function Vo(){switch(_T()){case bu:return 99;case NS:return 98;case MS:return 97;case DS:return 96;case FS:return 95;default:throw Error(T(332))}}function jS(e){switch(e){case 99:return bu;case 98:return NS;case 97:return MS;case 96:return DS;case 95:return FS;default:throw Error(T(332))}}function $r(e,t){return e=jS(e),ST(e,t)}function js(e,t,n){return e=jS(e),jp(e,t,n)}function en(){if(zl!==null){var e=zl;zl=null,qf(e)}HS()}function HS(){if(!Sf&&dn!==null){Sf=!0;var e=0;try{var t=dn;$r(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),dn=null}catch(n){throw dn!==null&&(dn=dn.slice(e+1)),jp(bu,en),n}finally{Sf=!1}}}var ET=Xr.ReactCurrentBatchConfig;function Mt(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var nu=lr(null),ru=null,Io=null,ou=null;function Hp(){ou=Io=ru=null}function Bp(e){var t=nu.current;se(nu),e.type._context._currentValue=t}function BS(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 Do(e,t){ru=e,ou=Io=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dt=!0),e.firstContext=null)}function _t(e,t){if(ou!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(ou=e,t=1073741823),t={context:e,observedBits:t,next:null},Io===null){if(ru===null)throw Error(T(308));Io=t,ru.dependencies={lanes:0,firstContext:t,responders:null}}else Io=Io.next=t;return e._currentValue}var Kn=!1;function Up(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function US(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 Zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(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 hv(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 Hs(e,t,n,r){var o=e.updateQueue;Kn=!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 y=e,S=i;switch(a=t,d=n,S.tag){case 1:if(y=S.payload,typeof y=="function"){f=y.call(d,f,a);break e}f=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=S.payload,a=typeof y=="function"?y.call(d,f,a):y,a==null)break e;f=ae({},f,a);break e;case 2:Kn=!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(1);c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,$s|=s,e.lanes=s,e.memoizedState=f}}function yv(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(T(191,o));o.call(r)}}}var zS=new hu.Component().refs;function iu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Tu={isMounted:function(e){return(e=e._reactInternals)?Qr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nt(),o=er(e),i=Zn(r,o);i.payload=t,n!=null&&(i.callback=n),Jn(e,i),tr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nt(),o=er(e),i=Zn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Jn(e,i),tr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nt(),r=er(e),o=Zn(n,r);o.tag=2,t!=null&&(o.callback=t),Jn(e,o),tr(e,r,n)}};function vv(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?!Ds(n,r)||!Ds(o,i):!0}function VS(e,t,n){var r=!1,o=ir,i=t.contextType;return typeof i=="object"&&i!==null?i=_t(i):(o=Ge(t)?Wr:Ne.current,r=t.contextTypes,i=(r=r!=null)?zo(e,o):ir),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Tu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Sv(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&&Tu.enqueueReplaceState(t,t.state,null)}function Xf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=zS,Up(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=_t(i):(i=Ge(t)?Wr:Ne.current,o.context=zo(e,i)),Hs(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(iu(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&&Tu.enqueueReplaceState(o,o.state,null),Hs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Al=Array.isArray;function is(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(T(309));var r=n.stateNode}if(!r)throw Error(T(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===zS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function Ol(e,t){if(e.type!=="textarea")throw Error(T(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function KS(e){function t(g,m){if(e){var p=g.lastEffect;p!==null?(p.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=ar(g,m),g.index=0,g.sibling=null,g}function i(g,m,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<m?(g.flags=2,m):p):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,p,v){return m===null||m.tag!==6?(m=Cf(p,g.mode,v),m.return=g,m):(m=o(m,p),m.return=g,m)}function l(g,m,p,v){return m!==null&&m.elementType===p.type?(v=o(m,p.props),v.ref=is(g,m,p),v.return=g,v):(v=$l(p.type,p.key,p.props,null,g.mode,v),v.ref=is(g,m,p),v.return=g,v)}function u(g,m,p,v){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=bf(p,g.mode,v),m.return=g,m):(m=o(m,p.children||[]),m.return=g,m)}function c(g,m,p,v,_){return m===null||m.tag!==7?(m=Bo(p,g.mode,v,_),m.return=g,m):(m=o(m,p),m.return=g,m)}function f(g,m,p){if(typeof m=="string"||typeof m=="number")return m=Cf(""+m,g.mode,p),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case fs:return p=$l(m.type,m.key,m.props,null,g.mode,p),p.ref=is(g,null,m),p.return=g,p;case Hr:return m=bf(m,g.mode,p),m.return=g,m}if(Al(m)||es(m))return m=Bo(m,g.mode,p,null),m.return=g,m;Ol(g,m)}return null}function d(g,m,p,v){var _=m!==null?m.key:null;if(typeof p=="string"||typeof p=="number")return _!==null?null:a(g,m,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case fs:return p.key===_?p.type===Wn?c(g,m,p.props.children,v,_):l(g,m,p,v):null;case Hr:return p.key===_?u(g,m,p,v):null}if(Al(p)||es(p))return _!==null?null:c(g,m,p,v,null);Ol(g,p)}return null}function y(g,m,p,v,_){if(typeof v=="string"||typeof v=="number")return g=g.get(p)||null,a(m,g,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case fs:return g=g.get(v.key===null?p:v.key)||null,v.type===Wn?c(m,g,v.props.children,_,v.key):l(m,g,v,_);case Hr:return g=g.get(v.key===null?p:v.key)||null,u(m,g,v,_)}if(Al(v)||es(v))return g=g.get(p)||null,c(m,g,v,_,null);Ol(m,v)}return null}function S(g,m,p,v){for(var _=null,C=null,E=m,b=m=0,R=null;E!==null&&b<p.length;b++){E.index>b?(R=E,E=null):R=E.sibling;var P=d(g,E,p[b],v);if(P===null){E===null&&(E=R);break}e&&E&&P.alternate===null&&t(g,E),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P,E=R}if(b===p.length)return n(g,E),_;if(E===null){for(;b<p.length;b++)E=f(g,p[b],v),E!==null&&(m=i(E,m,b),C===null?_=E:C.sibling=E,C=E);return _}for(E=r(g,E);b<p.length;b++)R=y(E,g,b,p[b],v),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?b:R.key),m=i(R,m,b),C===null?_=R:C.sibling=R,C=R);return e&&E.forEach(function(N){return t(g,N)}),_}function h(g,m,p,v){var _=es(p);if(typeof _!="function")throw Error(T(150));if(p=_.call(p),p==null)throw Error(T(151));for(var C=_=null,E=m,b=m=0,R=null,P=p.next();E!==null&&!P.done;b++,P=p.next()){E.index>b?(R=E,E=null):R=E.sibling;var N=d(g,E,P.value,v);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(g,E),m=i(N,m,b),C===null?_=N:C.sibling=N,C=N,E=R}if(P.done)return n(g,E),_;if(E===null){for(;!P.done;b++,P=p.next())P=f(g,P.value,v),P!==null&&(m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return _}for(E=r(g,E);!P.done;b++,P=p.next())P=y(E,g,b,P.value,v),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?b:P.key),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return e&&E.forEach(function(G){return t(g,G)}),_}return function(g,m,p,v){var _=typeof p=="object"&&p!==null&&p.type===Wn&&p.key===null;_&&(p=p.props.children);var C=typeof p=="object"&&p!==null;if(C)switch(p.$$typeof){case fs:e:{for(C=p.key,_=m;_!==null;){if(_.key===C){switch(_.tag){case 7:if(p.type===Wn){n(g,_.sibling),m=o(_,p.props.children),m.return=g,g=m;break e}break;default:if(_.elementType===p.type){n(g,_.sibling),m=o(_,p.props),m.ref=is(g,_,p),m.return=g,g=m;break e}}n(g,_);break}else t(g,_);_=_.sibling}p.type===Wn?(m=Bo(p.props.children,g.mode,v,p.key),m.return=g,g=m):(v=$l(p.type,p.key,p.props,null,g.mode,v),v.ref=is(g,m,p),v.return=g,g=v)}return s(g);case Hr:e:{for(_=p.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){n(g,m.sibling),m=o(m,p.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=bf(p,g.mode,v),m.return=g,g=m}return s(g)}if(typeof p=="string"||typeof p=="number")return p=""+p,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,p),m.return=g,g=m):(n(g,m),m=Cf(p,g.mode,v),m.return=g,g=m),s(g);if(Al(p))return S(g,m,p,v);if(es(p))return h(g,m,p,v);if(C&&Ol(g,p),typeof p>"u"&&!_)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Lo(g.type)||"Component"))}return n(g,m)}}var su=KS(!0),WS=KS(!1),Ws={},Zt=lr(Ws),Bs=lr(Ws),Us=lr(Ws);function zr(e){if(e===Ws)throw Error(T(174));return e}function Qf(e,t){switch(de(Us,t),de(Bs,e),de(Zt,Ws),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Nf(t,e)}se(Zt),de(Zt,t)}function Ko(){se(Zt),se(Bs),se(Us)}function xv(e){zr(Us.current);var t=zr(Zt.current),n=Nf(t,e.type);t!==n&&(de(Bs,e),de(Zt,n))}function zp(e){Bs.current===e&&(se(Zt),se(Bs))}var ce=lr(0);function au(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)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 pn=null,Gn=null,Jt=!1;function $S(e,t){var n=St(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 _v(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 Yf(e){if(Jt){var t=Gn;if(t){var n=t;if(!_v(e,t)){if(t=Mo(n.nextSibling),!t||!_v(e,t)){e.flags=e.flags&-1025|2,Jt=!1,pn=e;return}$S(pn,n)}pn=e,Gn=Mo(t.firstChild)}else e.flags=e.flags&-1025|2,Jt=!1,pn=e}}function wv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pn=e}function Nl(e){if(e!==pn)return!1;if(!Jt)return wv(e),Jt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Wf(t,e.memoizedProps))for(t=Gn;t;)$S(e,t),t=Mo(t.nextSibling);if(wv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Gn=Mo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Gn=null}}else Gn=pn?Mo(e.stateNode.nextSibling):null;return!0}function xf(){Gn=pn=null,Jt=!1}var Fo=[];function Vp(){for(var e=0;e<Fo.length;e++)Fo[e]._workInProgressVersionPrimary=null;Fo.length=0}var Cs=Xr.ReactCurrentDispatcher,xt=Xr.ReactCurrentBatchConfig,zs=0,ge=null,Le=null,be=null,lu=!1,bs=!1;function We(){throw Error(T(321))}function Kp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0}function Wp(e,t,n,r,o,i){if(zs=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Cs.current=e===null||e.memoizedState===null?bT:TT,e=n(r,o),bs){i=0;do{if(bs=!1,!(25>i))throw Error(T(301));i+=1,be=Le=null,t.updateQueue=null,Cs.current=kT,e=n(r,o)}while(bs)}if(Cs.current=fu,t=Le!==null&&Le.next!==null,zs=0,be=Le=ge=null,lu=!1,t)throw Error(T(300));return e}function Vr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?ge.memoizedState=be=e:be=be.next=e,be}function Yr(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=be===null?ge.memoizedState:be.next;if(t!==null)be=t,Le=e;else{if(e===null)throw Error(T(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},be===null?ge.memoizedState=be=e:be=be.next=e}return be}function Qt(e,t){return typeof t=="function"?t(e):t}function ss(e){var t=Yr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Le,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((zs&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,ge.lanes|=u,$s|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,vt(r,t.memoizedState)||(Dt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function as(e){var t=Yr(),n=t.queue;if(n===null)throw Error(T(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);vt(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ev(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=(zs&e)===e)&&(t._workInProgressVersionPrimary=r,Fo.push(t))),e)return n(t._source);throw Fo.push(t),Error(T(350))}function qS(e,t,n,r){var o=Be;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=Cs.current,l=a.useState(function(){return Ev(o,t,n)}),u=l[1],c=l[0];l=be;var f=e.memoizedState,d=f.refs,y=d.getSnapshot,S=f.source;f=f.subscribe;var h=ge;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!vt(s,g)){g=n(t._source),vt(c,g)||(u(g),g=er(h),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,p=g;0<p;){var v=31-or(p),_=1<<v;m[v]|=g,p&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var p=er(h);o.mutableReadLanes|=p&o.pendingLanes}catch(v){m(function(){throw v})}})},[t,r]),vt(y,n)&&vt(S,t)&&vt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:c},e.dispatch=u=Gp.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=Ev(o,t,n),l.memoizedState=l.baseState=c),c}function GS(e,t,n){var r=Yr();return qS(r,e,t,n)}function ls(e){var t=Vr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:e},e=e.dispatch=Gp.bind(null,ge,e),[t.memoizedState,e]}function uu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null},ge.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 Cv(e){var t=Vr();return e={current:e},t.memoizedState=e}function cu(){return Yr().memoizedState}function Zf(e,t,n,r){var o=Vr();ge.flags|=e,o.memoizedState=uu(1|t,n,void 0,r===void 0?null:r)}function $p(e,t,n,r){var o=Yr();r=r===void 0?null:r;var i=void 0;if(Le!==null){var s=Le.memoizedState;if(i=s.destroy,r!==null&&Kp(r,s.deps)){uu(t,n,i,r);return}}ge.flags|=e,o.memoizedState=uu(1|t,n,i,r)}function bv(e,t){return Zf(516,4,e,t)}function du(e,t){return $p(516,4,e,t)}function XS(e,t){return $p(4,2,e,t)}function QS(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 YS(e,t,n){return n=n!=null?n.concat([e]):null,$p(4,2,QS.bind(null,t,e),n)}function qp(){}function ZS(e,t){var n=Yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Kp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function JS(e,t){var n=Yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Kp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function CT(e,t){var n=Vo();$r(98>n?98:n,function(){e(!0)}),$r(97<n?97:n,function(){var r=xt.transition;xt.transition=1;try{e(!1),t()}finally{xt.transition=r}})}function Gp(e,t,n){var r=nt(),o=er(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===ge||s!==null&&s===ge)bs=lu=!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,vt(l,a))return}catch{}finally{}tr(e,o,r)}}var fu={readContext:_t,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useOpaqueIdentifier:We,unstable_isNewReconciler:!1},bT={readContext:_t,useCallback:function(e,t){return Vr().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:bv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zf(4,2,QS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zf(4,2,e,t)},useMemo:function(e,t){var n=Vr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vr();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=Gp.bind(null,ge,e),[r.memoizedState,e]},useRef:Cv,useState:ls,useDebugValue:qp,useDeferredValue:function(e){var t=ls(e),n=t[0],r=t[1];return bv(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=ls(!1),t=e[0];return e=CT.bind(null,e[1]),Cv(e),[e,t]},useMutableSource:function(e,t,n){var r=Vr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},qS(r,e,t,n)},useOpaqueIdentifier:function(){if(Jt){var e=!1,t=vT(function(){throw e||(e=!0,n("r:"+(yf++).toString(36))),Error(T(355))}),n=ls(t)[1];return!(ge.mode&2)&&(ge.flags|=516,uu(5,function(){n("r:"+(yf++).toString(36))},void 0,null)),t}return t="r:"+(yf++).toString(36),ls(t),t},unstable_isNewReconciler:!1},TT={readContext:_t,useCallback:ZS,useContext:_t,useEffect:du,useImperativeHandle:YS,useLayoutEffect:XS,useMemo:JS,useReducer:ss,useRef:cu,useState:function(){return ss(Qt)},useDebugValue:qp,useDeferredValue:function(e){var t=ss(Qt),n=t[0],r=t[1];return du(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=ss(Qt)[0];return[cu().current,e]},useMutableSource:GS,useOpaqueIdentifier:function(){return ss(Qt)[0]},unstable_isNewReconciler:!1},kT={readContext:_t,useCallback:ZS,useContext:_t,useEffect:du,useImperativeHandle:YS,useLayoutEffect:XS,useMemo:JS,useReducer:as,useRef:cu,useState:function(){return as(Qt)},useDebugValue:qp,useDeferredValue:function(e){var t=as(Qt),n=t[0],r=t[1];return du(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=as(Qt)[0];return[cu().current,e]},useMutableSource:GS,useOpaqueIdentifier:function(){return as(Qt)[0]},unstable_isNewReconciler:!1},PT=Xr.ReactCurrentOwner,Dt=!1;function $e(e,t,n,r){t.child=e===null?WS(t,null,n,r):su(t,e.child,n,r)}function Tv(e,t,n,r,o){n=n.render;var i=t.ref;return Do(t,o),r=Wp(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,mn(e,t,o)):(t.flags|=1,$e(e,t,r,o),t.child)}function kv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!em(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,e0(e,t,s,r,o,i)):(e=$l(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}return s=e.child,!(o&i)&&(o=s.memoizedProps,n=n.compare,n=n!==null?n:Ds,n(o,r)&&e.ref===t.ref)?mn(e,t,i):(t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e)}function e0(e,t,n,r,o,i){if(e!==null&&Ds(e.memoizedProps,r)&&e.ref===t.ref)if(Dt=!1,(i&o)!==0)e.flags&16384&&(Dt=!0);else return t.lanes=e.lanes,mn(e,t,i);return Jf(e,t,n,r,i)}function _f(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))t.memoizedState={baseLanes:0},Dl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Dl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Dl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Dl(t,r);return $e(e,t,o,n),t.child}function t0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Jf(e,t,n,r,o){var i=Ge(n)?Wr:Ne.current;return i=zo(t,i),Do(t,o),n=Wp(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,mn(e,t,o)):(t.flags|=1,$e(e,t,n,o),t.child)}function Pv(e,t,n,r,o){if(Ge(n)){var i=!0;Ul(t)}else i=!1;if(Do(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),VS(t,n,r),Xf(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=_t(u):(u=Ge(n)?Wr:Ne.current,u=zo(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)&&Sv(t,s,r,u),Kn=!1;var d=t.memoizedState;s.state=d,Hs(t,r,s,o),l=t.memoizedState,a!==r||d!==l||qe.current||Kn?(typeof c=="function"&&(iu(t,n,c,r),l=t.memoizedState),(a=Kn||vv(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,US(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Mt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=_t(l):(l=Ge(n)?Wr:Ne.current,l=zo(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&Sv(t,s,r,l),Kn=!1,d=t.memoizedState,s.state=d,Hs(t,r,s,o);var S=t.memoizedState;a!==f||d!==S||qe.current||Kn?(typeof y=="function"&&(iu(t,n,y,r),S=t.memoizedState),(u=Kn||vv(t,n,u,r,d,S,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,S,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,S,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=S),s.props=r,s.state=S,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 ep(e,t,n,r,i,o)}function ep(e,t,n,r,o,i){t0(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&pv(t,n,!1),mn(e,t,i);r=t.stateNode,PT.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=su(t,e.child,null,i),t.child=su(t,null,a,i)):$e(e,t,a,i),t.memoizedState=r.state,o&&pv(t,n,!0),t.child}function Rv(e){var t=e.stateNode;t.pendingContext?fv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fv(e,t.context,!1),Qf(e,t.containerInfo)}var Ml={dehydrated:null,retryLane:0};function Iv(e,t,n){var r=t.pendingProps,o=ce.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),de(ce,o&1),e===null?(r.fallback!==void 0&&Yf(t),e=r.children,o=r.fallback,i?(e=Lv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ml,e):typeof r.unstable_expectedLoadTime=="number"?(e=Lv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ml,t.lanes=33554432,e):(n=tm({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Ov(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=Ml,r):(n=Av(e,t,r.children,n),t.memoizedState=null,n):i?(r=Ov(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=Ml,r):(n=Av(e,t,r.children,n),t.memoizedState=null,n)}function Lv(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},!(o&2)&&i!==null?(i.childLanes=0,i.pendingProps=t):i=tm(t,o,0,null),n=Bo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Av(e,t,n,r){var o=e.child;return e=o.sibling,n=ar(o,{mode:"visible",children:n}),!(t.mode&2)&&(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 Ov(e,t,n,r,o){var i=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return!(i&2)&&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=ar(s,a),e!==null?r=ar(e,r):(r=Bo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Nv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),BS(e.return,t)}function wf(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 Mv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if($e(e,t,r.children,n),r=ce.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nv(e,n);else if(e.tag===19)Nv(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(de(ce,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&au(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),wf(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&&au(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}wf(t,!0,n,null,i,t.lastEffect);break;case"together":wf(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$s|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=ar(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ar(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var n0,tp,r0,o0;n0=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}};tp=function(){};r0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,zr(Zt.current);var i=null;switch(n){case"input":o=Pf(e,o),r=Pf(e,r),i=[];break;case"option":o=Lf(e,o),r=Lf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Af(e,o),r=Af(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Jl)}Mf(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"&&(Rs.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"&&(Rs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===_p?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};o0=function(e,t,n,r){n!==r&&(t.flags|=4)};function us(e,t){if(!Jt)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 RT(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 Ge(t.type)&&tu(),null;case 3:return Ko(),se(qe),se(Ne),Vp(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Nl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),tp(t),null;case 5:zp(t);var o=zr(Us.current);if(n=t.type,e!==null&&t.stateNode!=null)r0(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(T(166));return null}if(e=zr(Zt.current),Nl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[qn]=t,r[eu]=i,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(e=0;e<ms.length;e++)ie(ms[e],r);break;case"source":ie("error",r);break;case"img":case"image":case"link":ie("error",r),ie("load",r);break;case"details":ie("toggle",r);break;case"input":Fy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Hy(r,i),ie("invalid",r)}Mf(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]):Rs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":bl(r),jy(r,i,!0);break;case"textarea":bl(r),By(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Jl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Of.html&&(e=Yv(n)),e===Of.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[qn]=t,e[eu]=r,n0(e,t,!1,!1),t.stateNode=e,s=Df(n,r),n){case"dialog":ie("cancel",e),ie("close",e),o=r;break;case"iframe":case"object":case"embed":ie("load",e),o=r;break;case"video":case"audio":for(o=0;o<ms.length;o++)ie(ms[o],e);o=r;break;case"source":ie("error",e),o=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),o=r;break;case"details":ie("toggle",e),o=r;break;case"input":Fy(e,r),o=Pf(e,r),ie("invalid",e);break;case"option":o=Lf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Hy(e,r),o=Af(e,r),ie("invalid",e);break;default:o=r}Mf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?eS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Zv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Is(e,l):typeof l=="number"&&Is(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Rs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&gp(e,i,l,s))}switch(n){case"input":bl(e),jy(e,r,!1);break;case"textarea":bl(e),By(e);break;case"option":r.value!=null&&e.setAttribute("value",""+rr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Ao(e,!!r.multiple,i,!1):r.defaultValue!=null&&Ao(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Jl)}LS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)o0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=zr(Us.current),zr(Zt.current),Nl(t)?(r=t.stateNode,n=t.memoizedProps,r[qn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[qn]=t,t.stateNode=r)}return null;case 13:return se(ce),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&Nl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),Be===null||!($s&134217727)&&!(Go&134217727)||jo(Be,Oe))),(r||n)&&(t.flags|=4),null);case 4:return Ko(),tp(t),e===null&&PS(t.stateNode.containerInfo),null;case 10:return Bp(t),null;case 17:return Ge(t.type)&&tu(),null;case 19:if(se(ce),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)us(r,!1);else{if(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=au(e),s!==null){for(t.flags|=64,us(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 de(ce,ce.current&1|2),t.child}e=e.sibling}r.tail!==null&&Ae()>ap&&(t.flags|=64,i=!0,us(r,!1),t.lanes=33554432)}else{if(!i)if(e=au(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),us(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Jt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Ae()-r.renderingStartTime>ap&&n!==1073741824&&(t.flags|=64,i=!0,us(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=Ae(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return Jp(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(T(156,t.tag))}function IT(e){switch(e.tag){case 1:Ge(e.type)&&tu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Ko(),se(qe),se(Ne),Vp(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return zp(e),null;case 13:return se(ce),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(ce),null;case 4:return Ko(),null;case 10:return Bp(e),null;case 23:case 24:return Jp(),null;default:return null}}function Xp(e,t){try{var n="",r=t;do n+=cb(r),r=r.return;while(r);var o=n}catch(i){o=`
5
+ `+o[s].replace(" at new "," at ");while(1<=s&&0<=a);break}}}finally{sf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ms(e):""}function cb(e){switch(e.tag){case 5:return ms(e.type);case 16:return ms("Lazy");case 13:return ms("Suspense");case 19:return ms("SuspenseList");case 0:case 2:case 15:return e=Cl(e.type,!1),e;case 11:return e=Cl(e.type.render,!1),e;case 22:return e=Cl(e.type._render,!1),e;case 1:return e=Cl(e.type,!0),e;default:return""}}function Ao(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 Wn:return"Fragment";case Hr:return"Portal";case vs:return"Profiler";case hp:return"StrictMode";case Ss:return"Suspense";case ql:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case vp:return(e.displayName||"Context")+".Consumer";case yp:return(e._context.displayName||"Context")+".Provider";case yu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case vu:return Ao(e.type);case xp:return Ao(e._render);case Sp:t=e._payload,e=e._init;try{return Ao(e(t))}catch{}}return null}function rr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function qv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function db(e){var t=qv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&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 bl(e){e._valueTracker||(e._valueTracker=db(e))}function Gv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=qv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Gl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Pf(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fy(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=rr(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 Xv(e,t){t=t.checked,t!=null&&gp(e,"checked",t,!1)}function Rf(e,t){Xv(e,t);var n=rr(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")?If(e,t.type,n):t.hasOwnProperty("defaultValue")&&If(e,t.type,rr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jy(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 If(e,t,n){(t!=="number"||Gl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function fb(e){var t="";return hu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Lf(e,t){return e=ae({children:void 0},t),(t=fb(t.children))&&(e.children=t),e}function Oo(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=""+rr(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 Af(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Hy(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:rr(n)}}function Qv(e,t){var n=rr(t.value),r=rr(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 By(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Of={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Yv(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 Nf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Yv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Tl,Zv=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!==Of.svg||"innerHTML"in e)e.innerHTML=t;else{for(Tl=Tl||document.createElement("div"),Tl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Tl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ls(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xs={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},pb=["Webkit","ms","Moz","O"];Object.keys(xs).forEach(function(e){pb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xs[t]=xs[e]})});function Jv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xs.hasOwnProperty(e)&&xs[e]?(""+t).trim():t+"px"}function eS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Jv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var mb=ae({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 Mf(e,t){if(t){if(mb[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function Df(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 Ep(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ff=null,No=null,Mo=null;function Uy(e){if(e=Ws(e)){if(typeof Ff!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Cu(t),Ff(e.stateNode,e.type,t))}}function tS(e){No?Mo?Mo.push(e):Mo=[e]:No=e}function nS(){if(No){var e=No,t=Mo;if(Mo=No=null,Uy(e),t)for(e=0;e<t.length;e++)Uy(t[e])}}function Cp(e,t){return e(t)}function rS(e,t,n,r,o){return e(t,n,r,o)}function bp(){}var oS=Cp,Br=!1,af=!1;function Tp(){(No!==null||Mo!==null)&&(bp(),nS())}function gb(e,t,n){if(af)return e(t,n);af=!0;try{return oS(e,t,n)}finally{af=!1,Tp()}}function As(e,t){var n=e.stateNode;if(n===null)return null;var r=Cu(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(T(231,t,typeof n));return n}var jf=!1;if(yn)try{wo={},Object.defineProperty(wo,"passive",{get:function(){jf=!0}}),window.addEventListener("test",wo,wo),window.removeEventListener("test",wo,wo)}catch{jf=!1}var wo;function hb(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 _s=!1,Xl=null,Ql=!1,Hf=null,yb={onError:function(e){_s=!0,Xl=e}};function vb(e,t,n,r,o,i,s,a,l){_s=!1,Xl=null,hb.apply(yb,arguments)}function Sb(e,t,n,r,o,i,s,a,l){if(vb.apply(this,arguments),_s){if(_s){var u=Xl;_s=!1,Xl=null}else throw Error(T(198));Ql||(Ql=!0,Hf=u)}}function Qr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&1026&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function iS(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 zy(e){if(Qr(e)!==e)throw Error(T(188))}function xb(e){var t=e.alternate;if(!t){if(t=Qr(e),t===null)throw Error(T(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 zy(o),e;if(i===r)return zy(o),t;i=i.sibling}throw Error(T(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(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function sS(e){if(e=xb(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 Vy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var aS,kp,lS,uS,Bf=!1,Xt=[],Xn=null,Qn=null,Yn=null,Os=new Map,Ns=new Map,ns=[],Ky="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 Uf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Wy(e,t){switch(e){case"focusin":case"focusout":Xn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Yn=null;break;case"pointerover":case"pointerout":Os.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ns.delete(t.pointerId)}}function rs(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Uf(t,n,r,o,i),t!==null&&(t=Ws(t),t!==null&&kp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function _b(e,t,n,r,o){switch(t){case"focusin":return Xn=rs(Xn,e,t,n,r,o),!0;case"dragenter":return Qn=rs(Qn,e,t,n,r,o),!0;case"mouseover":return Yn=rs(Yn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Os.set(i,rs(Os.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ns.set(i,rs(Ns.get(i)||null,e,t,n,r,o)),!0}return!1}function wb(e){var t=Ur(e.target);if(t!==null){var n=Qr(t);if(n!==null){if(t=n.tag,t===13){if(t=iS(n),t!==null){e.blockedOn=t,uS(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){lS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Ws(n),t!==null&&kp(t),e.blockedOn=n,!1;t.shift()}return!0}function $y(e,t,n){Fl(e)&&n.delete(t)}function Eb(){for(Bf=!1;0<Xt.length;){var e=Xt[0];if(e.blockedOn!==null){e=Ws(e.blockedOn),e!==null&&aS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Lp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&Xt.shift()}Xn!==null&&Fl(Xn)&&(Xn=null),Qn!==null&&Fl(Qn)&&(Qn=null),Yn!==null&&Fl(Yn)&&(Yn=null),Os.forEach($y),Ns.forEach($y)}function os(e,t){e.blockedOn===t&&(e.blockedOn=null,Bf||(Bf=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,Eb)))}function cS(e){function t(o){return os(o,e)}if(0<Xt.length){os(Xt[0],e);for(var n=1;n<Xt.length;n++){var r=Xt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Xn!==null&&os(Xn,e),Qn!==null&&os(Qn,e),Yn!==null&&os(Yn,e),Os.forEach(t),Ns.forEach(t),n=0;n<ns.length;n++)r=ns[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ns.length&&(n=ns[0],n.blockedOn===null);)wb(n),n.blockedOn===null&&ns.shift()}function kl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var To={animationend:kl("Animation","AnimationEnd"),animationiteration:kl("Animation","AnimationIteration"),animationstart:kl("Animation","AnimationStart"),transitionend:kl("Transition","TransitionEnd")},lf={},dS={};yn&&(dS=document.createElement("div").style,"AnimationEvent"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),"TransitionEvent"in window||delete To.transitionend.transition);function Su(e){if(lf[e])return lf[e];if(!To[e])return e;var t=To[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in dS)return lf[e]=t[n];return e}var fS=Su("animationend"),pS=Su("animationiteration"),mS=Su("animationstart"),gS=Su("transitionend"),hS=new Map,Pp=new Map,Cb=["abort","abort",fS,"animationEnd",pS,"animationIteration",mS,"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",gS,"transitionEnd","waiting","waiting"];function Rp(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)),Pp.set(r,t),hS.set(r,o),Gr(o,[r])}}var bb=xe.unstable_now;bb();var ne=8;function Co(e){if(1&e)return ne=15,1;if(2&e)return ne=14,2;if(4&e)return ne=13,4;var t=24&e;return t!==0?(ne=12,t):e&32?(ne=11,32):(t=192&e,t!==0?(ne=10,t):e&256?(ne=9,256):(t=3584&e,t!==0?(ne=8,t):e&4096?(ne=7,4096):(t=4186112&e,t!==0?(ne=6,t):(t=62914560&e,t!==0?(ne=5,t):e&67108864?(ne=4,67108864):e&134217728?(ne=3,134217728):(t=805306368&e,t!==0?(ne=2,t):1073741824&e?(ne=1,1073741824):(ne=8,e))))))}function Tb(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 kb(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(T(358,e))}}function Ms(e,t){var n=e.pendingLanes;if(n===0)return ne=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=ne=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=Co(l),o=ne):(a&=i,a!==0&&(r=Co(a),o=ne))}else i=n&~s,i!==0?(r=Co(i),o=ne):a!==0&&(r=Co(a),o=ne);if(r===0)return 0;if(r=31-or(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(Co(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-or(t),o=1<<n,r|=e[n],t&=~o;return r}function yS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Yl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=bo(24&~t),e===0?Yl(10,t):e;case 10:return e=bo(192&~t),e===0?Yl(8,t):e;case 8:return e=bo(3584&~t),e===0&&(e=bo(4186112&~t),e===0&&(e=512)),e;case 2:return t=bo(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function bo(e){return e&-e}function uf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xu(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-or(t),e[t]=n}var or=Math.clz32?Math.clz32:Ib,Pb=Math.log,Rb=Math.LN2;function Ib(e){return e===0?32:31-(Pb(e)/Rb|0)|0}var Lb=xe.unstable_UserBlockingPriority,Ab=xe.unstable_runWithPriority,jl=!0;function Ob(e,t,n,r){Br||bp();var o=Ip,i=Br;Br=!0;try{rS(o,e,t,n,r)}finally{(Br=i)||Tp()}}function Nb(e,t,n,r){Ab(Lb,Ip.bind(null,e,t,n,r))}function Ip(e,t,n,r){if(jl){var o;if((o=(t&4)===0)&&0<Xt.length&&-1<Ky.indexOf(e))e=Uf(null,e,t,n,r),Xt.push(e);else{var i=Lp(e,t,n,r);if(i===null)o&&Wy(e,r);else{if(o){if(-1<Ky.indexOf(e)){e=Uf(i,e,t,n,r),Xt.push(e);return}if(_b(i,e,t,n,r))return;Wy(e,r)}IS(e,t,r,null,n)}}}}function Lp(e,t,n,r){var o=Ep(r);if(o=Ur(o),o!==null){var i=Qr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=iS(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 IS(e,t,r,o,n),null}var $n=null,Ap=null,Hl=null;function vS(){if(Hl)return Hl;var e,t=Ap,n=t.length,r,o="value"in $n?$n.value:$n.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 Hl=o.slice(e,1<r?1-r:void 0)}function Bl(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 Pl(){return!0}function qy(){return!1}function rt(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)?Pl:qy,this.isPropagationStopped=qy,this}return ae(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=Pl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),t}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Op=rt($o),Ks=ae({},$o,{view:0,detail:0}),Mb=rt(Ks),cf,df,is,_u=ae({},Ks,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Np,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!==is&&(is&&e.type==="mousemove"?(cf=e.screenX-is.screenX,df=e.screenY-is.screenY):df=cf=0,is=e),cf)},movementY:function(e){return"movementY"in e?e.movementY:df}}),Gy=rt(_u),Db=ae({},_u,{dataTransfer:0}),Fb=rt(Db),jb=ae({},Ks,{relatedTarget:0}),ff=rt(jb),Hb=ae({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),Bb=rt(Hb),Ub=ae({},$o,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zb=rt(Ub),Vb=ae({},$o,{data:0}),Xy=rt(Vb),Kb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wb={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"},$b={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$b[e])?!!t[e]:!1}function Np(){return qb}var Gb=ae({},Ks,{key:function(e){if(e.key){var t=Kb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Wb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Np,charCode:function(e){return e.type==="keypress"?Bl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Xb=rt(Gb),Qb=ae({},_u,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qy=rt(Qb),Yb=ae({},Ks,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Np}),Zb=rt(Yb),Jb=ae({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),eT=rt(Jb),tT=ae({},_u,{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}),nT=rt(tT),rT=[9,13,27,32],Mp=yn&&"CompositionEvent"in window,ws=null;yn&&"documentMode"in document&&(ws=document.documentMode);var oT=yn&&"TextEvent"in window&&!ws,SS=yn&&(!Mp||ws&&8<ws&&11>=ws),Yy=String.fromCharCode(32),Zy=!1;function xS(e,t){switch(e){case"keyup":return rT.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 ko=!1;function iT(e,t){switch(e){case"compositionend":return _S(t);case"keypress":return t.which!==32?null:(Zy=!0,Yy);case"textInput":return e=t.data,e===Yy&&Zy?null:e;default:return null}}function sT(e,t){if(ko)return e==="compositionend"||!Mp&&xS(e,t)?(e=vS(),Hl=Ap=$n=null,ko=!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 SS&&t.locale!=="ko"?null:t.data;default:return null}}var aT={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 Jy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!aT[e.type]:t==="textarea"}function wS(e,t,n,r){tS(r),t=Zl(t,"onChange"),0<t.length&&(n=new Op("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Es=null,Ds=null;function lT(e){kS(e,0)}function wu(e){var t=Ro(e);if(Gv(t))return e}function uT(e,t){if(e==="change")return t}var ES=!1;yn&&(yn?(Il="oninput"in document,Il||(pf=document.createElement("div"),pf.setAttribute("oninput","return;"),Il=typeof pf.oninput=="function"),Rl=Il):Rl=!1,ES=Rl&&(!document.documentMode||9<document.documentMode));var Rl,Il,pf;function ev(){Es&&(Es.detachEvent("onpropertychange",CS),Ds=Es=null)}function CS(e){if(e.propertyName==="value"&&wu(Ds)){var t=[];if(wS(t,Ds,e,Ep(e)),e=lT,Br)e(t);else{Br=!0;try{Cp(e,t)}finally{Br=!1,Tp()}}}}function cT(e,t,n){e==="focusin"?(ev(),Es=t,Ds=n,Es.attachEvent("onpropertychange",CS)):e==="focusout"&&ev()}function dT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return wu(Ds)}function fT(e,t){if(e==="click")return wu(t)}function pT(e,t){if(e==="input"||e==="change")return wu(t)}function mT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vt=typeof Object.is=="function"?Object.is:mT,gT=Object.prototype.hasOwnProperty;function Fs(e,t){if(vt(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(!gT.call(t,n[r])||!vt(e[n[r]],t[n[r]]))return!1;return!0}function tv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nv(e,t){var n=tv(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=tv(n)}}function bS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function rv(){for(var e=window,t=Gl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gl(e.document)}return t}function zf(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 hT=yn&&"documentMode"in document&&11>=document.documentMode,Po=null,Vf=null,Cs=null,Kf=!1;function ov(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kf||Po==null||Po!==Gl(r)||(r=Po,"selectionStart"in r&&zf(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}),Cs&&Fs(Cs,r)||(Cs=r,r=Zl(Vf,"onSelect"),0<r.length&&(t=new Op("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Po)))}Rp("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);Rp("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);Rp(Cb,2);for(mf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ll=0;Ll<mf.length;Ll++)Pp.set(mf[Ll],0);var mf,Ll;zo("onMouseEnter",["mouseout","mouseover"]);zo("onMouseLeave",["mouseout","mouseover"]);zo("onPointerEnter",["pointerout","pointerover"]);zo("onPointerLeave",["pointerout","pointerover"]);Gr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),TS=new Set("cancel close invalid load scroll toggle".split(" ").concat(gs));function iv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Sb(r,t,void 0,e),e.currentTarget=null}function kS(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;iv(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;iv(o,a,u),i=l}}}if(Ql)throw e=Hf,Ql=!1,Hf=null,e}function ie(e,t){var n=AS(t),r=e+"__bubble";n.has(r)||(RS(t,e,2,!1),n.add(r))}var sv="_reactListening"+Math.random().toString(36).slice(2);function PS(e){e[sv]||(e[sv]=!0,Wv.forEach(function(t){TS.has(t)||av(t,!1,e,null),av(t,!0,e,null)}))}function av(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&&TS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=AS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),RS(i,e,o,t),s.add(a))}function RS(e,t,n,r){var o=Pp.get(t);switch(o===void 0?2:o){case 0:o=Ob;break;case 1:o=Nb;break;default:o=Ip}n=o.bind(null,t,n,e),o=void 0,!jf||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 IS(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&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=Ur(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}gb(function(){var u=i,c=Ep(n),f=[];e:{var d=hS.get(e);if(d!==void 0){var y=Op,S=e;switch(e){case"keypress":if(Bl(n)===0)break e;case"keydown":case"keyup":y=Xb;break;case"focusin":S="focus",y=ff;break;case"focusout":S="blur",y=ff;break;case"beforeblur":case"afterblur":y=ff;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":y=Gy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Fb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Zb;break;case fS:case pS:case mS:y=Bb;break;case gS:y=eT;break;case"scroll":y=Mb;break;case"wheel":y=nT;break;case"copy":case"cut":case"paste":y=zb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Qy}var h=(t&4)!==0,g=!h&&e==="scroll",m=h?d!==null?d+"Capture":null:d;h=[];for(var p=u,v;p!==null;){v=p;var _=v.stateNode;if(v.tag===5&&_!==null&&(v=_,m!==null&&(_=As(p,m),_!=null&&h.push(js(p,_,v)))),g)break;p=p.return}0<h.length&&(d=new y(d,S,null,n,c),f.push({event:d,listeners:h}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(S=n.relatedTarget||n.fromElement)&&(Ur(S)||S[qo]))break e;if((y||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,y?(S=n.relatedTarget||n.toElement,y=u,S=S?Ur(S):null,S!==null&&(g=Qr(S),S!==g||S.tag!==5&&S.tag!==6)&&(S=null)):(y=null,S=u),y!==S)){if(h=Gy,_="onMouseLeave",m="onMouseEnter",p="mouse",(e==="pointerout"||e==="pointerover")&&(h=Qy,_="onPointerLeave",m="onPointerEnter",p="pointer"),g=y==null?d:Ro(y),v=S==null?d:Ro(S),d=new h(_,p+"leave",y,n,c),d.target=g,d.relatedTarget=v,_=null,Ur(c)===u&&(h=new h(m,p+"enter",S,n,c),h.target=v,h.relatedTarget=g,_=h),g=_,y&&S)t:{for(h=y,m=S,p=0,v=h;v;v=Eo(v))p++;for(v=0,_=m;_;_=Eo(_))v++;for(;0<p-v;)h=Eo(h),p--;for(;0<v-p;)m=Eo(m),v--;for(;p--;){if(h===m||m!==null&&h===m.alternate)break t;h=Eo(h),m=Eo(m)}h=null}else h=null;y!==null&&lv(f,d,y,h,!1),S!==null&&g!==null&&lv(f,g,S,h,!0)}}e:{if(d=u?Ro(u):window,y=d.nodeName&&d.nodeName.toLowerCase(),y==="select"||y==="input"&&d.type==="file")var C=uT;else if(Jy(d))if(ES)C=pT;else{C=dT;var E=cT}else(y=d.nodeName)&&y.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=fT);if(C&&(C=C(e,u))){wS(f,C,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&If(d,"number",d.value)}switch(E=u?Ro(u):window,e){case"focusin":(Jy(E)||E.contentEditable==="true")&&(Po=E,Vf=u,Cs=null);break;case"focusout":Cs=Vf=Po=null;break;case"mousedown":Kf=!0;break;case"contextmenu":case"mouseup":case"dragend":Kf=!1,ov(f,n,c);break;case"selectionchange":if(hT)break;case"keydown":case"keyup":ov(f,n,c)}var b;if(Mp)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else ko?xS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(SS&&n.locale!=="ko"&&(ko||R!=="onCompositionStart"?R==="onCompositionEnd"&&ko&&(b=vS()):($n=c,Ap="value"in $n?$n.value:$n.textContent,ko=!0)),E=Zl(u,R),0<E.length&&(R=new Xy(R,e,null,n,c),f.push({event:R,listeners:E}),b?R.data=b:(b=_S(n),b!==null&&(R.data=b)))),(b=oT?iT(e,n):sT(e,n))&&(u=Zl(u,"onBeforeInput"),0<u.length&&(c=new Xy("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=b))}kS(f,t)})}function js(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=As(e,n),i!=null&&r.unshift(js(e,i,o)),i=As(e,t),i!=null&&r.push(js(e,i,o))),e=e.return}return r}function Eo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function lv(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=As(n,i),l!=null&&s.unshift(js(n,l,a))):o||(l=As(n,i),l!=null&&s.push(js(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Jl(){}var gf=null,hf=null;function LS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Wf(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 uv=typeof setTimeout=="function"?setTimeout:void 0,yT=typeof clearTimeout=="function"?clearTimeout:void 0;function Dp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Do(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function cv(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 yf=0;function vT(e){return{$$typeof:_p,toString:e,valueOf:e}}var Eu=Math.random().toString(36).slice(2),qn="__reactFiber$"+Eu,eu="__reactProps$"+Eu,qo="__reactContainer$"+Eu,dv="__reactEvents$"+Eu;function Ur(e){var t=e[qn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[qo]||n[qn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cv(e);e!==null;){if(n=e[qn])return n;e=cv(e)}return t}e=n,n=e.parentNode}return null}function Ws(e){return e=e[qn]||e[qo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ro(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Cu(e){return e[eu]||null}function AS(e){var t=e[dv];return t===void 0&&(t=e[dv]=new Set),t}var $f=[],Io=-1;function lr(e){return{current:e}}function se(e){0>Io||(e.current=$f[Io],$f[Io]=null,Io--)}function de(e,t){Io++,$f[Io]=e.current,e.current=t}var ir={},Ne=lr(ir),qe=lr(!1),Wr=ir;function Vo(e,t){var n=e.type.contextTypes;if(!n)return ir;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 Ge(e){return e=e.childContextTypes,e!=null}function tu(){se(qe),se(Ne)}function fv(e,t,n){if(Ne.current!==ir)throw Error(T(168));de(Ne,t),de(qe,n)}function OS(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(T(108,Ao(t)||"Unknown",o));return ae({},n,r)}function Ul(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ir,Wr=Ne.current,de(Ne,e),de(qe,qe.current),!0}function pv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=OS(e,t,Wr),r.__reactInternalMemoizedMergedChildContext=e,se(qe),se(Ne),de(Ne,e)):se(qe),de(qe,n)}var Fp=null,Kr=null,ST=xe.unstable_runWithPriority,jp=xe.unstable_scheduleCallback,qf=xe.unstable_cancelCallback,xT=xe.unstable_shouldYield,mv=xe.unstable_requestPaint,Gf=xe.unstable_now,_T=xe.unstable_getCurrentPriorityLevel,bu=xe.unstable_ImmediatePriority,NS=xe.unstable_UserBlockingPriority,MS=xe.unstable_NormalPriority,DS=xe.unstable_LowPriority,FS=xe.unstable_IdlePriority,vf={},wT=mv!==void 0?mv:function(){},fn=null,zl=null,Sf=!1,gv=Gf(),Ae=1e4>gv?Gf:function(){return Gf()-gv};function Ko(){switch(_T()){case bu:return 99;case NS:return 98;case MS:return 97;case DS:return 96;case FS:return 95;default:throw Error(T(332))}}function jS(e){switch(e){case 99:return bu;case 98:return NS;case 97:return MS;case 96:return DS;case 95:return FS;default:throw Error(T(332))}}function $r(e,t){return e=jS(e),ST(e,t)}function Hs(e,t,n){return e=jS(e),jp(e,t,n)}function en(){if(zl!==null){var e=zl;zl=null,qf(e)}HS()}function HS(){if(!Sf&&fn!==null){Sf=!0;var e=0;try{var t=fn;$r(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),fn=null}catch(n){throw fn!==null&&(fn=fn.slice(e+1)),jp(bu,en),n}finally{Sf=!1}}}var ET=Xr.ReactCurrentBatchConfig;function Mt(e,t){if(e&&e.defaultProps){t=ae({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var nu=lr(null),ru=null,Lo=null,ou=null;function Hp(){ou=Lo=ru=null}function Bp(e){var t=nu.current;se(nu),e.type._context._currentValue=t}function BS(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 Fo(e,t){ru=e,ou=Lo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Dt=!0),e.firstContext=null)}function _t(e,t){if(ou!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(ou=e,t=1073741823),t={context:e,observedBits:t,next:null},Lo===null){if(ru===null)throw Error(T(308));Lo=t,ru.dependencies={lanes:0,firstContext:t,responders:null}}else Lo=Lo.next=t;return e._currentValue}var Kn=!1;function Up(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function US(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 Zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Jn(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 hv(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 Bs(e,t,n,r){var o=e.updateQueue;Kn=!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 y=e,S=i;switch(a=t,d=n,S.tag){case 1:if(y=S.payload,typeof y=="function"){f=y.call(d,f,a);break e}f=y;break e;case 3:y.flags=y.flags&-4097|64;case 0:if(y=S.payload,a=typeof y=="function"?y.call(d,f,a):y,a==null)break e;f=ae({},f,a);break e;case 2:Kn=!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(1);c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,qs|=s,e.lanes=s,e.memoizedState=f}}function yv(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(T(191,o));o.call(r)}}}var zS=new hu.Component().refs;function iu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Tu={isMounted:function(e){return(e=e._reactInternals)?Qr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=nt(),o=er(e),i=Zn(r,o);i.payload=t,n!=null&&(i.callback=n),Jn(e,i),tr(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=nt(),o=er(e),i=Zn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Jn(e,i),tr(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=nt(),r=er(e),o=Zn(n,r);o.tag=2,t!=null&&(o.callback=t),Jn(e,o),tr(e,r,n)}};function vv(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?!Fs(n,r)||!Fs(o,i):!0}function VS(e,t,n){var r=!1,o=ir,i=t.contextType;return typeof i=="object"&&i!==null?i=_t(i):(o=Ge(t)?Wr:Ne.current,r=t.contextTypes,i=(r=r!=null)?Vo(e,o):ir),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Tu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Sv(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&&Tu.enqueueReplaceState(t,t.state,null)}function Xf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=zS,Up(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=_t(i):(i=Ge(t)?Wr:Ne.current,o.context=Vo(e,i)),Bs(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(iu(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&&Tu.enqueueReplaceState(o,o.state,null),Bs(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Al=Array.isArray;function ss(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(T(309));var r=n.stateNode}if(!r)throw Error(T(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===zS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function Ol(e,t){if(e.type!=="textarea")throw Error(T(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function KS(e){function t(g,m){if(e){var p=g.lastEffect;p!==null?(p.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=ar(g,m),g.index=0,g.sibling=null,g}function i(g,m,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<m?(g.flags=2,m):p):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,p,v){return m===null||m.tag!==6?(m=Cf(p,g.mode,v),m.return=g,m):(m=o(m,p),m.return=g,m)}function l(g,m,p,v){return m!==null&&m.elementType===p.type?(v=o(m,p.props),v.ref=ss(g,m,p),v.return=g,v):(v=$l(p.type,p.key,p.props,null,g.mode,v),v.ref=ss(g,m,p),v.return=g,v)}function u(g,m,p,v){return m===null||m.tag!==4||m.stateNode.containerInfo!==p.containerInfo||m.stateNode.implementation!==p.implementation?(m=bf(p,g.mode,v),m.return=g,m):(m=o(m,p.children||[]),m.return=g,m)}function c(g,m,p,v,_){return m===null||m.tag!==7?(m=Uo(p,g.mode,v,_),m.return=g,m):(m=o(m,p),m.return=g,m)}function f(g,m,p){if(typeof m=="string"||typeof m=="number")return m=Cf(""+m,g.mode,p),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ps:return p=$l(m.type,m.key,m.props,null,g.mode,p),p.ref=ss(g,null,m),p.return=g,p;case Hr:return m=bf(m,g.mode,p),m.return=g,m}if(Al(m)||ts(m))return m=Uo(m,g.mode,p,null),m.return=g,m;Ol(g,m)}return null}function d(g,m,p,v){var _=m!==null?m.key:null;if(typeof p=="string"||typeof p=="number")return _!==null?null:a(g,m,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case ps:return p.key===_?p.type===Wn?c(g,m,p.props.children,v,_):l(g,m,p,v):null;case Hr:return p.key===_?u(g,m,p,v):null}if(Al(p)||ts(p))return _!==null?null:c(g,m,p,v,null);Ol(g,p)}return null}function y(g,m,p,v,_){if(typeof v=="string"||typeof v=="number")return g=g.get(p)||null,a(m,g,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ps:return g=g.get(v.key===null?p:v.key)||null,v.type===Wn?c(m,g,v.props.children,_,v.key):l(m,g,v,_);case Hr:return g=g.get(v.key===null?p:v.key)||null,u(m,g,v,_)}if(Al(v)||ts(v))return g=g.get(p)||null,c(m,g,v,_,null);Ol(m,v)}return null}function S(g,m,p,v){for(var _=null,C=null,E=m,b=m=0,R=null;E!==null&&b<p.length;b++){E.index>b?(R=E,E=null):R=E.sibling;var P=d(g,E,p[b],v);if(P===null){E===null&&(E=R);break}e&&E&&P.alternate===null&&t(g,E),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P,E=R}if(b===p.length)return n(g,E),_;if(E===null){for(;b<p.length;b++)E=f(g,p[b],v),E!==null&&(m=i(E,m,b),C===null?_=E:C.sibling=E,C=E);return _}for(E=r(g,E);b<p.length;b++)R=y(E,g,b,p[b],v),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?b:R.key),m=i(R,m,b),C===null?_=R:C.sibling=R,C=R);return e&&E.forEach(function(N){return t(g,N)}),_}function h(g,m,p,v){var _=ts(p);if(typeof _!="function")throw Error(T(150));if(p=_.call(p),p==null)throw Error(T(151));for(var C=_=null,E=m,b=m=0,R=null,P=p.next();E!==null&&!P.done;b++,P=p.next()){E.index>b?(R=E,E=null):R=E.sibling;var N=d(g,E,P.value,v);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(g,E),m=i(N,m,b),C===null?_=N:C.sibling=N,C=N,E=R}if(P.done)return n(g,E),_;if(E===null){for(;!P.done;b++,P=p.next())P=f(g,P.value,v),P!==null&&(m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return _}for(E=r(g,E);!P.done;b++,P=p.next())P=y(E,g,b,P.value,v),P!==null&&(e&&P.alternate!==null&&E.delete(P.key===null?b:P.key),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return e&&E.forEach(function(G){return t(g,G)}),_}return function(g,m,p,v){var _=typeof p=="object"&&p!==null&&p.type===Wn&&p.key===null;_&&(p=p.props.children);var C=typeof p=="object"&&p!==null;if(C)switch(p.$$typeof){case ps:e:{for(C=p.key,_=m;_!==null;){if(_.key===C){switch(_.tag){case 7:if(p.type===Wn){n(g,_.sibling),m=o(_,p.props.children),m.return=g,g=m;break e}break;default:if(_.elementType===p.type){n(g,_.sibling),m=o(_,p.props),m.ref=ss(g,_,p),m.return=g,g=m;break e}}n(g,_);break}else t(g,_);_=_.sibling}p.type===Wn?(m=Uo(p.props.children,g.mode,v,p.key),m.return=g,g=m):(v=$l(p.type,p.key,p.props,null,g.mode,v),v.ref=ss(g,m,p),v.return=g,g=v)}return s(g);case Hr:e:{for(_=p.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){n(g,m.sibling),m=o(m,p.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=bf(p,g.mode,v),m.return=g,g=m}return s(g)}if(typeof p=="string"||typeof p=="number")return p=""+p,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,p),m.return=g,g=m):(n(g,m),m=Cf(p,g.mode,v),m.return=g,g=m),s(g);if(Al(p))return S(g,m,p,v);if(ts(p))return h(g,m,p,v);if(C&&Ol(g,p),typeof p>"u"&&!_)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,Ao(g.type)||"Component"))}return n(g,m)}}var su=KS(!0),WS=KS(!1),$s={},Zt=lr($s),Us=lr($s),zs=lr($s);function zr(e){if(e===$s)throw Error(T(174));return e}function Qf(e,t){switch(de(zs,t),de(Us,e),de(Zt,$s),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Nf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Nf(t,e)}se(Zt),de(Zt,t)}function Wo(){se(Zt),se(Us),se(zs)}function xv(e){zr(zs.current);var t=zr(Zt.current),n=Nf(t,e.type);t!==n&&(de(Us,e),de(Zt,n))}function zp(e){Us.current===e&&(se(Zt),se(Us))}var ce=lr(0);function au(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)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 mn=null,Gn=null,Jt=!1;function $S(e,t){var n=St(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 _v(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 Yf(e){if(Jt){var t=Gn;if(t){var n=t;if(!_v(e,t)){if(t=Do(n.nextSibling),!t||!_v(e,t)){e.flags=e.flags&-1025|2,Jt=!1,mn=e;return}$S(mn,n)}mn=e,Gn=Do(t.firstChild)}else e.flags=e.flags&-1025|2,Jt=!1,mn=e}}function wv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mn=e}function Nl(e){if(e!==mn)return!1;if(!Jt)return wv(e),Jt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Wf(t,e.memoizedProps))for(t=Gn;t;)$S(e,t),t=Do(t.nextSibling);if(wv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Gn=Do(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Gn=null}}else Gn=mn?Do(e.stateNode.nextSibling):null;return!0}function xf(){Gn=mn=null,Jt=!1}var jo=[];function Vp(){for(var e=0;e<jo.length;e++)jo[e]._workInProgressVersionPrimary=null;jo.length=0}var bs=Xr.ReactCurrentDispatcher,xt=Xr.ReactCurrentBatchConfig,Vs=0,ge=null,Le=null,be=null,lu=!1,Ts=!1;function We(){throw Error(T(321))}function Kp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vt(e[n],t[n]))return!1;return!0}function Wp(e,t,n,r,o,i){if(Vs=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,bs.current=e===null||e.memoizedState===null?bT:TT,e=n(r,o),Ts){i=0;do{if(Ts=!1,!(25>i))throw Error(T(301));i+=1,be=Le=null,t.updateQueue=null,bs.current=kT,e=n(r,o)}while(Ts)}if(bs.current=fu,t=Le!==null&&Le.next!==null,Vs=0,be=Le=ge=null,lu=!1,t)throw Error(T(300));return e}function Vr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return be===null?ge.memoizedState=be=e:be=be.next=e,be}function Yr(){if(Le===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=be===null?ge.memoizedState:be.next;if(t!==null)be=t,Le=e;else{if(e===null)throw Error(T(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},be===null?ge.memoizedState=be=e:be=be.next=e}return be}function Qt(e,t){return typeof t=="function"?t(e):t}function as(e){var t=Yr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Le,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((Vs&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,ge.lanes|=u,qs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,vt(r,t.memoizedState)||(Dt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ls(e){var t=Yr(),n=t.queue;if(n===null)throw Error(T(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);vt(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ev(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=(Vs&e)===e)&&(t._workInProgressVersionPrimary=r,jo.push(t))),e)return n(t._source);throw jo.push(t),Error(T(350))}function qS(e,t,n,r){var o=Be;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=bs.current,l=a.useState(function(){return Ev(o,t,n)}),u=l[1],c=l[0];l=be;var f=e.memoizedState,d=f.refs,y=d.getSnapshot,S=f.source;f=f.subscribe;var h=ge;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!vt(s,g)){g=n(t._source),vt(c,g)||(u(g),g=er(h),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,p=g;0<p;){var v=31-or(p),_=1<<v;m[v]|=g,p&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var p=er(h);o.mutableReadLanes|=p&o.pendingLanes}catch(v){m(function(){throw v})}})},[t,r]),vt(y,n)&&vt(S,t)&&vt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:c},e.dispatch=u=Gp.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=Ev(o,t,n),l.memoizedState=l.baseState=c),c}function GS(e,t,n){var r=Yr();return qS(r,e,t,n)}function us(e){var t=Vr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:e},e=e.dispatch=Gp.bind(null,ge,e),[t.memoizedState,e]}function uu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null},ge.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 Cv(e){var t=Vr();return e={current:e},t.memoizedState=e}function cu(){return Yr().memoizedState}function Zf(e,t,n,r){var o=Vr();ge.flags|=e,o.memoizedState=uu(1|t,n,void 0,r===void 0?null:r)}function $p(e,t,n,r){var o=Yr();r=r===void 0?null:r;var i=void 0;if(Le!==null){var s=Le.memoizedState;if(i=s.destroy,r!==null&&Kp(r,s.deps)){uu(t,n,i,r);return}}ge.flags|=e,o.memoizedState=uu(1|t,n,i,r)}function bv(e,t){return Zf(516,4,e,t)}function du(e,t){return $p(516,4,e,t)}function XS(e,t){return $p(4,2,e,t)}function QS(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 YS(e,t,n){return n=n!=null?n.concat([e]):null,$p(4,2,QS.bind(null,t,e),n)}function qp(){}function ZS(e,t){var n=Yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Kp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function JS(e,t){var n=Yr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Kp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function CT(e,t){var n=Ko();$r(98>n?98:n,function(){e(!0)}),$r(97<n?97:n,function(){var r=xt.transition;xt.transition=1;try{e(!1),t()}finally{xt.transition=r}})}function Gp(e,t,n){var r=nt(),o=er(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===ge||s!==null&&s===ge)Ts=lu=!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,vt(l,a))return}catch{}finally{}tr(e,o,r)}}var fu={readContext:_t,useCallback:We,useContext:We,useEffect:We,useImperativeHandle:We,useLayoutEffect:We,useMemo:We,useReducer:We,useRef:We,useState:We,useDebugValue:We,useDeferredValue:We,useTransition:We,useMutableSource:We,useOpaqueIdentifier:We,unstable_isNewReconciler:!1},bT={readContext:_t,useCallback:function(e,t){return Vr().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:bv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zf(4,2,QS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zf(4,2,e,t)},useMemo:function(e,t){var n=Vr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Vr();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=Gp.bind(null,ge,e),[r.memoizedState,e]},useRef:Cv,useState:us,useDebugValue:qp,useDeferredValue:function(e){var t=us(e),n=t[0],r=t[1];return bv(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=us(!1),t=e[0];return e=CT.bind(null,e[1]),Cv(e),[e,t]},useMutableSource:function(e,t,n){var r=Vr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},qS(r,e,t,n)},useOpaqueIdentifier:function(){if(Jt){var e=!1,t=vT(function(){throw e||(e=!0,n("r:"+(yf++).toString(36))),Error(T(355))}),n=us(t)[1];return!(ge.mode&2)&&(ge.flags|=516,uu(5,function(){n("r:"+(yf++).toString(36))},void 0,null)),t}return t="r:"+(yf++).toString(36),us(t),t},unstable_isNewReconciler:!1},TT={readContext:_t,useCallback:ZS,useContext:_t,useEffect:du,useImperativeHandle:YS,useLayoutEffect:XS,useMemo:JS,useReducer:as,useRef:cu,useState:function(){return as(Qt)},useDebugValue:qp,useDeferredValue:function(e){var t=as(Qt),n=t[0],r=t[1];return du(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=as(Qt)[0];return[cu().current,e]},useMutableSource:GS,useOpaqueIdentifier:function(){return as(Qt)[0]},unstable_isNewReconciler:!1},kT={readContext:_t,useCallback:ZS,useContext:_t,useEffect:du,useImperativeHandle:YS,useLayoutEffect:XS,useMemo:JS,useReducer:ls,useRef:cu,useState:function(){return ls(Qt)},useDebugValue:qp,useDeferredValue:function(e){var t=ls(Qt),n=t[0],r=t[1];return du(function(){var o=xt.transition;xt.transition=1;try{r(e)}finally{xt.transition=o}},[e]),n},useTransition:function(){var e=ls(Qt)[0];return[cu().current,e]},useMutableSource:GS,useOpaqueIdentifier:function(){return ls(Qt)[0]},unstable_isNewReconciler:!1},PT=Xr.ReactCurrentOwner,Dt=!1;function $e(e,t,n,r){t.child=e===null?WS(t,null,n,r):su(t,e.child,n,r)}function Tv(e,t,n,r,o){n=n.render;var i=t.ref;return Fo(t,o),r=Wp(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,$e(e,t,r,o),t.child)}function kv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!em(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,e0(e,t,s,r,o,i)):(e=$l(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}return s=e.child,!(o&i)&&(o=s.memoizedProps,n=n.compare,n=n!==null?n:Fs,n(o,r)&&e.ref===t.ref)?gn(e,t,i):(t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e)}function e0(e,t,n,r,o,i){if(e!==null&&Fs(e.memoizedProps,r)&&e.ref===t.ref)if(Dt=!1,(i&o)!==0)e.flags&16384&&(Dt=!0);else return t.lanes=e.lanes,gn(e,t,i);return Jf(e,t,n,r,i)}function _f(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))t.memoizedState={baseLanes:0},Dl(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Dl(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Dl(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Dl(t,r);return $e(e,t,o,n),t.child}function t0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Jf(e,t,n,r,o){var i=Ge(n)?Wr:Ne.current;return i=Vo(t,i),Fo(t,o),n=Wp(e,t,n,r,i,o),e!==null&&!Dt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,gn(e,t,o)):(t.flags|=1,$e(e,t,n,o),t.child)}function Pv(e,t,n,r,o){if(Ge(n)){var i=!0;Ul(t)}else i=!1;if(Fo(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),VS(t,n,r),Xf(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=_t(u):(u=Ge(n)?Wr:Ne.current,u=Vo(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)&&Sv(t,s,r,u),Kn=!1;var d=t.memoizedState;s.state=d,Bs(t,r,s,o),l=t.memoizedState,a!==r||d!==l||qe.current||Kn?(typeof c=="function"&&(iu(t,n,c,r),l=t.memoizedState),(a=Kn||vv(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,US(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Mt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=_t(l):(l=Ge(n)?Wr:Ne.current,l=Vo(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&Sv(t,s,r,l),Kn=!1,d=t.memoizedState,s.state=d,Bs(t,r,s,o);var S=t.memoizedState;a!==f||d!==S||qe.current||Kn?(typeof y=="function"&&(iu(t,n,y,r),S=t.memoizedState),(u=Kn||vv(t,n,u,r,d,S,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,S,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,S,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=S),s.props=r,s.state=S,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 ep(e,t,n,r,i,o)}function ep(e,t,n,r,o,i){t0(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&pv(t,n,!1),gn(e,t,i);r=t.stateNode,PT.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=su(t,e.child,null,i),t.child=su(t,null,a,i)):$e(e,t,a,i),t.memoizedState=r.state,o&&pv(t,n,!0),t.child}function Rv(e){var t=e.stateNode;t.pendingContext?fv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&fv(e,t.context,!1),Qf(e,t.containerInfo)}var Ml={dehydrated:null,retryLane:0};function Iv(e,t,n){var r=t.pendingProps,o=ce.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),de(ce,o&1),e===null?(r.fallback!==void 0&&Yf(t),e=r.children,o=r.fallback,i?(e=Lv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ml,e):typeof r.unstable_expectedLoadTime=="number"?(e=Lv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ml,t.lanes=33554432,e):(n=tm({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Ov(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=Ml,r):(n=Av(e,t,r.children,n),t.memoizedState=null,n):i?(r=Ov(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=Ml,r):(n=Av(e,t,r.children,n),t.memoizedState=null,n)}function Lv(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},!(o&2)&&i!==null?(i.childLanes=0,i.pendingProps=t):i=tm(t,o,0,null),n=Uo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Av(e,t,n,r){var o=e.child;return e=o.sibling,n=ar(o,{mode:"visible",children:n}),!(t.mode&2)&&(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 Ov(e,t,n,r,o){var i=t.mode,s=e.child;e=s.sibling;var a={mode:"hidden",children:n};return!(i&2)&&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=ar(s,a),e!==null?r=ar(e,r):(r=Uo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Nv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),BS(e.return,t)}function wf(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 Mv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if($e(e,t,r.children,n),r=ce.current,r&2)r=r&1|2,t.flags|=64;else{if(e!==null&&e.flags&64)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nv(e,n);else if(e.tag===19)Nv(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(de(ce,r),!(t.mode&2))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&au(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),wf(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&&au(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}wf(t,!0,n,null,i,t.lastEffect);break;case"together":wf(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qs|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=ar(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ar(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var n0,tp,r0,o0;n0=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}};tp=function(){};r0=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,zr(Zt.current);var i=null;switch(n){case"input":o=Pf(e,o),r=Pf(e,r),i=[];break;case"option":o=Lf(e,o),r=Lf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=Af(e,o),r=Af(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Jl)}Mf(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"&&(Is.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"&&(Is.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===_p?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};o0=function(e,t,n,r){n!==r&&(t.flags|=4)};function cs(e,t){if(!Jt)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 RT(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 Ge(t.type)&&tu(),null;case 3:return Wo(),se(qe),se(Ne),Vp(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Nl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),tp(t),null;case 5:zp(t);var o=zr(zs.current);if(n=t.type,e!==null&&t.stateNode!=null)r0(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(T(166));return null}if(e=zr(Zt.current),Nl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[qn]=t,r[eu]=i,n){case"dialog":ie("cancel",r),ie("close",r);break;case"iframe":case"object":case"embed":ie("load",r);break;case"video":case"audio":for(e=0;e<gs.length;e++)ie(gs[e],r);break;case"source":ie("error",r);break;case"img":case"image":case"link":ie("error",r),ie("load",r);break;case"details":ie("toggle",r);break;case"input":Fy(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Hy(r,i),ie("invalid",r)}Mf(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]):Is.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":bl(r),jy(r,i,!0);break;case"textarea":bl(r),By(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Jl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Of.html&&(e=Yv(n)),e===Of.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[qn]=t,e[eu]=r,n0(e,t,!1,!1),t.stateNode=e,s=Df(n,r),n){case"dialog":ie("cancel",e),ie("close",e),o=r;break;case"iframe":case"object":case"embed":ie("load",e),o=r;break;case"video":case"audio":for(o=0;o<gs.length;o++)ie(gs[o],e);o=r;break;case"source":ie("error",e),o=r;break;case"img":case"image":case"link":ie("error",e),ie("load",e),o=r;break;case"details":ie("toggle",e),o=r;break;case"input":Fy(e,r),o=Pf(e,r),ie("invalid",e);break;case"option":o=Lf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Hy(e,r),o=Af(e,r),ie("invalid",e);break;default:o=r}Mf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?eS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Zv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ls(e,l):typeof l=="number"&&Ls(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Is.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&gp(e,i,l,s))}switch(n){case"input":bl(e),jy(e,r,!1);break;case"textarea":bl(e),By(e);break;case"option":r.value!=null&&e.setAttribute("value",""+rr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Oo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Oo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Jl)}LS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)o0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=zr(zs.current),zr(Zt.current),Nl(t)?(r=t.stateNode,n=t.memoizedProps,r[qn]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[qn]=t,t.stateNode=r)}return null;case 13:return se(ce),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&Nl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?Te===0&&(Te=3):((Te===0||Te===3)&&(Te=4),Be===null||!(qs&134217727)&&!(Xo&134217727)||Ho(Be,Oe))),(r||n)&&(t.flags|=4),null);case 4:return Wo(),tp(t),e===null&&PS(t.stateNode.containerInfo),null;case 10:return Bp(t),null;case 17:return Ge(t.type)&&tu(),null;case 19:if(se(ce),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)cs(r,!1);else{if(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=au(e),s!==null){for(t.flags|=64,cs(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 de(ce,ce.current&1|2),t.child}e=e.sibling}r.tail!==null&&Ae()>ap&&(t.flags|=64,i=!0,cs(r,!1),t.lanes=33554432)}else{if(!i)if(e=au(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),cs(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Jt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Ae()-r.renderingStartTime>ap&&n!==1073741824&&(t.flags|=64,i=!0,cs(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=Ae(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return Jp(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(T(156,t.tag))}function IT(e){switch(e.tag){case 1:Ge(e.type)&&tu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Wo(),se(qe),se(Ne),Vp(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return zp(e),null;case 13:return se(ce),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(ce),null;case 4:return Wo(),null;case 10:return Bp(e),null;case 23:case 24:return Jp(),null;default:return null}}function Xp(e,t){try{var n="",r=t;do n+=cb(r),r=r.return;while(r);var o=n}catch(i){o=`
6
6
  Error generating stack: `+i.message+`
7
- `+i.stack}return{value:e,source:t,stack:o}}function np(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var LT=typeof WeakMap=="function"?WeakMap:Map;function i0(e,t,n){n=Zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){mu||(mu=!0,lp=r),np(e,t)},n}function s0(e,t,n){n=Zn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return np(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Yt===null?Yt=new Set([this]):Yt.add(this),np(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var AT=typeof WeakSet=="function"?WeakSet:Set;function Dv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){nr(e,n)}else t.current=null}function OT(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:Mt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Dp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function NT(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&&o&1&&(g0(n,e),zT(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:Mt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&yv(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}yv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&LS(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&&cS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Fv(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=Jv("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 jv(e,t){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(Fp,t)}catch{}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)g0(t,n);else{r=t;try{o()}catch(i){nr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Dv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){nr(t,i)}break;case 5:Dv(t);break;case 4:a0(e,t)}}function Hv(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 Bv(e){return e.tag===5||e.tag===3||e.tag===4}function Uv(e){e:{for(var t=e.return;t!==null;){if(Bv(t))break e;t=t.return}throw Error(T(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(T(161))}n.flags&16&&(Is(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Bv(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?rp(e,n,t):op(e,n,t)}function rp(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=Jl));else if(r!==4&&(e=e.child,e!==null))for(rp(e,t,n),e=e.sibling;e!==null;)rp(e,t,n),e=e.sibling}function op(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(op(e,t,n),e=e.sibling;e!==null;)op(e,t,n),e=e.sibling}function a0(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(T(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(jv(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(jv(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 Ef(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[eu]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Xv(n,r),Df(e,o),t=Df(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?eS(n,a):s==="dangerouslySetInnerHTML"?Zv(n,a):s==="children"?Is(n,a):gp(n,s,a,t)}switch(e){case"input":Rf(n,r);break;case"textarea":Qv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Ao(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Ao(n,!!r.multiple,r.defaultValue,!0):Ao(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(T(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,cS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Zp=Ae(),Fv(t.child,!0)),zv(t);return;case 19:zv(t);return;case 17:return;case 23:case 24:Fv(t,t.memoizedState!==null);return}throw Error(T(163))}function zv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new AT),t.forEach(function(r){var o=WT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function MT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var DT=Math.ceil,pu=Xr.ReactCurrentDispatcher,Qp=Xr.ReactCurrentOwner,F=0,Be=null,ve=null,Oe=0,qr=0,ip=lr(0),Te=0,ku=null,qo=0,$s=0,Go=0,Yp=0,sp=null,Zp=0,ap=1/0;function Xo(){ap=Ae()+500}var A=null,mu=!1,lp=null,Yt=null,sr=!1,Ts=null,gs=90,up=[],cp=[],gn=null,ks=0,dp=null,Vl=-1,fn=0,Kl=0,Ps=null,Wl=!1;function nt(){return F&48?Ae():Vl!==-1?Vl:Vl=Ae()}function er(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Vo()===99?1:2;if(fn===0&&(fn=qo),ET.transition!==0){Kl!==0&&(Kl=sp!==null?sp.pendingLanes:0),e=fn;var t=4186112&~Kl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Vo(),F&4&&e===98?e=Yl(12,fn):(e=Tb(e),e=Yl(e,fn)),e}function tr(e,t,n){if(50<ks)throw ks=0,dp=null,Error(T(185));if(e=Pu(e,t),e===null)return null;xu(e,t,n),e===Be&&(Go|=t,Te===4&&jo(e,Oe));var r=Vo();t===1?F&8&&!(F&48)?fp(e):(wt(e,n),F===0&&(Xo(),en())):(!(F&4)||r!==98&&r!==99||(gn===null?gn=new Set([e]):gn.add(e)),wt(e,n)),sp=e}function Pu(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 wt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-or(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,Eo(l);var c=ne;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Ns(e,e===Be?Oe:0),t=ne,r===0)n!==null&&(n!==vf&&qf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==vf&&qf(n)}t===15?(n=fp.bind(null,e),dn===null?(dn=[n],zl=jp(bu,HS)):dn.push(n),n=vf):t===14?n=js(99,fp.bind(null,e)):(n=kb(t),n=js(n,l0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function l0(e){if(Vl=-1,Kl=fn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(ur()&&e.callbackNode!==t)return null;var n=Ns(e,e===Be?Oe:0);if(n===0)return null;var r=n,o=F;F|=16;var i=f0();(Be!==e||Oe!==r)&&(Xo(),Ho(e,r));do try{HT();break}catch(a){d0(e,a)}while(1);if(Hp(),pu.current=i,F=o,ve!==null?r=0:(Be=null,Oe=0,r=Te),qo&Go)Ho(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Dp(e.containerInfo)),n=yS(e),n!==0&&(r=hs(e,n))),r===1)throw t=ku,Ho(e,0),jo(e,n),wt(e,Ae()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:jr(e);break;case 3:if(jo(e,n),(n&62914560)===n&&(r=Zp+500-Ae(),10<r)){if(Ns(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){nt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=uv(jr.bind(null,e),r);break}jr(e);break;case 4:if(jo(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-or(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*DT(n/1960))-n,10<n){e.timeoutHandle=uv(jr.bind(null,e),n);break}jr(e);break;case 5:jr(e);break;default:throw Error(T(329))}}return wt(e,Ae()),e.callbackNode===t?l0.bind(null,e):null}function jo(e,t){for(t&=~Yp,t&=~Go,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-or(t),r=1<<n;e[n]=-1,t&=~r}}function fp(e){if(F&48)throw Error(T(327));if(ur(),e===Be&&e.expiredLanes&Oe){var t=Oe,n=hs(e,t);qo&Go&&(t=Ns(e,t),n=hs(e,t))}else t=Ns(e,0),n=hs(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Dp(e.containerInfo)),t=yS(e),t!==0&&(n=hs(e,t))),n===1)throw n=ku,Ho(e,0),jo(e,t),wt(e,Ae()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,jr(e),wt(e,Ae()),null}function FT(){if(gn!==null){var e=gn;gn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,wt(t,Ae())})}en()}function u0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(Xo(),en())}}function c0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(Xo(),en())}}function Dl(e,t){de(ip,qr),qr|=t,qo|=t}function Jp(){qr=ip.current,se(ip)}function Ho(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yT(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&tu();break;case 3:Ko(),se(qe),se(Ne),Vp();break;case 5:zp(r);break;case 4:Ko();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Bp(r);break;case 23:case 24:Jp()}n=n.return}Be=e,ve=ar(e.current,null),Oe=qr=qo=t,Te=0,ku=null,Yp=Go=$s=0}function d0(e,t){do{var n=ve;try{if(Hp(),Cs.current=fu,lu){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}lu=!1}if(zs=0,be=Le=ge=null,bs=!1,Qp.current=null,n===null||n.return===null){Te=1,ku=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Oe,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){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=(ce.current&1)!==0,d=s;do{var y;if(y=d.tag===13){var S=d.memoizedState;if(S!==null)y=S.dehydrated!==null;else{var h=d.memoizedProps;y=h.fallback===void 0?!1:h.unstable_avoidThisFallback!==!0?!0:!f}}if(y){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)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var p=Zn(-1,1);p.tag=2,Jn(a,p)}a.lanes|=1;break e}l=void 0,a=t;var v=i.pingCache;if(v===null?(v=i.pingCache=new LT,l=new Set,v.set(u,l)):(l=v.get(u),l===void 0&&(l=new Set,v.set(u,l))),!l.has(a)){l.add(a);var _=KT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Lo(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
7
+ `+i.stack}return{value:e,source:t,stack:o}}function np(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var LT=typeof WeakMap=="function"?WeakMap:Map;function i0(e,t,n){n=Zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){mu||(mu=!0,lp=r),np(e,t)},n}function s0(e,t,n){n=Zn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return np(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Yt===null?Yt=new Set([this]):Yt.add(this),np(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var AT=typeof WeakSet=="function"?WeakSet:Set;function Dv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){nr(e,n)}else t.current=null}function OT(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:Mt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Dp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function NT(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&&o&1&&(g0(n,e),zT(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:Mt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&yv(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}yv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&LS(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&&cS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Fv(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=Jv("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 jv(e,t){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(Fp,t)}catch{}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)g0(t,n);else{r=t;try{o()}catch(i){nr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Dv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){nr(t,i)}break;case 5:Dv(t);break;case 4:a0(e,t)}}function Hv(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 Bv(e){return e.tag===5||e.tag===3||e.tag===4}function Uv(e){e:{for(var t=e.return;t!==null;){if(Bv(t))break e;t=t.return}throw Error(T(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(T(161))}n.flags&16&&(Ls(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Bv(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?rp(e,n,t):op(e,n,t)}function rp(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=Jl));else if(r!==4&&(e=e.child,e!==null))for(rp(e,t,n),e=e.sibling;e!==null;)rp(e,t,n),e=e.sibling}function op(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(op(e,t,n),e=e.sibling;e!==null;)op(e,t,n),e=e.sibling}function a0(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(T(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(jv(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(jv(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 Ef(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[eu]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Xv(n,r),Df(e,o),t=Df(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?eS(n,a):s==="dangerouslySetInnerHTML"?Zv(n,a):s==="children"?Ls(n,a):gp(n,s,a,t)}switch(e){case"input":Rf(n,r);break;case"textarea":Qv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Oo(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Oo(n,!!r.multiple,r.defaultValue,!0):Oo(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(T(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,cS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Zp=Ae(),Fv(t.child,!0)),zv(t);return;case 19:zv(t);return;case 17:return;case 23:case 24:Fv(t,t.memoizedState!==null);return}throw Error(T(163))}function zv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new AT),t.forEach(function(r){var o=WT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function MT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var DT=Math.ceil,pu=Xr.ReactCurrentDispatcher,Qp=Xr.ReactCurrentOwner,F=0,Be=null,ve=null,Oe=0,qr=0,ip=lr(0),Te=0,ku=null,Go=0,qs=0,Xo=0,Yp=0,sp=null,Zp=0,ap=1/0;function Qo(){ap=Ae()+500}var A=null,mu=!1,lp=null,Yt=null,sr=!1,ks=null,hs=90,up=[],cp=[],hn=null,Ps=0,dp=null,Vl=-1,pn=0,Kl=0,Rs=null,Wl=!1;function nt(){return F&48?Ae():Vl!==-1?Vl:Vl=Ae()}function er(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Ko()===99?1:2;if(pn===0&&(pn=Go),ET.transition!==0){Kl!==0&&(Kl=sp!==null?sp.pendingLanes:0),e=pn;var t=4186112&~Kl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Ko(),F&4&&e===98?e=Yl(12,pn):(e=Tb(e),e=Yl(e,pn)),e}function tr(e,t,n){if(50<Ps)throw Ps=0,dp=null,Error(T(185));if(e=Pu(e,t),e===null)return null;xu(e,t,n),e===Be&&(Xo|=t,Te===4&&Ho(e,Oe));var r=Ko();t===1?F&8&&!(F&48)?fp(e):(wt(e,n),F===0&&(Qo(),en())):(!(F&4)||r!==98&&r!==99||(hn===null?hn=new Set([e]):hn.add(e)),wt(e,n)),sp=e}function Pu(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 wt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-or(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,Co(l);var c=ne;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=Ms(e,e===Be?Oe:0),t=ne,r===0)n!==null&&(n!==vf&&qf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==vf&&qf(n)}t===15?(n=fp.bind(null,e),fn===null?(fn=[n],zl=jp(bu,HS)):fn.push(n),n=vf):t===14?n=Hs(99,fp.bind(null,e)):(n=kb(t),n=Hs(n,l0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function l0(e){if(Vl=-1,Kl=pn=0,F&48)throw Error(T(327));var t=e.callbackNode;if(ur()&&e.callbackNode!==t)return null;var n=Ms(e,e===Be?Oe:0);if(n===0)return null;var r=n,o=F;F|=16;var i=f0();(Be!==e||Oe!==r)&&(Qo(),Bo(e,r));do try{HT();break}catch(a){d0(e,a)}while(1);if(Hp(),pu.current=i,F=o,ve!==null?r=0:(Be=null,Oe=0,r=Te),Go&Xo)Bo(e,0);else if(r!==0){if(r===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Dp(e.containerInfo)),n=yS(e),n!==0&&(r=ys(e,n))),r===1)throw t=ku,Bo(e,0),Ho(e,n),wt(e,Ae()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:jr(e);break;case 3:if(Ho(e,n),(n&62914560)===n&&(r=Zp+500-Ae(),10<r)){if(Ms(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){nt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=uv(jr.bind(null,e),r);break}jr(e);break;case 4:if(Ho(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-or(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Ae()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*DT(n/1960))-n,10<n){e.timeoutHandle=uv(jr.bind(null,e),n);break}jr(e);break;case 5:jr(e);break;default:throw Error(T(329))}}return wt(e,Ae()),e.callbackNode===t?l0.bind(null,e):null}function Ho(e,t){for(t&=~Yp,t&=~Xo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-or(t),r=1<<n;e[n]=-1,t&=~r}}function fp(e){if(F&48)throw Error(T(327));if(ur(),e===Be&&e.expiredLanes&Oe){var t=Oe,n=ys(e,t);Go&Xo&&(t=Ms(e,t),n=ys(e,t))}else t=Ms(e,0),n=ys(e,t);if(e.tag!==0&&n===2&&(F|=64,e.hydrate&&(e.hydrate=!1,Dp(e.containerInfo)),t=yS(e),t!==0&&(n=ys(e,t))),n===1)throw n=ku,Bo(e,0),Ho(e,t),wt(e,Ae()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,jr(e),wt(e,Ae()),null}function FT(){if(hn!==null){var e=hn;hn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,wt(t,Ae())})}en()}function u0(e,t){var n=F;F|=1;try{return e(t)}finally{F=n,F===0&&(Qo(),en())}}function c0(e,t){var n=F;F&=-2,F|=8;try{return e(t)}finally{F=n,F===0&&(Qo(),en())}}function Dl(e,t){de(ip,qr),qr|=t,Go|=t}function Jp(){qr=ip.current,se(ip)}function Bo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yT(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&tu();break;case 3:Wo(),se(qe),se(Ne),Vp();break;case 5:zp(r);break;case 4:Wo();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Bp(r);break;case 23:case 24:Jp()}n=n.return}Be=e,ve=ar(e.current,null),Oe=qr=Go=t,Te=0,ku=null,Yp=Xo=qs=0}function d0(e,t){do{var n=ve;try{if(Hp(),bs.current=fu,lu){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}lu=!1}if(Vs=0,be=Le=ge=null,Ts=!1,Qp.current=null,n===null||n.return===null){Te=1,ku=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Oe,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){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=(ce.current&1)!==0,d=s;do{var y;if(y=d.tag===13){var S=d.memoizedState;if(S!==null)y=S.dehydrated!==null;else{var h=d.memoizedProps;y=h.fallback===void 0?!1:h.unstable_avoidThisFallback!==!0?!0:!f}}if(y){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)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var p=Zn(-1,1);p.tag=2,Jn(a,p)}a.lanes|=1;break e}l=void 0,a=t;var v=i.pingCache;if(v===null?(v=i.pingCache=new LT,l=new Set,v.set(u,l)):(l=v.get(u),l===void 0&&(l=new Set,v.set(u,l))),!l.has(a)){l.add(a);var _=KT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Ao(a.type)||"A React component")+` suspended while rendering, but no fallback UI was specified.
8
8
 
9
- Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Te!==5&&(Te=2),l=Xp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=i0(d,i,t);hv(d,C);break e;case 1:i=l;var E=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yt===null||!Yt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=s0(d,i,t);hv(d,R);break e}}d=d.return}while(d!==null)}m0(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function f0(){var e=pu.current;return pu.current=fu,e===null?fu:e}function hs(e,t){var n=F;F|=16;var r=f0();Be===e&&Oe===t||Ho(e,t);do try{jT();break}catch(o){d0(e,o)}while(1);if(Hp(),F=n,pu.current=r,ve!==null)throw Error(T(261));return Be=null,Oe=0,Te}function jT(){for(;ve!==null;)p0(ve)}function HT(){for(;ve!==null&&!xT();)p0(ve)}function p0(e){var t=h0(e.alternate,e,qr);e.memoizedProps=e.pendingProps,t===null?m0(e):ve=t,Qp.current=null}function m0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=IT(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=RT(n,t,qr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||qr&1073741824||!(n.mode&4)){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)&&(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))}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Te===0&&(Te=5)}function jr(e){var t=Vo();return $r(99,BT.bind(null,e,t)),null}function BT(e,t){do ur();while(Ts!==null);if(F&48)throw Error(T(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(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-or(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(gn!==null&&!(r&24)&&gn.has(e)&&gn.delete(e),e===Be&&(ve=Be=null,Oe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=F,F|=32,Qp.current=null,gf=jl,s=rv(),zf(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{a=null;break e}var c=0,f=-1,d=-1,y=0,S=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&&++y===i&&(f=c),g===l&&++S===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;hf={focusedElem:s,selectionRange:a},jl=!1,Ps=null,Wl=!1,A=r;do try{UT()}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);Ps=null,A=r;do try{for(s=e;A!==null;){var p=A.flags;if(p&16&&Is(A.stateNode,""),p&128){var v=A.alternate;if(v!==null){var _=v.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(p&1038){case 2:Uv(A),A.flags&=-3;break;case 6:Uv(A),A.flags&=-3,Ef(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,Ef(A.alternate,A);break;case 4:Ef(A.alternate,A);break;case 8:a=A,a0(s,a);var C=a.alternate;Hv(a),C!==null&&Hv(C)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);if(_=hf,v=rv(),p=_.focusedElem,s=_.selectionRange,v!==p&&p&&p.ownerDocument&&bS(p.ownerDocument.documentElement,p)){for(s!==null&&zf(p)&&(v=s.start,_=s.end,_===void 0&&(_=v),"selectionStart"in p?(p.selectionStart=v,p.selectionEnd=Math.min(_,p.value.length)):(_=(v=p.ownerDocument||document)&&v.defaultView||window,_.getSelection&&(_=_.getSelection(),a=p.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!_.extend&&C>s&&(a=s,s=C,C=a),a=nv(p,C),i=nv(p,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(v=v.createRange(),v.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(v),_.extend(i.node,i.offset)):(v.setEnd(i.node,i.offset),_.addRange(v)))))),v=[],_=p;_=_.parentNode;)_.nodeType===1&&v.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<v.length;p++)_=v[p],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}jl=!!gf,hf=gf=null,e.current=n,A=r;do try{for(p=e;A!==null;){var E=A.flags;if(E&36&&NT(p,A.alternate,A),E&128){v=void 0;var b=A.ref;if(b!==null){var R=A.stateNode;switch(A.tag){case 5:v=R;break;default:v=R}typeof b=="function"?b(v):b.current=v}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);A=null,wT(),F=o}else e.current=n;if(sr)sr=!1,Ts=e,gs=t;else for(A=r;A!==null;)t=A.nextEffect,A.nextEffect=null,A.flags&8&&(E=A,E.sibling=null,E.stateNode=null),A=t;if(r=e.pendingLanes,r===0&&(Yt=null),r===1?e===dp?ks++:(ks=0,dp=e):ks=0,n=n.stateNode,Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(Fp,n,void 0,(n.current.flags&64)===64)}catch{}if(wt(e,Ae()),mu)throw mu=!1,e=lp,lp=null,e;return F&8||en(),null}function UT(){for(;A!==null;){var e=A.alternate;Wl||Ps===null||(A.flags&8?Vy(A,Ps)&&(Wl=!0):A.tag===13&&MT(e,A)&&Vy(A,Ps)&&(Wl=!0));var t=A.flags;t&256&&OT(e,A),!(t&512)||sr||(sr=!0,js(97,function(){return ur(),null})),A=A.nextEffect}}function ur(){if(gs!==90){var e=97<gs?97:gs;return gs=90,$r(e,VT)}return!1}function zT(e,t){up.push(t,e),sr||(sr=!0,js(97,function(){return ur(),null}))}function g0(e,t){cp.push(t,e),sr||(sr=!0,js(97,function(){return ur(),null}))}function VT(){if(Ts===null)return!1;var e=Ts;if(Ts=null,F&48)throw Error(T(331));var t=F;F|=32;var n=cp;cp=[];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(T(330));nr(i,l)}}for(n=up,up=[],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(T(330));nr(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 F=t,en(),!0}function Vv(e,t,n){t=Xp(n,t),t=i0(e,t,1),Jn(e,t),t=nt(),e=Pu(e,1),e!==null&&(xu(e,1,t),wt(e,t))}function nr(e,t){if(e.tag===3)Vv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Vv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r))){e=Xp(t,e);var o=s0(n,e,1);if(Jn(n,o),o=nt(),n=Pu(n,1),n!==null)xu(n,1,o),wt(n,o);else if(typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function KT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Oe&n)===n&&(Te===4||Te===3&&(Oe&62914560)===Oe&&500>Ae()-Zp?Ho(e,0):Yp|=n),wt(e,t)}function WT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(fn===0&&(fn=qo),t=Co(62914560&~fn),t===0&&(t=4194304)):t=Vo()===99?1:2:t=1),n=nt(),e=Pu(e,t),e!==null&&(xu(e,t,n),wt(e,n))}var h0;h0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Dt=!0;else if(n&r)Dt=!!(e.flags&16384);else{switch(Dt=!1,t.tag){case 3:Rv(t),xf();break;case 5:xv(t);break;case 1:Ge(t.type)&&Ul(t);break;case 4:Qf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(nu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Iv(e,t,n):(de(ce,ce.current&1),t=mn(e,t,n),t!==null?t.sibling:null);de(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Mv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),de(ce,ce.current),r)break;return null;case 23:case 24:return t.lanes=0,_f(e,t,n)}return mn(e,t,n)}else Dt=!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=zo(t,Ne.current),Do(t,n),o=Wp(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,Ge(r)){var i=!0;Ul(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Up(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&iu(t,r,s,e),o.updater=Tu,t.stateNode=o,o._reactInternals=t,Xf(t,r,e,n),t=ep(null,t,r,!0,i,n)}else t.tag=0,$e(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=qT(o),e=Mt(o,e),i){case 0:t=Jf(null,t,o,e,n);break e;case 1:t=Pv(null,t,o,e,n);break e;case 11:t=Tv(null,t,o,e,n);break e;case 14:t=kv(null,t,o,Mt(o.type,e),r,n);break e}throw Error(T(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Jf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Pv(e,t,r,o,n);case 3:if(Rv(t),r=t.updateQueue,e===null||r===null)throw Error(T(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,US(e,t),Hs(t,r,null,n),r=t.memoizedState.element,r===o)xf(),t=mn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Gn=Mo(t.stateNode.containerInfo.firstChild),pn=t,i=Jt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Fo.push(i);for(n=WS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else $e(e,t,r,n),xf();t=t.child}return t;case 5:return xv(t),e===null&&Yf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Wf(r,o)?s=null:i!==null&&Wf(r,i)&&(t.flags|=16),t0(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&Yf(t),null;case 13:return Iv(e,t,n);case 4:return Qf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=su(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Tv(e,t,r,o,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(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(de(nu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=vt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!qe.current){t=mn(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){a.tag===1&&(u=Zn(-1,n&-n),u.tag=2,Jn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),BS(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}$e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Do(t,n),o=_t(o,i.unstable_observedBits),r=r(o),t.flags|=1,$e(e,t,r,n),t.child;case 14:return o=t.type,i=Mt(o,t.pendingProps),i=Mt(o.type,i),kv(e,t,o,i,r,n);case 15:return e0(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ge(r)?(e=!0,Ul(t)):e=!1,Do(t,n),VS(t,r,o),Xf(t,r,o,n),ep(null,t,r,!0,e,n);case 19:return Mv(e,t,n);case 23:return _f(e,t,n);case 24:return _f(e,t,n)}throw Error(T(156,t.tag))};function $T(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 St(e,t,n,r){return new $T(e,t,n,r)}function em(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qT(e){if(typeof e=="function")return em(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yu)return 11;if(e===vu)return 14}return 2}function ar(e,t){var n=e.alternate;return n===null?(n=St(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 $l(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")em(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wn:return Bo(n.children,o,i,t);case $v:s=8,o|=16;break;case hp:s=8,o|=1;break;case ys:return e=St(12,n,t,o|8),e.elementType=ys,e.type=ys,e.lanes=i,e;case vs:return e=St(13,n,t,o),e.type=vs,e.elementType=vs,e.lanes=i,e;case ql:return e=St(19,n,t,o),e.elementType=ql,e.lanes=i,e;case wp:return tm(n,o,i,t);case kf:return e=St(24,n,t,o),e.elementType=kf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yp:s=10;break e;case vp:s=9;break e;case yu:s=11;break e;case vu:s=14;break e;case Sp:s=16,r=null;break e;case xp:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=St(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Bo(e,t,n,r){return e=St(7,e,r,t),e.lanes=n,e}function tm(e,t,n,r){return e=St(23,e,r,t),e.elementType=wp,e.lanes=n,e}function Cf(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function bf(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GT(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=uf(0),this.expirationTimes=uf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uf(0),this.mutableSourceEagerHydrationData=null}function XT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function gu(e,t,n,r){var o=t.current,i=nt(),s=er(o);e:if(n){n=n._reactInternals;t:{if(Qr(n)!==n||n.tag!==1)throw Error(T(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(Ge(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(T(171))}if(n.tag===1){var l=n.type;if(Ge(l)){n=OS(n,l,a);break e}}n=a}else n=ir;return t.context===null?t.context=n:t.pendingContext=n,t=Zn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Jn(o,t),tr(o,s,i),s}function Tf(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 Kv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function nm(e,t){Kv(e,t),(e=e.alternate)&&Kv(e,t)}function QT(){return null}function rm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new GT(e,t,n!=null&&n.hydrate===!0),t=St(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Up(t),e[$o]=n.current,PS(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}rm.prototype.render=function(e){gu(e,this._internalRoot,null,null)};rm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;gu(null,e,null,function(){t[$o]=null})};function qs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function YT(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 rm(e,0,t?{hydrate:!0}:void 0)}function Ru(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=Tf(s);a.call(u)}}gu(t,s,e,o)}else{if(i=n._reactRootContainer=YT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=Tf(s);l.call(u)}}c0(function(){gu(t,s,e,o)})}return Tf(s)}aS=function(e){if(e.tag===13){var t=nt();tr(e,4,t),nm(e,4)}};kp=function(e){if(e.tag===13){var t=nt();tr(e,67108864,t),nm(e,67108864)}};lS=function(e){if(e.tag===13){var t=nt(),n=er(e);tr(e,n,t),nm(e,n)}};uS=function(e,t){return t()};Ff=function(e,t,n){switch(t){case"input":if(Rf(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=Cu(r);if(!o)throw Error(T(90));Gv(r),Rf(r,o)}}}break;case"textarea":Qv(e,n);break;case"select":t=n.value,t!=null&&Ao(e,!!n.multiple,t,!1)}};Cp=u0;rS=function(e,t,n,r,o){var i=F;F|=4;try{return $r(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(Xo(),en())}};bp=function(){!(F&49)&&(FT(),ur())};oS=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(Xo(),en())}};function y0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!qs(t))throw Error(T(200));return XT(e,t,null,n)}var ZT={Events:[Ks,Po,Cu,tS,nS,ur,{current:!1}]},cs={findFiberByHostInstance:Ur,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},JT={bundleType:cs.bundleType,version:cs.version,rendererPackageName:cs.rendererPackageName,rendererConfig:cs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=sS(e),e===null?null:e.stateNode},findFiberByHostInstance:cs.findFiberByHostInstance||QT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ds=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ds.isDisabled&&ds.supportsFiber))try{Fp=ds.inject(JT),Kr=ds}catch{}var ds;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ZT;Et.createPortal=y0;Et.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(T(188)):Error(T(268,Object.keys(e)));return e=sS(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e,t){var n=F;if(n&48)return e(t);F|=1;try{if(e)return $r(99,e.bind(null,t))}finally{F=n,en()}};Et.hydrate=function(e,t,n){if(!qs(t))throw Error(T(200));return Ru(null,e,t,!0,n)};Et.render=function(e,t,n){if(!qs(t))throw Error(T(200));return Ru(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!qs(e))throw Error(T(40));return e._reactRootContainer?(c0(function(){Ru(null,null,e,!1,function(){e._reactRootContainer=null,e[$o]=null})}),!0):!1};Et.unstable_batchedUpdates=u0;Et.unstable_createPortal=function(e,t){return y0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qs(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Ru(e,t,n,!1,r)};Et.version="17.0.2"});var Iu=pe((QO,x0)=>{"use strict";function S0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(S0)}catch(e){console.error(e)}}S0(),x0.exports=v0()});var G0=pe(q0=>{"use strict";var ti=O();function Fk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jk=typeof Object.is=="function"?Object.is:Fk,Hk=ti.useState,Bk=ti.useEffect,Uk=ti.useLayoutEffect,zk=ti.useDebugValue;function Vk(e,t){var n=t(),r=Hk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Uk(function(){o.value=n,o.getSnapshot=t,Im(o)&&i({inst:o})},[e,n,t]),Bk(function(){return Im(o)&&i({inst:o}),e(function(){Im(o)&&i({inst:o})})},[e]),zk(n),n}function Im(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jk(e,n)}catch{return!0}}function Kk(e,t){return t()}var Wk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Kk:Vk;q0.useSyncExternalStore=ti.useSyncExternalStore!==void 0?ti.useSyncExternalStore:Wk});var Lm=pe((FN,X0)=>{"use strict";X0.exports=G0()});var Y0=pe(Q0=>{"use strict";var ju=O(),$k=Lm();function qk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gk=typeof Object.is=="function"?Object.is:qk,Xk=$k.useSyncExternalStore,Qk=ju.useRef,Yk=ju.useEffect,Zk=ju.useMemo,Jk=ju.useDebugValue;Q0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Qk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Zk(function(){function l(y){if(!u){if(u=!0,c=y,y=r(y),o!==void 0&&s.hasValue){var S=s.value;if(o(S,y))return f=S}return f=y}if(S=f,Gk(c,y))return S;var h=r(y);return o!==void 0&&o(S,h)?S:(c=y,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=Xk(e,i[0],i[1]);return Yk(function(){s.hasValue=!0,s.value=a},[a]),Jk(a),a}});var J0=pe((HN,Z0)=>{"use strict";Z0.exports=Y0()});var cx=pe(Q=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,Om=_e?Symbol.for("react.element"):60103,Nm=_e?Symbol.for("react.portal"):60106,zu=_e?Symbol.for("react.fragment"):60107,Vu=_e?Symbol.for("react.strict_mode"):60108,Ku=_e?Symbol.for("react.profiler"):60114,Wu=_e?Symbol.for("react.provider"):60109,$u=_e?Symbol.for("react.context"):60110,Mm=_e?Symbol.for("react.async_mode"):60111,qu=_e?Symbol.for("react.concurrent_mode"):60111,Gu=_e?Symbol.for("react.forward_ref"):60112,Xu=_e?Symbol.for("react.suspense"):60113,rP=_e?Symbol.for("react.suspense_list"):60120,Qu=_e?Symbol.for("react.memo"):60115,Yu=_e?Symbol.for("react.lazy"):60116,oP=_e?Symbol.for("react.block"):60121,iP=_e?Symbol.for("react.fundamental"):60117,sP=_e?Symbol.for("react.responder"):60118,aP=_e?Symbol.for("react.scope"):60119;function it(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Om:switch(e=e.type,e){case Mm:case qu:case zu:case Ku:case Vu:case Xu:return e;default:switch(e=e&&e.$$typeof,e){case $u:case Gu:case Yu:case Qu:case Wu:return e;default:return t}}case Nm:return t}}}function ux(e){return it(e)===qu}Q.AsyncMode=Mm;Q.ConcurrentMode=qu;Q.ContextConsumer=$u;Q.ContextProvider=Wu;Q.Element=Om;Q.ForwardRef=Gu;Q.Fragment=zu;Q.Lazy=Yu;Q.Memo=Qu;Q.Portal=Nm;Q.Profiler=Ku;Q.StrictMode=Vu;Q.Suspense=Xu;Q.isAsyncMode=function(e){return ux(e)||it(e)===Mm};Q.isConcurrentMode=ux;Q.isContextConsumer=function(e){return it(e)===$u};Q.isContextProvider=function(e){return it(e)===Wu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Om};Q.isForwardRef=function(e){return it(e)===Gu};Q.isFragment=function(e){return it(e)===zu};Q.isLazy=function(e){return it(e)===Yu};Q.isMemo=function(e){return it(e)===Qu};Q.isPortal=function(e){return it(e)===Nm};Q.isProfiler=function(e){return it(e)===Ku};Q.isStrictMode=function(e){return it(e)===Vu};Q.isSuspense=function(e){return it(e)===Xu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zu||e===qu||e===Ku||e===Vu||e===Xu||e===rP||typeof e=="object"&&e!==null&&(e.$$typeof===Yu||e.$$typeof===Qu||e.$$typeof===Wu||e.$$typeof===$u||e.$$typeof===Gu||e.$$typeof===iP||e.$$typeof===sP||e.$$typeof===aP||e.$$typeof===oP)};Q.typeOf=it});var fx=pe((JN,dx)=>{"use strict";dx.exports=cx()});var Sx=pe((eM,vx)=>{"use strict";var Dm=fx(),lP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},uP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},cP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fm={};Fm[Dm.ForwardRef]=cP;Fm[Dm.Memo]=hx;function px(e){return Dm.isMemo(e)?hx:Fm[e.$$typeof]||lP}var dP=Object.defineProperty,fP=Object.getOwnPropertyNames,mx=Object.getOwnPropertySymbols,pP=Object.getOwnPropertyDescriptor,mP=Object.getPrototypeOf,gx=Object.prototype;function yx(e,t,n){if(typeof t!="string"){if(gx){var r=mP(t);r&&r!==gx&&yx(e,r,n)}var o=fP(t);mx&&(o=o.concat(mx(t)));for(var i=px(e),s=px(t),a=0;a<o.length;++a){var l=o[a];if(!uP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=pP(t,l);try{dP(e,l,u)}catch{}}}}return e}vx.exports=yx});var _x=pe(Y=>{"use strict";var jm=Symbol.for("react.element"),Hm=Symbol.for("react.portal"),Zu=Symbol.for("react.fragment"),Ju=Symbol.for("react.strict_mode"),ec=Symbol.for("react.profiler"),tc=Symbol.for("react.provider"),nc=Symbol.for("react.context"),gP=Symbol.for("react.server_context"),rc=Symbol.for("react.forward_ref"),oc=Symbol.for("react.suspense"),ic=Symbol.for("react.suspense_list"),sc=Symbol.for("react.memo"),ac=Symbol.for("react.lazy"),hP=Symbol.for("react.offscreen"),xx;xx=Symbol.for("react.module.reference");function bt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jm:switch(e=e.type,e){case Zu:case ec:case Ju:case oc:case ic:return e;default:switch(e=e&&e.$$typeof,e){case gP:case nc:case rc:case ac:case sc:case tc:return e;default:return t}}case Hm:return t}}}Y.ContextConsumer=nc;Y.ContextProvider=tc;Y.Element=jm;Y.ForwardRef=rc;Y.Fragment=Zu;Y.Lazy=ac;Y.Memo=sc;Y.Portal=Hm;Y.Profiler=ec;Y.StrictMode=Ju;Y.Suspense=oc;Y.SuspenseList=ic;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return bt(e)===nc};Y.isContextProvider=function(e){return bt(e)===tc};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jm};Y.isForwardRef=function(e){return bt(e)===rc};Y.isFragment=function(e){return bt(e)===Zu};Y.isLazy=function(e){return bt(e)===ac};Y.isMemo=function(e){return bt(e)===sc};Y.isPortal=function(e){return bt(e)===Hm};Y.isProfiler=function(e){return bt(e)===ec};Y.isStrictMode=function(e){return bt(e)===Ju};Y.isSuspense=function(e){return bt(e)===oc};Y.isSuspenseList=function(e){return bt(e)===ic};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zu||e===ec||e===Ju||e===oc||e===ic||e===hP||typeof e=="object"&&e!==null&&(e.$$typeof===ac||e.$$typeof===sc||e.$$typeof===tc||e.$$typeof===nc||e.$$typeof===rc||e.$$typeof===xx||e.getModuleId!==void 0)};Y.typeOf=bt});var Ex=pe((nM,wx)=>{"use strict";wx.exports=_x()});var d_=pe((iD,c_)=>{"use strict";var GP=/["'&<>]/;c_.exports=XP;function XP(e){var t=""+e,n=GP.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 Dg=pe((x8,Hw)=>{"use strict";var BR="Expected a function",Fw=NaN,UR="[object Symbol]",zR=/^\s+|\s+$/g,VR=/^[-+]0x[0-9a-f]+$/i,KR=/^0b[01]+$/i,WR=/^0o[0-7]+$/i,$R=parseInt,qR=typeof global=="object"&&global&&global.Object===Object&&global,GR=typeof self=="object"&&self&&self.Object===Object&&self,XR=qR||GR||Function("return this")(),QR=Object.prototype,YR=QR.toString,ZR=Math.max,JR=Math.min,Ng=function(){return XR.Date.now()};function eI(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(BR);t=jw(t)||0,Mg(n)&&(c=!!n.leading,f="maxWait"in n,i=f?ZR(jw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(E){var b=r,R=o;return r=o=void 0,u=E,s=e.apply(R,b),s}function S(E){return u=E,a=setTimeout(m,t),c?y(E):s}function h(E){var b=E-l,R=E-u,P=t-b;return f?JR(P,i-R):P}function g(E){var b=E-l,R=E-u;return l===void 0||b>=t||b<0||f&&R>=i}function m(){var E=Ng();if(g(E))return p(E);a=setTimeout(m,h(E))}function p(E){return a=void 0,d&&r?y(E):(r=o=void 0,s)}function v(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:p(Ng())}function C(){var E=Ng(),b=g(E);if(r=arguments,o=this,l=E,b){if(a===void 0)return S(l);if(f)return a=setTimeout(m,t),y(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=v,C.flush=_,C}function Mg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function tI(e){return!!e&&typeof e=="object"}function nI(e){return typeof e=="symbol"||tI(e)&&YR.call(e)==UR}function jw(e){if(typeof e=="number")return e;if(nI(e))return Fw;if(Mg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Mg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(zR,"");var n=KR.test(e);return n||WR.test(e)?$R(e.slice(2),n?2:8):VR.test(e)?Fw:+e}Hw.exports=eI});var KL={};Ce(KL,{Card:()=>me,Chip:()=>sy,ContentEditableInput:()=>uo,DeepdeskAPI:()=>Hn,DeepdeskSDK:()=>Ba,HTTPClient:()=>Wt,InputMediator:()=>bn,InputType:()=>zn,KeyboardHint:()=>ml,Label:()=>gl,Locale:()=>ta,Section:()=>Un,SectionList:()=>hl,Sources:()=>Ot,Suggestion:()=>oe,SuggestionList:()=>ht,TextAreaInput:()=>Tn,ToggleButton:()=>Dr,attachFile:()=>uC,authenticateWithKey:()=>aC,createFullRange:()=>Ni,createOverlayContainer:()=>oo,createRangeFromOffsets:()=>Rr,escapeHTML:()=>Ri,fetchPlatformConfig:()=>lC,formatTextMarkup:()=>sC,getRangeOffsets:()=>Da,getRangeText:()=>Fa,insertCKEditor:()=>iC,isSupportedInputElement:()=>bd,updateContentEditable:()=>oC,updateTextArea:()=>rC,useStyles:()=>k,waitForElementVisibilityChange:()=>Td});var Qa=x(X()),pt=x(O());var Ga=x(O()),Vh=x(X()),Vi=Ga.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Ga.useContext)(Vi),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Vh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Kh={root:"_root_vr71j_1"};var Or=x(w()),Xa=()=>(0,Or.jsxs)("svg",{className:Kh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Or.jsx)("defs",{children:(0,Or.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Or.jsx)("title",{children:"Failed loading image"}),(0,Or.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 Nd={root:"_root_4e7lf_1",imageWrapper:"_imageWrapper_4e7lf_7",image:"_image_4e7lf_7",content:"_content_4e7lf_24",title:"_title_4e7lf_35",contentIsCropped:"_contentIsCropped_4e7lf_45",lineClamp:"_lineClamp_4e7lf_51"};var Nr=x(w()),Ya=(0,pt.createContext)(Nd),RC=({title:e,src:t})=>{let n=(0,pt.useContext)(Ya),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Nr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Nr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Nr.jsx)(Xa,{})})},IC=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)(Ya);return(0,Nr.jsx)("div",{className:(0,Qa.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},LC=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,pt.useContext)(Ya);return pt.default.createElement(e,{className:(0,Qa.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Za=({children:e})=>{let t=k("Card",Nd);return(0,Nr.jsx)("div",{className:(0,Qa.default)(t.root),children:(0,Nr.jsx)(Ya.Provider,{value:t,children:e})})};Za.Image=RC;Za.Content=IC;Za.Title=LC;var me=Za;var Xh={root:"_root_nkim0_1"};var fl=x(O());var Md=function(e,t){return Md=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])},Md(e,t)};function Wi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Md(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var tt=function(){return tt=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},tt.apply(this,arguments)};function Qh(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 Ja(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))}var el;(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"})(el||(el={}));var tl=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var At;(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"})(At||(At={}));var nl;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(nl||(nl={}));function Dd(e){return e.type===At.literal}function Yh(e){return e.type===At.argument}function rl(e){return e.type===At.number}function ol(e){return e.type===At.date}function il(e){return e.type===At.time}function sl(e){return e.type===At.select}function al(e){return e.type===At.plural}function Zh(e){return e.type===At.pound}function ll(e){return e.type===At.tag}function ul(e){return!!(e&&typeof e=="object"&&e.type===nl.number)}function $i(e){return!!(e&&typeof e=="object"&&e.type===nl.dateTime)}function Fd(e){e.forEach(function(t){if(delete t.location,sl(t)||al(t))for(var n in t.options)delete t.options[n].location,Fd(t.options[n].value);else rl(t)&&ul(t.style)||(ol(t)||il(t))&&$i(t.style)?delete t.style.location:ll(t)&&Fd(t.children)})}function Jh(e,t){t===void 0&&(t={}),t=tt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new tl(e,t).parse();if(n.err){var r=SyntaxError(el[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Fd(n.val),n.val}function cl(e,t){var n=t&&t.cache?t.cache:FC,r=t&&t.serializer?t.serializer:DC,o=t&&t.strategy?t.strategy:OC;return o(e,{cache:n,serializer:r})}function AC(e){return e==null||typeof e=="number"||typeof e=="boolean"}function ey(e,t,n,r){var o=AC(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function ty(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function jd(e,t,n,r,o){return n.bind(t,e,r,o)}function OC(e,t){var n=e.length===1?ey:ty;return jd(e,this,n,t.cache.create(),t.serializer)}function NC(e,t){return jd(e,this,ty,t.cache.create(),t.serializer)}function MC(e,t){return jd(e,this,ey,t.cache.create(),t.serializer)}var DC=function(){return JSON.stringify(arguments)};function Hd(){this.cache=Object.create(null)}Hd.prototype.get=function(e){return this.cache[e]};Hd.prototype.set=function(e,t){this.cache[e]=t};var FC={create:function(){return new Hd}},dl={variadic:NC,monadic:MC};var Mr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Mr||(Mr={}));var qi=function(e){Wi(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 Bd=function(e){Wi(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('", "'),'"'),Mr.INVALID_VALUE,i)||this}return t}(qi);var ny=function(e){Wi(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Mr.INVALID_VALUE,o)||this}return t}(qi);var ry=function(e){Wi(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,'"'),Mr.MISSING_VALUE,r)||this}return t}(qi);var Re;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Re||(Re={}));function jC(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Re.literal||n.type!==Re.literal?t.push(n):r.value+=n.value,t},[])}function HC(e){return typeof e=="function"}function Gi(e,t,n,r,o,i,s){if(e.length===1&&Dd(e[0]))return[{type:Re.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Dd(c)){a.push({type:Re.literal,value:c.value});continue}if(Zh(c)){typeof i=="number"&&a.push({type:Re.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new ry(f,s);var d=o[f];if(Yh(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Re.literal:Re.object,value:d});continue}if(ol(c)){var y=typeof c.style=="string"?r.date[c.style]:$i(c.style)?c.style.parsedOptions:void 0;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(il(c)){var y=typeof c.style=="string"?r.time[c.style]:$i(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(rl(c)){var y=typeof c.style=="string"?r.number[c.style]:ul(c.style)?c.style.parsedOptions:void 0;y&&y.scale&&(d=d*(y.scale||1)),a.push({type:Re.literal,value:n.getNumberFormat(t,y).format(d)});continue}if(ll(c)){var S=c.children,h=c.value,g=o[h];if(!HC(g))throw new ny(h,"function",s);var m=Gi(S,t,n,r,o,i),p=g(m.map(function(C){return C.value}));Array.isArray(p)||(p=[p]),a.push.apply(a,p.map(function(C){return{type:typeof C=="string"?Re.literal:Re.object,value:C}}))}if(sl(c)){var v=c.options[d]||c.options.other;if(!v)throw new Bd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Gi(v.value,t,n,r,o));continue}if(al(c)){var v=c.options["=".concat(d)];if(!v){if(!Intl.PluralRules)throw new qi(`Intl.PluralRules is not available in this environment.
9
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Te!==5&&(Te=2),l=Xp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=i0(d,i,t);hv(d,C);break e;case 1:i=l;var E=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Yt===null||!Yt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=s0(d,i,t);hv(d,R);break e}}d=d.return}while(d!==null)}m0(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function f0(){var e=pu.current;return pu.current=fu,e===null?fu:e}function ys(e,t){var n=F;F|=16;var r=f0();Be===e&&Oe===t||Bo(e,t);do try{jT();break}catch(o){d0(e,o)}while(1);if(Hp(),F=n,pu.current=r,ve!==null)throw Error(T(261));return Be=null,Oe=0,Te}function jT(){for(;ve!==null;)p0(ve)}function HT(){for(;ve!==null&&!xT();)p0(ve)}function p0(e){var t=h0(e.alternate,e,qr);e.memoizedProps=e.pendingProps,t===null?m0(e):ve=t,Qp.current=null}function m0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=IT(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=RT(n,t,qr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||qr&1073741824||!(n.mode&4)){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)&&(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))}if(t=t.sibling,t!==null){ve=t;return}ve=t=e}while(t!==null);Te===0&&(Te=5)}function jr(e){var t=Ko();return $r(99,BT.bind(null,e,t)),null}function BT(e,t){do ur();while(ks!==null);if(F&48)throw Error(T(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(T(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-or(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(hn!==null&&!(r&24)&&hn.has(e)&&hn.delete(e),e===Be&&(ve=Be=null,Oe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=F,F|=32,Qp.current=null,gf=jl,s=rv(),zf(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{a=null;break e}var c=0,f=-1,d=-1,y=0,S=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&&++y===i&&(f=c),g===l&&++S===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;hf={focusedElem:s,selectionRange:a},jl=!1,Rs=null,Wl=!1,A=r;do try{UT()}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);Rs=null,A=r;do try{for(s=e;A!==null;){var p=A.flags;if(p&16&&Ls(A.stateNode,""),p&128){var v=A.alternate;if(v!==null){var _=v.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(p&1038){case 2:Uv(A),A.flags&=-3;break;case 6:Uv(A),A.flags&=-3,Ef(A.alternate,A);break;case 1024:A.flags&=-1025;break;case 1028:A.flags&=-1025,Ef(A.alternate,A);break;case 4:Ef(A.alternate,A);break;case 8:a=A,a0(s,a);var C=a.alternate;Hv(a),C!==null&&Hv(C)}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);if(_=hf,v=rv(),p=_.focusedElem,s=_.selectionRange,v!==p&&p&&p.ownerDocument&&bS(p.ownerDocument.documentElement,p)){for(s!==null&&zf(p)&&(v=s.start,_=s.end,_===void 0&&(_=v),"selectionStart"in p?(p.selectionStart=v,p.selectionEnd=Math.min(_,p.value.length)):(_=(v=p.ownerDocument||document)&&v.defaultView||window,_.getSelection&&(_=_.getSelection(),a=p.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!_.extend&&C>s&&(a=s,s=C,C=a),a=nv(p,C),i=nv(p,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(v=v.createRange(),v.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(v),_.extend(i.node,i.offset)):(v.setEnd(i.node,i.offset),_.addRange(v)))))),v=[],_=p;_=_.parentNode;)_.nodeType===1&&v.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<v.length;p++)_=v[p],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}jl=!!gf,hf=gf=null,e.current=n,A=r;do try{for(p=e;A!==null;){var E=A.flags;if(E&36&&NT(p,A.alternate,A),E&128){v=void 0;var b=A.ref;if(b!==null){var R=A.stateNode;switch(A.tag){case 5:v=R;break;default:v=R}typeof b=="function"?b(v):b.current=v}}A=A.nextEffect}}catch(P){if(A===null)throw Error(T(330));nr(A,P),A=A.nextEffect}while(A!==null);A=null,wT(),F=o}else e.current=n;if(sr)sr=!1,ks=e,hs=t;else for(A=r;A!==null;)t=A.nextEffect,A.nextEffect=null,A.flags&8&&(E=A,E.sibling=null,E.stateNode=null),A=t;if(r=e.pendingLanes,r===0&&(Yt=null),r===1?e===dp?Ps++:(Ps=0,dp=e):Ps=0,n=n.stateNode,Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(Fp,n,void 0,(n.current.flags&64)===64)}catch{}if(wt(e,Ae()),mu)throw mu=!1,e=lp,lp=null,e;return F&8||en(),null}function UT(){for(;A!==null;){var e=A.alternate;Wl||Rs===null||(A.flags&8?Vy(A,Rs)&&(Wl=!0):A.tag===13&&MT(e,A)&&Vy(A,Rs)&&(Wl=!0));var t=A.flags;t&256&&OT(e,A),!(t&512)||sr||(sr=!0,Hs(97,function(){return ur(),null})),A=A.nextEffect}}function ur(){if(hs!==90){var e=97<hs?97:hs;return hs=90,$r(e,VT)}return!1}function zT(e,t){up.push(t,e),sr||(sr=!0,Hs(97,function(){return ur(),null}))}function g0(e,t){cp.push(t,e),sr||(sr=!0,Hs(97,function(){return ur(),null}))}function VT(){if(ks===null)return!1;var e=ks;if(ks=null,F&48)throw Error(T(331));var t=F;F|=32;var n=cp;cp=[];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(T(330));nr(i,l)}}for(n=up,up=[],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(T(330));nr(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 F=t,en(),!0}function Vv(e,t,n){t=Xp(n,t),t=i0(e,t,1),Jn(e,t),t=nt(),e=Pu(e,1),e!==null&&(xu(e,1,t),wt(e,t))}function nr(e,t){if(e.tag===3)Vv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){Vv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r))){e=Xp(t,e);var o=s0(n,e,1);if(Jn(n,o),o=nt(),n=Pu(n,1),n!==null)xu(n,1,o),wt(n,o);else if(typeof r.componentDidCatch=="function"&&(Yt===null||!Yt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function KT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=nt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Oe&n)===n&&(Te===4||Te===3&&(Oe&62914560)===Oe&&500>Ae()-Zp?Bo(e,0):Yp|=n),wt(e,t)}function WT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(pn===0&&(pn=Go),t=bo(62914560&~pn),t===0&&(t=4194304)):t=Ko()===99?1:2:t=1),n=nt(),e=Pu(e,t),e!==null&&(xu(e,t,n),wt(e,n))}var h0;h0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||qe.current)Dt=!0;else if(n&r)Dt=!!(e.flags&16384);else{switch(Dt=!1,t.tag){case 3:Rv(t),xf();break;case 5:xv(t);break;case 1:Ge(t.type)&&Ul(t);break;case 4:Qf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(nu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?Iv(e,t,n):(de(ce,ce.current&1),t=gn(e,t,n),t!==null?t.sibling:null);de(ce,ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return Mv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),de(ce,ce.current),r)break;return null;case 23:case 24:return t.lanes=0,_f(e,t,n)}return gn(e,t,n)}else Dt=!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=Vo(t,Ne.current),Fo(t,n),o=Wp(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,Ge(r)){var i=!0;Ul(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Up(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&iu(t,r,s,e),o.updater=Tu,t.stateNode=o,o._reactInternals=t,Xf(t,r,e,n),t=ep(null,t,r,!0,i,n)}else t.tag=0,$e(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=qT(o),e=Mt(o,e),i){case 0:t=Jf(null,t,o,e,n);break e;case 1:t=Pv(null,t,o,e,n);break e;case 11:t=Tv(null,t,o,e,n);break e;case 14:t=kv(null,t,o,Mt(o.type,e),r,n);break e}throw Error(T(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Jf(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Pv(e,t,r,o,n);case 3:if(Rv(t),r=t.updateQueue,e===null||r===null)throw Error(T(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,US(e,t),Bs(t,r,null,n),r=t.memoizedState.element,r===o)xf(),t=gn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Gn=Do(t.stateNode.containerInfo.firstChild),mn=t,i=Jt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],jo.push(i);for(n=WS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else $e(e,t,r,n),xf();t=t.child}return t;case 5:return xv(t),e===null&&Yf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Wf(r,o)?s=null:i!==null&&Wf(r,i)&&(t.flags|=16),t0(e,t),$e(e,t,s,n),t.child;case 6:return e===null&&Yf(t),null;case 13:return Iv(e,t,n);case 4:return Qf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=su(t,null,r,n):$e(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),Tv(e,t,r,o,n);case 7:return $e(e,t,t.pendingProps,n),t.child;case 8:return $e(e,t,t.pendingProps.children,n),t.child;case 12:return $e(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(de(nu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=vt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!qe.current){t=gn(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){a.tag===1&&(u=Zn(-1,n&-n),u.tag=2,Jn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),BS(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}$e(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Fo(t,n),o=_t(o,i.unstable_observedBits),r=r(o),t.flags|=1,$e(e,t,r,n),t.child;case 14:return o=t.type,i=Mt(o,t.pendingProps),i=Mt(o.type,i),kv(e,t,o,i,r,n);case 15:return e0(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Mt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Ge(r)?(e=!0,Ul(t)):e=!1,Fo(t,n),VS(t,r,o),Xf(t,r,o,n),ep(null,t,r,!0,e,n);case 19:return Mv(e,t,n);case 23:return _f(e,t,n);case 24:return _f(e,t,n)}throw Error(T(156,t.tag))};function $T(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 St(e,t,n,r){return new $T(e,t,n,r)}function em(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qT(e){if(typeof e=="function")return em(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yu)return 11;if(e===vu)return 14}return 2}function ar(e,t){var n=e.alternate;return n===null?(n=St(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 $l(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")em(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wn:return Uo(n.children,o,i,t);case $v:s=8,o|=16;break;case hp:s=8,o|=1;break;case vs:return e=St(12,n,t,o|8),e.elementType=vs,e.type=vs,e.lanes=i,e;case Ss:return e=St(13,n,t,o),e.type=Ss,e.elementType=Ss,e.lanes=i,e;case ql:return e=St(19,n,t,o),e.elementType=ql,e.lanes=i,e;case wp:return tm(n,o,i,t);case kf:return e=St(24,n,t,o),e.elementType=kf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yp:s=10;break e;case vp:s=9;break e;case yu:s=11;break e;case vu:s=14;break e;case Sp:s=16,r=null;break e;case xp:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=St(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Uo(e,t,n,r){return e=St(7,e,r,t),e.lanes=n,e}function tm(e,t,n,r){return e=St(23,e,r,t),e.elementType=wp,e.lanes=n,e}function Cf(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function bf(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GT(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=uf(0),this.expirationTimes=uf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uf(0),this.mutableSourceEagerHydrationData=null}function XT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function gu(e,t,n,r){var o=t.current,i=nt(),s=er(o);e:if(n){n=n._reactInternals;t:{if(Qr(n)!==n||n.tag!==1)throw Error(T(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(Ge(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(T(171))}if(n.tag===1){var l=n.type;if(Ge(l)){n=OS(n,l,a);break e}}n=a}else n=ir;return t.context===null?t.context=n:t.pendingContext=n,t=Zn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Jn(o,t),tr(o,s,i),s}function Tf(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 Kv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function nm(e,t){Kv(e,t),(e=e.alternate)&&Kv(e,t)}function QT(){return null}function rm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new GT(e,t,n!=null&&n.hydrate===!0),t=St(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Up(t),e[qo]=n.current,PS(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}rm.prototype.render=function(e){gu(e,this._internalRoot,null,null)};rm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;gu(null,e,null,function(){t[qo]=null})};function Gs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function YT(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 rm(e,0,t?{hydrate:!0}:void 0)}function Ru(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=Tf(s);a.call(u)}}gu(t,s,e,o)}else{if(i=n._reactRootContainer=YT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=Tf(s);l.call(u)}}c0(function(){gu(t,s,e,o)})}return Tf(s)}aS=function(e){if(e.tag===13){var t=nt();tr(e,4,t),nm(e,4)}};kp=function(e){if(e.tag===13){var t=nt();tr(e,67108864,t),nm(e,67108864)}};lS=function(e){if(e.tag===13){var t=nt(),n=er(e);tr(e,n,t),nm(e,n)}};uS=function(e,t){return t()};Ff=function(e,t,n){switch(t){case"input":if(Rf(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=Cu(r);if(!o)throw Error(T(90));Gv(r),Rf(r,o)}}}break;case"textarea":Qv(e,n);break;case"select":t=n.value,t!=null&&Oo(e,!!n.multiple,t,!1)}};Cp=u0;rS=function(e,t,n,r,o){var i=F;F|=4;try{return $r(98,e.bind(null,t,n,r,o))}finally{F=i,F===0&&(Qo(),en())}};bp=function(){!(F&49)&&(FT(),ur())};oS=function(e,t){var n=F;F|=2;try{return e(t)}finally{F=n,F===0&&(Qo(),en())}};function y0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Gs(t))throw Error(T(200));return XT(e,t,null,n)}var ZT={Events:[Ws,Ro,Cu,tS,nS,ur,{current:!1}]},ds={findFiberByHostInstance:Ur,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},JT={bundleType:ds.bundleType,version:ds.version,rendererPackageName:ds.rendererPackageName,rendererConfig:ds.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Xr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=sS(e),e===null?null:e.stateNode},findFiberByHostInstance:ds.findFiberByHostInstance||QT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(fs=__REACT_DEVTOOLS_GLOBAL_HOOK__,!fs.isDisabled&&fs.supportsFiber))try{Fp=fs.inject(JT),Kr=fs}catch{}var fs;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ZT;Et.createPortal=y0;Et.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(T(188)):Error(T(268,Object.keys(e)));return e=sS(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e,t){var n=F;if(n&48)return e(t);F|=1;try{if(e)return $r(99,e.bind(null,t))}finally{F=n,en()}};Et.hydrate=function(e,t,n){if(!Gs(t))throw Error(T(200));return Ru(null,e,t,!0,n)};Et.render=function(e,t,n){if(!Gs(t))throw Error(T(200));return Ru(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!Gs(e))throw Error(T(40));return e._reactRootContainer?(c0(function(){Ru(null,null,e,!1,function(){e._reactRootContainer=null,e[qo]=null})}),!0):!1};Et.unstable_batchedUpdates=u0;Et.unstable_createPortal=function(e,t){return y0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gs(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Ru(e,t,n,!1,r)};Et.version="17.0.2"});var Iu=pe((QO,x0)=>{"use strict";function S0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(S0)}catch(e){console.error(e)}}S0(),x0.exports=v0()});var G0=pe(q0=>{"use strict";var ni=O();function Fk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jk=typeof Object.is=="function"?Object.is:Fk,Hk=ni.useState,Bk=ni.useEffect,Uk=ni.useLayoutEffect,zk=ni.useDebugValue;function Vk(e,t){var n=t(),r=Hk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Uk(function(){o.value=n,o.getSnapshot=t,Im(o)&&i({inst:o})},[e,n,t]),Bk(function(){return Im(o)&&i({inst:o}),e(function(){Im(o)&&i({inst:o})})},[e]),zk(n),n}function Im(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jk(e,n)}catch{return!0}}function Kk(e,t){return t()}var Wk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Kk:Vk;q0.useSyncExternalStore=ni.useSyncExternalStore!==void 0?ni.useSyncExternalStore:Wk});var Lm=pe((FN,X0)=>{"use strict";X0.exports=G0()});var Y0=pe(Q0=>{"use strict";var ju=O(),$k=Lm();function qk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Gk=typeof Object.is=="function"?Object.is:qk,Xk=$k.useSyncExternalStore,Qk=ju.useRef,Yk=ju.useEffect,Zk=ju.useMemo,Jk=ju.useDebugValue;Q0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Qk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Zk(function(){function l(y){if(!u){if(u=!0,c=y,y=r(y),o!==void 0&&s.hasValue){var S=s.value;if(o(S,y))return f=S}return f=y}if(S=f,Gk(c,y))return S;var h=r(y);return o!==void 0&&o(S,h)?S:(c=y,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=Xk(e,i[0],i[1]);return Yk(function(){s.hasValue=!0,s.value=a},[a]),Jk(a),a}});var J0=pe((HN,Z0)=>{"use strict";Z0.exports=Y0()});var cx=pe(Q=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,Om=_e?Symbol.for("react.element"):60103,Nm=_e?Symbol.for("react.portal"):60106,zu=_e?Symbol.for("react.fragment"):60107,Vu=_e?Symbol.for("react.strict_mode"):60108,Ku=_e?Symbol.for("react.profiler"):60114,Wu=_e?Symbol.for("react.provider"):60109,$u=_e?Symbol.for("react.context"):60110,Mm=_e?Symbol.for("react.async_mode"):60111,qu=_e?Symbol.for("react.concurrent_mode"):60111,Gu=_e?Symbol.for("react.forward_ref"):60112,Xu=_e?Symbol.for("react.suspense"):60113,rP=_e?Symbol.for("react.suspense_list"):60120,Qu=_e?Symbol.for("react.memo"):60115,Yu=_e?Symbol.for("react.lazy"):60116,oP=_e?Symbol.for("react.block"):60121,iP=_e?Symbol.for("react.fundamental"):60117,sP=_e?Symbol.for("react.responder"):60118,aP=_e?Symbol.for("react.scope"):60119;function it(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Om:switch(e=e.type,e){case Mm:case qu:case zu:case Ku:case Vu:case Xu:return e;default:switch(e=e&&e.$$typeof,e){case $u:case Gu:case Yu:case Qu:case Wu:return e;default:return t}}case Nm:return t}}}function ux(e){return it(e)===qu}Q.AsyncMode=Mm;Q.ConcurrentMode=qu;Q.ContextConsumer=$u;Q.ContextProvider=Wu;Q.Element=Om;Q.ForwardRef=Gu;Q.Fragment=zu;Q.Lazy=Yu;Q.Memo=Qu;Q.Portal=Nm;Q.Profiler=Ku;Q.StrictMode=Vu;Q.Suspense=Xu;Q.isAsyncMode=function(e){return ux(e)||it(e)===Mm};Q.isConcurrentMode=ux;Q.isContextConsumer=function(e){return it(e)===$u};Q.isContextProvider=function(e){return it(e)===Wu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Om};Q.isForwardRef=function(e){return it(e)===Gu};Q.isFragment=function(e){return it(e)===zu};Q.isLazy=function(e){return it(e)===Yu};Q.isMemo=function(e){return it(e)===Qu};Q.isPortal=function(e){return it(e)===Nm};Q.isProfiler=function(e){return it(e)===Ku};Q.isStrictMode=function(e){return it(e)===Vu};Q.isSuspense=function(e){return it(e)===Xu};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zu||e===qu||e===Ku||e===Vu||e===Xu||e===rP||typeof e=="object"&&e!==null&&(e.$$typeof===Yu||e.$$typeof===Qu||e.$$typeof===Wu||e.$$typeof===$u||e.$$typeof===Gu||e.$$typeof===iP||e.$$typeof===sP||e.$$typeof===aP||e.$$typeof===oP)};Q.typeOf=it});var fx=pe((JN,dx)=>{"use strict";dx.exports=cx()});var Sx=pe((eM,vx)=>{"use strict";var Dm=fx(),lP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},uP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},cP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},hx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Fm={};Fm[Dm.ForwardRef]=cP;Fm[Dm.Memo]=hx;function px(e){return Dm.isMemo(e)?hx:Fm[e.$$typeof]||lP}var dP=Object.defineProperty,fP=Object.getOwnPropertyNames,mx=Object.getOwnPropertySymbols,pP=Object.getOwnPropertyDescriptor,mP=Object.getPrototypeOf,gx=Object.prototype;function yx(e,t,n){if(typeof t!="string"){if(gx){var r=mP(t);r&&r!==gx&&yx(e,r,n)}var o=fP(t);mx&&(o=o.concat(mx(t)));for(var i=px(e),s=px(t),a=0;a<o.length;++a){var l=o[a];if(!uP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=pP(t,l);try{dP(e,l,u)}catch{}}}}return e}vx.exports=yx});var _x=pe(Y=>{"use strict";var jm=Symbol.for("react.element"),Hm=Symbol.for("react.portal"),Zu=Symbol.for("react.fragment"),Ju=Symbol.for("react.strict_mode"),ec=Symbol.for("react.profiler"),tc=Symbol.for("react.provider"),nc=Symbol.for("react.context"),gP=Symbol.for("react.server_context"),rc=Symbol.for("react.forward_ref"),oc=Symbol.for("react.suspense"),ic=Symbol.for("react.suspense_list"),sc=Symbol.for("react.memo"),ac=Symbol.for("react.lazy"),hP=Symbol.for("react.offscreen"),xx;xx=Symbol.for("react.module.reference");function bt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jm:switch(e=e.type,e){case Zu:case ec:case Ju:case oc:case ic:return e;default:switch(e=e&&e.$$typeof,e){case gP:case nc:case rc:case ac:case sc:case tc:return e;default:return t}}case Hm:return t}}}Y.ContextConsumer=nc;Y.ContextProvider=tc;Y.Element=jm;Y.ForwardRef=rc;Y.Fragment=Zu;Y.Lazy=ac;Y.Memo=sc;Y.Portal=Hm;Y.Profiler=ec;Y.StrictMode=Ju;Y.Suspense=oc;Y.SuspenseList=ic;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return bt(e)===nc};Y.isContextProvider=function(e){return bt(e)===tc};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jm};Y.isForwardRef=function(e){return bt(e)===rc};Y.isFragment=function(e){return bt(e)===Zu};Y.isLazy=function(e){return bt(e)===ac};Y.isMemo=function(e){return bt(e)===sc};Y.isPortal=function(e){return bt(e)===Hm};Y.isProfiler=function(e){return bt(e)===ec};Y.isStrictMode=function(e){return bt(e)===Ju};Y.isSuspense=function(e){return bt(e)===oc};Y.isSuspenseList=function(e){return bt(e)===ic};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Zu||e===ec||e===Ju||e===oc||e===ic||e===hP||typeof e=="object"&&e!==null&&(e.$$typeof===ac||e.$$typeof===sc||e.$$typeof===tc||e.$$typeof===nc||e.$$typeof===rc||e.$$typeof===xx||e.getModuleId!==void 0)};Y.typeOf=bt});var Ex=pe((nM,wx)=>{"use strict";wx.exports=_x()});var d_=pe((iD,c_)=>{"use strict";var GP=/["'&<>]/;c_.exports=XP;function XP(e){var t=""+e,n=GP.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 Dg=pe((x8,Hw)=>{"use strict";var BR="Expected a function",Fw=NaN,UR="[object Symbol]",zR=/^\s+|\s+$/g,VR=/^[-+]0x[0-9a-f]+$/i,KR=/^0b[01]+$/i,WR=/^0o[0-7]+$/i,$R=parseInt,qR=typeof global=="object"&&global&&global.Object===Object&&global,GR=typeof self=="object"&&self&&self.Object===Object&&self,XR=qR||GR||Function("return this")(),QR=Object.prototype,YR=QR.toString,ZR=Math.max,JR=Math.min,Ng=function(){return XR.Date.now()};function eI(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(BR);t=jw(t)||0,Mg(n)&&(c=!!n.leading,f="maxWait"in n,i=f?ZR(jw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function y(E){var b=r,R=o;return r=o=void 0,u=E,s=e.apply(R,b),s}function S(E){return u=E,a=setTimeout(m,t),c?y(E):s}function h(E){var b=E-l,R=E-u,P=t-b;return f?JR(P,i-R):P}function g(E){var b=E-l,R=E-u;return l===void 0||b>=t||b<0||f&&R>=i}function m(){var E=Ng();if(g(E))return p(E);a=setTimeout(m,h(E))}function p(E){return a=void 0,d&&r?y(E):(r=o=void 0,s)}function v(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:p(Ng())}function C(){var E=Ng(),b=g(E);if(r=arguments,o=this,l=E,b){if(a===void 0)return S(l);if(f)return a=setTimeout(m,t),y(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=v,C.flush=_,C}function Mg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function tI(e){return!!e&&typeof e=="object"}function nI(e){return typeof e=="symbol"||tI(e)&&YR.call(e)==UR}function jw(e){if(typeof e=="number")return e;if(nI(e))return Fw;if(Mg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Mg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(zR,"");var n=KR.test(e);return n||WR.test(e)?$R(e.slice(2),n?2:8):VR.test(e)?Fw:+e}Hw.exports=eI});var KL={};Ce(KL,{Card:()=>me,Chip:()=>sy,ContentEditableInput:()=>co,DeepdeskAPI:()=>Hn,DeepdeskSDK:()=>Ba,HTTPClient:()=>Wt,InputMediator:()=>bn,InputType:()=>zn,KeyboardHint:()=>ml,Label:()=>gl,Locale:()=>na,Section:()=>Un,SectionList:()=>hl,Sources:()=>Ot,Suggestion:()=>oe,SuggestionList:()=>ht,TextAreaInput:()=>Tn,ToggleButton:()=>Dr,attachFile:()=>uC,authenticateWithKey:()=>aC,createFullRange:()=>Mi,createOverlayContainer:()=>io,createRangeFromOffsets:()=>Rr,escapeHTML:()=>Ii,fetchPlatformConfig:()=>lC,formatTextMarkup:()=>sC,getRangeOffsets:()=>Da,getRangeText:()=>Fa,insertCKEditor:()=>iC,isSupportedInputElement:()=>bd,updateContentEditable:()=>oC,updateTextArea:()=>rC,useStyles:()=>k,waitForElementVisibilityChange:()=>Td});var Qa=x(X()),pt=x(O());var Ga=x(O()),Vh=x(X()),Ki=Ga.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Ga.useContext)(Ki),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Vh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Kh={root:"_root_vr71j_1"};var Or=x(w()),Xa=()=>(0,Or.jsxs)("svg",{className:Kh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Or.jsx)("defs",{children:(0,Or.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Or.jsx)("title",{children:"Failed loading image"}),(0,Or.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 Nd={root:"_root_4e7lf_1",imageWrapper:"_imageWrapper_4e7lf_7",image:"_image_4e7lf_7",content:"_content_4e7lf_24",title:"_title_4e7lf_35",contentIsCropped:"_contentIsCropped_4e7lf_45",lineClamp:"_lineClamp_4e7lf_51"};var Nr=x(w()),Ya=(0,pt.createContext)(Nd),RC=({title:e,src:t})=>{let n=(0,pt.useContext)(Ya),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Nr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Nr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Nr.jsx)(Xa,{})})},IC=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)(Ya);return(0,Nr.jsx)("div",{className:(0,Qa.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},LC=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,pt.useContext)(Ya);return pt.default.createElement(e,{className:(0,Qa.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Za=({children:e})=>{let t=k("Card",Nd);return(0,Nr.jsx)("div",{className:(0,Qa.default)(t.root),children:(0,Nr.jsx)(Ya.Provider,{value:t,children:e})})};Za.Image=RC;Za.Content=IC;Za.Title=LC;var me=Za;var Xh={root:"_root_nkim0_1"};var fl=x(O());var Md=function(e,t){return Md=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])},Md(e,t)};function $i(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Md(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var tt=function(){return tt=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},tt.apply(this,arguments)};function Qh(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 Ja(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))}var el;(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"})(el||(el={}));var tl=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var At;(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"})(At||(At={}));var nl;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(nl||(nl={}));function Dd(e){return e.type===At.literal}function Yh(e){return e.type===At.argument}function rl(e){return e.type===At.number}function ol(e){return e.type===At.date}function il(e){return e.type===At.time}function sl(e){return e.type===At.select}function al(e){return e.type===At.plural}function Zh(e){return e.type===At.pound}function ll(e){return e.type===At.tag}function ul(e){return!!(e&&typeof e=="object"&&e.type===nl.number)}function qi(e){return!!(e&&typeof e=="object"&&e.type===nl.dateTime)}function Fd(e){e.forEach(function(t){if(delete t.location,sl(t)||al(t))for(var n in t.options)delete t.options[n].location,Fd(t.options[n].value);else rl(t)&&ul(t.style)||(ol(t)||il(t))&&qi(t.style)?delete t.style.location:ll(t)&&Fd(t.children)})}function Jh(e,t){t===void 0&&(t={}),t=tt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new tl(e,t).parse();if(n.err){var r=SyntaxError(el[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Fd(n.val),n.val}function cl(e,t){var n=t&&t.cache?t.cache:FC,r=t&&t.serializer?t.serializer:DC,o=t&&t.strategy?t.strategy:OC;return o(e,{cache:n,serializer:r})}function AC(e){return e==null||typeof e=="number"||typeof e=="boolean"}function ey(e,t,n,r){var o=AC(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function ty(e,t,n){var r=Array.prototype.slice.call(arguments,3),o=n(r),i=t.get(o);return typeof i>"u"&&(i=e.apply(this,r),t.set(o,i)),i}function jd(e,t,n,r,o){return n.bind(t,e,r,o)}function OC(e,t){var n=e.length===1?ey:ty;return jd(e,this,n,t.cache.create(),t.serializer)}function NC(e,t){return jd(e,this,ty,t.cache.create(),t.serializer)}function MC(e,t){return jd(e,this,ey,t.cache.create(),t.serializer)}var DC=function(){return JSON.stringify(arguments)};function Hd(){this.cache=Object.create(null)}Hd.prototype.get=function(e){return this.cache[e]};Hd.prototype.set=function(e,t){this.cache[e]=t};var FC={create:function(){return new Hd}},dl={variadic:NC,monadic:MC};var Mr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Mr||(Mr={}));var Gi=function(e){$i(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 Bd=function(e){$i(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('", "'),'"'),Mr.INVALID_VALUE,i)||this}return t}(Gi);var ny=function(e){$i(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Mr.INVALID_VALUE,o)||this}return t}(Gi);var ry=function(e){$i(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,'"'),Mr.MISSING_VALUE,r)||this}return t}(Gi);var Re;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Re||(Re={}));function jC(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Re.literal||n.type!==Re.literal?t.push(n):r.value+=n.value,t},[])}function HC(e){return typeof e=="function"}function Xi(e,t,n,r,o,i,s){if(e.length===1&&Dd(e[0]))return[{type:Re.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Dd(c)){a.push({type:Re.literal,value:c.value});continue}if(Zh(c)){typeof i=="number"&&a.push({type:Re.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new ry(f,s);var d=o[f];if(Yh(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Re.literal:Re.object,value:d});continue}if(ol(c)){var y=typeof c.style=="string"?r.date[c.style]:qi(c.style)?c.style.parsedOptions:void 0;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(il(c)){var y=typeof c.style=="string"?r.time[c.style]:qi(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Re.literal,value:n.getDateTimeFormat(t,y).format(d)});continue}if(rl(c)){var y=typeof c.style=="string"?r.number[c.style]:ul(c.style)?c.style.parsedOptions:void 0;y&&y.scale&&(d=d*(y.scale||1)),a.push({type:Re.literal,value:n.getNumberFormat(t,y).format(d)});continue}if(ll(c)){var S=c.children,h=c.value,g=o[h];if(!HC(g))throw new ny(h,"function",s);var m=Xi(S,t,n,r,o,i),p=g(m.map(function(C){return C.value}));Array.isArray(p)||(p=[p]),a.push.apply(a,p.map(function(C){return{type:typeof C=="string"?Re.literal:Re.object,value:C}}))}if(sl(c)){var v=c.options[d]||c.options.other;if(!v)throw new Bd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Xi(v.value,t,n,r,o));continue}if(al(c)){var v=c.options["=".concat(d)];if(!v){if(!Intl.PluralRules)throw new Gi(`Intl.PluralRules is not available in this environment.
10
10
  Try polyfilling it using "@formatjs/intl-pluralrules"
11
- `,Mr.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));v=c.options[_]||c.options.other}if(!v)throw new Bd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Gi(v.value,t,n,r,o,d-(c.offset||0)));continue}}return jC(a)}function BC(e,t){return t?tt(tt(tt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=tt(tt({},e[r]),t[r]||{}),n},{})):e}function UC(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=BC(e[r],t[r]),n},tt({},e)):e}function Ud(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function zC(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:cl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Ja([void 0],n,!1)))},{cache:Ud(e.number),strategy:dl.variadic}),getDateTimeFormat:cl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Ja([void 0],n,!1)))},{cache:Ud(e.dateTime),strategy:dl.variadic}),getPluralRules:cl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Ja([void 0],n,!1)))},{cache:Ud(e.pluralRules),strategy:dl.variadic})}}var oy=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,y){return!d.length||y.type!==Re.literal||typeof d[d.length-1]!="string"?d.push(y.value):d[d.length-1]+=y.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Gi(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=Qh(s,["formatters"]);this.ast=e.__parse(t,tt(tt({},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=UC(e.formats,r),this.formatters=o&&o.formatters||zC(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>"u")){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=Jh,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 VC(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var KC="dummy",zd=(0,fl.createContext)(null);function j(e){let t=(0,fl.useContext)(zd);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=e[t]??{};return(r,o)=>{let i=VC(n,r);return i?new oy(i).format(o):(t!==KC&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Vd={};Ce(Vd,{enUS:()=>WC,nlNL:()=>$C});var WC={experimental:[{type:0,value:"Experimental"}]},$C={experimental:[{type:0,value:"Experimenteel"}]};var Kd=x(w()),iy=({children:e})=>{let t=k("Chip",Xh);return(0,Kd.jsx)("span",{className:t.root,children:e})},pl=()=>{let e=j(Vd);return(0,Kd.jsx)(iy,{children:e("experimental")})},sy=iy;var ly=x(X());var ay={root:"_root_cq1yq_1"};var uy=x(w());var qC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},GC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",ay);return(0,uy.jsx)("span",{"data-key":qC[t],className:(0,ly.default)(e,r.root),...n})},ml=GC;var dy=x(X());var cy={root:"_root_4a08n_1"};var fy=x(w()),XC=({className:e,children:t,...n})=>{let r=k("Label",cy);return(0,fy.jsx)("span",{...n,className:(0,dy.default)(e,r.root),children:t})},gl=XC;var py={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var go=x(w()),QC=({title:e,children:t,type:n,...r})=>{let o=k("Section",py);return(0,go.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,go.jsx)("div",{className:o.subTitleContainer,children:(0,go.jsx)("span",{className:o.subtitle,children:e})}),(0,go.jsx)("div",{className:o.suggestions,children:t})]})},Un=QC;var gy=x(X()),hy=x(O());var my={root:"_root_19wxp_1"};var yy=x(w()),YC=hy.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",my);return(0,yy.jsx)("div",{ref:n,className:(0,gy.default)(r.root,e),children:t})}),hl=YC;var Xi=x(X()),gt=x(O());var Wd={root:"_root_fsa1k_10",fadein:"_fadein_fsa1k_1",isClickable:"_isClickable_fsa1k_45",isSelected:"_isSelected_fsa1k_50",actions:"_actions_fsa1k_74",actionsIsFixed:"_actionsIsFixed_fsa1k_96",actionButton:"_actionButton_fsa1k_104",dropdownList:"_dropdownList_fsa1k_125",dropdownButton:"_dropdownButton_fsa1k_140",dropdownItem:"_dropdownItem_fsa1k_150",dropdownItemButton:"_dropdownItemButton_fsa1k_159",actionButtonIsPrimary:"_actionButtonIsPrimary_fsa1k_173",actionButtonIsDisabled:"_actionButtonIsDisabled_fsa1k_177",labels:"_labels_fsa1k_185",label:"_label_fsa1k_185"};var mt=x(w()),ho=(0,gt.createContext)(Wd),ZC=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(ho);return(0,mt.jsx)("div",{...n,className:(0,Xi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},JC=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(ho);return(0,mt.jsxs)("div",{className:(0,Xi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,mt.jsx)("ul",{className:i.dropdownList,children:o})]})},eb=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(ho);return(0,mt.jsx)("li",{className:r.dropdownItem,children:(0,mt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},tb=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(ho);return(0,mt.jsx)("button",{type:"button",className:(0,Xi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},$d=({labels:e})=>{let t=(0,gt.useContext)(ho);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},yo=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Wd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,Xi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(ho.Provider,{value:a,children:r})})});yo.Labels=$d;yo.Actions=ZC;yo.ActionButton=tb;yo.DropdownButton=JC;yo.DropdownItem=eb;var oe=yo;var Sy=x(X());var vy={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var xy=x(w()),nb=({withDivider:e,children:t})=>{let n=k("SuggestionList",vy);return(0,xy.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Sy.default)(n.root,{[n.isWithDivider]:e}),children:t})},ht=nb;var wy=x(X());var _y={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var yl=x(w()),rb=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",_y);return(0,yl.jsx)("button",{type:"button",className:(0,wy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,yl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,yl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Dr=rb;var Ey=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,vo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Cy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Ot=(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))(Ot||{}),zn=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(zn||{});var $t=x(Iu());var c1=x(O());function Ct(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!1)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 yn(e){return!!e&&!!e[le]}function Ft(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)===ak}(e)||Array.isArray(e)||!!e[k0]||!!(!((t=e.constructor)===null||t===void 0)&&t[k0])||fm(e)||pm(e))}function Zr(e,t,n){n===void 0&&(n=!1),Zo(e)===0?(n?Object.keys:Yo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Zo(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:fm(e)?2:pm(e)?3:0}function Qo(e,t){return Zo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ek(e,t){return Zo(e)===2?e.get(t):e[t]}function P0(e,t,n){var r=Zo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function R0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function fm(e){return ik&&e instanceof Map}function pm(e){return sk&&e instanceof Set}function cr(e){return e.o||e.t}function mm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=A0(e);delete t[le];for(var n=Yo(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 gm(e,t){return t===void 0&&(t=!1),hm(e)||yn(e)||!Ft(e)||(Zo(e)>1&&(e.set=e.add=e.clear=e.delete=tk),Object.freeze(e),t&&Zr(e,function(n,r){return gm(r,!0)},!0)),e}function tk(){Ct(2)}function hm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tn(e){var t=dm[e];return t||Ct(18,e),t}function nk(e,t){dm[e]||(dm[e]=t)}function lm(){return Xs}function om(e,t){t&&(tn("Patches"),e.u=[],e.s=[],e.v=t)}function Lu(e){um(e),e.p.forEach(rk),e.p=null}function um(e){e===Xs&&(Xs=e.l)}function _0(e){return Xs={p:[],l:Xs,h:e,m:!0,_:0}}function rk(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function im(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||tn("ES5").S(t,e,r),r?(n[le].P&&(Lu(t),Ct(4)),Ft(e)&&(e=Au(t,e),t.l||Ou(t,e)),t.u&&tn("Patches").M(n[le].t,e,t.u,t.s)):e=Au(t,n,[]),Lu(t),t.u&&t.v(t.u,t.s),e!==L0?e:void 0}function Au(e,t,n){if(hm(t))return t;var r=t[le];if(!r)return Zr(t,function(a,l){return w0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Ou(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=mm(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Zr(i,function(a,l){return w0(e,r,o,a,l,n,s)}),Ou(e,o,!1),n&&e.u&&tn("Patches").N(r,n,e.u,e.s)}return r.o}function w0(e,t,n,r,o,i,s){if(yn(o)){var a=Au(e,o,i&&t&&t.i!==3&&!Qo(t.R,r)?i.concat(r):void 0);if(P0(n,r,a),!yn(a))return;e.m=!1}else s&&n.add(o);if(Ft(o)&&!hm(o)){if(!e.h.D&&e._<1)return;Au(e,o),t&&t.A.l||Ou(e,o)}}function Ou(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&gm(t,n)}function sm(e,t){var n=e[le];return(n?cr(n):e)[t]}function E0(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 dr(e){e.P||(e.P=!0,e.l&&dr(e.l))}function am(e){e.o||(e.o=mm(e.t))}function cm(e,t,n){var r=fm(t)?tn("MapSet").F(t,n):pm(t)?tn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:lm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Qs;s&&(l=[a],u=Gs);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):tn("ES5").J(t,n);return(n?n.A:lm()).p.push(r),r}function ok(e){return yn(e)||Ct(22,e),function t(n){if(!Ft(n))return n;var r,o=n[le],i=Zo(n);if(o){if(!o.P&&(o.i<4||!tn("ES5").K(o)))return o.t;o.I=!0,r=C0(n,i),o.I=!1}else r=C0(n,i);return Zr(r,function(s,a){o&&ek(o.t,s)===a||P0(r,s,t(a))}),i===3?new Set(r):r}(e)}function C0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return mm(e)}function I0(){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[le];return Qs.get(u,s)},set:function(u){var c=this[le];Qs.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][le];if(!l.P)switch(l.i){case 5:r(l)&&dr(l);break;case 4:n(l)&&dr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Yo(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==le){var d=a[f];if(d===void 0&&!Qo(a,f))return!0;var y=l[f],S=y&&y[le];if(S?S.t!==d:!R0(y,d))return!0}}var h=!!a[le];return u.length!==Yo(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&&Ct(3,JSON.stringify(cr(s)))}var i={};nk("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var y=Array(d.length),S=0;S<d.length;S++)Object.defineProperty(y,""+S,e(S,!0));return y}var h=A0(d);delete h[le];for(var g=Yo(h),m=0;m<g.length;m++){var p=g[m];h[p]=e(p,f||!!h[p].enumerable)}return Object.create(Object.getPrototypeOf(d),h)}(l,s),c={i:l?5:4,A:a?a.A:lm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,le,{value:c,writable:!0}),u},S:function(s,a,l){l?yn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[le];if(f){var d=f.t,y=f.k,S=f.R,h=f.i;if(h===4)Zr(y,function(_){_!==le&&(d[_]!==void 0||Qo(d,_)?S[_]||u(y[_]):(S[_]=!0,dr(f)))}),Zr(d,function(_){y[_]!==void 0||Qo(y,_)||(S[_]=!1,dr(f))});else if(h===5){if(r(f)&&(dr(f),S.length=!0),y.length<d.length)for(var g=y.length;g<d.length;g++)S[g]=!1;else for(var m=d.length;m<y.length;m++)S[m]=!0;for(var p=Math.min(y.length,d.length),v=0;v<p;v++)y.hasOwnProperty(v)||(S[v]=!0),S[v]===void 0&&u(y[v])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var b0,Xs,ym=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ik=typeof Map<"u",sk=typeof Set<"u",T0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",L0=ym?Symbol.for("immer-nothing"):((b0={})["immer-nothing"]=!0,b0),k0=ym?Symbol.for("immer-draftable"):"__$immer_draftable",le=ym?Symbol.for("immer-state"):"__$immer_state";var ak=""+Object.prototype.constructor,Yo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,A0=Object.getOwnPropertyDescriptors||function(e){var t={};return Yo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},dm={},Qs={get:function(e,t){if(t===le)return e;var n=cr(e);if(!Qo(n,t))return function(o,i,s){var a,l=E0(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||!Ft(r)?r:r===sm(e.t,t)?(am(e),e.o[t]=cm(e.A.h,r,e)):r},has:function(e,t){return t in cr(e)},ownKeys:function(e){return Reflect.ownKeys(cr(e))},set:function(e,t,n){var r=E0(cr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=sm(cr(e),t),i=o==null?void 0:o[le];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(R0(n,o)&&(n!==void 0||Qo(e.t,t)))return!0;am(e),dr(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 sm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,am(e),dr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=cr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ct(12)}},Gs={};Zr(Qs,function(e,t){Gs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Gs.deleteProperty=function(e,t){return Gs.set.call(this,e,t,void 0)},Gs.set=function(e,t,n){return Qs.set.call(this,e[0],t,n,e[0])};var lk=function(){function e(n){var r=this;this.O=T0,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,p=Array(m>1?m-1:0),v=1;v<m;v++)p[v-1]=arguments[v];return l.produce(h,function(_){var C;return(C=i).call.apply(C,[g,_].concat(p))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Ft(o)){var c=_0(r),f=cm(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Lu(c):um(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(h){return om(c,s),im(h,c)},function(h){throw Lu(c),h}):(om(c,s),im(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===L0&&(u=void 0),r.D&&gm(u,!0),s){var y=[],S=[];tn("Patches").M(o,u,y,S),s(y,S)}return u}Ct(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(y){return o.apply(void 0,[y].concat(f))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&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){Ft(n)||Ct(8),yn(n)&&(n=ok(n));var r=_0(this),o=cm(this,n,void 0);return o[le].C=!0,um(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return om(i,r),im(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!T0&&Ct(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=tn("Patches").$;return yn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),ot=new lk,uk=ot.produce,YO=ot.produceWithPatches.bind(ot),ZO=ot.setAutoFreeze.bind(ot),JO=ot.setUseProxies.bind(ot),eN=ot.applyPatches.bind(ot),tN=ot.createDraft.bind(ot),nN=ot.finishDraft.bind(ot),Nu=uk;function fr(e){"@babel/helpers - typeof";return fr=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},fr(e)}function vm(e,t){if(fr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sm(e){var t=vm(e,"string");return fr(t)==="symbol"?t:String(t)}function xm(e,t,n){return t=Sm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O0(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 Mu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O0(Object(n),!0).forEach(function(r){xm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Me(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 N0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),_m=function(){return Math.random().toString(36).substring(7).split("").join(".")},Du={INIT:"@@redux/INIT"+_m(),REPLACE:"@@redux/REPLACE"+_m(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_m()}};function ck(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 wm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Me(1));return n(wm)(e,t)}if(typeof e!="function")throw new Error(Me(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(Me(3));return i}function f(h){if(typeof h!="function")throw new Error(Me(4));if(l)throw new Error(Me(5));var g=!0;return u(),a.push(h),function(){if(g){if(l)throw new Error(Me(6));g=!1,u();var p=a.indexOf(h);a.splice(p,1),s=null}}}function d(h){if(!ck(h))throw new Error(Me(7));if(typeof h.type>"u")throw new Error(Me(8));if(l)throw new Error(Me(9));try{l=!0,i=o(i,h)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var p=g[m];p()}return h}function y(h){if(typeof h!="function")throw new Error(Me(10));o=h,d({type:Du.REPLACE})}function S(){var h,g=f;return h={subscribe:function(p){if(typeof p!="object"||p===null)throw new Error(Me(11));function v(){p.next&&p.next(c())}v();var _=g(v);return{unsubscribe:_}}},h[N0]=function(){return this},h}return d({type:Du.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:y},r[N0]=S,r}function dk(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Du.INIT});if(typeof r>"u")throw new Error(Me(12));if(typeof n(void 0,{type:Du.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function Fu(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{dk(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var f;for(var d=!1,y={},S=0;S<i.length;S++){var h=i[S],g=n[h],m=u[h],p=g(m,c);if(typeof p>"u"){var v=c&&c.type;throw new Error(Me(14))}y[h]=p,d=d||p!==m}return d=d||i.length!==Object.keys(u).length,d?y:u}}function Jo(){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 M0(){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(Me(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Jo.apply(void 0,a)(o.dispatch),Mu(Mu({},o),{},{dispatch:i})}}}function D0(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 F0=D0();F0.withExtraArgument=D0;var Em=F0;var z0=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)}}(),fk=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}}},ei=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},pk=Object.defineProperty,mk=Object.defineProperties,gk=Object.getOwnPropertyDescriptors,j0=Object.getOwnPropertySymbols,hk=Object.prototype.hasOwnProperty,yk=Object.prototype.propertyIsEnumerable,H0=function(e,t,n){return t in e?pk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},pr=function(e,t){for(var n in t||(t={}))hk.call(t,n)&&H0(e,n,t[n]);if(j0)for(var r=0,o=j0(t);r<o.length;r++){var n=o[r];yk.call(t,n)&&H0(e,n,t[n])}return e},Cm=function(e,t){return mk(e,gk(t))},vk=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 Sk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Jo:Jo.apply(null,arguments)},xN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function xk(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}var _k=function(e){z0(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,ei([void 0],n[0].concat(this)))):new(t.bind.apply(t,ei([void 0],n.concat(this))))},t}(Array),wk=function(e){z0(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,ei([void 0],n[0].concat(this)))):new(t.bind.apply(t,ei([void 0],n.concat(this))))},t}(Array);function km(e){return Ft(e)?Nu(e,function(){}):e}function Ek(e){return typeof e=="boolean"}function Ck(){return function(t){return bk(t)}}function bk(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=new _k;if(n&&(Ek(n)?a.push(Em):a.push(Em.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var bm=!0;function V0(e){var t=Ck(),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,y;if(typeof o=="function")y=o;else if(xk(o))y=Fu(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 S=s;if(typeof S=="function"&&(S=S(t),!bm&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!bm&&S.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=M0.apply(void 0,S),g=Jo;l&&(g=Sk(pr({trace:!bm},typeof l=="object"&&l)));var m=new wk(h),p=m;Array.isArray(d)?p=ei([h],d):typeof d=="function"&&(p=d(m));var v=g.apply(void 0,p);return wm(y,c,v)}function fe(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 pr(pr({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}function K0(e){var t={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(a in t)throw new Error("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 Tk(e){return typeof e=="function"}function kk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?K0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Tk(e))l=function(){return km(e())};else{var u=km(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var y=ei([i[d.type]],s.filter(function(S){var h=S.matcher;return h(d)}).map(function(S){var h=S.reducer;return h}));return y.filter(function(S){return!!S}).length===0&&(y=[a]),y.reduce(function(S,h){if(h)if(yn(S)){var g=S,m=h(g,d);return m===void 0?S:m}else{if(Ft(S))return Nu(S,function(p){return h(p,d)});var m=h(S,d);if(m===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return S},f)}return c.getInitialState=l,c}function Pk(e,t){return e+"/"+t}function H(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:km(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=Pk(t,c),y,S;"reducer"in f?(y=f.reducer,S=f.prepare):y=f,i[c]=y,s[d]=y,a[c]=S?fe(d,S):fe(d)});function l(){var c=typeof e.extraReducers=="function"?K0(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,y=c[1],S=y===void 0?[]:y,h=c[2],g=h===void 0?void 0:h,m=pr(pr({},d),s);return kk(n,function(p){for(var v in m)p.addCase(v,m[v]);for(var _=0,C=S;_<C.length;_++){var E=C[_];p.addMatcher(E.matcher,E.reducer)}g&&p.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 Rk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ik=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Rk[Math.random()*64|0];return t},Lk=["name","message","stack","code"],Tm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),B0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Ak=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Lk;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},M=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,f,d,y){return{payload:c,meta:Cm(pr({},y||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,f,d){return{payload:void 0,meta:Cm(pr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,f,d,y,S){return{payload:y,error:(r&&r.serializeError||Ak)(c||"Rejected"),meta:Cm(pr({},S||{}),{arg:d,requestId:f,rejectedWithValue:!!y,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?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,y){var S=r!=null&&r.idGenerator?r.idGenerator(c):Ik(),h=new l,g,m=!1;function p(_){g=_,h.abort()}var v=function(){return vk(this,null,function(){var _,C,E,b,R,P,N;return fk(this,function(G){switch(G.label){case 0:return G.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:y}),Nk(b)?[4,b]:[3,2];case 1:b=G.sent(),G.label=2;case 2:if(b===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(V,He){return h.signal.addEventListener("abort",function(){return He({name:"AbortError",message:g||"Aborted"})})}),f(i(S,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:S,arg:c},{getState:d,extra:y}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:f,getState:d,extra:y,requestId:S,signal:h.signal,abort:p,rejectWithValue:function(V,He){return new Tm(V,He)},fulfillWithValue:function(V,He){return new B0(V,He)}})).then(function(V){if(V instanceof Tm)throw V;return V instanceof B0?o(V.payload,S,c,V.meta):o(V,S,c)})])];case 3:return E=G.sent(),[3,5];case 4:return P=G.sent(),E=P instanceof Tm?s(null,S,c,P.payload,P.meta):s(P,S,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||f(E),[2,E]}})})}();return Object.assign(v,{abort:p,requestId:S,arg:c,unwrap:function(){return v.then(Ok)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ok(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Nk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Mk="task",W0="listener",$0="completed",Pm="cancelled",CN="task-"+Pm,bN="task-"+$0,TN=W0+"-"+Pm,kN=W0+"-"+$0,PN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Mk+" "+Pm+" (reason: "+t+")"}return e}();var Rm="listenerMiddleware";var RN=fe(Rm+"/add"),IN=fe(Rm+"/removeAll"),LN=fe(Rm+"/remove");var U0,AN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(U0||(U0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Dk=function(e){return function(t){setTimeout(t,e)}},ON=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Dk(10);I0();var Nx=x(Lm()),Mx=x(J0());var Am=x(Iu());function eP(e){e()}var ex=eP,tx=e=>ex=e,nx=()=>ex;var ni=x(O());var ix=x(O());var Hu=x(O()),rx=Symbol.for(`react-redux-context-${Hu.version}`),ox=globalThis;function tP(){let e=ox[rx];return e||(e=(0,Hu.createContext)(null),ox[rx]=e),e}var De=new Proxy({},new Proxy({},{get(e,t){let n=tP();return(r,...o)=>Reflect[t](n,...o)}}));function Ys(e=De){return function(){return(0,ix.useContext)(e)}}var Bu=Ys();var Uu=()=>{throw new Error("uSES not initialized!")};var sx=Uu,ax=e=>{sx=e},nP=(e,t)=>e===t;function lx(e=De){let t=e===De?Bu:Ys(e);return function(r,o={}){let{equalityFn:i=nP,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(),y=(0,ni.useRef)(!0),S=(0,ni.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),h=sx(u.addNestedSub,l.getState,c||l.getState,S,i);return(0,ni.useDebugValue)(h),h}}var L=lx();function vn(){return vn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vn.apply(this,arguments)}function Zs(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var zm=x(Sx()),Z=x(O()),Ix=x(Ex());var vP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function SP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function y(p,v){return l=p,u=v,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function S(){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 p=e(l,u),v=!s(p,c);return c=p,v&&(d=n(c,f,u)),d}function m(p,v){let _=!i(v,u),C=!o(p,l,v,u);return l=p,u=v,_&&C?S():_?h():C?g():d}return function(v,_){return a?m(v,_):y(v,_)}}function Bm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Zs(t,vP),s=n(e,i),a=r(e,i),l=o(e,i);return SP(s,a,l,e,i)}function Um(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 Js(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Cx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function lc(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=Cx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Cx(u),u=i(a,l)),u},i}}function ri(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function bx(e){return e&&typeof e=="object"?Js(t=>Um(e,t)):e?typeof e=="function"?lc(e,"mapDispatchToProps"):ri(e,"mapDispatchToProps"):Js(t=>({dispatch:t}))}function Tx(e){return e?typeof e=="function"?lc(e,"mapStateToProps"):ri(e,"mapStateToProps"):Js(()=>({}))}function xP(e,t,n){return vn({},n,e,t)}function _P(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 kx(e){return e?typeof e=="function"?_P(e):ri(e,"mergeProps"):()=>xP}function wP(){let e=nx(),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 Px={notify(){},get:()=>[]};function uc(e,t){let n,r=Px;function o(f){return l(),r.subscribe(f)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=wP())}function u(){n&&(n(),n=void 0,r.clear(),r=Px)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var cc=x(O()),EP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",oi=EP?cc.useLayoutEffect:cc.useEffect;function Rx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ii(e,t){if(Rx(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])||!Rx(e[n[o]],t[n[o]]))return!1;return!0}var CP=["reactReduxForwardedRef"],Lx=Uu,Ax=e=>{Lx=e};var bP=[null,null];function TP(e,t,n){oi(()=>e(...t),n)}function kP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function PP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,y=()=>{if(f||!a.current)return;let h=t.getState(),g,m;try{g=r(h,o.current)}catch(p){m=p,d=p}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function RP(e,t){return e===t}function IP(e,t,n,{pure:r,areStatesEqual:o=RP,areOwnPropsEqual:i=ii,areStatePropsEqual:s=ii,areMergedPropsEqual:a=ii,forwardRef:l=!1,context:u=De}={}){let c=u,f=Tx(e),d=bx(t),y=kx(n),S=!!e;return g=>{let m=g.displayName||g.name||"Component",p=`Connect(${m})`,v={shouldHandleStateChanges:S,displayName:p,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:y,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(b){let[R,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:dt}=b,Ar=Zs(b,CP);return[b.context,dt,Ar]},[b]),G=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Ix.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),V=(0,Z.useContext)(G),He=!!b.store&&!!b.store.getState&&!!b.store.dispatch,an=!!V&&!!V.store,qt=He?b.store:V.store,fo=an?V.getServerState:qt.getState,Fi=(0,Z.useMemo)(()=>Bm(qt.dispatch,v),[qt]),[Ir,Ua]=(0,Z.useMemo)(()=>{if(!S)return bP;let dt=uc(qt,He?void 0:V.subscription),Ar=dt.notifyNestedSubs.bind(dt);return[dt,Ar]},[qt,He,V]),za=(0,Z.useMemo)(()=>He?V:vn({},V,{subscription:Ir}),[He,V,Ir]),ji=(0,Z.useRef)(),Hi=(0,Z.useRef)(N),ln=(0,Z.useRef)(),Bi=(0,Z.useRef)(!1),Lr=(0,Z.useRef)(!1),I=(0,Z.useRef)(!1),W=(0,Z.useRef)();oi(()=>(I.current=!0,()=>{I.current=!1}),[]);let Lt=(0,Z.useMemo)(()=>()=>ln.current&&N===Hi.current?ln.current:Fi(qt.getState(),N),[qt,N]),Bn=(0,Z.useMemo)(()=>Ar=>Ir?PP(S,qt,Ir,Fi,Hi,ji,Bi,I,ln,Ua,Ar):()=>{},[Ir]);TP(kP,[Hi,ji,Bi,N,ln,Ua]);let un;try{un=Lx(Bn,Lt,fo?()=>Fi(fo(),N):Lt)}catch(dt){throw W.current&&(dt.message+=`
11
+ `,Mr.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));v=c.options[_]||c.options.other}if(!v)throw new Bd(c.value,d,Object.keys(c.options),s);a.push.apply(a,Xi(v.value,t,n,r,o,d-(c.offset||0)));continue}}return jC(a)}function BC(e,t){return t?tt(tt(tt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=tt(tt({},e[r]),t[r]||{}),n},{})):e}function UC(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=BC(e[r],t[r]),n},tt({},e)):e}function Ud(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function zC(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:cl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Ja([void 0],n,!1)))},{cache:Ud(e.number),strategy:dl.variadic}),getDateTimeFormat:cl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Ja([void 0],n,!1)))},{cache:Ud(e.dateTime),strategy:dl.variadic}),getPluralRules:cl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Ja([void 0],n,!1)))},{cache:Ud(e.pluralRules),strategy:dl.variadic})}}var oy=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,y){return!d.length||y.type!==Re.literal||typeof d[d.length-1]!="string"?d.push(y.value):d[d.length-1]+=y.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Xi(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=Qh(s,["formatters"]);this.ast=e.__parse(t,tt(tt({},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=UC(e.formats,r),this.formatters=o&&o.formatters||zC(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>"u")){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=Jh,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 VC(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var KC="dummy",zd=(0,fl.createContext)(null);function j(e){let t=(0,fl.useContext)(zd);if(!t)throw new Error("useTranslator() may be used only in the context of a <LocaleContext> component.");let n=e[t]??{};return(r,o)=>{let i=VC(n,r);return i?new oy(i).format(o):(t!==KC&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Vd={};Ce(Vd,{enUS:()=>WC,nlNL:()=>$C});var WC={experimental:[{type:0,value:"Experimental"}]},$C={experimental:[{type:0,value:"Experimenteel"}]};var Kd=x(w()),iy=({children:e})=>{let t=k("Chip",Xh);return(0,Kd.jsx)("span",{className:t.root,children:e})},pl=()=>{let e=j(Vd);return(0,Kd.jsx)(iy,{children:e("experimental")})},sy=iy;var ly=x(X());var ay={root:"_root_cq1yq_1"};var uy=x(w());var qC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},GC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",ay);return(0,uy.jsx)("span",{"data-key":qC[t],className:(0,ly.default)(e,r.root),...n})},ml=GC;var dy=x(X());var cy={root:"_root_4a08n_1"};var fy=x(w()),XC=({className:e,children:t,...n})=>{let r=k("Label",cy);return(0,fy.jsx)("span",{...n,className:(0,dy.default)(e,r.root),children:t})},gl=XC;var py={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var ho=x(w()),QC=({title:e,children:t,type:n,...r})=>{let o=k("Section",py);return(0,ho.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,ho.jsx)("div",{className:o.subTitleContainer,children:(0,ho.jsx)("span",{className:o.subtitle,children:e})}),(0,ho.jsx)("div",{className:o.suggestions,children:t})]})},Un=QC;var gy=x(X()),hy=x(O());var my={root:"_root_19wxp_1"};var yy=x(w()),YC=hy.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",my);return(0,yy.jsx)("div",{ref:n,className:(0,gy.default)(r.root,e),children:t})}),hl=YC;var Qi=x(X()),gt=x(O());var Wd={root:"_root_fsa1k_10",fadein:"_fadein_fsa1k_1",isClickable:"_isClickable_fsa1k_45",isSelected:"_isSelected_fsa1k_50",actions:"_actions_fsa1k_74",actionsIsFixed:"_actionsIsFixed_fsa1k_96",actionButton:"_actionButton_fsa1k_104",dropdownList:"_dropdownList_fsa1k_125",dropdownButton:"_dropdownButton_fsa1k_140",dropdownItem:"_dropdownItem_fsa1k_150",dropdownItemButton:"_dropdownItemButton_fsa1k_159",actionButtonIsPrimary:"_actionButtonIsPrimary_fsa1k_173",actionButtonIsDisabled:"_actionButtonIsDisabled_fsa1k_177",labels:"_labels_fsa1k_185",label:"_label_fsa1k_185"};var mt=x(w()),yo=(0,gt.createContext)(Wd),ZC=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(yo);return(0,mt.jsx)("div",{...n,className:(0,Qi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},JC=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(yo);return(0,mt.jsxs)("div",{className:(0,Qi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,mt.jsx)("ul",{className:i.dropdownList,children:o})]})},eb=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(yo);return(0,mt.jsx)("li",{className:r.dropdownItem,children:(0,mt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},tb=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(yo);return(0,mt.jsx)("button",{type:"button",className:(0,Qi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},$d=({labels:e})=>{let t=(0,gt.useContext)(yo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},vo=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Wd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,Qi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(yo.Provider,{value:a,children:r})})});vo.Labels=$d;vo.Actions=ZC;vo.ActionButton=tb;vo.DropdownButton=JC;vo.DropdownItem=eb;var oe=vo;var Sy=x(X());var vy={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var xy=x(w()),nb=({withDivider:e,children:t})=>{let n=k("SuggestionList",vy);return(0,xy.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Sy.default)(n.root,{[n.isWithDivider]:e}),children:t})},ht=nb;var wy=x(X());var _y={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var yl=x(w()),rb=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",_y);return(0,yl.jsx)("button",{type:"button",className:(0,wy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,yl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,yl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Dr=rb;var Ey=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,So=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Cy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Ot=(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))(Ot||{}),zn=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(zn||{});var $t=x(Iu());var c1=x(O());function Ct(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!1)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 vn(e){return!!e&&!!e[le]}function Ft(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)===ak}(e)||Array.isArray(e)||!!e[k0]||!!(!((t=e.constructor)===null||t===void 0)&&t[k0])||fm(e)||pm(e))}function Zr(e,t,n){n===void 0&&(n=!1),Jo(e)===0?(n?Object.keys:Zo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Jo(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:fm(e)?2:pm(e)?3:0}function Yo(e,t){return Jo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ek(e,t){return Jo(e)===2?e.get(t):e[t]}function P0(e,t,n){var r=Jo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function R0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function fm(e){return ik&&e instanceof Map}function pm(e){return sk&&e instanceof Set}function cr(e){return e.o||e.t}function mm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=A0(e);delete t[le];for(var n=Zo(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 gm(e,t){return t===void 0&&(t=!1),hm(e)||vn(e)||!Ft(e)||(Jo(e)>1&&(e.set=e.add=e.clear=e.delete=tk),Object.freeze(e),t&&Zr(e,function(n,r){return gm(r,!0)},!0)),e}function tk(){Ct(2)}function hm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function tn(e){var t=dm[e];return t||Ct(18,e),t}function nk(e,t){dm[e]||(dm[e]=t)}function lm(){return Qs}function om(e,t){t&&(tn("Patches"),e.u=[],e.s=[],e.v=t)}function Lu(e){um(e),e.p.forEach(rk),e.p=null}function um(e){e===Qs&&(Qs=e.l)}function _0(e){return Qs={p:[],l:Qs,h:e,m:!0,_:0}}function rk(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function im(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||tn("ES5").S(t,e,r),r?(n[le].P&&(Lu(t),Ct(4)),Ft(e)&&(e=Au(t,e),t.l||Ou(t,e)),t.u&&tn("Patches").M(n[le].t,e,t.u,t.s)):e=Au(t,n,[]),Lu(t),t.u&&t.v(t.u,t.s),e!==L0?e:void 0}function Au(e,t,n){if(hm(t))return t;var r=t[le];if(!r)return Zr(t,function(a,l){return w0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Ou(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=mm(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Zr(i,function(a,l){return w0(e,r,o,a,l,n,s)}),Ou(e,o,!1),n&&e.u&&tn("Patches").N(r,n,e.u,e.s)}return r.o}function w0(e,t,n,r,o,i,s){if(vn(o)){var a=Au(e,o,i&&t&&t.i!==3&&!Yo(t.R,r)?i.concat(r):void 0);if(P0(n,r,a),!vn(a))return;e.m=!1}else s&&n.add(o);if(Ft(o)&&!hm(o)){if(!e.h.D&&e._<1)return;Au(e,o),t&&t.A.l||Ou(e,o)}}function Ou(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&gm(t,n)}function sm(e,t){var n=e[le];return(n?cr(n):e)[t]}function E0(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 dr(e){e.P||(e.P=!0,e.l&&dr(e.l))}function am(e){e.o||(e.o=mm(e.t))}function cm(e,t,n){var r=fm(t)?tn("MapSet").F(t,n):pm(t)?tn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:lm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ys;s&&(l=[a],u=Xs);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):tn("ES5").J(t,n);return(n?n.A:lm()).p.push(r),r}function ok(e){return vn(e)||Ct(22,e),function t(n){if(!Ft(n))return n;var r,o=n[le],i=Jo(n);if(o){if(!o.P&&(o.i<4||!tn("ES5").K(o)))return o.t;o.I=!0,r=C0(n,i),o.I=!1}else r=C0(n,i);return Zr(r,function(s,a){o&&ek(o.t,s)===a||P0(r,s,t(a))}),i===3?new Set(r):r}(e)}function C0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return mm(e)}function I0(){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[le];return Ys.get(u,s)},set:function(u){var c=this[le];Ys.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][le];if(!l.P)switch(l.i){case 5:r(l)&&dr(l);break;case 4:n(l)&&dr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Zo(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==le){var d=a[f];if(d===void 0&&!Yo(a,f))return!0;var y=l[f],S=y&&y[le];if(S?S.t!==d:!R0(y,d))return!0}}var h=!!a[le];return u.length!==Zo(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&&Ct(3,JSON.stringify(cr(s)))}var i={};nk("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var y=Array(d.length),S=0;S<d.length;S++)Object.defineProperty(y,""+S,e(S,!0));return y}var h=A0(d);delete h[le];for(var g=Zo(h),m=0;m<g.length;m++){var p=g[m];h[p]=e(p,f||!!h[p].enumerable)}return Object.create(Object.getPrototypeOf(d),h)}(l,s),c={i:l?5:4,A:a?a.A:lm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,le,{value:c,writable:!0}),u},S:function(s,a,l){l?vn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[le];if(f){var d=f.t,y=f.k,S=f.R,h=f.i;if(h===4)Zr(y,function(_){_!==le&&(d[_]!==void 0||Yo(d,_)?S[_]||u(y[_]):(S[_]=!0,dr(f)))}),Zr(d,function(_){y[_]!==void 0||Yo(y,_)||(S[_]=!1,dr(f))});else if(h===5){if(r(f)&&(dr(f),S.length=!0),y.length<d.length)for(var g=y.length;g<d.length;g++)S[g]=!1;else for(var m=d.length;m<y.length;m++)S[m]=!0;for(var p=Math.min(y.length,d.length),v=0;v<p;v++)y.hasOwnProperty(v)||(S[v]=!0),S[v]===void 0&&u(y[v])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var b0,Qs,ym=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",ik=typeof Map<"u",sk=typeof Set<"u",T0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",L0=ym?Symbol.for("immer-nothing"):((b0={})["immer-nothing"]=!0,b0),k0=ym?Symbol.for("immer-draftable"):"__$immer_draftable",le=ym?Symbol.for("immer-state"):"__$immer_state";var ak=""+Object.prototype.constructor,Zo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,A0=Object.getOwnPropertyDescriptors||function(e){var t={};return Zo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},dm={},Ys={get:function(e,t){if(t===le)return e;var n=cr(e);if(!Yo(n,t))return function(o,i,s){var a,l=E0(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||!Ft(r)?r:r===sm(e.t,t)?(am(e),e.o[t]=cm(e.A.h,r,e)):r},has:function(e,t){return t in cr(e)},ownKeys:function(e){return Reflect.ownKeys(cr(e))},set:function(e,t,n){var r=E0(cr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=sm(cr(e),t),i=o==null?void 0:o[le];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(R0(n,o)&&(n!==void 0||Yo(e.t,t)))return!0;am(e),dr(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 sm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,am(e),dr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=cr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Ct(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Ct(12)}},Xs={};Zr(Ys,function(e,t){Xs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Xs.deleteProperty=function(e,t){return Xs.set.call(this,e,t,void 0)},Xs.set=function(e,t,n){return Ys.set.call(this,e[0],t,n,e[0])};var lk=function(){function e(n){var r=this;this.O=T0,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,p=Array(m>1?m-1:0),v=1;v<m;v++)p[v-1]=arguments[v];return l.produce(h,function(_){var C;return(C=i).call.apply(C,[g,_].concat(p))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Ft(o)){var c=_0(r),f=cm(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Lu(c):um(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(h){return om(c,s),im(h,c)},function(h){throw Lu(c),h}):(om(c,s),im(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===L0&&(u=void 0),r.D&&gm(u,!0),s){var y=[],S=[];tn("Patches").M(o,u,y,S),s(y,S)}return u}Ct(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(y){return o.apply(void 0,[y].concat(f))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"u"&&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){Ft(n)||Ct(8),vn(n)&&(n=ok(n));var r=_0(this),o=cm(this,n,void 0);return o[le].C=!0,um(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return om(i,r),im(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!T0&&Ct(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=tn("Patches").$;return vn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),ot=new lk,uk=ot.produce,YO=ot.produceWithPatches.bind(ot),ZO=ot.setAutoFreeze.bind(ot),JO=ot.setUseProxies.bind(ot),eN=ot.applyPatches.bind(ot),tN=ot.createDraft.bind(ot),nN=ot.finishDraft.bind(ot),Nu=uk;function fr(e){"@babel/helpers - typeof";return fr=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},fr(e)}function vm(e,t){if(fr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(fr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sm(e){var t=vm(e,"string");return fr(t)==="symbol"?t:String(t)}function xm(e,t,n){return t=Sm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O0(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 Mu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?O0(Object(n),!0).forEach(function(r){xm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Me(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 N0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),_m=function(){return Math.random().toString(36).substring(7).split("").join(".")},Du={INIT:"@@redux/INIT"+_m(),REPLACE:"@@redux/REPLACE"+_m(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+_m()}};function ck(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 wm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Me(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Me(1));return n(wm)(e,t)}if(typeof e!="function")throw new Error(Me(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(Me(3));return i}function f(h){if(typeof h!="function")throw new Error(Me(4));if(l)throw new Error(Me(5));var g=!0;return u(),a.push(h),function(){if(g){if(l)throw new Error(Me(6));g=!1,u();var p=a.indexOf(h);a.splice(p,1),s=null}}}function d(h){if(!ck(h))throw new Error(Me(7));if(typeof h.type>"u")throw new Error(Me(8));if(l)throw new Error(Me(9));try{l=!0,i=o(i,h)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var p=g[m];p()}return h}function y(h){if(typeof h!="function")throw new Error(Me(10));o=h,d({type:Du.REPLACE})}function S(){var h,g=f;return h={subscribe:function(p){if(typeof p!="object"||p===null)throw new Error(Me(11));function v(){p.next&&p.next(c())}v();var _=g(v);return{unsubscribe:_}}},h[N0]=function(){return this},h}return d({type:Du.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:y},r[N0]=S,r}function dk(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Du.INIT});if(typeof r>"u")throw new Error(Me(12));if(typeof n(void 0,{type:Du.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Me(13))})}function Fu(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{dk(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var f;for(var d=!1,y={},S=0;S<i.length;S++){var h=i[S],g=n[h],m=u[h],p=g(m,c);if(typeof p>"u"){var v=c&&c.type;throw new Error(Me(14))}y[h]=p,d=d||p!==m}return d=d||i.length!==Object.keys(u).length,d?y:u}}function ei(){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 M0(){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(Me(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=ei.apply(void 0,a)(o.dispatch),Mu(Mu({},o),{},{dispatch:i})}}}function D0(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 F0=D0();F0.withExtraArgument=D0;var Em=F0;var z0=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)}}(),fk=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}}},ti=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},pk=Object.defineProperty,mk=Object.defineProperties,gk=Object.getOwnPropertyDescriptors,j0=Object.getOwnPropertySymbols,hk=Object.prototype.hasOwnProperty,yk=Object.prototype.propertyIsEnumerable,H0=function(e,t,n){return t in e?pk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},pr=function(e,t){for(var n in t||(t={}))hk.call(t,n)&&H0(e,n,t[n]);if(j0)for(var r=0,o=j0(t);r<o.length;r++){var n=o[r];yk.call(t,n)&&H0(e,n,t[n])}return e},Cm=function(e,t){return mk(e,gk(t))},vk=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 Sk=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ei:ei.apply(null,arguments)},xN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function xk(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}var _k=function(e){z0(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,ti([void 0],n[0].concat(this)))):new(t.bind.apply(t,ti([void 0],n.concat(this))))},t}(Array),wk=function(e){z0(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,ti([void 0],n[0].concat(this)))):new(t.bind.apply(t,ti([void 0],n.concat(this))))},t}(Array);function km(e){return Ft(e)?Nu(e,function(){}):e}function Ek(e){return typeof e=="boolean"}function Ck(){return function(t){return bk(t)}}function bk(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=new _k;if(n&&(Ek(n)?a.push(Em):a.push(Em.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var bm=!0;function V0(e){var t=Ck(),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,y;if(typeof o=="function")y=o;else if(xk(o))y=Fu(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 S=s;if(typeof S=="function"&&(S=S(t),!bm&&!Array.isArray(S)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!bm&&S.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var h=M0.apply(void 0,S),g=ei;l&&(g=Sk(pr({trace:!bm},typeof l=="object"&&l)));var m=new wk(h),p=m;Array.isArray(d)?p=ti([h],d):typeof d=="function"&&(p=d(m));var v=g.apply(void 0,p);return wm(y,c,v)}function fe(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 pr(pr({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}function K0(e){var t={},n=[],r,o={addCase:function(i,s){var a=typeof i=="string"?i:i.type;if(a in t)throw new Error("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 Tk(e){return typeof e=="function"}function kk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?K0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(Tk(e))l=function(){return km(e())};else{var u=km(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var y=ti([i[d.type]],s.filter(function(S){var h=S.matcher;return h(d)}).map(function(S){var h=S.reducer;return h}));return y.filter(function(S){return!!S}).length===0&&(y=[a]),y.reduce(function(S,h){if(h)if(vn(S)){var g=S,m=h(g,d);return m===void 0?S:m}else{if(Ft(S))return Nu(S,function(p){return h(p,d)});var m=h(S,d);if(m===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return S},f)}return c.getInitialState=l,c}function Pk(e,t){return e+"/"+t}function H(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");typeof process<"u";var n=typeof e.initialState=="function"?e.initialState:km(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=Pk(t,c),y,S;"reducer"in f?(y=f.reducer,S=f.prepare):y=f,i[c]=y,s[d]=y,a[c]=S?fe(d,S):fe(d)});function l(){var c=typeof e.extraReducers=="function"?K0(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,y=c[1],S=y===void 0?[]:y,h=c[2],g=h===void 0?void 0:h,m=pr(pr({},d),s);return kk(n,function(p){for(var v in m)p.addCase(v,m[v]);for(var _=0,C=S;_<C.length;_++){var E=C[_];p.addMatcher(E.matcher,E.reducer)}g&&p.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 Rk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ik=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=Rk[Math.random()*64|0];return t},Lk=["name","message","stack","code"],Tm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),B0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Ak=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=Lk;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},M=function(){function e(t,n,r){var o=fe(t+"/fulfilled",function(c,f,d,y){return{payload:c,meta:Cm(pr({},y||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,f,d){return{payload:void 0,meta:Cm(pr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,f,d,y,S){return{payload:y,error:(r&&r.serializeError||Ak)(c||"Rejected"),meta:Cm(pr({},S||{}),{arg:d,requestId:f,rejectedWithValue:!!y,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?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,y){var S=r!=null&&r.idGenerator?r.idGenerator(c):Ik(),h=new l,g,m=!1;function p(_){g=_,h.abort()}var v=function(){return vk(this,null,function(){var _,C,E,b,R,P,N;return fk(this,function(G){switch(G.label){case 0:return G.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:y}),Nk(b)?[4,b]:[3,2];case 1:b=G.sent(),G.label=2;case 2:if(b===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(V,He){return h.signal.addEventListener("abort",function(){return He({name:"AbortError",message:g||"Aborted"})})}),f(i(S,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:S,arg:c},{getState:d,extra:y}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:f,getState:d,extra:y,requestId:S,signal:h.signal,abort:p,rejectWithValue:function(V,He){return new Tm(V,He)},fulfillWithValue:function(V,He){return new B0(V,He)}})).then(function(V){if(V instanceof Tm)throw V;return V instanceof B0?o(V.payload,S,c,V.meta):o(V,S,c)})])];case 3:return E=G.sent(),[3,5];case 4:return P=G.sent(),E=P instanceof Tm?s(null,S,c,P.payload,P.meta):s(P,S,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||f(E),[2,E]}})})}();return Object.assign(v,{abort:p,requestId:S,arg:c,unwrap:function(){return v.then(Ok)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ok(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Nk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Mk="task",W0="listener",$0="completed",Pm="cancelled",CN="task-"+Pm,bN="task-"+$0,TN=W0+"-"+Pm,kN=W0+"-"+$0,PN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Mk+" "+Pm+" (reason: "+t+")"}return e}();var Rm="listenerMiddleware";var RN=fe(Rm+"/add"),IN=fe(Rm+"/removeAll"),LN=fe(Rm+"/remove");var U0,AN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(U0||(U0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Dk=function(e){return function(t){setTimeout(t,e)}},ON=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Dk(10);I0();var Nx=x(Lm()),Mx=x(J0());var Am=x(Iu());function eP(e){e()}var ex=eP,tx=e=>ex=e,nx=()=>ex;var ri=x(O());var ix=x(O());var Hu=x(O()),rx=Symbol.for(`react-redux-context-${Hu.version}`),ox=globalThis;function tP(){let e=ox[rx];return e||(e=(0,Hu.createContext)(null),ox[rx]=e),e}var De=new Proxy({},new Proxy({},{get(e,t){let n=tP();return(r,...o)=>Reflect[t](n,...o)}}));function Zs(e=De){return function(){return(0,ix.useContext)(e)}}var Bu=Zs();var Uu=()=>{throw new Error("uSES not initialized!")};var sx=Uu,ax=e=>{sx=e},nP=(e,t)=>e===t;function lx(e=De){let t=e===De?Bu:Zs(e);return function(r,o={}){let{equalityFn:i=nP,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(),y=(0,ri.useRef)(!0),S=(0,ri.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),h=sx(u.addNestedSub,l.getState,c||l.getState,S,i);return(0,ri.useDebugValue)(h),h}}var L=lx();function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sn.apply(this,arguments)}function Js(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var zm=x(Sx()),Z=x(O()),Ix=x(Ex());var vP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function SP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function y(p,v){return l=p,u=v,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function S(){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 p=e(l,u),v=!s(p,c);return c=p,v&&(d=n(c,f,u)),d}function m(p,v){let _=!i(v,u),C=!o(p,l,v,u);return l=p,u=v,_&&C?S():_?h():C?g():d}return function(v,_){return a?m(v,_):y(v,_)}}function Bm(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Js(t,vP),s=n(e,i),a=r(e,i),l=o(e,i);return SP(s,a,l,e,i)}function Um(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 ea(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Cx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function lc(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=Cx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Cx(u),u=i(a,l)),u},i}}function oi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function bx(e){return e&&typeof e=="object"?ea(t=>Um(e,t)):e?typeof e=="function"?lc(e,"mapDispatchToProps"):oi(e,"mapDispatchToProps"):ea(t=>({dispatch:t}))}function Tx(e){return e?typeof e=="function"?lc(e,"mapStateToProps"):oi(e,"mapStateToProps"):ea(()=>({}))}function xP(e,t,n){return Sn({},n,e,t)}function _P(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 kx(e){return e?typeof e=="function"?_P(e):oi(e,"mergeProps"):()=>xP}function wP(){let e=nx(),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 Px={notify(){},get:()=>[]};function uc(e,t){let n,r=Px;function o(f){return l(),r.subscribe(f)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=wP())}function u(){n&&(n(),n=void 0,r.clear(),r=Px)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var cc=x(O()),EP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ii=EP?cc.useLayoutEffect:cc.useEffect;function Rx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function si(e,t){if(Rx(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])||!Rx(e[n[o]],t[n[o]]))return!1;return!0}var CP=["reactReduxForwardedRef"],Lx=Uu,Ax=e=>{Lx=e};var bP=[null,null];function TP(e,t,n){ii(()=>e(...t),n)}function kP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function PP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,y=()=>{if(f||!a.current)return;let h=t.getState(),g,m;try{g=r(h,o.current)}catch(p){m=p,d=p}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function RP(e,t){return e===t}function IP(e,t,n,{pure:r,areStatesEqual:o=RP,areOwnPropsEqual:i=si,areStatePropsEqual:s=si,areMergedPropsEqual:a=si,forwardRef:l=!1,context:u=De}={}){let c=u,f=Tx(e),d=bx(t),y=kx(n),S=!!e;return g=>{let m=g.displayName||g.name||"Component",p=`Connect(${m})`,v={shouldHandleStateChanges:S,displayName:p,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:y,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(b){let[R,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:dt}=b,Ar=Js(b,CP);return[b.context,dt,Ar]},[b]),G=(0,Z.useMemo)(()=>R&&R.Consumer&&(0,Ix.isContextConsumer)(Z.default.createElement(R.Consumer,null))?R:c,[R,c]),V=(0,Z.useContext)(G),He=!!b.store&&!!b.store.getState&&!!b.store.dispatch,ln=!!V&&!!V.store,qt=He?b.store:V.store,po=ln?V.getServerState:qt.getState,ji=(0,Z.useMemo)(()=>Bm(qt.dispatch,v),[qt]),[Ir,Ua]=(0,Z.useMemo)(()=>{if(!S)return bP;let dt=uc(qt,He?void 0:V.subscription),Ar=dt.notifyNestedSubs.bind(dt);return[dt,Ar]},[qt,He,V]),za=(0,Z.useMemo)(()=>He?V:Sn({},V,{subscription:Ir}),[He,V,Ir]),Hi=(0,Z.useRef)(),Bi=(0,Z.useRef)(N),un=(0,Z.useRef)(),Ui=(0,Z.useRef)(!1),Lr=(0,Z.useRef)(!1),I=(0,Z.useRef)(!1),W=(0,Z.useRef)();ii(()=>(I.current=!0,()=>{I.current=!1}),[]);let Lt=(0,Z.useMemo)(()=>()=>un.current&&N===Bi.current?un.current:ji(qt.getState(),N),[qt,N]),Bn=(0,Z.useMemo)(()=>Ar=>Ir?PP(S,qt,Ir,ji,Bi,Hi,Ui,I,un,Ua,Ar):()=>{},[Ir]);TP(kP,[Bi,Hi,Ui,N,un,Ua]);let cn;try{cn=Lx(Bn,Lt,po?()=>ji(po(),N):Lt)}catch(dt){throw W.current&&(dt.message+=`
12
12
  The error may be correlated with this previous error:
13
13
  ${W.current.stack}
14
14
 
15
- `),dt}oi(()=>{W.current=void 0,ln.current=void 0,ji.current=un});let Ui=(0,Z.useMemo)(()=>Z.default.createElement(g,vn({},un,{ref:P})),[P,g,un]);return(0,Z.useMemo)(()=>S?Z.default.createElement(G.Provider,{value:za},Ui):Ui,[G,Ui,za])}let E=Z.default.memo(_);if(E.WrappedComponent=g,E.displayName=_.displayName=p,l){let R=Z.default.forwardRef(function(N,G){return Z.default.createElement(E,vn({},N,{reactReduxForwardedRef:G}))});return R.displayName=p,R.WrappedComponent=g,(0,zm.default)(R,g)}return(0,zm.default)(E,g)}}var Sn=IP;var ea=x(O());function LP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,ea.useMemo)(()=>{let u=uc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,ea.useMemo)(()=>e.getState(),[e]);oi(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||De;return ea.default.createElement(l.Provider,{value:s},n)}var Vm=LP;function dc(e=De){let t=e===De?Bu:Ys(e);return function(){let{store:r}=t();return r}}var Km=dc();function Ox(e=De){let t=e===De?Km:dc(e);return function(){return t().dispatch}}var B=Ox();ax(Mx.useSyncExternalStoreWithSelector);Ax(Nx.useSyncExternalStore);tx(Am.unstable_batchedUpdates);var ta=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(ta||{});var AP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showPersonalCollectionLink:!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,adminUrl:void 0,productName:"Deepdesk"},Dx=H({name:"settings",initialState:AP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:na}=Dx.actions,Wm=e=>t=>t.settings[e],D=e=>L(Wm(e)),Fx=Dx.reducer;var Pw=x(O());function xn(){}xn.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(h){return o?(setTimeout(function(){o(void 0,h)},0),!0):h}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function y(){for(var h=-1*u;h<=u;h+=2){var g=void 0,m=f[h-1],p=f[h+1],v=(p?p.newPos:0)-h;m&&(f[h-1]=void 0);var _=m&&m.newPos+1<a,C=p&&0<=v&&v<l;if(!_&&!C){f[h]=void 0;continue}if(!_||C&&m.newPos<p.newPos?(g=NP(p),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),v=i.extractCommon(g,n,t,h),g.newPos+1>=a&&v+1>=l)return s(OP(i,g.components,n,t,i.useLongestToken));f[h]=g}u++}if(o)(function h(){setTimeout(function(){if(u>c)return o();y()||h()},0)})();else for(;u<=c;){var S=y();if(S)return S}},pushComponent:function(t,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?t[t.length-1]={count:o.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.newPos,l=a-o,u=0;a+1<i&&l+1<s&&this.equals(n[a+1],r[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=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 OP(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(y,S){var h=r[l+S];return h.length>y.length?h:y}),u.value=e.join(c)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function NP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var MP=new xn;function Bx(e,t,n){return MP.diff(e,t,n)}var jx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Hx=/\S/,Ux=new xn;Ux.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Hx.test(e)&&!Hx.test(t)};Ux.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]&&jx.test(t[n])&&jx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var zx=new xn;zx.tokenize=function(e){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 DP=new xn;DP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var FP=new xn;FP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function fc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fc=function(t){return typeof t}:fc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}var jP=Object.prototype.toString,ra=new xn;ra.useLongestToken=!0;ra.tokenize=zx.tokenize;ra.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify($m(e,null,null,o),o," ")};ra.equals=function(e,t){return xn.prototype.equals.call(ra,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function $m(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(jP.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]=$m(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),fc(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]=$m(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var qm=new xn;qm.tokenize=function(e){return e.slice()};qm.join=qm.removeEmpty=function(e){return e};function Vx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function mr(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)=>mr(i,t[s],n-1)):Vx(e)&&Vx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>mr(e[s],t[s],n-1)):!1}function HP(e){return Math.max(...e.map(t=>t.length))}function BP(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return{...r,[o]:i}}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function Kx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<HP(r);o++){let i=BP(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 UP=2;function Gm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Kx(e,UP);return n&&n.text!==t?n:e[0]}var Wx={current:null,isSupported:null},J=fe("resetConversation"),pc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},mc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},si=e=>e.conversation.isSupported,Xm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),gc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),hc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),yc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=mc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Qm=M("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),vc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=mc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),zP=[gc.rejected,hc.rejected,yc.rejected,vc.rejected].map(e=>e==null?void 0:e.toString()),VP=H({name:"conversation",initialState:Wx,reducers:{},extraReducers:e=>{e.addCase(Xm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(gc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(hc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Qm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(yc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(vc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Wx).addMatcher(t=>zP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),$x=VP.reducer;var gr={text:"",html:null,selection:{start:0,end:0},stagedSuggestion:null,userCommitted:{text:"",selection:{start:0,end:0}},tabCompletionSuggestion:void 0,previousKeyDownEvent: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 xc(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 _c=fe("input/replaceText"),wc=fe("input/keyDown"),Jr=fe("input/sendMessage"),Ec=fe("input/sendEditSuggestionMessage"),Cc=fe("input/uiInputChange"),bc=fe("input/applyImageSuggestion"),st=fe("input/sendEvent");function Sc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,f=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(f||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:f?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var qx=e=>H({name:e,initialState:gr,reducers:{initialInput(t,n){let{text:r,selection:o,html:i}=n.payload;t.text=r,t.selection.start=(o==null?void 0:o.start)??r.length,t.selection.end=(o==null?void 0:o.end)??r.length,t.userCommitted.text=r,t.userCommitted.selection.start=(o==null?void 0:o.start)??r.length,t.userCommitted.selection.end=(o==null?void 0:o.end)??r.length,t.html=i||null},reset(t){Object.assign(t,{...gr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Gm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(mr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&Sc(t)))},platformInput(t,n){let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end),t.text=r,t.html=o||null},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:f,ctrlKey:d,metaKey:y,altKey:S}=t.previousKeyDownEvent;switch(c){case"Enter":f&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:h}=t,{text:g}=n.payload,m=Bx(h,g);h.length-g.length>1&&t.metrics.deletions.push(...m.filter(p=>p.removed).map(p=>p.value)),t.metrics.numCharsDeleted+=h.length-g.length;break}case"C":case"V":case"X":if(!d&&!y){t.metrics.numCharsTyped+=1;let h=((s=t.selection)==null?void 0:s.start)!==void 0&&((a=t.selection)==null?void 0:a.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}break;case"Shift":break;default:if(!d&&!y&&!S){t.metrics.numCharsTyped+=1;let h=((l=t.selection)==null?void 0:l.start)!==void 0&&((u=t.selection)==null?void 0:u.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=gr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&Sc(t);let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end,t.userCommitted.selection.start=i.start,t.userCommitted.selection.end=i.end),t.text=r,t.html=o||null,t.userCommitted.text=r,t.previousKeyDownEvent=null},stageSuggestion(t,n){let{text:r}=n.payload;switch(t.stagedSuggestion=n.payload,t.tabCompletionSuggestion=void 0,n.payload.replace){case"selection":t.text=`${t.text.slice(0,t.selection.start)}${r}${t.text.slice(t.selection.end)}`,t.selection.end=t.selection.start+r.length,t.selection.start+=r.length;break;case"until-selection-end":t.text=`${r}${t.text.slice(t.selection.end)}`,t.selection.start=r.length,t.selection.end=r.length;break;default:throw new Error(`Unknown replace ${n.payload.replace}`)}n.payload.eventMetrics.inputType==="tab"&&Sc(t)},commitSuggestion(t){Sc(t)},offeredTextSuggestion(t,n){let{text:r,suggestion:{source:o}}=n.payload;t.metrics.offeredTextSuggestions.find(s=>s.text===r)||t.metrics.offeredTextSuggestions.push({text:r,source:o})},registerCut(t,n){let{metrics:r}=t,o=n.payload;t.metrics={...t.metrics,numCharsCut:r.numCharsCut+o.length,cuts:[...r.cuts,o]}},registerPaste(t,n){let{metrics:r}=t,{text:o,selectionText:i}=n.payload,s=r.numCharsDeleted+(i&&i.length?i.length:0),a=i&&i.length?[...r.deletions,i]:r.deletions;t.metrics={...t.metrics,numCharsDeleted:s,deletions:a,numCharsPasted:r.numCharsPasted+o.length,numPaste:r.numPaste+1,pastes:[...r.pastes,o]}},registerKeyDown(t,n){t.previousKeyDownEvent=n.payload},nextTextSuggestionIndex(t){let n=t.textSuggestions.length;t.selectedSuggestionIndex=t.selectedSuggestionIndex<n-1?t.selectedSuggestionIndex+1:t.selectedSuggestionIndex},previousTextSuggestionIndex(t){t.selectedSuggestionIndex=t.selectedSuggestionIndex>=0?t.selectedSuggestionIndex-1:t.selectedSuggestionIndex},setTextSuggestions(t,n){if(t.selectedSuggestionIndex=-1,t.textSuggestions=n.payload,n.payload.length===0)return;let r=t.userCommitted.text.substring(0,t.userCommitted.selection.end),o=Gm(n.payload,r);t.tabCompletionSuggestion=o!=null&&o.text.includes(r)?o:void 0},setSelectedTextSuggestionIndex(t,n){t.selectedSuggestionIndex=n.payload},mergeMetrics(t,{payload:n}){let r=n.agentStartedTypingTimestamp!=null?n.agentStartedTypingTimestamp:Date.now(),o=(Date.now()-r)/1e3;t.metrics.externalTimeTotalSeconds=o,t.metrics.numCharsTyped+=n.numCharsTyped,t.metrics.numCharsPasted+=n.numCharsPasted,t.metrics.numCharsCut+=n.numCharsCut,t.metrics.numCharsDeleted+=n.numCharsDeleted,t.metrics.numPaste+=n.numPaste,t.metrics.pastes.push(...n.pastes),t.metrics.deletions.push(...n.deletions)}},extraReducers:t=>{t.addCase(J,n=>{n.tabCompletionSuggestion=gr.tabCompletionSuggestion,n.previousKeyDownEvent=gr.previousKeyDownEvent,n.textSuggestions=gr.textSuggestions,n.selectedSuggestionIndex=gr.selectedSuggestionIndex,n.metrics=gr.metrics})}}),Ym=qx("input"),ai=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),KP=e=>e.input.selection,Gx=()=>L(KP),{userInput:Xx,changeSelection:Zm,initialInput:Qx,mergeMetrics:Yx,nextTextSuggestionIndex:Zx,offeredTextSuggestion:Jx,previousTextSuggestionIndex:e_,registerCut:t_,registerKeyDown:n_,registerPaste:r_,reset:o_,resetToCommitted:oa,platformInput:i_,setSelectedTextSuggestionIndex:ia,setTextSuggestions:_n,stageSuggestion:jt,commitSuggestion:hr}=Ym.actions,Xe=qx("overlay");var li=x(O());var s_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var Jm=x(w()),WP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,li.useRef)(null),l=(0,li.useRef)(null),u=k("Dialog",s_);return(0,li.useEffect)(()=>{var d,y;let c=S=>{S.key==="Escape"&&(S.preventDefault(),S.stopPropagation(),o())},f=S=>{let h=window.getSelection();h!=null&&h.toString()||S.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",f),(y=a.current)==null||y.addEventListener("keyup",c),()=>{var S,h;(S=a.current)==null||S.removeEventListener("click",f),(h=a.current)==null||h.removeEventListener("keyup",c)}},[a,l,o,r]),(0,li.useEffect)(()=>{var c,f;!a.current||!e||!t||(f=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||f.focus()},[e,t,a]),e?(0,Jm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,Jm.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},ui=WP;var Tg=x(O());var eg={};Ce(eg,{enUS:()=>$P,nlNL:()=>qP});var $P={dismiss:[{type:0,value:"Close"}],add:[{type:0,value:"Add to message"}],next:[{type:0,value:"Next"}],previous:[{type:0,value:"Previous"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},qP={dismiss:[{type:0,value:"Sluiten"}],add:[{type:0,value:"Toevoegen"}],next:[{type:0,value:"Volgende"}],previous:[{type:0,value:"Vorige"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var a_={root:"_root_l80t9_1",content:"_content_l80t9_3",title:"_title_l80t9_7",actions:"_actions_l80t9_15",pagination:"_pagination_l80t9_20",primaryButton:"_primaryButton_l80t9_51",primaryButtons:"_primaryButtons_l80t9_55"};var sa=x(w()),Tc=()=>(0,sa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,sa.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,sa.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 aa=x(w()),l_=()=>(0,aa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,aa.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,aa.jsx)("path",{d:"M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"})]});var Tt=x(O());var kc=x(O());function la(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=1,ng=2,rg=4,Se=8,Pc=16,ua=32,Ht=64,tg={a:{content:q|Se,self:!1,type:q|Se|ua|Ht},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:q|Se,void:!0},body:{content:q|ng|rg|Se|Pc|ua|Ht},button:{content:Se,type:q|Se|ua|Ht},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|ua|Ht},dd:{content:q,parent:["dl"]},dl:{children:["dt","dd"],type:q},dt:{content:q,invalid:["footer","header"],parent:["dl"]},figcaption:{content:q,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:q,void:!0},img:{void:!0},li:{content:q,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:q},picture:{children:["source","img"],type:q|Se|Pc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Se,parent:["ruby","rtc"]},rtc:{content:Se,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Se,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:q},tbody:{parent:["table"],children:["tr"]},td:{content:q,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:q,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:q},video:{children:["track","source"]},wbr:{type:q|Se,void:!0}};function to(e){return t=>{tg[t]={...e,...tg[t]}}}["address","main","div","figure","p","pre"].forEach(to({content:q,type:q|Ht}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(to({content:Se,type:q|Se|Ht}));["p","pre"].forEach(to({content:Se,type:q|Ht}));["s","small","span","del","ins"].forEach(to({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(to({content:q,type:q|ng|Ht}));["h1","h2","h3","h4","h5","h6"].forEach(to({content:Se,type:q|rg|Ht}));["audio","canvas","iframe","img","video"].forEach(to({type:q|Se|Pc|Ht}));var da=Object.freeze(tg),og=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ig=Object.keys(da).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,sg=2,eo=3,yr=4,Ic=5,Lc=Object.freeze({alt:ee,cite:ee,class:ee,colspan:eo,controls:yr,datetime:ee,default:yr,disabled:yr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:yr,media:ee,muted:yr,poster:ee,rel:ee,role:ee,rowspan:eo,scope:ee,sizes:ee,span:eo,start:eo,style:Ic,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),ag=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Rc(){return Rc=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},Rc.apply(this,arguments)}function Ac({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?kc.default.createElement(i,Rc({className:t},e)):kc.default.createElement(i,Rc({className:t},e),n)}var ca=class{attribute(t,n){return n}node(t,n){return n}};function u_(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var wn=class{constructor(t,n,r){la(this,"greedy",!1),la(this,"options",void 0),la(this,"propName",void 0),la(this,"inverseName",void 0),la(this,"factory",void 0),this.options={...n},this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r??null}createElement(t,n){return this.factory?kc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return u_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var no=x(O()),p_=x(d_());function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QP=/(url|image|image-set)\(/i,lg=class extends ca{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(QP)&&delete n[r]}),n}},f_=1,YP=3,ZP=/^<(!doctype|(html|head|body)(\s|>))/i,JP=/^(aria-|data-|\w+:)/iu,eR=/{{{(\w+)\/?}}}/;function tR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Oc=class{constructor(t,n={},r=[],o=[]){var i;En(this,"allowed",void 0),En(this,"banned",void 0),En(this,"blocked",void 0),En(this,"container",void 0),En(this,"content",[]),En(this,"props",void 0),En(this,"matchers",void 0),En(this,"filters",void 0),En(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new lg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:ig),this.banned=new Set(og),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{index:d,length:y,match:S,valid:h,void:g,...m}=a,p=l.propName+String(s);d>0&&(f+=i.slice(0,d)),h?(f+=g?`{{{${p}/}}}`:`{{{${p}}}}${S}{{{/${p}}}}`,this.keyIndex+=1,s+=1,r[p]={children:S,matcher:l,props:{...o,...m,key:this.keyIndex}}):f+=S,l.greedy?(i=f+i.slice(d+y),f=""):i=i.slice(d+(y||S.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
+ `),dt}ii(()=>{W.current=void 0,un.current=void 0,Hi.current=cn});let zi=(0,Z.useMemo)(()=>Z.default.createElement(g,Sn({},cn,{ref:P})),[P,g,cn]);return(0,Z.useMemo)(()=>S?Z.default.createElement(G.Provider,{value:za},zi):zi,[G,zi,za])}let E=Z.default.memo(_);if(E.WrappedComponent=g,E.displayName=_.displayName=p,l){let R=Z.default.forwardRef(function(N,G){return Z.default.createElement(E,Sn({},N,{reactReduxForwardedRef:G}))});return R.displayName=p,R.WrappedComponent=g,(0,zm.default)(R,g)}return(0,zm.default)(E,g)}}var xn=IP;var ta=x(O());function LP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,ta.useMemo)(()=>{let u=uc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,ta.useMemo)(()=>e.getState(),[e]);ii(()=>{let{subscription:u}=s;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[s,a]);let l=t||De;return ta.default.createElement(l.Provider,{value:s},n)}var Vm=LP;function dc(e=De){let t=e===De?Bu:Zs(e);return function(){let{store:r}=t();return r}}var Km=dc();function Ox(e=De){let t=e===De?Km:dc(e);return function(){return t().dispatch}}var B=Ox();ax(Mx.useSyncExternalStoreWithSelector);Ax(Nx.useSyncExternalStore);tx(Am.unstable_batchedUpdates);var na=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(na||{});var AP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showPersonalCollectionLink:!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,adminUrl:void 0,productName:"Deepdesk"},Dx=H({name:"settings",initialState:AP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:ra}=Dx.actions,Wm=e=>t=>t.settings[e],D=e=>L(Wm(e)),Fx=Dx.reducer;var Pw=x(O());function _n(){}_n.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(h){return o?(setTimeout(function(){o(void 0,h)},0),!0):h}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function y(){for(var h=-1*u;h<=u;h+=2){var g=void 0,m=f[h-1],p=f[h+1],v=(p?p.newPos:0)-h;m&&(f[h-1]=void 0);var _=m&&m.newPos+1<a,C=p&&0<=v&&v<l;if(!_&&!C){f[h]=void 0;continue}if(!_||C&&m.newPos<p.newPos?(g=NP(p),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),v=i.extractCommon(g,n,t,h),g.newPos+1>=a&&v+1>=l)return s(OP(i,g.components,n,t,i.useLongestToken));f[h]=g}u++}if(o)(function h(){setTimeout(function(){if(u>c)return o();y()||h()},0)})();else for(;u<=c;){var S=y();if(S)return S}},pushComponent:function(t,n,r){var o=t[t.length-1];o&&o.added===n&&o.removed===r?t[t.length-1]={count:o.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,o){for(var i=n.length,s=r.length,a=t.newPos,l=a-o,u=0;a+1<i&&l+1<s&&this.equals(n[a+1],r[l+1]);)a++,l++,u++;return u&&t.components.push({count:u}),t.newPos=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 OP(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(y,S){var h=r[l+S];return h.length>y.length?h:y}),u.value=e.join(c)}else u.value=e.join(n.slice(a,a+u.count));a+=u.count,u.added||(l+=u.count)}}var d=t[s-1];return s>1&&typeof d.value=="string"&&(d.added||d.removed)&&e.equals("",d.value)&&(t[s-2].value+=d.value,t.pop()),t}function NP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var MP=new _n;function Bx(e,t,n){return MP.diff(e,t,n)}var jx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Hx=/\S/,Ux=new _n;Ux.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Hx.test(e)&&!Hx.test(t)};Ux.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]&&jx.test(t[n])&&jx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var zx=new _n;zx.tokenize=function(e){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 DP=new _n;DP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var FP=new _n;FP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function fc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fc=function(t){return typeof t}:fc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fc(e)}var jP=Object.prototype.toString,oa=new _n;oa.useLongestToken=!0;oa.tokenize=zx.tokenize;oa.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,o=r===void 0?function(i,s){return typeof s>"u"?n:s}:r;return typeof e=="string"?e:JSON.stringify($m(e,null,null,o),o," ")};oa.equals=function(e,t){return _n.prototype.equals.call(oa,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function $m(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(jP.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]=$m(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),fc(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]=$m(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var qm=new _n;qm.tokenize=function(e){return e.slice()};qm.join=qm.removeEmpty=function(e){return e};function Vx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function mr(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)=>mr(i,t[s],n-1)):Vx(e)&&Vx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>mr(e[s],t[s],n-1)):!1}function HP(e){return Math.max(...e.map(t=>t.length))}function BP(e,t){let n=e.reduce((r,o)=>{if(o){let i=r[o]?r[o]+1:1;return{...r,[o]:i}}return r},{});return Object.keys(n).reduce((r,o)=>(n[o]<t&&r.push(o),r),[])}function Kx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<HP(r);o++){let i=BP(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 UP=2;function Gm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Kx(e,UP);return n&&n.text!==t?n:e[0]}var Wx={current:null,isSupported:null},J=fe("resetConversation"),pc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},mc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},ai=e=>e.conversation.isSupported,Xm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),gc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),hc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),yc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=mc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Qm=M("conversation/upsert",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId).catch(()=>null).then(r=>{if(!r)return n.createConversation(e);let{agentId:o,agentName:i,agentEmail:s,agentNickname:a,tags:l}=e;return n.updateConversation(r.id,{agentId:o,agentEmail:s,agentName:i,agentNickname:a,tags:l})})}),vc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=mc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),zP=[gc.rejected,hc.rejected,yc.rejected,vc.rejected].map(e=>e==null?void 0:e.toString()),VP=H({name:"conversation",initialState:Wx,reducers:{},extraReducers:e=>{e.addCase(Xm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(gc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(hc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Qm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(yc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(vc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Wx).addMatcher(t=>zP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),$x=VP.reducer;var gr={text:"",html:null,selection:{start:0,end:0},stagedSuggestion:null,userCommitted:{text:"",selection:{start:0,end:0}},tabCompletionSuggestion:void 0,previousKeyDownEvent: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 xc(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 _c=fe("input/replaceText"),wc=fe("input/keyDown"),Jr=fe("input/sendMessage"),Ec=fe("input/sendEditSuggestionMessage"),Cc=fe("input/uiInputChange"),bc=fe("input/applyImageSuggestion"),st=fe("input/sendEvent");function Sc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,f=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(f||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:f?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var qx=e=>H({name:e,initialState:gr,reducers:{initialInput(t,n){let{text:r,selection:o,html:i}=n.payload;t.text=r,t.selection.start=(o==null?void 0:o.start)??r.length,t.selection.end=(o==null?void 0:o.end)??r.length,t.userCommitted.text=r,t.userCommitted.selection.start=(o==null?void 0:o.start)??r.length,t.userCommitted.selection.end=(o==null?void 0:o.end)??r.length,t.html=i||null},reset(t){Object.assign(t,{...gr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Gm(t.textSuggestions,t.userCommitted.text)},changeSelection(t,n){n.payload&&(mr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&Sc(t)))},platformInput(t,n){let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end),t.text=r,t.html=o||null},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:f,ctrlKey:d,metaKey:y,altKey:S}=t.previousKeyDownEvent;switch(c){case"Enter":f&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:h}=t,{text:g}=n.payload,m=Bx(h,g);h.length-g.length>1&&t.metrics.deletions.push(...m.filter(p=>p.removed).map(p=>p.value)),t.metrics.numCharsDeleted+=h.length-g.length;break}case"C":case"V":case"X":if(!d&&!y){t.metrics.numCharsTyped+=1;let h=((s=t.selection)==null?void 0:s.start)!==void 0&&((a=t.selection)==null?void 0:a.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}break;case"Shift":break;default:if(!d&&!y&&!S){t.metrics.numCharsTyped+=1;let h=((l=t.selection)==null?void 0:l.start)!==void 0&&((u=t.selection)==null?void 0:u.end)!==void 0?t.text.substring(t.selection.start,t.selection.end):null;h&&h.length>0&&(t.metrics.numCharsDeleted+=h.length,t.metrics.deletions.push(h))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=gr.metrics,t.textSuggestions=[],t.stagedSuggestion=null),t.text!==n.payload.text&&Sc(t);let{text:r,html:o,selection:i}=n.payload;i&&(t.selection.start=i.start,t.selection.end=i.end,t.userCommitted.selection.start=i.start,t.userCommitted.selection.end=i.end),t.text=r,t.html=o||null,t.userCommitted.text=r,t.previousKeyDownEvent=null},stageSuggestion(t,n){let{text:r}=n.payload;switch(t.stagedSuggestion=n.payload,t.tabCompletionSuggestion=void 0,n.payload.replace){case"selection":t.text=`${t.text.slice(0,t.selection.start)}${r}${t.text.slice(t.selection.end)}`,t.selection.end=t.selection.start+r.length,t.selection.start+=r.length;break;case"until-selection-end":t.text=`${r}${t.text.slice(t.selection.end)}`,t.selection.start=r.length,t.selection.end=r.length;break;default:throw new Error(`Unknown replace ${n.payload.replace}`)}n.payload.eventMetrics.inputType==="tab"&&Sc(t)},commitSuggestion(t){Sc(t)},offeredTextSuggestion(t,n){let{text:r,suggestion:{source:o}}=n.payload;t.metrics.offeredTextSuggestions.find(s=>s.text===r)||t.metrics.offeredTextSuggestions.push({text:r,source:o})},registerCut(t,n){let{metrics:r}=t,o=n.payload;t.metrics={...t.metrics,numCharsCut:r.numCharsCut+o.length,cuts:[...r.cuts,o]}},registerPaste(t,n){let{metrics:r}=t,{text:o,selectionText:i}=n.payload,s=r.numCharsDeleted+(i&&i.length?i.length:0),a=i&&i.length?[...r.deletions,i]:r.deletions;t.metrics={...t.metrics,numCharsDeleted:s,deletions:a,numCharsPasted:r.numCharsPasted+o.length,numPaste:r.numPaste+1,pastes:[...r.pastes,o]}},registerKeyDown(t,n){t.previousKeyDownEvent=n.payload},nextTextSuggestionIndex(t){let n=t.textSuggestions.length;t.selectedSuggestionIndex=t.selectedSuggestionIndex<n-1?t.selectedSuggestionIndex+1:t.selectedSuggestionIndex},previousTextSuggestionIndex(t){t.selectedSuggestionIndex=t.selectedSuggestionIndex>=0?t.selectedSuggestionIndex-1:t.selectedSuggestionIndex},setTextSuggestions(t,n){if(t.selectedSuggestionIndex=-1,t.textSuggestions=n.payload,n.payload.length===0)return;let r=t.userCommitted.text.substring(0,t.userCommitted.selection.end),o=Gm(n.payload,r);t.tabCompletionSuggestion=o!=null&&o.text.includes(r)?o:void 0},setSelectedTextSuggestionIndex(t,n){t.selectedSuggestionIndex=n.payload},mergeMetrics(t,{payload:n}){let r=n.agentStartedTypingTimestamp!=null?n.agentStartedTypingTimestamp:Date.now(),o=(Date.now()-r)/1e3;t.metrics.externalTimeTotalSeconds=o,t.metrics.numCharsTyped+=n.numCharsTyped,t.metrics.numCharsPasted+=n.numCharsPasted,t.metrics.numCharsCut+=n.numCharsCut,t.metrics.numCharsDeleted+=n.numCharsDeleted,t.metrics.numPaste+=n.numPaste,t.metrics.pastes.push(...n.pastes),t.metrics.deletions.push(...n.deletions)}},extraReducers:t=>{t.addCase(J,n=>{n.tabCompletionSuggestion=gr.tabCompletionSuggestion,n.previousKeyDownEvent=gr.previousKeyDownEvent,n.textSuggestions=gr.textSuggestions,n.selectedSuggestionIndex=gr.selectedSuggestionIndex,n.metrics=gr.metrics})}}),Ym=qx("input"),li=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),KP=e=>e.input.selection,Gx=()=>L(KP),{userInput:Xx,changeSelection:Zm,initialInput:Qx,mergeMetrics:Yx,nextTextSuggestionIndex:Zx,offeredTextSuggestion:Jx,previousTextSuggestionIndex:e_,registerCut:t_,registerKeyDown:n_,registerPaste:r_,reset:o_,resetToCommitted:ia,platformInput:i_,setSelectedTextSuggestionIndex:eo,setTextSuggestions:nn,stageSuggestion:jt,commitSuggestion:hr}=Ym.actions,Xe=qx("overlay");var ui=x(O());var s_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var Jm=x(w()),WP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ui.useRef)(null),l=(0,ui.useRef)(null),u=k("Dialog",s_);return(0,ui.useEffect)(()=>{var d,y;let c=S=>{S.key==="Escape"&&(S.preventDefault(),S.stopPropagation(),o())},f=S=>{let h=window.getSelection();h!=null&&h.toString()||S.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",f),(y=a.current)==null||y.addEventListener("keyup",c),()=>{var S,h;(S=a.current)==null||S.removeEventListener("click",f),(h=a.current)==null||h.removeEventListener("keyup",c)}},[a,l,o,r]),(0,ui.useEffect)(()=>{var c,f;!a.current||!e||!t||(f=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||f.focus()},[e,t,a]),e?(0,Jm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,Jm.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},ci=WP;var Tg=x(O());var eg={};Ce(eg,{enUS:()=>$P,nlNL:()=>qP});var $P={dismiss:[{type:0,value:"Close"}],add:[{type:0,value:"Add to message"}],next:[{type:0,value:"Next"}],previous:[{type:0,value:"Previous"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},qP={dismiss:[{type:0,value:"Sluiten"}],add:[{type:0,value:"Toevoegen"}],next:[{type:0,value:"Volgende"}],previous:[{type:0,value:"Vorige"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var a_={root:"_root_l80t9_1",content:"_content_l80t9_3",title:"_title_l80t9_7",actions:"_actions_l80t9_15",pagination:"_pagination_l80t9_20",primaryButton:"_primaryButton_l80t9_51",primaryButtons:"_primaryButtons_l80t9_55"};var sa=x(w()),Tc=()=>(0,sa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,sa.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,sa.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 aa=x(w()),l_=()=>(0,aa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,aa.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,aa.jsx)("path",{d:"M64 448c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L178.8 256L41.38 118.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l160 160c12.5 12.5 12.5 32.75 0 45.25l-160 160C80.38 444.9 72.19 448 64 448z"})]});var Tt=x(O());var kc=x(O());function la(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var q=1,ng=2,rg=4,Se=8,Pc=16,ua=32,Ht=64,tg={a:{content:q|Se,self:!1,type:q|Se|ua|Ht},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:q|Se,void:!0},body:{content:q|ng|rg|Se|Pc|ua|Ht},button:{content:Se,type:q|Se|ua|Ht},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|ua|Ht},dd:{content:q,parent:["dl"]},dl:{children:["dt","dd"],type:q},dt:{content:q,invalid:["footer","header"],parent:["dl"]},figcaption:{content:q,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:q,void:!0},img:{void:!0},li:{content:q,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:q},picture:{children:["source","img"],type:q|Se|Pc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Se,parent:["ruby","rtc"]},rtc:{content:Se,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Se,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:q},tbody:{parent:["table"],children:["tr"]},td:{content:q,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:q,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:q},video:{children:["track","source"]},wbr:{type:q|Se,void:!0}};function no(e){return t=>{tg[t]={...e,...tg[t]}}}["address","main","div","figure","p","pre"].forEach(no({content:q,type:q|Ht}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(no({content:Se,type:q|Se|Ht}));["p","pre"].forEach(no({content:Se,type:q|Ht}));["s","small","span","del","ins"].forEach(no({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(no({content:q,type:q|ng|Ht}));["h1","h2","h3","h4","h5","h6"].forEach(no({content:Se,type:q|rg|Ht}));["audio","canvas","iframe","img","video"].forEach(no({type:q|Se|Pc|Ht}));var da=Object.freeze(tg),og=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],ig=Object.keys(da).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,sg=2,to=3,yr=4,Ic=5,Lc=Object.freeze({alt:ee,cite:ee,class:ee,colspan:to,controls:yr,datetime:ee,default:yr,disabled:yr,dir:ee,height:ee,href:ee,id:ee,kind:ee,label:ee,lang:ee,loading:ee,loop:yr,media:ee,muted:yr,poster:ee,rel:ee,role:ee,rowspan:to,scope:ee,sizes:ee,span:to,start:to,style:Ic,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),ag=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function Rc(){return Rc=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},Rc.apply(this,arguments)}function Ac({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?kc.default.createElement(i,Rc({className:t},e)):kc.default.createElement(i,Rc({className:t},e),n)}var ca=class{attribute(t,n){return n}node(t,n){return n}};function u_(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var wn=class{constructor(t,n,r){la(this,"greedy",!1),la(this,"options",void 0),la(this,"propName",void 0),la(this,"inverseName",void 0),la(this,"factory",void 0),this.options={...n},this.propName=t,this.inverseName=`no${t.charAt(0).toUpperCase()+t.slice(1)}`,this.factory=r??null}createElement(t,n){return this.factory?kc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return u_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var ro=x(O()),p_=x(d_());function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var QP=/(url|image|image-set)\(/i,lg=class extends ca{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(QP)&&delete n[r]}),n}},f_=1,YP=3,ZP=/^<(!doctype|(html|head|body)(\s|>))/i,JP=/^(aria-|data-|\w+:)/iu,eR=/{{{(\w+)\/?}}}/;function tR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Oc=class{constructor(t,n={},r=[],o=[]){var i;En(this,"allowed",void 0),En(this,"banned",void 0),En(this,"blocked",void 0),En(this,"container",void 0),En(this,"content",[]),En(this,"props",void 0),En(this,"matchers",void 0),En(this,"filters",void 0),En(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new lg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:ig),this.banned=new Set(og),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{index:d,length:y,match:S,valid:h,void:g,...m}=a,p=l.propName+String(s);d>0&&(f+=i.slice(0,d)),h?(f+=g?`{{{${p}/}}}`:`{{{${p}}}}${S}{{{/${p}}}}`,this.keyIndex+=1,s+=1,r[p]={children:S,matcher:l,props:{...o,...m,key:this.keyIndex}}):f+=S,l.greedy?(i=f+i.slice(d+y),f=""):i=i.slice(d+(y||S.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,`
16
16
  `);return o=o.replace(/\n{3,}/g,`
17
17
 
18
18
 
19
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||tR)();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(ZP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,p_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==f_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Lc[l]||Lc[s];if(!this.isSafe(t)||!l.match(JP)&&(!n&&(!u||u===sg)||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===yr?c=!0:u===eo?c=Number.parseFloat(String(c)):u!==Ic&&(c=String(c)),r[ag[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 da[t]?{...n,...da[t],tagName:t}:n}isSafe(t){if(typeof HTMLAnchorElement<"u"&&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===f_){let d=c.nodeName.toLowerCase(),y=this.getTagConfig(d);u&&(l.push(u),u="");let S=this.applyNodeFilters(d,c);if(!S)return;let h;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;h=this.parseNode(S,y);let m=s(S,h,y);if(m===null)return;if(typeof m<"u"){l.push(no.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,y))){var f;this.keyIndex+=1;let g=this.extractAttributes(S),m={tagName:d};g&&(m.attributes=g),y.void&&(m.selfClose=y.void),l.push(no.default.createElement(Ac,{...m,key:this.keyIndex},(f=h)!==null&&f!==void 0?f:this.parseNode(S,y)))}else l=[...l,...this.parseNode(S,y.tagName?y:n)]}else if(c.nodeType===YP){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(eR);){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],y;if(u)y=s.length,r.push(f.createElement(c,d));else{let S=o.match(new RegExp(`{{{/${a}}}}`));y=S.index+S[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,S.index),n),d))}o=o.slice(y)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function nR(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",f=c==="fragment"?!0:u,d;if(a)d=a;else{let y=new Oc(i??"",e).parse();y.length>0&&(d=y)}return d||(d=s),f?no.default.createElement(no.default.Fragment,null,d):no.default.createElement(Ac,{attributes:n,className:r,tagName:c},d)}function ci(e){let{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,...y}=e,S=i?[]:l,h=o?[]:a,g=c?[c]:[],m=u?[u]:[];S.forEach(C=>{C.onBeforeParse&&g.push(C.onBeforeParse.bind(C)),C.onAfterParse&&m.push(C.onAfterParse.bind(C))});let p=g.reduce((C,E)=>E(C,e),r??""),v=new Oc(p,y,S,h),_=m.reduce((C,E)=>E(C,e),v.parse());return no.default.createElement(nR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:f})}var vg=x(X());var ug={root:"_root_kxnai_1",agentText:"_agentText_kxnai_3",textInput:"_textInput_kxnai_8",textInputWrapper:"_textInputWrapper_kxnai_27",alert:"_alert_kxnai_31",alertText:"_alertText_kxnai_50",warning:"_warning_kxnai_60",success:"_success_kxnai_69"};var g_=x(X());var di=x(O());function m_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Nc(e){let t=(0,di.useRef)(null),[n,r]=(0,di.useState)(!1);return(0,di.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=m_((c,f)=>{let d=t.current;if(!d)return;let y=c/i,S=f/i,h=d.getBoundingClientRect(),g=y>h.x&&y<h.x+h.width&&S>h.y&&S<h.y+h.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:f})=>[c,f]),[l,u]=m_(()=>{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]}var Cn={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var cg=x(w()),rR=({inputElement:e,children:t})=>{let n=k("TabCompletion",Cn),[r,o]=Nc(e);return(0,cg.jsx)("mark",{ref:r,className:(0,g_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},fi=class extends wn{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,cg.jsx)(rR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var pi=x(O());function Mc(e){return e.contentEditable==="true"}function oR(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 h_(e){let{selectionStart:t,selectionEnd:n}=Mc(e)?oR(e):e;return[t,n]}function Dc(e){let[,t]=(0,pi.useState)(),n=(0,pi.useRef)(null);return n.current=h_(e),(0,pi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=h_(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 Fc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(vo);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 y_=x(O());function mi(e){(0,y_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function ro(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var v_,nn=new Map,iR=["bottom","height","left","right","top","width"],sR=(e={},t={})=>iR.some(n=>e[n]!==t[n]);function S_(e){var n,r;let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...S_(t)]:[]}function x_(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var dg=!1,__=()=>{dg=!0;let e=[];nn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),nn.delete(n);return}let r=n.getBoundingClientRect();sR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(x_,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),nn.size!==0&&(v_=window.requestAnimationFrame(__))};function fg(e,t){let n=S_(e),r=[],o=n.map((i,s)=>fg(i,a=>{r[s]=a;let l=nn.get(e);if(!l)return;let u=r.reduce(x_,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),nn.has(e)){let s=nn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else nn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!dg&&__()},unobserve(){o.forEach(s=>s.unobserve());let i=nn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||nn.delete(e),nn.size||(cancelAnimationFrame(v_),dg=!1)}}}}var w_,rn=new Map,E_=()=>{rn.forEach((e,t)=>{if(!t.isConnected){rn.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)))}),rn.size!==0&&(w_=window.requestAnimationFrame(E_))};function C_(e,t){return{observe(){let n=rn.size===0;rn.has(e)?rn.get(e).callbacks.push(t):rn.set(e,{visible:void 0,callbacks:[t]}),n&&E_()},unobserve(){let n=rn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||rn.delete(e),rn.size||cancelAnimationFrame(w_)}}}}var pg=["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 mg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function gi(e){return parseFloat(e)}function jc(e){return Math.round(e*1e6)}function b_(e){return e/1e6}function gg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=gi(e.width),i=gi(e.borderLeftWidth),s=gi(e.borderRightWidth),a=gi(e.paddingRight),l=b_(jc(o)-jc(i)-jc(s)),u=b_(jc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function oo(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",ro(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};mg(r,n,pg),gg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=C_(e,()=>{mg(r,n,pg),gg(r,e,n),i(),setTimeout(i,0)}),a=fg(e,u=>{if(u===null){t.onRemove&&t.onRemove(),n.remove();return}if(u.height===0&&u.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(mg(r,n,pg),gg(r,e,n),i(),n.style.top=`${u.top}px`,n.style.left=`${u.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let c=t.closestScrollElement.getBoundingClientRect(),f=window.getComputedStyle(t.closestScrollElement),d=gi(f.borderTopWidth),y=gi(f.borderBottomWidth),S=c.top+d-u.top,h=u.top+u.height+-(c.top+c.height-y);n.style.clipPath=`inset(${S}px 0px ${h}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(l=e.parentElement)==null||l.appendChild(n),a.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),a.unobserve(),s.unobserve()}]}var hg={};Ce(hg,{enUS:()=>aR,nlNL:()=>lR});var aR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"No placeholders found"}]},one:{value:[{type:0,value:"There is one placeholder in your message"}]},other:{value:[{type:0,value:"There are "},{type:7},{type:0,value:" placeholders in your message"}]}},offset:0,pluralType:"cardinal"}]},lR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"Alle placeholders zijn uit je bericht"}]},one:{value:[{type:0,value:"Er is 1 placeholder in jouw bericht"}]},other:{value:[{type:0,value:"Er zijn "},{type:7},{type:0,value:" placeholders in jouw bericht"}]}},offset:0,pluralType:"cardinal"}]};var fa=x(w()),T_=()=>(0,fa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,fa.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,fa.jsx)("path",{d:"M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"})]});var yg=x(w()),k_=()=>(0,yg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,yg.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"})});function uR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function Hc(e){return e?e instanceof ShadowRoot?Hc(e.host):e===e.ownerDocument.body?e.ownerDocument:uR(e)?e:Hc(e.parentNode):document.body}var P_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(P_||{}),bn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;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)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();mr(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(P_).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",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",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},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()});let n=Hc(this.element);if(n){let r=()=>{this.currentCaret!==null&&(this.currentCaret=null,this.emit("caret",null))};n.addEventListener("scroll",r),this.disposeHandlers.push(()=>{n.removeEventListener("scroll",r)})}this.currentSelection=this.getSelection()}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))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var Tn=class extends bn{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};var Qe=x(w()),cR=({value:e,onUse:t,...n})=>{var c;let r=j(hg),o=B(),i=k("EditSuggestionTextInput",ug),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(vo))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let f;return l.current&&(a(l.current),f=new Tn(l.current),f.on("change",({plainText:d})=>{o(Xe.actions.userInput({text:d,selection:f.getSelection()}))}),f.on("keydown",d=>{o(Xe.actions.registerKeyDown(xc(d))),d.code==="Enter"&&d.shiftKey&&t(f.getText())}),f.on("paste",({pastedText:d,selectionText:y})=>{o(Xe.actions.registerPaste({text:d,selectionText:y}))}),f.on("cut",({selectionText:d})=>{o(Xe.actions.registerCut(d))})),()=>{o(Xe.actions.reset()),f.dispose(),f.deactivate()}},[l]),(0,Tt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,Tt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let f=l.current.value.length;l.current.setSelectionRange(f,f),l.current.focus()},0)},[l]),(0,Qe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Qe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Qe.jsx)(dR,{inputElement:l.current,value:e}),(0,Qe.jsxs)("div",{className:(0,vg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Qe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Qe.jsx)(T_,{}):(0,Qe.jsx)(k_,{})]})]})},dR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",ug),r=(0,Tt.useRef)(null),o=Dc(e);return(0,Tt.useEffect)(()=>{Fc(e,o)},[o,e]),(0,Qe.jsx)(fR,{inputElement:e,children:(0,Qe.jsxs)("div",{ref:r,className:(0,vg.default)(n.root,n.agentText),children:[(0,Qe.jsx)(ci,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new fi("placeholders")],inputElement:e,boundaryRef:r}),(0,Qe.jsx)("br",{})]})})},fR=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=oo(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,Qe.jsx)("div",{ref:n,children:t})},R_=cR;var vi=x(O());var I_=x(O()),Bc=x(X());var Ye={root:"_root_185k9_1",list:"_list_185k9_2",listWrapper:"_listWrapper_185k9_6",listHorizontal:"_listHorizontal_185k9_10",page:"_page_185k9_19",search:"_search_185k9_25",pageNav:"_pageNav_185k9_33",pageTitle:"_pageTitle_185k9_41",pageBackButton:"_pageBackButton_185k9_48",listHeading:"_listHeading_185k9_62",listItem:"_listItem_185k9_70",listItemContent:"_listItemContent_185k9_79",listItemText:"_listItemText_185k9_97",listItemDescription:"_listItemDescription_185k9_105",truncate:"_truncate_185k9_112",lineClamp:"_lineClamp_185k9_118",listItemTitle:"_listItemTitle_185k9_125",listItemAction:"_listItemAction_185k9_132",listItemPrimaryAction:"_listItemPrimaryAction_185k9_146",listItemSelected:"_listItemSelected_185k9_151",sources:"_sources_185k9_155",sourcesTitle:"_sourcesTitle_185k9_162",source:"_source_185k9_155",icon:"_icon_185k9_177",searchIcon:"_searchIcon_185k9_194",searchInputWrapper:"_searchInputWrapper_185k9_199",searchInput:"_searchInput_185k9_199",select:"_select_185k9_220",selectType:"_selectType_185k9_237",selectWrapper:"_selectWrapper_185k9_241",image:"_image_185k9_271",imageSrc:"_imageSrc_185k9_278",imageSrcHidden:"_imageSrcHidden_185k9_289",imageSrcStatus:"_imageSrcStatus_185k9_293",imageTitle:"_imageTitle_185k9_303",actions:"_actions_185k9_308",actionsWrapper:"_actionsWrapper_185k9_312",actionsBar:"_actionsBar_185k9_318",actionButton:"_actionButton_185k9_327",actionShortcut:"_actionShortcut_185k9_345",actionShortcutFixKerning:"_actionShortcutFixKerning_185k9_352"};var io={};Ce(io,{enUS:()=>pR,nlNL:()=>mR});var pR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},mR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var vr=x(w()),gR=({src:e,title:t})=>{let n=k("CommandPalette",Ye),[r,o]=(0,I_.useState)("loading"),i=j(io);return(0,vr.jsxs)("div",{className:n.image,children:[(0,vr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Bc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,vr.jsx)("span",{className:(0,Bc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,vr.jsx)("span",{className:(0,Bc.default)(n.imageSrc,n.imageSrcStatus),children:(0,vr.jsx)(Xa,{})}),t&&(0,vr.jsx)("span",{className:n.imageTitle,children:t})]})},L_=gR;var A_=x(O()),O_=x(X());var pa=x(w());function Sg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Ye);return A_.default.Children.count(e)===0?null:(0,pa.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,pa.jsx)("h4",{className:r.listHeading,children:t}),(0,pa.jsx)("div",{className:(0,O_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ma=x(X());var Uc=x(O()),D_=x(w()),N_=Uc.default.createContext(void 0);function Sr(){let e=Uc.default.useContext(N_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var M_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Uc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,D_.jsx)(N_.Provider,{value:s,children:e})};var kt=x(w());function xg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:f,onChangeOpen:d}=Sr(),y=k("CommandPalette",Ye);function S(h){r(h),e&&d(!1)}return(0,kt.jsxs)("div",{className:(0,ma.default)(y.listItem,f===i&&y.listItemSelected),children:[(0,kt.jsxs)("button",{type:"button",className:(0,ma.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:S,...c,children:[(0,kt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,kt.jsx)("p",{className:(0,ma.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,kt.jsx)("p",{className:(0,ma.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate),children:a})]}),s&&(0,kt.jsx)(pl,{})]}),l&&(0,kt.jsxs)("div",{className:y.sources,children:[(0,kt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(h=>h.url?(0,kt.jsx)("a",{className:y.source,href:h.url,target:"_blank",title:h.url,rel:"noopener noreferrer",onClick:()=>o&&o(h),children:h.name},h.url):(0,kt.jsx)("span",{className:y.source,children:h.name},h.name))]})]})}var xr=x(w());function _g({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(io),s=k("CommandPalette",Ye),{page:a}=Sr();return a!==n?null:(0,xr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,xr.jsxs)("div",{className:s.pageNav,children:[(0,xr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,xr.jsx)(Tc,{}),i("back")]}),t&&(0,xr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,xr.jsx)(pl,{})]}),e]})}var _r=x(O());var zc=()=>/Mac/i.test(navigator.platform);var hR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},U=hR;function yR(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function re(e){return Array.isArray(e)?e.map(re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[yR(n)]:re(e[n])}),{}):e}function wg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function we(e){return Array.isArray(e)?e.map(we):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[wg(n)]:we(e[n])}),{}):e}var vR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},ha=e=>{var t,n,r;return{timezone:((t=e.info.visitorInfo)==null?void 0:t.visitorTimeZone)||Intl.DateTimeFormat().resolvedOptions().timeZone,agentName:((n=e.info.agentInfo)==null?void 0:n.agentNickname)||"",visitorName:((r=e.info.visitorInfo)==null?void 0:r.visitorName)||""}},ga=M("info/setAgentInfo",async(e,t)=>{let{deepdeskAPI:n}=t.extra;if(!e.agentId&&!e.agentNickname)throw new Error("At least provide agentId or agentNickname");let r=await n.client.get("/apis/admin/session/me/",{version:null}),o={};return r.external_id||(o.external_id=e.agentId),r.nickname||(o.nickname=e.agentNickname),!o.external_id&&!o.nickname?re(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),re(r))}),Eg=M("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),Cg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),F_=e=>e.info.agentInfo,j_=H({name:"info",initialState:vR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ga.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ga.rejected,t=>{t.fetchState="error"}).addCase(ga.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo={...t.agentInfo,...n.meta.arg,agentId:n.payload.externalId||n.meta.arg.agentId||"",agentNickname:n.payload.nickname||n.meta.arg.agentNickname||""}}).addCase(Eg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Cg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:H_}=j_.actions,B_=j_.reducer;var Vc={list:[],fetchState:"idle",isOpen:!1,page:"search"},U_=e=>e.search.isOpen,z_=e=>e.search.page,V_=e=>e.search.list;function K_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var so=M("search/getAll",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i}=await n.search({profile:o,query:e.query,filters:{type:e.type},params:ha(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),W_=H({name:"search",initialState:Vc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Vc.fetchState,e.list=Vc.list}},extraReducers:e=>{e.addCase(so.pending,t=>{t.fetchState="loading"}).addCase(so.rejected,(t,n)=>{t.fetchState="error",U.error(n.error)}).addCase(so.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>Vc)}}),{resetSearch:Kc,setIsOpen:at,setPage:ze}=W_.actions,$_=W_.reducer;var SR=/(https?:\/\/[^\s]+)/,Wc=e=>e.split(" ").find(t=>SR.test(t));var bg=x(X());var $c=x(w()),xR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Ye);return(0,$c.jsxs)("button",{type:"button",...r,onClick:e,className:(0,bg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,$c.jsx)("span",{className:(0,bg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},hi=xR;var kn=x(w()),_R=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Ye),a=j(io),{selected:l,setSelected:u}=Sr(),c=i[l],f=c&&typeof c.text=="string"&&Wc(c.text),d=(0,_r.useRef)(null);function y(v){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,E=0;v==="down"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C===_.length-1?0:C+1):v==="up"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C?C-1:_.length-1):u(0);let b=_[E];b&&typeof E=="number"&&(u(E),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function S(){if(!d.current)return;let v=d.current.querySelectorAll(".command-palette-list-item"),_=0;v.forEach((E,b)=>{b===l&&(_=b)});let C=v[_];C&&C.click()}let h=()=>{f&&window.open(f,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},p=(0,_r.useCallback)(v=>{if(v.key==="Enter"&&v.altKey&&f){h();return}if(v.key==="Enter"&&v.shiftKey){m();return}if(v.key==="ArrowDown"){v.preventDefault(),v.stopPropagation(),y("down");return}if(v.key==="ArrowUp"){v.preventDefault(),v.stopPropagation(),y("up");return}v.key==="Enter"&&l!==-1&&(v.preventDefault(),v.stopPropagation(),S())},[l]);return(0,_r.useEffect)(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]),(0,kn.jsxs)("div",{className:s.actions,children:[(0,kn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,kn.jsxs)("div",{className:s.actionsBar,children:[f&&(0,kn.jsx)(hi,{onClick:h,shortKeys:[zc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,kn.jsxs)(_r.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,kn.jsx)(hi,{onClick:m,shortKeys:[8679,8629],children:n}),(0,kn.jsx)(hi,{onClick:g,shortKeys:[8629],children:t})]})]})]})},G_=_R;var X_=x(O());var ya=x(w()),yi=()=>(0,ya.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,ya.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,ya.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 Bt=x(w());function wR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Ye);return(0,Bt.jsxs)("div",{className:l.search,children:[(0,Bt.jsx)("div",{className:l.searchIcon,children:(0,Bt.jsx)(yi,{})}),(0,Bt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Bt.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,Bt.jsx)("div",{className:l.selectWrapper,children:(0,Bt.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,Bt.jsx)("option",{children:r}),o.map(u=>(0,Bt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var Q_=(0,X_.forwardRef)(wR);var va=x(w());function ao({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}){let[y,S]=(0,vi.useState)(0),h=(0,vi.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var p;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(p=h.current)==null||p.focus();return}if(d.length>0){i("");return}a(!1)};return(0,vi.useEffect)(()=>{S(0)},[d,r]),(0,va.jsx)(ui,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:m,onClose:g,children:(0,va.jsxs)(M_,{selected:y,setSelected:S,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,va.jsx)(Q_,{ref:h,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}ao.Page=_g;ao.List=Sg;ao.Image=L_;ao.ListItem=xg;ao.ActionsBar=G_;ao.Button=hi;var te=ao;var Fe=x(w()),ER=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",a_),l=B(),u=j(eg),c=L(S=>S.overlayInput.text);(0,Tg.useEffect)(()=>{e&&(l(Xe.actions.reset()),l(Xe.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Xe.actions.commitSuggestion()))},[e]);let f=S=>{S.preventDefault(),d(c)},d=S=>{l(Ec(S)),t(S)},y=S=>h=>{c!==s?window.confirm(u("warning"))&&S(h):S(h)};return(0,Tg.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,Fe.jsxs)("div",{className:a.root,children:[(0,Fe.jsxs)("div",{className:a.content,children:[e.title&&(0,Fe.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,Fe.jsx)($d,{labels:e.searchKeywords}),(0,Fe.jsx)(R_,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:f,children:[(0,Fe.jsxs)("div",{children:[(0,Fe.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&y(i),children:(0,Fe.jsx)(Tc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&y(o),children:(0,Fe.jsx)(l_,{})})]}),(0,Fe.jsxs)("div",{className:a.primaryButtons,children:[(0,Fe.jsx)(te.Button,{onClick:y(n),shortKeys:["esc"],children:u("dismiss")}),(0,Fe.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},qc=ER;var CR=["{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}"],bR=new RegExp(CR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function Y_(e,t){let n=e.split(bR),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 Z_(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var ew={suggestions:[],fetchState:"idle",isInitialRequest:null},J_={default:ew},tw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},nw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},rw=e=>{let t=Object.keys(e.textSuggestions).map(n=>{var r;return(r=e.textSuggestions[n])==null?void 0:r.fetchState});return t.length===0?!0:t.every(n=>n!=="done")},Si=e=>e.textSuggestions,ow=e=>{let t=e.toLowerCase();return n=>n.text.toLowerCase().startsWith(t)},Gc=fe("textSuggestions/refresh"),Pn=M("textSuggestions/recommendations",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=ai(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,ha(r),e);if(e==="default"){let c=s?l.filter(ow(a)):l;t.dispatch(_n(c.slice(0,i)))}return l}),Sa=M("textSuggestions/autocompletions",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,deanonymize:s,inlineSuggestions:a}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getAutocompleteSuggestions(o,{...ha(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(ow(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?Y_(c.text,e):c.text}))),l=Z_(l,i),t.dispatch(_n(l)),l}),iw=H({name:"textSuggestions",initialState:J_,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}}}},setSuggestionState(e,t){return t.payload}},extraReducers:e=>{e.addCase(Pn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||ew;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Pn.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Pn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Sa.pending,t=>{t.default.fetchState="loading"}).addCase(Sa.rejected,t=>{t.default.fetchState="error"}).addCase(Sa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>J_)}}),{setTextSuggestions:sw,setSuggestionState:aw}=iw.actions,lw=iw.reducer;var uw={contentType:null,suggestion:null},cw=e=>e.activeSuggestion.suggestion,dw=e=>e.activeSuggestion.contentType,fw=H({name:"activeSuggestion",initialState:uw,reducers:{setActiveSuggestion(e,t){let{contentType:n,suggestion:r}=t.payload;e.contentType=n,e.suggestion=r},resetActiveSuggestion(e){e.contentType=null,e.suggestion=null}},extraReducers:e=>{e.addCase(J,()=>uw)}}),{setActiveSuggestion:Rn,resetActiveSuggestion:kg}=fw.actions,pw=fw.reducer;var Pg={};Ce(Pg,{enUS:()=>TR,nlNL:()=>kR});var TR={warning:[{type:0,value:"Are you sure you want to discard the message?"}],editContentLabel:[{type:0,value:"Edit and view suggestion"}],overlayLabel:[{type:0,value:"Close dialog"}]},kR={warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}],editContentLabel:[{type:0,value:"Bewerk en bekijk suggestie"}],overlayLabel:[{type:0,value:"Sluit"}]};var PR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Xc=({ui:e})=>e.overlayCollapsed;var mw=H({name:"ui",initialState:PR,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputHasFocus(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:xa,setInputHasFocus:xi,setOverlayCollapsed:wr,setOpenOverlayWhenTyping:gw,setOverlayCollapsedUserOverwrite:hw}=mw.actions,yw=mw.reducer;var _a=x(O()),Sw=x(w()),vw=_a.default.createContext(null),_i=({broadcastEvents:e,children:t})=>{let n=_a.default.useMemo(()=>e,[]);return(0,Sw.jsx)(vw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,_a.useContext)(vw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var RR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Ut=e=>e.auth.isLoggedIn,xw=e=>e.auth.loginFetchState,_w=e=>e.auth.verifyFetchState,ww=e=>e.auth.showLoginOverlay,Er=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Ew=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),wa=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Cw=H({name:"auth",initialState:RR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Er.pending,t=>{t.loginFetchState="loading"}),e.addCase(Er.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Er.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(wa.pending,t=>{t.verifyFetchState="loading"}),e.addCase(wa.rejected,t=>{t.verifyFetchState="error"}),e.addCase(wa.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:wi,setShowLoginOverlay:bw}=Cw.actions,Tw=Cw.reducer;var Rg="SetActiveSuggestion",Ei="ShowLoginOverlay",Ig="UserLoggedIn",IR="UserLoggedOut",In="ApplySuggestion",Lg="ApplyImageSuggestion",LR="ShowCommandPalette",AR=e=>({[Rg]:t=>{e.dispatch(aw(t.state)),e.dispatch(Rn({contentType:t.contentType,suggestion:t.suggestion}))},[LR]:t=>{e.dispatch(at(t.isOpen)),t.page&&e.dispatch(ze(t.page))},[Ei]:t=>{e.dispatch(bw(t))},[Ig]:()=>{e.dispatch(Er())},[IR]:()=>{e.dispatch(Er())},[Lg]:t=>{e.dispatch(bc({suggestion:t.suggestion}))},[In]:t=>{e.dispatch(jt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(hr())}}),kw=AR;var Ag=x(w()),OR=()=>{var S;let[e,t]=(0,Pw.useState)(!1),n=L(cw),r=L(dw),o=L(Si),i=B(),s=Pt(),a=j(Pg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(kg()),i(xi(!0)),i(Xe.actions.reset())},c=(h,g)=>{i(kg()),i(xi(!0)),s.send(In,{text:h,suggestion:{...g,source:`${g.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let f=(S=o[r])==null?void 0:S.suggestions.indexOf(n),d=f===0||f===null?void 0:()=>i(Rn({contentType:r,suggestion:o[r].suggestions[f-1]})),y=f===o[r].suggestions.length-1||f===null?void 0:()=>i(Rn({contentType:r,suggestion:o[r].suggestions[f+1]}));return(0,Ag.jsx)(ui,{autoFocus:!0,isOpen:f!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Ag.jsx)(qc,{onTouched:t,onDismiss:u,onUse:h=>c(h,n),suggestion:n,onNext:y,onPrevious:d})})},Rw=OR;var Qc=x(X()),zt=x(O());var Lw=x(X());var Iw={root:"_root_1ukx5_1"};var Aw=x(w()),NR=({className:e,value:t,...n})=>{let r=k("TextInput",Iw);return(0,Aw.jsx)("input",{className:(0,Lw.default)(e,r.root),type:"text",value:t,...n})},Ea=NR;var Og={};Ce(Og,{enUS:()=>MR,nlNL:()=>DR});var MR={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"}]},DR={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 Ow={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=x(w());var FR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},jR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(Og),s=k("LoginTokenDialog",Ow),a=L(_w),l=B(),u=D("productName"),[c,f]=(0,zt.useState)(e||""),[d,y]=(0,zt.useState)(0),[S,h]=(0,zt.useState)(""),g=(0,zt.useCallback)(async _=>{_.preventDefault(),l(Ew({email:c})),y(1)},[n,c]),m=()=>{h(""),y(0)},p=(0,zt.useCallback)(async _=>{_.preventDefault();let C=FR(_.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:v}));return}l(wa({token:C}))},[n]),v=(0,zt.useMemo)(()=>_=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:_},"back-button"),[]);return(0,zt.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:v})),a==="done"&&r()},[a]),(0,he.jsx)(ui,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,he.jsxs)("div",{className:s.root,children:[(0,he.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,he.jsxs)("form",{onSubmit:g,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,he.jsx)(Ea,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>f(_.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,Qc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:p,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Ea,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),S&&(0,he.jsx)("div",{className:s.errorMessage,children:S}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Qc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Qc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Nw=jR;var Dw=x(w()),HR=()=>{let e=L(ww),t=L(F_),n=D("adminUrl"),r=Pt(),o=()=>r.send(Ei,!1),i=()=>{r.send(Ei,!1),r.send(Ig)};return(0,Dw.jsx)(Nw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Mw=HR;var l1=x(Dg()),Je=x(O());var rI={data:null,fetchState:"idle"},Bw=e=>e.contentTypes.data,Ca=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),oI=H({name:"contentTypes",initialState:rI,reducers:{},extraReducers:e=>{e.addCase(Ca.pending,t=>{t.fetchState="loading"}).addCase(Ca.rejected,t=>{t.fetchState="error"}).addCase(Ca.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Uw=oI.reducer;function ba(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 zw=x(O());function Vw(e,t){(0,zw.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 Ta=x(O());var Kw={data:null,fetchState:"idle"},Yc=e=>{var i;let t=[],{visitorName:n}=e.info.visitorInfo??{},{agentName:r,agentNickname:o}=e.info.agentInfo??{};return r&&r!==n&&t.push(r),o&&o!==n&&t.push(o),((i=e.entities.data)==null?void 0:i.filter(s=>!t.includes(s.text)))??null},Vt=M("entities/getEntities",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=await o();return i.length===0?Promise.resolve([]):n.getEntities(i)}),iI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),sI=H({name:"entities",initialState:Kw,reducers:{},extraReducers:e=>{e.addCase(Vt.pending,t=>{t.fetchState="loading"}).addCase(Vt.rejected,t=>{t.fetchState="error"}).addCase(Vt.fulfilled,(t,n)=>{t.fetchState="done",t.data=iI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Kw)}}),Ww=sI.reducer;var Fg={};Ce(Fg,{enUS:()=>aI,nlNL:()=>lI});var aI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},lI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var $w={root:"_root_17kae_1",empty:"_empty_17kae_5"};var lo=x(w()),uI=({onCopy:e,onUse:t})=>{let n=(0,Ta.useRef)(null),r=k("EntitiesList",$w),o=j(Fg),i=L(Yc),s=B();return(0,Ta.useEffect)(()=>{s(Vt())},[]),(0,Ta.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,lo.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,lo.jsx)(te.ActionsBar,{primaryLabel:o("copy"),secondaryLabel:o("use"),onPrimary:(a,l)=>e(i[l]),onSecondary:(a,l)=>t(i[l]),list:i.map(a=>({text:a.text,type:a.label,primaryAction:"copy",secondaryAction:"use"})),children:(0,lo.jsx)(te.List,{children:i.map((a,l)=>(0,lo.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,lo.jsx)("p",{className:r.empty,children:o("noResults")})]})},qw=uI;var Kt=x(O());var Gw={data:null,fetchState:"idle"},Xw=e=>e.summary.data,Qw=e=>e.summary.fetchState==="error",Ln=M("summary/getSummary",async(e,t)=>{let n=t.getState().profile.data;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:r,dynamicThunkObject:o}=t.extra;if(!o.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let i=o.conversationQuery,s=await i();return s.length===0?Promise.reject(new Error("No messages are included")):{summary:await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel})}}),cI=H({name:"summary",initialState:Gw,reducers:{},extraReducers:e=>{e.addCase(Ln.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Ln.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Ln.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>Gw)}}),Yw=cI.reducer;var jg={};Ce(jg,{enUS:()=>dI,nlNL:()=>fI});var dI={copy:[{type:0,value:"Copy"}],error:[{type:0,value:"Could not generate a summary"}],loading:[{type:0,value:"Generating summary, this may take a few moments."}]},fI={copy:[{type:0,value:"Kopieer"}],error:[{type:0,value:"Kon helaas geen samenvatting genereren."}],loading:[{type:0,value:"Samenvatting wordt gemaakt, dit kan even duren."}]};var Zw={root:"_root_6ahh3_1",actions:"_actions_6ahh3_5",main:"_main_6ahh3_11",textInput:"_textInput_6ahh3_15",loading:"_loading_6ahh3_34",error:"_error_6ahh3_38"};var An=x(w()),pI=({onCopy:e})=>{let t=(0,Kt.useRef)(null),n=k("SummaryForm",Zw),[r,o]=(0,Kt.useState)(""),i=j(jg),s=L(Xw),a=L(Qw),l=B(),u=()=>{l(st({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(st({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,Kt.useEffect)(()=>{l(Ln())},[]),(0,Kt.useEffect)(()=>{o(s||"")},[s]),(0,Kt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Kt.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,An.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,An.jsx)("p",{className:n.error,children:i("error")}):(0,An.jsxs)(Kt.Fragment,{children:[(0,An.jsx)("div",{className:n.main,children:(0,An.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:f=>o(f.target.value)})}),(0,An.jsx)("div",{className:n.actions,children:(0,An.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},Jw=pI;var Hg={};Ce(Hg,{enUS:()=>mI,nlNL:()=>gI});var mI={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link 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"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],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?"}]},gI={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:"Link 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"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],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 Cr=x(O());var Bg={};Ce(Bg,{enUS:()=>hI,nlNL:()=>yI});var hI={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"}]},yI={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 e1={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var Ug={data:[],fetchState:"idle"},t1=e=>{var t;return(t=e.answer)==null?void 0:t.data},n1=e=>e.answer.fetchState,bi=fe("answer/resetKnowledgeSearch"),Ci=M("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeAssist({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),vI=H({name:"answer",initialState:Ug,reducers:{},extraReducers:e=>{e.addCase(Ci.pending,t=>{t.fetchState="loading"}).addCase(Ci.rejected,t=>{t.fetchState="error"}).addCase(Ci.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Ug).addCase(bi,()=>Ug)}}),r1=vI.reducer;var ka=x(w()),o1=()=>(0,ka.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,ka.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,ka.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 Ze=x(w()),SI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Cr.default.useState(""),{setSelected:s}=Sr(),a=(0,Cr.useRef)(null),l=k("EntitiesList",e1),u=j(Bg),c=B(),f=L(t1),d=L(n1),y=async h=>{h.preventDefault(),h.stopPropagation(),o!==""&&c(Ci({question:o,promptInstruction:r}))},S=(h,g)=>{c(st({name:"knowledge assist source viewed",data:{question:g,sourceViewed:h.url||h.name},options:{includeConversationData:!0}}))};return(0,Cr.useEffect)(()=>{var h;n&&d==="idle"?c(Ci({question:n,promptInstruction:r})):(h=a.current)==null||h.focus()},[a,d]),(0,Cr.useEffect)(()=>{d==="done"&&(c(st({name:"knowledge assist question answered",data:{question:o||n,sources:f[f.length-1].answer.sources,answer:f[f.length-1].answer.answer,isFollowUpQuestion:f.length>1},options:{includeConversationData:!0}})),s(f.length-1),i(""))},[d,f]),(0,Cr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,f]),(0,Ze.jsxs)("div",{className:l.root,children:[f.length>0&&(0,Ze.jsx)("div",{className:l.alignRight,children:(0,Ze.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ze.jsxs)(te.ActionsBar,{list:f.map(({answer:h})=>({text:h.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:h=>e(h.text),children:[f.map(({question:h,answer:g},m)=>(0,Ze.jsx)(te.List,{children:(0,Ze.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:g.answer,closeOnSelect:!0,onClick:()=>e(g.answer),onSourceClick:p=>S(p,h),sources:g.sources,styles:{title:l.question,description:l.answer},children:h})},`${g.answer}_${m}`)),d==="loading"&&(0,Ze.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ze.jsx)("p",{className:l.status,children:u("error")}),(0,Ze.jsxs)("form",{className:l.form,onSubmit:y,children:[(0,Ze.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:h=>{s(-1),i(h.target.value)}}),(0,Ze.jsx)("button",{type:"submit",className:l.submit,children:(0,Ze.jsx)(o1,{})})]})]})]})},i1=SI;var xI={data:null,fetchState:"idle"},Ti=e=>e.profile.data,Zc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Pa=M("profile/getProfile",async(e,t)=>{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)}),_I=H({name:"profile",initialState:xI,reducers:{},extraReducers:e=>{e.addCase(Pa.pending,t=>{t.fetchState="loading"}).addCase(Pa.rejected,t=>{t.fetchState="error"}).addCase(Pa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),s1=_I.reducer;var Ee=x(w()),wI=200,EI=5,CI=4,bI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),a1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),TI=()=>{let e=B(),t=Pt(),n=j(Hg),[r,o]=(0,Je.useState)(!1),[i,s]=(0,Je.useState)(""),a=L(z_),l=L(Ti),[u,c]=(0,Je.useState)(null),[f,d]=(0,Je.useState)([]),[y,S]=(0,Je.useState)(),h=L(Ut),g=D("showSearch"),m=D("showEntitiesCommand"),p=D("showSummaryCommand"),v=D("showKnowledgeSearch"),_=D("showImageSearch"),C=D("searchTriggerKey"),E=L(Bw),b=L(V_),R=L(U_),P=I=>ln(b.filter(W=>W.type===I.toUpperCase()),I),N=[{value:"PERSONAL",label:n("personalSuggestions"),list:P("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:P("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:P("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:P("IMAGE"),listOrientation:"horizontal",shouldShow:_}].filter(I=>I.shouldShow),G=[{label:n("entitiesClipboard"),onClick:()=>e(ze("entities")),shouldShow:m&&a1(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(ze("summary")),shouldShow:p&&a1(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(ze("knowledgeAssist")),shouldShow:v,experimental:!0}].filter(I=>I.shouldShow),V=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],He=(0,Je.useCallback)((0,l1.default)((I,W)=>{e(so({query:I,type:W,tags:["search-overlay"]}))},wI),[]),an=bI([...V,...N]),qt=(0,Je.useCallback)((I,W)=>{if(!W)return;let Lt=[...N,...V].find(({value:Bn})=>Bn===W);Lt&&(e(ze("edit")),c({...I,searchTerm:void 0}),d(Lt.list))},[e,u,V]),fo=(0,Je.useCallback)((I,W)=>{switch(W.type){case"IMAGE":t.send(Lg,{suggestion:W});break;default:t.send(In,{text:I,suggestion:W})}e(at(!1))},[e]),Fi=I=>{ba(I.text),e(st({name:"entity copied",data:{entity:I,type:"copy"}})),e(at(!1))},Ir=I=>{t.send(In,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(st({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(ze("search")),e(bi()),e(at(!1))},Ua=I=>{ba(I),e(at(!1))},za=I=>{t.send(In,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(at(!1))},ji=u===null||f.indexOf(u)-1<0?void 0:()=>c(f[f.indexOf(u)-1]),Hi=u===null||f.indexOf(u)===f.length-1?void 0:()=>c(f[f.indexOf(u)+1]);function ln(I,W){return I.slice(0,y?10:W.toLowerCase()==="image"?CI:EI)}function Bi(I,W,Lt){return W.reduce((Bn,un)=>Lt&&y===Lt?un.length+Bn:ln(un,Lt).length+Bn,I)}function Lr(I){return W=>{r?window.confirm(n("warning"))&&(I(W),o(!1)):I(W)}}return(0,Je.useEffect)(()=>{i?He(i,y):e(Kc())},[i,y]),(0,Je.useEffect)(()=>{a==="search"&&e(bi())},[a]),(0,Je.useEffect)(()=>{h&&e(Ca())},[h]),Vw(C,()=>e(at(!0))),!g||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Lr(I=>e(at(I))),onChangeType:I=>S(I),onChangePage:Lr(I=>e(ze(I))),selectedType:y,search:i,page:a,isOpen:R,types:[...V,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...G.map(I=>({text:I.label,type:"command"})),...an.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},W)=>fo(I,an[W]),onSecondary:(I,W)=>{qt(an[W-G.length],an[W-G.length].type)},children:[G.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:G.map((I,W)=>(0,Ee.jsx)(te.ListItem,{index:Bi(W,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...V,...N].map(({value:I,label:W,list:Lt,lineClamp:Bn,listOrientation:un},Ui)=>(0,Ee.jsx)(te.List,{heading:W,orientation:un==="horizontal"?"horizontal":"vertical",children:ln(Lt,I).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Bi(G.length+dt,[...V,...N].slice(0,Ui).map(({list:Ar})=>Ar),I),closeOnSelect:!1,lineClamp:Bn,onClick:()=>fo(ct.text,ct),description:I!=="IMAGE"?ct.title&&ct.text:void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Lr(()=>{e(ze("search")),c(null)}),children:u&&(0,Ee.jsx)(qc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(ze("search")),c(null),d([])},onNext:Hi,onPrevious:ji,onUse:I=>{e(ze("search")),fo(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(at(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:Lr(()=>{e(ze("search"))}),children:(0,Ee.jsx)(qw,{onUse:za,onCopy:Fi})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:Lr(()=>{e(ze("search"))}),children:(0,Ee.jsx)(Jw,{onCopy:Ua})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),isExperimental:!0,onDismiss:Lr(()=>{e(bi()),e(ze("search"))}),children:(0,Ee.jsx)(i1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Ir,onResetQuestion:()=>{e(bi()),s("")}})})]})},u1=TI;var ki=x(w()),kI=()=>{let e=D("showSearch"),t=D("isEmbedded");return(0,ki.jsxs)(c1.Fragment,{children:[e&&(0,ki.jsx)(u1,{}),(0,ki.jsx)(Rw,{}),t&&(0,ki.jsx)(Mw,{})]})},d1=kI;function Pi(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input.userCommitted;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 Jc=x(O());var Ii=x(O());var f1=x(O());function p1(e,t,n){(0,f1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var PI=/[.*+?^${}()|[\]\\]/g,RI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function II(e){return e.replace(PI,"\\$&")}function LI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function AI(e){return e.search(RI)}function m1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${II(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function g1(e){return e.replace(vo,'<mark data-type="placeholder">$1</mark>')}function Ri(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function OI(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 zg(e,t,n={}){if(t){let r=LI(t.toLowerCase(),e.toLowerCase()),o=Ri(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=AI(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Ey).length>3||t.length>30?OI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ri(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var h1={badge:"_badge_1syy2_1",formattedText:"_formattedText_1syy2_5"};var Vg=x(w()),MI=["search","personal-collection-search","search-autocomplete"];function DI(e,t,n,r={}){let o="";return MI.includes(t)?o=m1(zg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=zg(e,n,r),r.placeholders===!0&&(o=g1(o)),o}var FI=()=>{},jI=({index:e,selected:t,suggestion:n})=>{let r=D("inlineSuggestions"),o=L(ai),i=B(),s=k("TextSuggestion",h1),a=(0,Ii.useRef)(null);(0,Ii.useEffect)(()=>{let u=setTimeout(()=>{i(Jx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),p1(a,"click",()=>{i(ia(e)),i(jt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Ii.useMemo)(()=>DI(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"&&!r?null:(0,Vg.jsx)(oe,{ref:a,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:FI,children:(0,Vg.jsx)(ci,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},y1=jI;var Kg=x(w()),HI=({suggestions:e,selectedIndex:t,reverse:n})=>{let r=(0,Jc.useMemo)(()=>{let o=e.map((i,s)=>(0,Kg.jsx)(y1,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]);return(0,Kg.jsx)(Jc.Fragment,{children:r})},ed=HI;var v1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var Ra=x(w()),BI=({textSuggestions:e,selectedIndex:t})=>{let n=k("InlineSuggestionsOverlay",v1),r=L(Pi),o=B(),i=L(Ut),s=L(si),a=L(Xc),l=D("showTextSuggestions");return mi(()=>{o(wr({collapse:!0,skipWhenInputFocus:!0}))}),a||!r||!l||e.length===0||i!==!0||s===!1?null:(0,Ra.jsx)("div",{className:n.root,"data-variant":"inline",children:(0,Ra.jsx)("div",{className:n.paper,children:(0,Ra.jsx)(ht,{children:(0,Ra.jsx)(ed,{suggestions:e,selectedIndex:t})})})})},UI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),S1=Sn(UI)(BI);var nd=x(X()),Li=x(O());var x1=x(O());function _1(e,t){let[n,r]=(0,x1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return U.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){U.error(s)}}]}var E1=x(X()),On=x(O());var Wg={};Ce(Wg,{enUS:()=>zI,nlNL:()=>VI});var zI={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"}]}]},VI={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 w1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var br=x(w()),$g=(e,t,n)=>r=>(0,br.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),KI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Wg),i=Pt(),s=k("Login",w1),a=D("productName"),l=(0,On.useCallback)(h=>{h.preventDefault(),r&&r(parseInt(h.target.value,10))},[]),u=(0,On.useCallback)(h=>{h.preventDefault(),i.send(Ei,!0)},[t]),c=(0,On.useMemo)(()=>h=>(0,br.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:h},"login"),[t]),f=(0,On.useCallback)(h=>(0,br.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:h},"prompt"),[u]),{min:d,hour:y,day:S}=(0,On.useMemo)(()=>({min:$g(s,60*10,l),hour:$g(s,60*60,l),day:$g(s,60*60*12,l)}),[]);return(0,br.jsxs)("div",{className:(0,E1.default)(e,s.root),children:[o("loginPlease",{login:n?f:c,productName:a}),r&&(0,br.jsxs)(On.Fragment,{children:[(0,br.jsx)("br",{}),o("snooze",{min:d,hour:y,day:S})]})]})},td=KI;var C1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Ia=x(w()),WI=({title:e})=>{let t=k("SearchTrigger",C1),n=B();return(0,Ia.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(at(!0)),children:[(0,Ia.jsx)(yi,{}),(0,Ia.jsx)("span",{className:t.text,children:e})]})},b1=WI;var qg={};Ce(qg,{enUS:()=>$I,nlNL:()=>qI});var $I={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"}]},qI={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 T1={root:"_root_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ue=x(w()),GI=({textSuggestions:e,selectedIndex:t})=>{let n=k("SuggestionsOverlay",T1),r=j(qg),o=L(Pi),i=Gx(),s=B(),a=(0,Li.useRef)(null),l=D("searchTriggerKey"),u=D("productName"),c=L(Xc),f=L(Ut),d=L(si),[y,S]=(0,Li.useState)(null),h=D("showSearch"),g=D("showTextSuggestions"),m=D("adminUrl"),p=D("isEmbedded"),[v,_]=_1("dd-snooze-until-ms",0),C=c||v>Date.now(),E=e.filter(P=>P.source!=="gpt").length,b=()=>{C&&_(0),s(hw(!C))},R=P=>{let N=Date.now()+P*1e3;_(N),U.info(`Snooze until: ${new Date(N)}`),s(wr({collapse:!0}))};return(0,Li.useEffect)(()=>{E===0&&S(null)},[e,E]),mi(()=>{s(wr({collapse:!0,skipWhenInputFocus:!0}))}),f===null||d===!1?null:f===!1?(0,ue.jsxs)("div",{ref:a,className:(0,nd.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:n.triggersRight,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),(0,ue.jsx)("div",{className:n.collapsible,children:(0,ue.jsx)(td,{loginUrl:m,isEmbedded:p,onSnooze:R})})]}):!i||!o?null:(0,ue.jsxs)("div",{ref:a,className:(0,nd.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:h&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>S(r(zc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:l.toUpperCase()})),onMouseLeave:()=>S(null),children:(0,ue.jsx)(b1,{title:r("search")})})}),(0,ue.jsxs)("div",{className:n.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,nd.default)(!y&&n.hintsHidden,n.hints),children:y}),(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),E>0&&g&&(0,ue.jsx)("div",{className:n.collapsible,onFocus:()=>{},children:(0,ue.jsx)(ht,{children:(0,ue.jsx)(ed,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},XI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),k1=Sn(XI)(GI);var La=x(w()),QI=({children:e})=>{let n=D("locale").replace("-","");return(0,La.jsx)(zd.Provider,{value:n,children:e})},YI=({store:e,customStyles:t={},children:n})=>(0,La.jsx)(Vm,{store:e,children:(0,La.jsx)(QI,{children:(0,La.jsx)(Vi.Provider,{value:t,children:n})})}),Ai=YI;var gd=x(X());var Dn=x(O());var P1=x(O()),ZI=["div","span","mark","strong","b","i","u","em"];function Gg(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(ZI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,P1.cloneElement)(r,{children:Gg(s,t,n+1)})]}return[...e,...t]}function Tr(e){return e.tagName.toLowerCase()==="textarea"}var R1={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var j1=x(X());var dd=x(O());function I1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function rd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function L1(e){return e!=null}var Qg=x(X()),Rt=x(O());var od=x(O()),JI=["bottom","height","left","right","top","width"],eL=(e={},t={})=>JI.some(n=>e[n]!==t[n]),Nn=new Map,A1,O1=()=>{let e=[],t=[];Nn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();eL(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Nn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),A1=window.requestAnimationFrame(O1)};function tL(e,t){return{observe(){let n=Nn.size===0;if(Nn.has(e)){let r=Nn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Nn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&O1()},unobserve(){let n=Nn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Nn.delete(e),Nn.size||cancelAnimationFrame(A1)}}}}function Xg(e){let[t,n]=(0,od.useState)(null);return(0,od.useLayoutEffect)(()=>{if(!e.current)return;let r=tL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Oi=x(O()),M1=x(Iu());var N1={root:"_root_1jq08_1"};var D1=({children:e})=>{let[t,n]=(0,Oi.useState)(null),r=(0,Oi.useContext)(Vi);return(0,Oi.useLayoutEffect)(()=>{let o=document.createElement("div");return ro(o),o.classList.add(N1.root),r!=null&&r.portalRootNode&&o.classList.add(r==null?void 0:r.portalRootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,M1.createPortal)(e,t):null};var on={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var id=x(w()),sd=(e=!1)=>{let[t,n]=(0,Rt.useState)(e),r=(0,Rt.useCallback)(()=>n(!0),[]),o=(0,Rt.useCallback)(()=>n(!1),[]),i=(0,Rt.useCallback)(()=>n(a=>!a),[]),s=(0,Rt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Yg(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 ad=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Yg,...a})=>{let l=Xg(t),u=Xg(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,id.jsx)(D1,{children:(0,id.jsx)("div",{className:(0,Qg.default)(on.ref,{[on.positionAbove]:r==="above",[on.positionBelow]:r==="below",[on.positionLeft]:r==="left",[on.positionRight]:r==="right",[on.alignStart]:o==="start",[on.alignCenter]:o==="center",[on.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,id.jsx)("div",{className:(0,Qg.default)(e,on.root),children:i})})})};var F1=x(X()),ld=x(O());var Zg=x(w()),ud=(0,ld.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,ld.useRef)(null),i=k("TabCompletion",Cn);return(0,Zg.jsx)("div",{ref:rd([o,r]),className:(0,F1.default)(e,i.popoverContentContainer),...n,children:(0,Zg.jsx)("div",{className:i.popoverContent,children:t})})});var kr=x(w()),nL=e=>t=>{let n=Yg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},rL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Cn),s=sd(),a=(0,dd.useMemo)(()=>nL(e.getBoundingClientRect()),[e]),[l,u]=Nc(e);return(0,dd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,kr.jsxs)("span",{children:[(0,kr.jsx)("mark",{ref:rd([l,s.triggerRef]),className:(0,j1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,kr.jsx)(ad,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,kr.jsx)(ud,{style:n,children:(0,kr.jsx)("div",{className:i.hintText,children:o})})})]})},cd=class extends wn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${I1(r.keyword)}\\b`,"i")})),this.keywordMatches=n.keywordMatches),this.usedKeywordMatches.clear(),t}match(t){let n=this.preparedKeywordMatches.map(o=>{if(this.usedKeywordMatches.has(o))return null;let i=t.match(o.keywordRegex);if(!i)return null;let s=t.charAt(i.index-1),a=t.charAt(i.index+o.keyword.length);return s==="{"&&a==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:o.suggestion,preparedKeywordMatch:o,valid:!0}}).filter(L1);if(n.length===0)return null;let r=n.reduce((o,i)=>i.index<o.index?i:o);return this.usedKeywordMatches.add(r.preparedKeywordMatch),r}replaceWith(t,n){return(0,kr.jsx)(rL,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var pd=x(X());var Ke=x(O());var Jg=x(w()),H1=()=>(0,Jg.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,Jg.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 Pr=x(O());var U1=x(Dg());var B1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function fd(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{return null}}function eh(e){return e.replace("https://www.","").replace("https://","")}var It=x(w()),oL=3,iL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),sL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=oL})=>{let i=k("LinkSearch",B1),[s,a]=(0,Pr.useState)(""),l=B(),u=L(tw("url")),c=L(K_("URL",iL)),[f,d]=(0,Pr.useState)(c.length-1),y=D("fallbackImage"),S=p=>{let v=p.target;a(v.value)},h=(p,v)=>{p.stopPropagation(),p.preventDefault(),window.open(v,"_blank")},g=p=>{var C;let v=f-1<0?c.length-1:f-1,_=f+1===c.length?0:f+1;p.code==="Escape"&&(a(""),t()),p.code==="ArrowUp"&&d(v),p.code==="ArrowDown"&&d(_),p.code==="Enter"&&e(((C=c[f])==null?void 0:C.text)||s)},m=(0,Pr.useCallback)((0,U1.default)(p=>{l(so({query:p,type:"URL",tags:["link-search"]}))},300),[]);return(0,Pr.useEffect)(()=>{s&&m(s)},[s]),(0,Pr.useEffect)(()=>()=>{l(Kc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(ht,{withDivider:!0,children:(s?c:u).slice(0,o).map((p,v)=>(0,It.jsx)(oe,{selected:f===v,onClick:()=>e(p.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(me,{children:[(0,It.jsx)(me.Image,{src:fd(p,"small",y||void 0),title:p.title||p.text}),(0,It.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(me.Title,{children:p.title||eh(p.text)}),p.title&&eh(p.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:_=>h(_,p.text)})})]})},p.text))}),(0,It.jsx)(Ea,{value:s,onChange:S,autoFocus:!0,placeholder:n,onKeyUp:g})]})},z1=sL;var th={};Ce(th,{enUS:()=>aL,nlNL:()=>lL});var aL={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},lL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Ve=x(w()),uL=(0,Ke.forwardRef)((e,t)=>{let n=k("TabCompletion",Cn);return(0,Ve.jsx)("mark",{ref:t,className:(0,pd.default)(n.matchSelection)},"selection-start")}),cL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(th),s=k("TabCompletion",Cn),a=(0,Ke.useRef)(null),l=(0,Ke.useRef)(null),[u,c]=(0,Ke.useState)(null),f=B(),d=sd(document.activeElement===r),[y]=(0,Ke.useState)(()=>document.createRange());d.triggerRef.current=y,(0,Ke.useEffect)(()=>()=>y.detach(),[]),(0,Ke.useEffect)(()=>{let h=e.current,g=a.current;!h||!g||(y.setStart(h,0),y.setEnd(g,0))},[e.current,a.current]),mi(()=>{d.close()});let S=(0,Ke.useCallback)(h=>{let g=y.toString(),m=/^http(s?):\/\//.test(h)?h:`https://${h}`;f(_c({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,Ve.jsxs)("span",{children:[(0,Ve.jsx)("mark",{ref:a,className:(0,pd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Ve.jsx)(ad,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ve.jsxs)(ud,{style:n,ref:l,children:[(0,Ve.jsx)("div",{className:(0,pd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Ve.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Ve.jsx)(H1,{}),(0,Ve.jsx)("span",{children:"\xA0"}),(0,Ve.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Ve.jsx)(z1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:S,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},md=class extends wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ke.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,Ve.jsx)(uL,{ref:this.startRef}):(0,Ve.jsx)(cL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Mn=x(w()),dL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",R1),c=D("insertLink"),f=D("showMidSentenceSuggestions"),d=D("inlineSuggestions"),y=Dc(a),S=(0,Dn.useRef)(null);(0,Dn.useEffect)(()=>{Tr(a)&&y&&Fc(a,y)},[y]);let h=(0,Dn.useCallback)(p=>{if(!o||!n)return p;let v=[(0,Mn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Mn.jsx)("span",{"data-testid":"tab-completion",className:(0,gd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&v.push((0,Mn.jsx)("span",{className:(0,gd.default)(u.hint,u.resetIndent),children:(0,Mn.jsx)(ml,{keyCode:"tab"},"tabHint")})),Gg(p,v)},[o,n,r]),g=(0,Dn.useMemo)(()=>{let p=[];return c&&p.push(new md("selection")),p.push(new fi("placeholders")),i&&p.push(new cd("keywords")),p},[d,c,i]),m=(0,Dn.useMemo)(()=>{let p=window.getComputedStyle(a);return{"--dd-color":p.color,"--dd-font-size":p.fontSize,"--dd-font-family":p.fontFamily,"--dd-font-variant":p.fontVariant}},[]);return e?(0,Mn.jsxs)("div",{ref:p=>{p!=null&&p.parentElement&&(S.current=p==null?void 0:p.parentElement)},className:u.root,style:m,children:[(0,Mn.jsx)(ci,{tagName:"span",containerTagName:"div",className:(0,gd.default)(u.container,u.agentText),disableLineBreaks:Tr(a),content:t||"\u200B",onAfterParse:h,matchers:g,selection:y,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:S,inlineSuggestionsOnlyAtEnd:!f}),(0,Mn.jsx)("br",{})]}):null},fL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var h;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Ri(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:y,showStyleSuggestions:S}=n;return{showTabHint:c,showStyleSuggestions:S,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((h=r.list)==null?void 0:h.keywordMatches)??[],enabled:y&&f!==!1}},V1=Sn(fL)(dL);var LE=x(X()),AE=x(O());var K1={list:[],fetchState:"idle",isInitialRequest:null},$1=e=>e.autoflows.list||[],W1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Fn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),nh=M("autoflows/start",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.startAutoflowSession(e),await n(Fn(e.platformSessionId))}),rh=M("autoflows/stop",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.stopAutoflowSession(e.platformSessionId),await n(Fn(e.platformSessionId))}),pL=H({name:"autoflows",initialState:K1,reducers:{},extraReducers:e=>{e.addCase(nh.pending,(t,n)=>{let r=W1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(rh.pending,(t,n)=>{let r=W1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Fn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Fn.rejected,t=>{t.fetchState="error"}),e.addCase(Fn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>K1)}}),q1=M("autoflows/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");let o=r.openStream(e);o.on("sessionAborted",()=>{n(Fn(e))}),o.on("sessionCompleted",()=>{n(Fn(e))})}),G1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),X1=pL.reducer;var Q1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},Y1=e=>e.customMessages.list,Z1=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),J1=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),eE=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Aa=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),hd=M("customMessages/send",async(e,t)=>{let{platformSessionId:n,suggestion:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.sendCustomMessage(n,r)}),yd=M("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),tE=H({name:"customMessages",initialState:Q1,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Aa.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Aa.rejected,t=>{t.fetchState="error"}).addCase(Aa.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(hd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(hd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(yd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(yd.rejected,(t,n)=>{let r=t.answeredSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1)),t.answeredSuggestions.splice(r,1)}).addCase(J,()=>Q1)}}),nE=M("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(tE.actions.onCustomMessage(i))})}),rE=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),oE=tE.reducer;var mL={jwt:null,accountUrl:null,interval:null},iE=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},oh=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),ih=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(oh()),setInterval(()=>r(oh()),n)}),sE=H({name:"exchangeToken",initialState:mL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(oh.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(ih.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:aE}=sE.actions,lE=sE.reducer;function uE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var vE=x(O());var gE=x(X()),hE=x(O());var dE=x(X());var cE={root:"_root_838fd_1"};var pE=x(w()),gL=({className:e,children:t})=>{let n=k("Unicode",cE);return(0,pE.jsx)("span",{className:(0,dE.default)(e,n.root),children:t})},fE=gL;var mE={isDisabled:"_isDisabled_1rmfm_1",buttonStart:"_buttonStart_1rmfm_5",root:"_root_1rmfm_8",buttonStop:"_buttonStop_1rmfm_8",stateBadge:"_stateBadge_1rmfm_19",isCompleted:"_isCompleted_1rmfm_26",isStarted:"_isStarted_1rmfm_30",isAborted:"_isAborted_1rmfm_34"};var sh={};Ce(sh,{enUS:()=>hL,nlNL:()=>yL});var hL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]},yL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]};var lt=x(w()),SL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",mE),a=j(sh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,lt.jsxs)(oe,{className:(0,gE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,lt.jsx)(me,{children:(0,lt.jsxs)(me.Content,{children:[(0,lt.jsxs)(me.Title,{children:[t&&(0,lt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,lt.jsx)("span",{children:r})]})}),(0,lt.jsx)(oe.Actions,{fixed:t==="Started",children:(0,lt.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,lt.jsxs)(hE.Fragment,{children:[(0,lt.jsx)(fE,{children:u})," ",(0,lt.jsx)("span",{children:a(l)})]})})})]})},yE=SL;var ah=x(w()),xL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},_L=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,ah.jsx)(vE.Fragment,{children:e.map(o=>(0,ah.jsx)(yE,{displayName:o.displayName,description:o.description,disabled:o.isBusy||xL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),wL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},EL={onStartAutoflow:nh,onStopAutoflow:rh},SE=Sn(wL,EL)(_L);var vd=x(O());var ch=x(X());var lh=x(w()),uh=()=>(0,lh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,lh.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 xE={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var sn=x(w()),CL=({entities:e})=>{let t=k("EntitiesWidgetList",xE),[n,r]=(0,vd.useState)(void 0),o=B(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),ba(a.text),o(st({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,vd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,sn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,sn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,sn.jsx)("span",{className:t.entityText,children:a.text}),(0,sn.jsxs)("span",{className:t.iconWrapper,children:[(0,sn.jsx)("span",{className:(0,ch.default)(t.icon),children:(0,sn.jsx)(uh,{})}),(0,sn.jsx)("span",{className:(0,ch.default)(t.icon,n===l&&t.iconClicked),children:(0,sn.jsx)(uh,{})})]})]},a.text))})},_E=CL;var wE=x(X()),dh=x(O());var Oa={};Ce(Oa,{enUS:()=>bL,nlNL:()=>TL});var bL={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"}],answer:[{type:0,value:"Answer"}]},TL={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"}],answer:[{type:0,value:"Antwoord"}]};var jn={root:"_root_1e6ej_1",title:"_title_1e6ej_8",isUsed:"_isUsed_1e6ej_13",quickReplies:"_quickReplies_1e6ej_22",quickReply:"_quickReply_1e6ej_29",hasError:"_hasError_1e6ej_39",label:"_label_1e6ej_43",errorIcon:"_errorIcon_1e6ej_48"};var et=x(w()),kL=({suggestion:e})=>{let t=j(Oa),n=B(),r=L(Z1(e.text)),o=L(J1(e.text)),i=L(eE(e.text)),s=L(pc),{replyOptions:a}=e,l=(0,dh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(hd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,dh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(yd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,et.jsxs)(oe,{onClick:l,className:(0,wE.default)(jn.root,{[jn.isUsed]:r,[jn.hasError]:i}),children:[(0,et.jsx)(me,{children:(0,et.jsxs)(me.Content,{children:[(0,et.jsxs)(me.Title,{className:jn.title,children:[e.text," ",(0,et.jsx)(gl,{className:jn.label,children:"analyse tool"})," ",i&&(0,et.jsx)("span",{className:jn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,et.jsx)("ul",{className:jn.quickReplies,children:a.map(c=>(0,et.jsx)("li",{className:jn.quickReply,children:c.title},c.title))})]})}),(0,et.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,et.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,et.jsx)(oe.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,et.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},EE=kL;var fh=x(w()),CE=()=>(0,fh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,fh.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 bE=x(O());var ut=x(w()),PL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Wc(o),s=j(Oa),a=D("showImages"),l=D("fallbackImage"),u=y=>{y.preventDefault(),y.stopPropagation(),r(o)},c=y=>{y.preventDefault(),y.stopPropagation(),n(e)},f=(0,bE.useCallback)(y=>{window.open(i,"_blank"),y.stopPropagation(),y.preventDefault()},[i]);return(0,ut.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,ut.jsxs)(me,{children:[a&&e.image&&(0,ut.jsx)(me.Image,{src:fd(e,"small",l||void 0),title:e.title}),(0,ut.jsxs)(me.Content,{children:[e.title&&(0,ut.jsx)(me.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,ut.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,ut.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,ut.jsxs)(oe.Actions,{children:[i&&(0,ut.jsx)(oe.ActionButton,{onClick:f,label:s("visitUrl")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},TE=PL;var Na=x(w()),RL=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=L(Si),i=a=>{r.send(Rg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(In,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Na.jsx)(Na.Fragment,{children:n.map(a=>(0,Na.jsx)(TE,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},kE=RL;var ph={};Ce(ph,{enUS:()=>IL,nlNL:()=>LL});var IL={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},LL={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var PE={root:"_root_x0pwe_1",loginText:"_loginText_x0pwe_7",stateText:"_stateText_x0pwe_8",sectionList:"_sectionList_x0pwe_20",shortcutList:"_shortcutList_x0pwe_24",shortcut:"_shortcut_x0pwe_24",link:"_link_x0pwe_52"};var mh=x(w()),RE=()=>(0,mh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,mh.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 gh=x(w()),IE=()=>(0,gh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,gh.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 z=x(w()),Sd=(e,t)=>{let n=L(Ut);(0,AE.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},AL=()=>{let e=j(ph),t=B(),n=D("isEmbedded"),r=k("Widget",PE),o=D("showAutoflows"),i=D("showCustomMessages"),s=D("showPersonalCollectionLink"),a=D("showSummaryCommand"),l=D("showKnowledgeSearch"),u=D("showSearch"),c=L(Ti),f=L(Zc),d=L($1),y=L(Yc),S=L(Y1),h=L(mc),g=L(si),m=L(Ut),p=L(pc),v=L(uE),_=L(Si),C=Pt(),E=L(rw),b=L(iE("/admin/personal-collection")),R=D("adminUrl");if(Sd(()=>(t(Aa(p)),t(nE(p)),()=>{t(rE(p))}),[t,g,i,p]),Sd(()=>(t(Fn(p)),t(q1(p)),()=>{t(G1(p))}),[t,g,o,p]),Sd(()=>{f.forEach(({type:N})=>{t(N==="entities"?Vt():Pn(N))})},[t,g,h,c]),Sd(()=>(t(ih()),()=>{t(aE())}),[t,g,s,h]),g===!1)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("notSupported")})})},"supported");if(m===!1)return(0,z.jsx)("div",{className:r.loginText,children:(0,z.jsx)("div",{children:(0,z.jsx)(td,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!p||m===null||E||v)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("waiting")})})},"waiting");let P=u||a||l||b;return(0,z.jsx)("div",{className:(0,LE.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(hl,{className:r.sectionList,children:[P&&(0,z.jsx)(Un,{title:e("actions"),type:"shortcuts",children:(0,z.jsxs)("div",{className:r.shortcutList,children:[u&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-search",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0}),children:[(0,z.jsx)(yi,{}),e("linkSearch")]}),a&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-summary",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,z.jsx)(IE,{}),e("linkSummary")]}),l&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,z.jsx)(RE,{}),e("linkKnowledgeSearch")]}),b&&(0,z.jsxs)("a",{className:r.shortcut,target:"_blank",href:b,"data-testid":"shortcut-personal-collection",rel:"noreferrer",children:[(0,z.jsx)(CE,{}),e("linkPersonalcollection")]})]})}),i&&S.length>0&&(0,z.jsx)(Un,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(ht,{withDivider:!0,children:S.map(N=>(0,z.jsx)(EE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(Un,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(SE,{})})}),f.map(({type:N,title:G,amount:V,lines:He})=>{var an;switch(N){case"entities":return y&&y.length>0&&(0,z.jsx)(Un,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(_E,{entities:y})},N);default:return((an=_[N])==null?void 0:an.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(Un,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(kE,{lines:He,contentType:N,suggestions:_[N].suggestions.slice(0,V)||[]})})},N)}})]})})},OE=AL;function Ni(e){let t=new Range;return t.selectNodeContents(e),t}function NE(e,t,n){try{return Rr(e,t,n),!0}catch{return!1}}function xd(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function _d(e){return"tagName"in e&&e.tagName==="BR"}var Ma=/[\u200B-\u200D\uFEFF]/g;function Rr(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(Ma,""),f=o+c.length,d=t>=o&&t<=f,y=n>=o&&n<=f;if(d){let S=s(u,t-o);S===0&&!y?r.setStartBefore(l):r.setStart(l,S)}y&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(_d(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;xd(l)&&u&&!xd(u)&&!_d(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Da(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===n,y=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let S=f.textContent;d&&(a=u+S.substring(0,r).replace(Ma,"").length),y&&(l=u+S.substring(0,i).replace(Ma,"").length),u+=S.replace(Ma,"").length;break}case Node.ELEMENT_NODE:{let S=f.nextSibling===null;_d(f)&&!S&&u++;for(let h=0;h<f.childNodes.length;h++){let g=d&&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&&xd(f)&&!S&&u++,y&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function Fa(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}=t,s=-1,a="";function l(u){let c=u===n,f=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,y=f?i:void 0,S=u.textContent.replace(Ma,"");d===0&&y===void 0?a+=S:a+=S.substring(d,y);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&_d(u)&&!d&&(a+=`
19
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||tR)();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(ZP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,p_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==f_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Lc[l]||Lc[s];if(!this.isSafe(t)||!l.match(JP)&&(!n&&(!u||u===sg)||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===yr?c=!0:u===to?c=Number.parseFloat(String(c)):u!==Ic&&(c=String(c)),r[ag[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 da[t]?{...n,...da[t],tagName:t}:n}isSafe(t){if(typeof HTMLAnchorElement<"u"&&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===f_){let d=c.nodeName.toLowerCase(),y=this.getTagConfig(d);u&&(l.push(u),u="");let S=this.applyNodeFilters(d,c);if(!S)return;let h;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;h=this.parseNode(S,y);let m=s(S,h,y);if(m===null)return;if(typeof m<"u"){l.push(ro.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,y))){var f;this.keyIndex+=1;let g=this.extractAttributes(S),m={tagName:d};g&&(m.attributes=g),y.void&&(m.selfClose=y.void),l.push(ro.default.createElement(Ac,{...m,key:this.keyIndex},(f=h)!==null&&f!==void 0?f:this.parseNode(S,y)))}else l=[...l,...this.parseNode(S,y.tagName?y:n)]}else if(c.nodeType===YP){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(eR);){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],y;if(u)y=s.length,r.push(f.createElement(c,d));else{let S=o.match(new RegExp(`{{{/${a}}}}`));y=S.index+S[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,S.index),n),d))}o=o.slice(y)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function nR(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",f=c==="fragment"?!0:u,d;if(a)d=a;else{let y=new Oc(i??"",e).parse();y.length>0&&(d=y)}return d||(d=s),f?ro.default.createElement(ro.default.Fragment,null,d):ro.default.createElement(Ac,{attributes:n,className:r,tagName:c},d)}function di(e){let{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,...y}=e,S=i?[]:l,h=o?[]:a,g=c?[c]:[],m=u?[u]:[];S.forEach(C=>{C.onBeforeParse&&g.push(C.onBeforeParse.bind(C)),C.onAfterParse&&m.push(C.onAfterParse.bind(C))});let p=g.reduce((C,E)=>E(C,e),r??""),v=new Oc(p,y,S,h),_=m.reduce((C,E)=>E(C,e),v.parse());return ro.default.createElement(nR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:f})}var vg=x(X());var ug={root:"_root_kxnai_1",agentText:"_agentText_kxnai_3",textInput:"_textInput_kxnai_8",textInputWrapper:"_textInputWrapper_kxnai_27",alert:"_alert_kxnai_31",alertText:"_alertText_kxnai_50",warning:"_warning_kxnai_60",success:"_success_kxnai_69"};var g_=x(X());var fi=x(O());function m_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Nc(e){let t=(0,fi.useRef)(null),[n,r]=(0,fi.useState)(!1);return(0,fi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=m_((c,f)=>{let d=t.current;if(!d)return;let y=c/i,S=f/i,h=d.getBoundingClientRect(),g=y>h.x&&y<h.x+h.width&&S>h.y&&S<h.y+h.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:f})=>[c,f]),[l,u]=m_(()=>{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]}var Cn={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var cg=x(w()),rR=({inputElement:e,children:t})=>{let n=k("TabCompletion",Cn),[r,o]=Nc(e);return(0,cg.jsx)("mark",{ref:r,className:(0,g_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},pi=class extends wn{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,cg.jsx)(rR,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var mi=x(O());function Mc(e){return e.contentEditable==="true"}function oR(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 h_(e){let{selectionStart:t,selectionEnd:n}=Mc(e)?oR(e):e;return[t,n]}function Dc(e){let[,t]=(0,mi.useState)(),n=(0,mi.useRef)(null);return n.current=h_(e),(0,mi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=h_(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 Fc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(So);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 y_=x(O());function gi(e){(0,y_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function oo(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var v_,rn=new Map,iR=["bottom","height","left","right","top","width"],sR=(e={},t={})=>iR.some(n=>e[n]!==t[n]);function S_(e){var n,r;let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...S_(t)]:[]}function x_(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var dg=!1,__=()=>{dg=!0;let e=[];rn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),rn.delete(n);return}let r=n.getBoundingClientRect();sR(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(x_,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),rn.size!==0&&(v_=window.requestAnimationFrame(__))};function fg(e,t){let n=S_(e),r=[],o=n.map((i,s)=>fg(i,a=>{r[s]=a;let l=rn.get(e);if(!l)return;let u=r.reduce(x_,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),rn.has(e)){let s=rn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else rn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!dg&&__()},unobserve(){o.forEach(s=>s.unobserve());let i=rn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||rn.delete(e),rn.size||(cancelAnimationFrame(v_),dg=!1)}}}}var w_,on=new Map,E_=()=>{on.forEach((e,t)=>{if(!t.isConnected){on.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)))}),on.size!==0&&(w_=window.requestAnimationFrame(E_))};function C_(e,t){return{observe(){let n=on.size===0;on.has(e)?on.get(e).callbacks.push(t):on.set(e,{visible:void 0,callbacks:[t]}),n&&E_()},unobserve(){let n=on.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||on.delete(e),on.size||cancelAnimationFrame(w_)}}}}var pg=["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 mg(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function hi(e){return parseFloat(e)}function jc(e){return Math.round(e*1e6)}function b_(e){return e/1e6}function gg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=hi(e.width),i=hi(e.borderLeftWidth),s=hi(e.borderRightWidth),a=hi(e.paddingRight),l=b_(jc(o)-jc(i)-jc(s)),u=b_(jc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function io(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",oo(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};mg(r,n,pg),gg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=C_(e,()=>{mg(r,n,pg),gg(r,e,n),i(),setTimeout(i,0)}),a=fg(e,u=>{if(u===null){t.onRemove&&t.onRemove(),n.remove();return}if(u.height===0&&u.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(mg(r,n,pg),gg(r,e,n),i(),n.style.top=`${u.top}px`,n.style.left=`${u.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let c=t.closestScrollElement.getBoundingClientRect(),f=window.getComputedStyle(t.closestScrollElement),d=hi(f.borderTopWidth),y=hi(f.borderBottomWidth),S=c.top+d-u.top,h=u.top+u.height+-(c.top+c.height-y);n.style.clipPath=`inset(${S}px 0px ${h}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(l=e.parentElement)==null||l.appendChild(n),a.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),a.unobserve(),s.unobserve()}]}var hg={};Ce(hg,{enUS:()=>aR,nlNL:()=>lR});var aR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"No placeholders found"}]},one:{value:[{type:0,value:"There is one placeholder in your message"}]},other:{value:[{type:0,value:"There are "},{type:7},{type:0,value:" placeholders in your message"}]}},offset:0,pluralType:"cardinal"}]},lR={placeholders:[{type:6,value:"placeholderSize",options:{"=0":{value:[{type:0,value:"Alle placeholders zijn uit je bericht"}]},one:{value:[{type:0,value:"Er is 1 placeholder in jouw bericht"}]},other:{value:[{type:0,value:"Er zijn "},{type:7},{type:0,value:" placeholders in jouw bericht"}]}},offset:0,pluralType:"cardinal"}]};var fa=x(w()),T_=()=>(0,fa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,fa.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,fa.jsx)("path",{d:"M243.8 339.8C232.9 350.7 215.1 350.7 204.2 339.8L140.2 275.8C129.3 264.9 129.3 247.1 140.2 236.2C151.1 225.3 168.9 225.3 179.8 236.2L224 280.4L332.2 172.2C343.1 161.3 360.9 161.3 371.8 172.2C382.7 183.1 382.7 200.9 371.8 211.8L243.8 339.8zM512 256C512 397.4 397.4 512 256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256zM256 48C141.1 48 48 141.1 48 256C48 370.9 141.1 464 256 464C370.9 464 464 370.9 464 256C464 141.1 370.9 48 256 48z"})]});var yg=x(w()),k_=()=>(0,yg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,yg.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"})});function uR(e){let t=e.scrollHeight>e.clientHeight,r=window.getComputedStyle(e).overflowY.indexOf("hidden")!==-1;return t&&!r}function Hc(e){return e?e instanceof ShadowRoot?Hc(e.host):e===e.ownerDocument.body?e.ownerDocument:uR(e)?e:Hc(e.parentNode):document.body}var P_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(P_||{}),bn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;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)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();mr(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(P_).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",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",r=>this.handleKeyDown(r)),this.addEventListener("keyup",r=>this.handleKeyUp(r)),this.addEventListener("input",()=>this.triggerChange()),this.addEventListener("change",()=>this.triggerChange()),this.addEventListener("focus",()=>this.handleFocus()),this.addEventListener("blur",()=>this.handleBlur()),this.addEventListener("cut",()=>this.handleCut()),this.addEventListener("paste",r=>this.handlePaste(r)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},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()});let n=Hc(this.element);if(n){let r=()=>{this.currentCaret!==null&&(this.currentCaret=null,this.emit("caret",null))};n.addEventListener("scroll",r),this.disposeHandlers.push(()=>{n.removeEventListener("scroll",r)})}this.currentSelection=this.getSelection()}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))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};var Tn=class extends bn{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};var Qe=x(w()),cR=({value:e,onUse:t,...n})=>{var c;let r=j(hg),o=B(),i=k("EditSuggestionTextInput",ug),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(So))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let f;return l.current&&(a(l.current),f=new Tn(l.current),f.on("change",({plainText:d})=>{o(Xe.actions.userInput({text:d,selection:f.getSelection()}))}),f.on("keydown",d=>{o(Xe.actions.registerKeyDown(xc(d))),d.code==="Enter"&&d.shiftKey&&t(f.getText())}),f.on("paste",({pastedText:d,selectionText:y})=>{o(Xe.actions.registerPaste({text:d,selectionText:y}))}),f.on("cut",({selectionText:d})=>{o(Xe.actions.registerCut(d))})),()=>{o(Xe.actions.reset()),f.dispose(),f.deactivate()}},[l]),(0,Tt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,Tt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let f=l.current.value.length;l.current.setSelectionRange(f,f),l.current.focus()},0)},[l]),(0,Qe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Qe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Qe.jsx)(dR,{inputElement:l.current,value:e}),(0,Qe.jsxs)("div",{className:(0,vg.default)(i.alert,u===0?i.success:i.warning),children:[(0,Qe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Qe.jsx)(T_,{}):(0,Qe.jsx)(k_,{})]})]})},dR=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",ug),r=(0,Tt.useRef)(null),o=Dc(e);return(0,Tt.useEffect)(()=>{Fc(e,o)},[o,e]),(0,Qe.jsx)(fR,{inputElement:e,children:(0,Qe.jsxs)("div",{ref:r,className:(0,vg.default)(n.root,n.agentText),children:[(0,Qe.jsx)(di,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new pi("placeholders")],inputElement:e,boundaryRef:r}),(0,Qe.jsx)("br",{})]})})},fR=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=io(e,{overlayContainer:n.current,mirrorOverflow:!0});return r.setAttribute("translate","no"),()=>{o()}},[n.current]),(0,Qe.jsx)("div",{ref:n,children:t})},R_=cR;var Si=x(O());var I_=x(O()),Bc=x(X());var Ye={root:"_root_185k9_1",list:"_list_185k9_2",listWrapper:"_listWrapper_185k9_6",listHorizontal:"_listHorizontal_185k9_10",page:"_page_185k9_19",search:"_search_185k9_25",pageNav:"_pageNav_185k9_33",pageTitle:"_pageTitle_185k9_41",pageBackButton:"_pageBackButton_185k9_48",listHeading:"_listHeading_185k9_62",listItem:"_listItem_185k9_70",listItemContent:"_listItemContent_185k9_79",listItemText:"_listItemText_185k9_97",listItemDescription:"_listItemDescription_185k9_105",truncate:"_truncate_185k9_112",lineClamp:"_lineClamp_185k9_118",listItemTitle:"_listItemTitle_185k9_125",listItemAction:"_listItemAction_185k9_132",listItemPrimaryAction:"_listItemPrimaryAction_185k9_146",listItemSelected:"_listItemSelected_185k9_151",sources:"_sources_185k9_155",sourcesTitle:"_sourcesTitle_185k9_162",source:"_source_185k9_155",icon:"_icon_185k9_177",searchIcon:"_searchIcon_185k9_194",searchInputWrapper:"_searchInputWrapper_185k9_199",searchInput:"_searchInput_185k9_199",select:"_select_185k9_220",selectType:"_selectType_185k9_237",selectWrapper:"_selectWrapper_185k9_241",image:"_image_185k9_271",imageSrc:"_imageSrc_185k9_278",imageSrcHidden:"_imageSrcHidden_185k9_289",imageSrcStatus:"_imageSrcStatus_185k9_293",imageTitle:"_imageTitle_185k9_303",actions:"_actions_185k9_308",actionsWrapper:"_actionsWrapper_185k9_312",actionsBar:"_actionsBar_185k9_318",actionButton:"_actionButton_185k9_327",actionShortcut:"_actionShortcut_185k9_345",actionShortcutFixKerning:"_actionShortcutFixKerning_185k9_352"};var so={};Ce(so,{enUS:()=>pR,nlNL:()=>mR});var pR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}]},mR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}]};var vr=x(w()),gR=({src:e,title:t})=>{let n=k("CommandPalette",Ye),[r,o]=(0,I_.useState)("loading"),i=j(so);return(0,vr.jsxs)("div",{className:n.image,children:[(0,vr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,Bc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,vr.jsx)("span",{className:(0,Bc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,vr.jsx)("span",{className:(0,Bc.default)(n.imageSrc,n.imageSrcStatus),children:(0,vr.jsx)(Xa,{})}),t&&(0,vr.jsx)("span",{className:n.imageTitle,children:t})]})},L_=gR;var A_=x(O()),O_=x(X());var pa=x(w());function Sg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Ye);return A_.default.Children.count(e)===0?null:(0,pa.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,pa.jsx)("h4",{className:r.listHeading,children:t}),(0,pa.jsx)("div",{className:(0,O_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ma=x(X());var Uc=x(O()),D_=x(w()),N_=Uc.default.createContext(void 0);function Sr(){let e=Uc.default.useContext(N_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var M_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Uc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,D_.jsx)(N_.Provider,{value:s,children:e})};var kt=x(w());function xg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:f,onChangeOpen:d}=Sr(),y=k("CommandPalette",Ye);function S(h){r(h),e&&d(!1)}return(0,kt.jsxs)("div",{className:(0,ma.default)(y.listItem,f===i&&y.listItemSelected),children:[(0,kt.jsxs)("button",{type:"button",className:(0,ma.default)("command-palette-list-item",y.listItemAction,y.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:S,...c,children:[(0,kt.jsxs)("div",{className:y.listItemContent,children:[typeof n=="string"?(0,kt.jsx)("p",{className:(0,ma.default)(y.listItemText,y.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,kt.jsx)("p",{className:(0,ma.default)(y.listItemDescription,u==null?void 0:u.description,t?y.lineClamp:y.truncate),children:a})]}),s&&(0,kt.jsx)(pl,{})]}),l&&(0,kt.jsxs)("div",{className:y.sources,children:[(0,kt.jsx)("span",{className:y.sourcesTitle,children:"Sources"}),l.map(h=>h.url?(0,kt.jsx)("a",{className:y.source,href:h.url,target:"_blank",title:h.url,rel:"noopener noreferrer",onClick:()=>o&&o(h),children:h.name},h.url):(0,kt.jsx)("span",{className:y.source,children:h.name},h.name))]})]})}var xr=x(w());function _g({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=j(so),s=k("CommandPalette",Ye),{page:a}=Sr();return a!==n?null:(0,xr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,xr.jsxs)("div",{className:s.pageNav,children:[(0,xr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,xr.jsx)(Tc,{}),i("back")]}),t&&(0,xr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,xr.jsx)(pl,{})]}),e]})}var _r=x(O());var zc=()=>/Mac/i.test(navigator.platform);var hR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},U=hR;function yR(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function re(e){return Array.isArray(e)?e.map(re):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[yR(n)]:re(e[n])}),{}):e}function wg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function we(e){return Array.isArray(e)?e.map(we):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[wg(n)]:we(e[n])}),{}):e}var vR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},ha=e=>{var t,n,r;return{timezone:((t=e.info.visitorInfo)==null?void 0:t.visitorTimeZone)||Intl.DateTimeFormat().resolvedOptions().timeZone,agentName:((n=e.info.agentInfo)==null?void 0:n.agentNickname)||"",visitorName:((r=e.info.visitorInfo)==null?void 0:r.visitorName)||""}},ga=M("info/setAgentInfo",async(e,t)=>{let{deepdeskAPI:n}=t.extra;if(!e.agentId&&!e.agentNickname)throw new Error("At least provide agentId or agentNickname");let r=await n.client.get("/apis/admin/session/me/",{version:null}),o={};return r.external_id||(o.external_id=e.agentId),r.nickname||(o.nickname=e.agentNickname),!o.external_id&&!o.nickname?re(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),re(r))}),Eg=M("info/setAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.client.get("/apis/admin/session/me/",{version:null}),o={...typeof r.ui_config=="object"?r.ui_config:{},...e};return await n.client.patch("/apis/admin/session/me/",{ui_config:o}),o}),Cg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),F_=e=>e.info.agentInfo,j_=H({name:"info",initialState:vR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ga.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ga.rejected,t=>{t.fetchState="error"}).addCase(ga.fulfilled,(t,n)=>{t.fetchState="done",t.agentInfo={...t.agentInfo,...n.meta.arg,agentId:n.payload.externalId||n.meta.arg.agentId||"",agentNickname:n.payload.nickname||n.meta.arg.agentNickname||""}}).addCase(Eg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Cg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:H_}=j_.actions,B_=j_.reducer;var Vc={list:[],fetchState:"idle",isOpen:!1,page:"search"},U_=e=>e.search.isOpen,z_=e=>e.search.page,V_=e=>e.search.list;function K_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var ao=M("search/getAll",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i}=await n.search({profile:o,query:e.query,filters:{type:e.type},params:ha(r),tags:e.tags});return i.map(a=>({...a,source:`search-${a.type.toLowerCase()}`,searchTerm:e.query}))}),W_=H({name:"search",initialState:Vc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Vc.fetchState,e.list=Vc.list}},extraReducers:e=>{e.addCase(ao.pending,t=>{t.fetchState="loading"}).addCase(ao.rejected,(t,n)=>{t.fetchState="error",U.error(n.error)}).addCase(ao.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>Vc)}}),{resetSearch:Kc,setIsOpen:at,setPage:ze}=W_.actions,$_=W_.reducer;var SR=/(https?:\/\/[^\s]+)/,Wc=e=>e.split(" ").find(t=>SR.test(t));var bg=x(X());var $c=x(w()),xR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Ye);return(0,$c.jsxs)("button",{type:"button",...r,onClick:e,className:(0,bg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,$c.jsx)("span",{className:(0,bg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},yi=xR;var kn=x(w()),_R=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Ye),a=j(so),{selected:l,setSelected:u}=Sr(),c=i[l],f=c&&typeof c.text=="string"&&Wc(c.text),d=(0,_r.useRef)(null);function y(v){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,E=0;v==="down"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C===_.length-1?0:C+1):v==="up"?(_.forEach((R,P)=>{P===l&&(C=P)}),E=C?C-1:_.length-1):u(0);let b=_[E];b&&typeof E=="number"&&(u(E),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function S(){if(!d.current)return;let v=d.current.querySelectorAll(".command-palette-list-item"),_=0;v.forEach((E,b)=>{b===l&&(_=b)});let C=v[_];C&&C.click()}let h=()=>{f&&window.open(f,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},p=(0,_r.useCallback)(v=>{if(v.key==="Enter"&&v.altKey&&f){h();return}if(v.key==="Enter"&&v.shiftKey){m();return}if(v.key==="ArrowDown"){v.preventDefault(),v.stopPropagation(),y("down");return}if(v.key==="ArrowUp"){v.preventDefault(),v.stopPropagation(),y("up");return}v.key==="Enter"&&l!==-1&&(v.preventDefault(),v.stopPropagation(),S())},[l]);return(0,_r.useEffect)(()=>(window.addEventListener("keyup",p),()=>{window.removeEventListener("keyup",p)}),[p]),(0,kn.jsxs)("div",{className:s.actions,children:[(0,kn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,kn.jsxs)("div",{className:s.actionsBar,children:[f&&(0,kn.jsx)(yi,{onClick:h,shortKeys:[zc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,kn.jsxs)(_r.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,kn.jsx)(yi,{onClick:m,shortKeys:[8679,8629],children:n}),(0,kn.jsx)(yi,{onClick:g,shortKeys:[8629],children:t})]})]})]})},G_=_R;var X_=x(O());var ya=x(w()),vi=()=>(0,ya.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,ya.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,ya.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 Bt=x(w());function wR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Ye);return(0,Bt.jsxs)("div",{className:l.search,children:[(0,Bt.jsx)("div",{className:l.searchIcon,children:(0,Bt.jsx)(vi,{})}),(0,Bt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Bt.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,Bt.jsx)("div",{className:l.selectWrapper,children:(0,Bt.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,Bt.jsx)("option",{children:r}),o.map(u=>(0,Bt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var Q_=(0,X_.forwardRef)(wR);var va=x(w());function lo({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}){let[y,S]=(0,Si.useState)(0),h=(0,Si.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var p;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(p=h.current)==null||p.focus();return}if(d.length>0){i("");return}a(!1)};return(0,Si.useEffect)(()=>{S(0)},[d,r]),(0,va.jsx)(ci,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:m,onClose:g,children:(0,va.jsxs)(M_,{selected:y,setSelected:S,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,va.jsx)(Q_,{ref:h,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}lo.Page=_g;lo.List=Sg;lo.Image=L_;lo.ListItem=xg;lo.ActionsBar=G_;lo.Button=yi;var te=lo;var Fe=x(w()),ER=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",a_),l=B(),u=j(eg),c=L(S=>S.overlayInput.text);(0,Tg.useEffect)(()=>{e&&(l(Xe.actions.reset()),l(Xe.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Xe.actions.commitSuggestion()))},[e]);let f=S=>{S.preventDefault(),d(c)},d=S=>{l(Ec(S)),t(S)},y=S=>h=>{c!==s?window.confirm(u("warning"))&&S(h):S(h)};return(0,Tg.useEffect)(()=>{r&&r(c!==s)},[r,e,c]),(0,Fe.jsxs)("div",{className:a.root,children:[(0,Fe.jsxs)("div",{className:a.content,children:[e.title&&(0,Fe.jsx)("h3",{className:a.title,children:e.title}),e.searchKeywords&&e.searchKeywords.length>0&&(0,Fe.jsx)($d,{labels:e.searchKeywords}),(0,Fe.jsx)(R_,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:f,children:[(0,Fe.jsxs)("div",{children:[(0,Fe.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&y(i),children:(0,Fe.jsx)(Tc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&y(o),children:(0,Fe.jsx)(l_,{})})]}),(0,Fe.jsxs)("div",{className:a.primaryButtons,children:[(0,Fe.jsx)(te.Button,{onClick:y(n),shortKeys:["esc"],children:u("dismiss")}),(0,Fe.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},qc=ER;var CR=["{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}"],bR=new RegExp(CR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function Y_(e,t){let n=e.split(bR),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 Z_(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var ew={suggestions:[],fetchState:"idle",isInitialRequest:null},J_={default:ew},tw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)||[]},nw=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},rw=e=>{let t=Object.keys(e.textSuggestions).map(n=>{var r;return(r=e.textSuggestions[n])==null?void 0:r.fetchState});return t.length===0?!0:t.every(n=>n!=="done")},xi=e=>e.textSuggestions,ow=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Gc=fe("textSuggestions/refresh"),Pn=M("textSuggestions/recommendations",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,inlineSuggestions:s}=r.settings,a=li(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,ha(r),e);if(e==="default"){let c=s?l.filter(ow(a)):l;t.dispatch(nn(c.slice(0,i)))}return l}),Sa=M("textSuggestions/autocompletions",async(e,t)=>{var u;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(u=r.conversation.current)==null?void 0:u.id,{textSuggestionsCount:i,deanonymize:s,inlineSuggestions:a}=r.settings;if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getAutocompleteSuggestions(o,{...ha(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(ow(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?Y_(c.text,e):c.text}))),l=Z_(l,i),t.dispatch(nn(l)),l}),iw=H({name:"textSuggestions",initialState:J_,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}}}},setSuggestionState(e,t){return t.payload}},extraReducers:e=>{e.addCase(Pn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||ew;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(Pn.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(Pn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Sa.pending,t=>{t.default.fetchState="loading"}).addCase(Sa.rejected,t=>{t.default.fetchState="error"}).addCase(Sa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>J_)}}),{setTextSuggestions:sw,setSuggestionState:aw}=iw.actions,lw=iw.reducer;var uw={contentType:null,suggestion:null},cw=e=>e.activeSuggestion.suggestion,dw=e=>e.activeSuggestion.contentType,fw=H({name:"activeSuggestion",initialState:uw,reducers:{setActiveSuggestion(e,t){let{contentType:n,suggestion:r}=t.payload;e.contentType=n,e.suggestion=r},resetActiveSuggestion(e){e.contentType=null,e.suggestion=null}},extraReducers:e=>{e.addCase(J,()=>uw)}}),{setActiveSuggestion:Rn,resetActiveSuggestion:kg}=fw.actions,pw=fw.reducer;var Pg={};Ce(Pg,{enUS:()=>TR,nlNL:()=>kR});var TR={warning:[{type:0,value:"Are you sure you want to discard the message?"}],editContentLabel:[{type:0,value:"Edit and view suggestion"}],overlayLabel:[{type:0,value:"Close dialog"}]},kR={warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}],editContentLabel:[{type:0,value:"Bewerk en bekijk suggestie"}],overlayLabel:[{type:0,value:"Sluit"}]};var PR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Xc=({ui:e})=>e.overlayCollapsed;var mw=H({name:"ui",initialState:PR,reducers:{setShowTabHint(e,t){e.showTabHint=t.payload},setInputHasFocus(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:xa,setInputHasFocus:_i,setOverlayCollapsed:wr,setOpenOverlayWhenTyping:gw,setOverlayCollapsedUserOverwrite:hw}=mw.actions,yw=mw.reducer;var _a=x(O()),Sw=x(w()),vw=_a.default.createContext(null),wi=({broadcastEvents:e,children:t})=>{let n=_a.default.useMemo(()=>e,[]);return(0,Sw.jsx)(vw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,_a.useContext)(vw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var RR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Ut=e=>e.auth.isLoggedIn,xw=e=>e.auth.loginFetchState,_w=e=>e.auth.verifyFetchState,ww=e=>e.auth.showLoginOverlay,Er=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),Ew=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),wa=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),Cw=H({name:"auth",initialState:RR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Er.pending,t=>{t.loginFetchState="loading"}),e.addCase(Er.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Er.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(wa.pending,t=>{t.verifyFetchState="loading"}),e.addCase(wa.rejected,t=>{t.verifyFetchState="error"}),e.addCase(wa.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Ei,setShowLoginOverlay:bw}=Cw.actions,Tw=Cw.reducer;var Rg="SetActiveSuggestion",Ci="ShowLoginOverlay",Ig="UserLoggedIn",IR="UserLoggedOut",In="ApplySuggestion",Lg="ApplyImageSuggestion",LR="ShowCommandPalette",AR=e=>({[Rg]:t=>{e.dispatch(aw(t.state)),e.dispatch(Rn({contentType:t.contentType,suggestion:t.suggestion}))},[LR]:t=>{e.dispatch(at(t.isOpen)),t.page&&e.dispatch(ze(t.page))},[Ci]:t=>{e.dispatch(bw(t))},[Ig]:()=>{e.dispatch(Er())},[IR]:()=>{e.dispatch(Er())},[Lg]:t=>{e.dispatch(bc({suggestion:t.suggestion}))},[In]:t=>{e.dispatch(jt({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(hr())}}),kw=AR;var Ag=x(w()),OR=()=>{var S;let[e,t]=(0,Pw.useState)(!1),n=L(cw),r=L(dw),o=L(xi),i=B(),s=Pt(),a=j(Pg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(kg()),i(_i(!0)),i(Xe.actions.reset())},c=(h,g)=>{i(kg()),i(_i(!0)),s.send(In,{text:h,suggestion:{...g,source:`${g.source||"text_recommendation"}-preview`}})};if(n===null||r===null)return null;let f=(S=o[r])==null?void 0:S.suggestions.indexOf(n),d=f===0||f===null?void 0:()=>i(Rn({contentType:r,suggestion:o[r].suggestions[f-1]})),y=f===o[r].suggestions.length-1||f===null?void 0:()=>i(Rn({contentType:r,suggestion:o[r].suggestions[f+1]}));return(0,Ag.jsx)(ci,{autoFocus:!0,isOpen:f!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Ag.jsx)(qc,{onTouched:t,onDismiss:u,onUse:h=>c(h,n),suggestion:n,onNext:y,onPrevious:d})})},Rw=OR;var Qc=x(X()),zt=x(O());var Lw=x(X());var Iw={root:"_root_1ukx5_1"};var Aw=x(w()),NR=({className:e,value:t,...n})=>{let r=k("TextInput",Iw);return(0,Aw.jsx)("input",{className:(0,Lw.default)(e,r.root),type:"text",value:t,...n})},Ea=NR;var Og={};Ce(Og,{enUS:()=>MR,nlNL:()=>DR});var MR={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"}]},DR={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 Ow={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=x(w());var FR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},jR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=j(Og),s=k("LoginTokenDialog",Ow),a=L(_w),l=B(),u=D("productName"),[c,f]=(0,zt.useState)(e||""),[d,y]=(0,zt.useState)(0),[S,h]=(0,zt.useState)(""),g=(0,zt.useCallback)(async _=>{_.preventDefault(),l(Ew({email:c})),y(1)},[n,c]),m=()=>{h(""),y(0)},p=(0,zt.useCallback)(async _=>{_.preventDefault();let C=FR(_.target.elements.token.value);if(!C){h(i("verifyCodeError",{login:v}));return}l(wa({token:C}))},[n]),v=(0,zt.useMemo)(()=>_=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:_},"back-button"),[]);return(0,zt.useEffect)(()=>{a==="error"&&h(i("verifyCodeError",{login:v})),a==="done"&&r()},[a]),(0,he.jsx)(ci,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,he.jsxs)("div",{className:s.root,children:[(0,he.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,he.jsxs)("form",{onSubmit:g,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,he.jsx)(Ea,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>f(_.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,Qc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:p,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Ea,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),S&&(0,he.jsx)("div",{className:s.errorMessage,children:S}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Qc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Qc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Nw=jR;var Dw=x(w()),HR=()=>{let e=L(ww),t=L(F_),n=D("adminUrl"),r=Pt(),o=()=>r.send(Ci,!1),i=()=>{r.send(Ci,!1),r.send(Ig)};return(0,Dw.jsx)(Nw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Mw=HR;var l1=x(Dg()),Je=x(O());var rI={data:null,fetchState:"idle"},Bw=e=>e.contentTypes.data,Ca=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),oI=H({name:"contentTypes",initialState:rI,reducers:{},extraReducers:e=>{e.addCase(Ca.pending,t=>{t.fetchState="loading"}).addCase(Ca.rejected,t=>{t.fetchState="error"}).addCase(Ca.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Uw=oI.reducer;function ba(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 zw=x(O());function Vw(e,t){(0,zw.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 Ta=x(O());var Kw={data:null,fetchState:"idle"},Yc=e=>{var i;let t=[],{visitorName:n}=e.info.visitorInfo??{},{agentName:r,agentNickname:o}=e.info.agentInfo??{};return r&&r!==n&&t.push(r),o&&o!==n&&t.push(o),((i=e.entities.data)==null?void 0:i.filter(s=>!t.includes(s.text)))??null},Vt=M("entities/getEntities",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.resolve([]);let o=r.conversationQuery,i=await o();return i.length===0?Promise.resolve([]):n.getEntities(i)}),iI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),sI=H({name:"entities",initialState:Kw,reducers:{},extraReducers:e=>{e.addCase(Vt.pending,t=>{t.fetchState="loading"}).addCase(Vt.rejected,t=>{t.fetchState="error"}).addCase(Vt.fulfilled,(t,n)=>{t.fetchState="done",t.data=iI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>Kw)}}),Ww=sI.reducer;var Fg={};Ce(Fg,{enUS:()=>aI,nlNL:()=>lI});var aI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},lI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var $w={root:"_root_17kae_1",empty:"_empty_17kae_5"};var uo=x(w()),uI=({onCopy:e,onUse:t})=>{let n=(0,Ta.useRef)(null),r=k("EntitiesList",$w),o=j(Fg),i=L(Yc),s=B();return(0,Ta.useEffect)(()=>{s(Vt())},[]),(0,Ta.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,uo.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,uo.jsx)(te.ActionsBar,{primaryLabel:o("copy"),secondaryLabel:o("use"),onPrimary:(a,l)=>e(i[l]),onSecondary:(a,l)=>t(i[l]),list:i.map(a=>({text:a.text,type:a.label,primaryAction:"copy",secondaryAction:"use"})),children:(0,uo.jsx)(te.List,{children:i.map((a,l)=>(0,uo.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,uo.jsx)("p",{className:r.empty,children:o("noResults")})]})},qw=uI;var Kt=x(O());var Gw={data:null,fetchState:"idle"},Xw=e=>e.summary.data,Qw=e=>e.summary.fetchState==="error",Ln=M("summary/getSummary",async(e,t)=>{let n=t.getState().profile.data;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:r,dynamicThunkObject:o}=t.extra;if(!o.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let i=o.conversationQuery,s=await i();return s.length===0?Promise.reject(new Error("No messages are included")):{summary:await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel})}}),cI=H({name:"summary",initialState:Gw,reducers:{},extraReducers:e=>{e.addCase(Ln.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Ln.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Ln.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>Gw)}}),Yw=cI.reducer;var jg={};Ce(jg,{enUS:()=>dI,nlNL:()=>fI});var dI={copy:[{type:0,value:"Copy"}],error:[{type:0,value:"Could not generate a summary"}],loading:[{type:0,value:"Generating summary, this may take a few moments."}]},fI={copy:[{type:0,value:"Kopieer"}],error:[{type:0,value:"Kon helaas geen samenvatting genereren."}],loading:[{type:0,value:"Samenvatting wordt gemaakt, dit kan even duren."}]};var Zw={root:"_root_6ahh3_1",actions:"_actions_6ahh3_5",main:"_main_6ahh3_11",textInput:"_textInput_6ahh3_15",loading:"_loading_6ahh3_34",error:"_error_6ahh3_38"};var An=x(w()),pI=({onCopy:e})=>{let t=(0,Kt.useRef)(null),n=k("SummaryForm",Zw),[r,o]=(0,Kt.useState)(""),i=j(jg),s=L(Xw),a=L(Qw),l=B(),u=()=>{l(st({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(st({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,Kt.useEffect)(()=>{l(Ln())},[]),(0,Kt.useEffect)(()=>{o(s||"")},[s]),(0,Kt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Kt.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,An.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,An.jsx)("p",{className:n.error,children:i("error")}):(0,An.jsxs)(Kt.Fragment,{children:[(0,An.jsx)("div",{className:n.main,children:(0,An.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:f=>o(f.target.value)})}),(0,An.jsx)("div",{className:n.actions,children:(0,An.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},Jw=pI;var Hg={};Ce(Hg,{enUS:()=>mI,nlNL:()=>gI});var mI={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link 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"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],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?"}]},gI={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:"Link 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"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],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 Cr=x(O());var Bg={};Ce(Bg,{enUS:()=>hI,nlNL:()=>yI});var hI={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"}]},yI={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 e1={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var Ug={data:[],fetchState:"idle"},t1=e=>{var t;return(t=e.answer)==null?void 0:t.data},n1=e=>e.answer.fetchState,Ti=fe("answer/resetKnowledgeSearch"),bi=M("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().conversation.current)==null?void 0:s.profileCode;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeAssist({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),vI=H({name:"answer",initialState:Ug,reducers:{},extraReducers:e=>{e.addCase(bi.pending,t=>{t.fetchState="loading"}).addCase(bi.rejected,t=>{t.fetchState="error"}).addCase(bi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Ug).addCase(Ti,()=>Ug)}}),r1=vI.reducer;var ka=x(w()),o1=()=>(0,ka.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,ka.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,ka.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 Ze=x(w()),SI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=Cr.default.useState(""),{setSelected:s}=Sr(),a=(0,Cr.useRef)(null),l=k("EntitiesList",e1),u=j(Bg),c=B(),f=L(t1),d=L(n1),y=async h=>{h.preventDefault(),h.stopPropagation(),o!==""&&c(bi({question:o,promptInstruction:r}))},S=(h,g)=>{c(st({name:"knowledge assist source viewed",data:{question:g,sourceViewed:h.url||h.name},options:{includeConversationData:!0}}))};return(0,Cr.useEffect)(()=>{var h;n&&d==="idle"?c(bi({question:n,promptInstruction:r})):(h=a.current)==null||h.focus()},[a,d]),(0,Cr.useEffect)(()=>{d==="done"&&(c(st({name:"knowledge assist question answered",data:{question:o||n,sources:f[f.length-1].answer.sources,answer:f[f.length-1].answer.answer,isFollowUpQuestion:f.length>1},options:{includeConversationData:!0}})),s(f.length-1),i(""))},[d,f]),(0,Cr.useEffect)(()=>{a.current&&a.current.scrollIntoView({behavior:"smooth"})},[a,f]),(0,Ze.jsxs)("div",{className:l.root,children:[f.length>0&&(0,Ze.jsx)("div",{className:l.alignRight,children:(0,Ze.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ze.jsxs)(te.ActionsBar,{list:f.map(({answer:h})=>({text:h.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:h=>e(h.text),children:[f.map(({question:h,answer:g},m)=>(0,Ze.jsx)(te.List,{children:(0,Ze.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:g.answer,closeOnSelect:!0,onClick:()=>e(g.answer),onSourceClick:p=>S(p,h),sources:g.sources,styles:{title:l.question,description:l.answer},children:h})},`${g.answer}_${m}`)),d==="loading"&&(0,Ze.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ze.jsx)("p",{className:l.status,children:u("error")}),(0,Ze.jsxs)("form",{className:l.form,onSubmit:y,children:[(0,Ze.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:h=>{s(-1),i(h.target.value)}}),(0,Ze.jsx)("button",{type:"submit",className:l.submit,children:(0,Ze.jsx)(o1,{})})]})]})]})},i1=SI;var xI={data:null,fetchState:"idle"},ki=e=>e.profile.data,Zc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Pa=M("profile/getProfile",async(e,t)=>{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)}),_I=H({name:"profile",initialState:xI,reducers:{},extraReducers:e=>{e.addCase(Pa.pending,t=>{t.fetchState="loading"}).addCase(Pa.rejected,t=>{t.fetchState="error"}).addCase(Pa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),s1=_I.reducer;var Ee=x(w()),wI=200,EI=5,CI=4,bI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),a1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),TI=()=>{let e=B(),t=Pt(),n=j(Hg),[r,o]=(0,Je.useState)(!1),[i,s]=(0,Je.useState)(""),a=L(z_),l=L(ki),[u,c]=(0,Je.useState)(null),[f,d]=(0,Je.useState)([]),[y,S]=(0,Je.useState)(),h=L(Ut),g=D("showSearch"),m=D("showEntitiesCommand"),p=D("showSummaryCommand"),v=D("showKnowledgeSearch"),_=D("showImageSearch"),C=D("searchTriggerKey"),E=L(Bw),b=L(V_),R=L(U_),P=I=>un(b.filter(W=>W.type===I.toUpperCase()),I),N=[{value:"PERSONAL",label:n("personalSuggestions"),list:P("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:P("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:P("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:P("IMAGE"),listOrientation:"horizontal",shouldShow:_}].filter(I=>I.shouldShow),G=[{label:n("entitiesClipboard"),onClick:()=>e(ze("entities")),shouldShow:m&&a1(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(ze("summary")),shouldShow:p&&a1(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(ze("knowledgeAssist")),shouldShow:v,experimental:!0}].filter(I=>I.shouldShow),V=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:P(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],He=(0,Je.useCallback)((0,l1.default)((I,W)=>{e(ao({query:I,type:W,tags:["search-overlay"]}))},wI),[]),ln=bI([...V,...N]),qt=(0,Je.useCallback)((I,W)=>{if(!W)return;let Lt=[...N,...V].find(({value:Bn})=>Bn===W);Lt&&(e(ze("edit")),c({...I,searchTerm:void 0}),d(Lt.list))},[e,u,V]),po=(0,Je.useCallback)((I,W)=>{switch(W.type){case"IMAGE":t.send(Lg,{suggestion:W});break;default:t.send(In,{text:I,suggestion:W})}e(at(!1))},[e]),ji=I=>{ba(I.text),e(st({name:"entity copied",data:{entity:I,type:"copy"}})),e(at(!1))},Ir=I=>{t.send(In,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(st({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(ze("search")),e(Ti()),e(at(!1))},Ua=I=>{ba(I),e(at(!1))},za=I=>{t.send(In,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(at(!1))},Hi=u===null||f.indexOf(u)-1<0?void 0:()=>c(f[f.indexOf(u)-1]),Bi=u===null||f.indexOf(u)===f.length-1?void 0:()=>c(f[f.indexOf(u)+1]);function un(I,W){return I.slice(0,y?10:W.toLowerCase()==="image"?CI:EI)}function Ui(I,W,Lt){return W.reduce((Bn,cn)=>Lt&&y===Lt?cn.length+Bn:un(cn,Lt).length+Bn,I)}function Lr(I){return W=>{r?window.confirm(n("warning"))&&(I(W),o(!1)):I(W)}}return(0,Je.useEffect)(()=>{i?He(i,y):e(Kc())},[i,y]),(0,Je.useEffect)(()=>{a==="search"&&e(Ti())},[a]),(0,Je.useEffect)(()=>{h&&e(Ca())},[h]),Vw(C,()=>e(at(!0))),!g||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Lr(I=>e(at(I))),onChangeType:I=>S(I),onChangePage:Lr(I=>e(ze(I))),selectedType:y,search:i,page:a,isOpen:R,types:[...V,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...G.map(I=>({text:I.label,type:"command"})),...ln.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},W)=>po(I,ln[W]),onSecondary:(I,W)=>{qt(ln[W-G.length],ln[W-G.length].type)},children:[G.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:G.map((I,W)=>(0,Ee.jsx)(te.ListItem,{index:Ui(W,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...V,...N].map(({value:I,label:W,list:Lt,lineClamp:Bn,listOrientation:cn},zi)=>(0,Ee.jsx)(te.List,{heading:W,orientation:cn==="horizontal"?"horizontal":"vertical",children:un(Lt,I).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Ui(G.length+dt,[...V,...N].slice(0,zi).map(({list:Ar})=>Ar),I),closeOnSelect:!1,lineClamp:Bn,onClick:()=>po(ct.text,ct),description:I!=="IMAGE"?ct.title&&ct.text:void 0,children:I==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},I))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:Lr(()=>{e(ze("search")),c(null)}),children:u&&(0,Ee.jsx)(qc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(ze("search")),c(null),d([])},onNext:Bi,onPrevious:Hi,onUse:I=>{e(ze("search")),po(I,{...u,source:`${u.source||"text_recommendation"}-preview`}),e(at(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:Lr(()=>{e(ze("search"))}),children:(0,Ee.jsx)(qw,{onUse:za,onCopy:ji})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:Lr(()=>{e(ze("search"))}),children:(0,Ee.jsx)(Jw,{onCopy:Ua})}),(0,Ee.jsx)(te.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),isExperimental:!0,onDismiss:Lr(()=>{e(Ti()),e(ze("search"))}),children:(0,Ee.jsx)(i1,{promptInstruction:l.knowledgeAssistPromptInstruction,question:i,onUse:Ir,onResetQuestion:()=>{e(Ti()),s("")}})})]})},u1=TI;var Pi=x(w()),kI=()=>{let e=D("showSearch"),t=D("isEmbedded");return(0,Pi.jsxs)(c1.Fragment,{children:[e&&(0,Pi.jsx)(u1,{}),(0,Pi.jsx)(Rw,{}),t&&(0,Pi.jsx)(Mw,{})]})},d1=kI;function Ri(e){let{showMidSentenceSuggestions:t,showSuggestionsBeforePattern:n,showSuggestionsAfterPattern:r}=e.settings,{text:o,selection:i}=e.input.userCommitted;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 Jc=x(O());var Li=x(O());var f1=x(O());function p1(e,t,n){(0,f1.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var PI=/[.*+?^${}()|[\]\\]/g,RI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function II(e){return e.replace(PI,"\\$&")}function LI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function AI(e){return e.search(RI)}function m1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${II(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function g1(e){return e.replace(So,'<mark data-type="placeholder">$1</mark>')}function Ii(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function OI(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 zg(e,t,n={}){if(t){let r=LI(t.toLowerCase(),e.toLowerCase()),o=Ii(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=AI(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Ey).length>3||t.length>30?OI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ii(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var h1={badge:"_badge_1syy2_1",formattedText:"_formattedText_1syy2_5"};var Vg=x(w()),MI=["search","personal-collection-search","search-autocomplete"];function DI(e,t,n,r={}){let o="";return MI.includes(t)?o=m1(zg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=zg(e,n,r),r.placeholders===!0&&(o=g1(o)),o}var FI=()=>{},jI=({index:e,selected:t,suggestion:n})=>{let r=D("inlineSuggestions"),o=L(li),i=B(),s=k("TextSuggestion",h1),a=(0,Li.useRef)(null);(0,Li.useEffect)(()=>{let u=setTimeout(()=>{i(Jx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),p1(a,"click",()=>{i(eo(e)),i(jt({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Li.useMemo)(()=>DI(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"&&!r?null:(0,Vg.jsx)(oe,{ref:a,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:FI,children:(0,Vg.jsx)(di,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},y1=jI;var Kg=x(w()),HI=({suggestions:e,selectedIndex:t,reverse:n})=>{let r=(0,Jc.useMemo)(()=>{let o=e.map((i,s)=>(0,Kg.jsx)(y1,{index:s,selected:s===t,suggestion:i},`${i.text}-${i.source}`));return n?o.reverse():o},[e,t,n]);return(0,Kg.jsx)(Jc.Fragment,{children:r})},ed=HI;var v1={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var Ra=x(w()),BI=({textSuggestions:e,selectedIndex:t})=>{let n=k("InlineSuggestionsOverlay",v1),r=L(Ri),o=B(),i=L(Ut),s=L(ai),a=L(Xc),l=D("showTextSuggestions");return gi(()=>{o(wr({collapse:!0,skipWhenInputFocus:!0}))}),a||!r||!l||e.length===0||i!==!0||s===!1?null:(0,Ra.jsx)("div",{className:n.root,"data-variant":"inline",children:(0,Ra.jsx)("div",{className:n.paper,children:(0,Ra.jsx)(ht,{children:(0,Ra.jsx)(ed,{suggestions:e,selectedIndex:t})})})})},UI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),S1=xn(UI)(BI);var nd=x(X()),Ai=x(O());var x1=x(O());function _1(e,t){let[n,r]=(0,x1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return U.error(i),t}});return[n,i=>{try{let s=i instanceof Function?i(n):i;r(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(s){U.error(s)}}]}var E1=x(X()),On=x(O());var Wg={};Ce(Wg,{enUS:()=>zI,nlNL:()=>VI});var zI={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"}]}]},VI={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 w1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var br=x(w()),$g=(e,t,n)=>r=>(0,br.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),KI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=j(Wg),i=Pt(),s=k("Login",w1),a=D("productName"),l=(0,On.useCallback)(h=>{h.preventDefault(),r&&r(parseInt(h.target.value,10))},[]),u=(0,On.useCallback)(h=>{h.preventDefault(),i.send(Ci,!0)},[t]),c=(0,On.useMemo)(()=>h=>(0,br.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:h},"login"),[t]),f=(0,On.useCallback)(h=>(0,br.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:h},"prompt"),[u]),{min:d,hour:y,day:S}=(0,On.useMemo)(()=>({min:$g(s,60*10,l),hour:$g(s,60*60,l),day:$g(s,60*60*12,l)}),[]);return(0,br.jsxs)("div",{className:(0,E1.default)(e,s.root),children:[o("loginPlease",{login:n?f:c,productName:a}),r&&(0,br.jsxs)(On.Fragment,{children:[(0,br.jsx)("br",{}),o("snooze",{min:d,hour:y,day:S})]})]})},td=KI;var C1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Ia=x(w()),WI=({title:e})=>{let t=k("SearchTrigger",C1),n=B();return(0,Ia.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(at(!0)),children:[(0,Ia.jsx)(vi,{}),(0,Ia.jsx)("span",{className:t.text,children:e})]})},b1=WI;var qg={};Ce(qg,{enUS:()=>$I,nlNL:()=>qI});var $I={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"}]},qI={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 T1={root:"_root_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ue=x(w()),GI=({textSuggestions:e,selectedIndex:t})=>{let n=k("SuggestionsOverlay",T1),r=j(qg),o=L(Ri),i=Gx(),s=B(),a=(0,Ai.useRef)(null),l=D("searchTriggerKey"),u=D("productName"),c=L(Xc),f=L(Ut),d=L(ai),[y,S]=(0,Ai.useState)(null),h=D("showSearch"),g=D("showTextSuggestions"),m=D("adminUrl"),p=D("isEmbedded"),[v,_]=_1("dd-snooze-until-ms",0),C=c||v>Date.now(),E=e.filter(P=>P.source!=="gpt").length,b=()=>{C&&_(0),s(hw(!C))},R=P=>{let N=Date.now()+P*1e3;_(N),U.info(`Snooze until: ${new Date(N)}`),s(wr({collapse:!0}))};return(0,Ai.useEffect)(()=>{E===0&&S(null)},[e,E]),gi(()=>{s(wr({collapse:!0,skipWhenInputFocus:!0}))}),f===null||d===!1?null:f===!1?(0,ue.jsxs)("div",{ref:a,className:(0,nd.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:n.triggersRight,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),(0,ue.jsx)("div",{className:n.collapsible,children:(0,ue.jsx)(td,{loginUrl:m,isEmbedded:p,onSnooze:R})})]}):!i||!o?null:(0,ue.jsxs)("div",{ref:a,className:(0,nd.default)(n.root,{[n.isCollapsed]:C}),children:[!C&&(0,ue.jsxs)("div",{className:n.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:h&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>S(r(zc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:l.toUpperCase()})),onMouseLeave:()=>S(null),children:(0,ue.jsx)(b1,{title:r("search")})})}),(0,ue.jsxs)("div",{className:n.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,nd.default)(!y&&n.hintsHidden,n.hints),children:y}),(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("collapse"),onClick:b,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:n.toggleButtonWrapper,children:(0,ue.jsx)(Dr,{className:n.toggleButton,title:r("open",{productName:u}),onClick:b,isCollapsed:!0})}),E>0&&g&&(0,ue.jsx)("div",{className:n.collapsible,onFocus:()=>{},children:(0,ue.jsx)(ht,{children:(0,ue.jsx)(ed,{suggestions:e,selectedIndex:t,reverse:!0})})})]})},XI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),k1=xn(XI)(GI);var La=x(w()),QI=({children:e})=>{let n=D("locale").replace("-","");return(0,La.jsx)(zd.Provider,{value:n,children:e})},YI=({store:e,customStyles:t={},children:n})=>(0,La.jsx)(Vm,{store:e,children:(0,La.jsx)(QI,{children:(0,La.jsx)(Ki.Provider,{value:t,children:n})})}),Oi=YI;var gd=x(X());var Dn=x(O());var P1=x(O()),ZI=["div","span","mark","strong","b","i","u","em"];function Gg(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(ZI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,P1.cloneElement)(r,{children:Gg(s,t,n+1)})]}return[...e,...t]}function Tr(e){return e.tagName.toLowerCase()==="textarea"}var R1={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var j1=x(X());var dd=x(O());function I1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function rd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function L1(e){return e!=null}var Qg=x(X()),Rt=x(O());var od=x(O()),JI=["bottom","height","left","right","top","width"],eL=(e={},t={})=>JI.some(n=>e[n]!==t[n]),Nn=new Map,A1,O1=()=>{let e=[],t=[];Nn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();eL(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Nn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),A1=window.requestAnimationFrame(O1)};function tL(e,t){return{observe(){let n=Nn.size===0;if(Nn.has(e)){let r=Nn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Nn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&O1()},unobserve(){let n=Nn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Nn.delete(e),Nn.size||cancelAnimationFrame(A1)}}}}function Xg(e){let[t,n]=(0,od.useState)(null);return(0,od.useLayoutEffect)(()=>{if(!e.current)return;let r=tL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Ni=x(O()),M1=x(Iu());var N1={root:"_root_1jq08_1"};var D1=({children:e})=>{let[t,n]=(0,Ni.useState)(null),r=(0,Ni.useContext)(Ki);return(0,Ni.useLayoutEffect)(()=>{let o=document.createElement("div");return oo(o),o.classList.add(N1.root),r!=null&&r.portalRootNode&&o.classList.add(r==null?void 0:r.portalRootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,M1.createPortal)(e,t):null};var sn={ref:"_ref_1rcyi_1",root:"_root_1rcyi_7",positionAbove:"_positionAbove_1rcyi_13",positionBelow:"_positionBelow_1rcyi_17",positionLeft:"_positionLeft_1rcyi_21",positionRight:"_positionRight_1rcyi_25",alignStart:"_alignStart_1rcyi_29",alignCenter:"_alignCenter_1rcyi_34",alignEnd:"_alignEnd_1rcyi_40"};var id=x(w()),sd=(e=!1)=>{let[t,n]=(0,Rt.useState)(e),r=(0,Rt.useCallback)(()=>n(!0),[]),o=(0,Rt.useCallback)(()=>n(!1),[]),i=(0,Rt.useCallback)(()=>n(a=>!a),[]),s=(0,Rt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Yg(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 ad=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Yg,...a})=>{let l=Xg(t),u=Xg(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,id.jsx)(D1,{children:(0,id.jsx)("div",{className:(0,Qg.default)(sn.ref,{[sn.positionAbove]:r==="above",[sn.positionBelow]:r==="below",[sn.positionLeft]:r==="left",[sn.positionRight]:r==="right",[sn.alignStart]:o==="start",[sn.alignCenter]:o==="center",[sn.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,id.jsx)("div",{className:(0,Qg.default)(e,sn.root),children:i})})})};var F1=x(X()),ld=x(O());var Zg=x(w()),ud=(0,ld.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,ld.useRef)(null),i=k("TabCompletion",Cn);return(0,Zg.jsx)("div",{ref:rd([o,r]),className:(0,F1.default)(e,i.popoverContentContainer),...n,children:(0,Zg.jsx)("div",{className:i.popoverContent,children:t})})});var kr=x(w()),nL=e=>t=>{let n=Yg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},rL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",Cn),s=sd(),a=(0,dd.useMemo)(()=>nL(e.getBoundingClientRect()),[e]),[l,u]=Nc(e);return(0,dd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,kr.jsxs)("span",{children:[(0,kr.jsx)("mark",{ref:rd([l,s.triggerRef]),className:(0,j1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,kr.jsx)(ad,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,kr.jsx)(ud,{style:n,children:(0,kr.jsx)("div",{className:i.hintText,children:o})})})]})},cd=class extends wn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${I1(r.keyword)}\\b`,"i")})),this.keywordMatches=n.keywordMatches),this.usedKeywordMatches.clear(),t}match(t){let n=this.preparedKeywordMatches.map(o=>{if(this.usedKeywordMatches.has(o))return null;let i=t.match(o.keywordRegex);if(!i)return null;let s=t.charAt(i.index-1),a=t.charAt(i.index+o.keyword.length);return s==="{"&&a==="}"?null:{index:i.index,length:i[0].length,match:i[0],matchString:i[0],suggestion:o.suggestion,preparedKeywordMatch:o,valid:!0}}).filter(L1);if(n.length===0)return null;let r=n.reduce((o,i)=>i.index<o.index?i:o);return this.usedKeywordMatches.add(r.preparedKeywordMatch),r}replaceWith(t,n){return(0,kr.jsx)(rL,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var pd=x(X());var Ke=x(O());var Jg=x(w()),H1=()=>(0,Jg.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,Jg.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 Pr=x(O());var U1=x(Dg());var B1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function fd(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{return null}}function eh(e){return e.replace("https://www.","").replace("https://","")}var It=x(w()),oL=3,iL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),sL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=oL})=>{let i=k("LinkSearch",B1),[s,a]=(0,Pr.useState)(""),l=B(),u=L(tw("url")),c=L(K_("URL",iL)),[f,d]=(0,Pr.useState)(c.length-1),y=D("fallbackImage"),S=p=>{let v=p.target;a(v.value)},h=(p,v)=>{p.stopPropagation(),p.preventDefault(),window.open(v,"_blank")},g=p=>{var C;let v=f-1<0?c.length-1:f-1,_=f+1===c.length?0:f+1;p.code==="Escape"&&(a(""),t()),p.code==="ArrowUp"&&d(v),p.code==="ArrowDown"&&d(_),p.code==="Enter"&&e(((C=c[f])==null?void 0:C.text)||s)},m=(0,Pr.useCallback)((0,U1.default)(p=>{l(ao({query:p,type:"URL",tags:["link-search"]}))},300),[]);return(0,Pr.useEffect)(()=>{s&&m(s)},[s]),(0,Pr.useEffect)(()=>()=>{l(Kc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(ht,{withDivider:!0,children:(s?c:u).slice(0,o).map((p,v)=>(0,It.jsx)(oe,{selected:f===v,onClick:()=>e(p.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(me,{children:[(0,It.jsx)(me.Image,{src:fd(p,"small",y||void 0),title:p.title||p.text}),(0,It.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(me.Title,{children:p.title||eh(p.text)}),p.title&&eh(p.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:_=>h(_,p.text)})})]})},p.text))}),(0,It.jsx)(Ea,{value:s,onChange:S,autoFocus:!0,placeholder:n,onKeyUp:g})]})},z1=sL;var th={};Ce(th,{enUS:()=>aL,nlNL:()=>lL});var aL={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},lL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Ve=x(w()),uL=(0,Ke.forwardRef)((e,t)=>{let n=k("TabCompletion",Cn);return(0,Ve.jsx)("mark",{ref:t,className:(0,pd.default)(n.matchSelection)},"selection-start")}),cL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=j(th),s=k("TabCompletion",Cn),a=(0,Ke.useRef)(null),l=(0,Ke.useRef)(null),[u,c]=(0,Ke.useState)(null),f=B(),d=sd(document.activeElement===r),[y]=(0,Ke.useState)(()=>document.createRange());d.triggerRef.current=y,(0,Ke.useEffect)(()=>()=>y.detach(),[]),(0,Ke.useEffect)(()=>{let h=e.current,g=a.current;!h||!g||(y.setStart(h,0),y.setEnd(g,0))},[e.current,a.current]),gi(()=>{d.close()});let S=(0,Ke.useCallback)(h=>{let g=y.toString(),m=/^http(s?):\/\//.test(h)?h:`https://${h}`;f(_c({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,Ve.jsxs)("span",{children:[(0,Ve.jsx)("mark",{ref:a,className:(0,pd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Ve.jsx)(ad,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ve.jsxs)(ud,{style:n,ref:l,children:[(0,Ve.jsx)("div",{className:(0,pd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Ve.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Ve.jsx)(H1,{}),(0,Ve.jsx)("span",{children:"\xA0"}),(0,Ve.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Ve.jsx)(z1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:S,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},md=class extends wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ke.createRef)(),this.foundIndex=0,t}match(t){if(!this.props||this.props.selection===null||this.foundIndex===2)return null;let[n,r]=this.props.selection;if(n===r)return null;let o=this.foundIndex===0?n:r,i=o>=this.charCount&&o<=this.charCount+t.length?{index:o-this.charCount,length:0,match:"",valid:!0}:null;i&&this.foundIndex++;let s=this.foundIndex===1;return i&&s?this.charCount+=o-this.charCount:this.charCount+=t.length,i?{isStart:s,...i}:null}replaceWith(t,n){return n.isStart?(0,Ve.jsx)(uL,{ref:this.startRef}):(0,Ve.jsx)(cL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Mn=x(w()),dL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",R1),c=D("insertLink"),f=D("showMidSentenceSuggestions"),d=D("inlineSuggestions"),y=Dc(a),S=(0,Dn.useRef)(null);(0,Dn.useEffect)(()=>{Tr(a)&&y&&Fc(a,y)},[y]);let h=(0,Dn.useCallback)(p=>{if(!o||!n)return p;let v=[(0,Mn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Mn.jsx)("span",{"data-testid":"tab-completion",className:(0,gd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&v.push((0,Mn.jsx)("span",{className:(0,gd.default)(u.hint,u.resetIndent),children:(0,Mn.jsx)(ml,{keyCode:"tab"},"tabHint")})),Gg(p,v)},[o,n,r]),g=(0,Dn.useMemo)(()=>{let p=[];return c&&p.push(new md("selection")),p.push(new pi("placeholders")),i&&p.push(new cd("keywords")),p},[d,c,i]),m=(0,Dn.useMemo)(()=>{let p=window.getComputedStyle(a);return{"--dd-color":p.color,"--dd-font-size":p.fontSize,"--dd-font-family":p.fontFamily,"--dd-font-variant":p.fontVariant}},[]);return e?(0,Mn.jsxs)("div",{ref:p=>{p!=null&&p.parentElement&&(S.current=p==null?void 0:p.parentElement)},className:u.root,style:m,children:[(0,Mn.jsx)(di,{tagName:"span",containerTagName:"div",className:(0,gd.default)(u.container,u.agentText),disableLineBreaks:Tr(a),content:t||"\u200B",onAfterParse:h,matchers:g,selection:y,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:S,inlineSuggestionsOnlyAtEnd:!f}),(0,Mn.jsx)("br",{})]}):null},fL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var h;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Ii(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:y,showStyleSuggestions:S}=n;return{showTabHint:c,showStyleSuggestions:S,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((h=r.list)==null?void 0:h.keywordMatches)??[],enabled:y&&f!==!1}},V1=xn(fL)(dL);var LE=x(X()),AE=x(O());var K1={list:[],fetchState:"idle",isInitialRequest:null},$1=e=>e.autoflows.list||[],W1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},Fn=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),nh=M("autoflows/start",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.startAutoflowSession(e),await n(Fn(e.platformSessionId))}),rh=M("autoflows/stop",async(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");await r.stopAutoflowSession(e.platformSessionId),await n(Fn(e.platformSessionId))}),pL=H({name:"autoflows",initialState:K1,reducers:{},extraReducers:e=>{e.addCase(nh.pending,(t,n)=>{let r=W1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(rh.pending,(t,n)=>{let r=W1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(Fn.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(Fn.rejected,t=>{t.fetchState="error"}),e.addCase(Fn.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>K1)}}),q1=M("autoflows/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");let o=r.openStream(e);o.on("sessionAborted",()=>{n(Fn(e))}),o.on("sessionCompleted",()=>{n(Fn(e))})}),G1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),X1=pL.reducer;var Q1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},Y1=e=>e.customMessages.list,Z1=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),J1=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),eE=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Aa=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),hd=M("customMessages/send",async(e,t)=>{let{platformSessionId:n,suggestion:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.sendCustomMessage(n,r)}),yd=M("customMessages/answer",async(e,t)=>{let{platformSessionId:n,reply:r}=e,{deepdeskBrokerAPI:o}=t.extra;if(!o)throw new Error("Deepdesk Broker not initialized");await o.answerCustomMessage(n,r)}),tE=H({name:"customMessages",initialState:Q1,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Aa.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Aa.rejected,t=>{t.fetchState="error"}).addCase(Aa.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(hd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(hd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(yd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(yd.rejected,(t,n)=>{let r=t.answeredSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1)),t.answeredSuggestions.splice(r,1)}).addCase(J,()=>Q1)}}),nE=M("customMessages/openStream",(e,t)=>{let{dispatch:n}=t,{deepdeskBrokerAPI:r}=t.extra;if(!r)throw new Error("Deepdesk Broker not initialized");r.openStream(e).on("customMessageSuggestion",i=>{n(tE.actions.onCustomMessage(i))})}),rE=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),oE=tE.reducer;var mL={jwt:null,accountUrl:null,interval:null},iE=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},oh=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),ih=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(oh()),setInterval(()=>r(oh()),n)}),sE=H({name:"exchangeToken",initialState:mL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(oh.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(ih.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:aE}=sE.actions,lE=sE.reducer;function uE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var vE=x(O());var gE=x(X()),hE=x(O());var dE=x(X());var cE={root:"_root_838fd_1"};var pE=x(w()),gL=({className:e,children:t})=>{let n=k("Unicode",cE);return(0,pE.jsx)("span",{className:(0,dE.default)(e,n.root),children:t})},fE=gL;var mE={isDisabled:"_isDisabled_1rmfm_1",buttonStart:"_buttonStart_1rmfm_5",root:"_root_1rmfm_8",buttonStop:"_buttonStop_1rmfm_8",stateBadge:"_stateBadge_1rmfm_19",isCompleted:"_isCompleted_1rmfm_26",isStarted:"_isStarted_1rmfm_30",isAborted:"_isAborted_1rmfm_34"};var sh={};Ce(sh,{enUS:()=>hL,nlNL:()=>yL});var hL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]},yL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]};var lt=x(w()),SL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",mE),a=j(sh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,lt.jsxs)(oe,{className:(0,gE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,lt.jsx)(me,{children:(0,lt.jsxs)(me.Content,{children:[(0,lt.jsxs)(me.Title,{children:[t&&(0,lt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,lt.jsx)("span",{children:r})]})}),(0,lt.jsx)(oe.Actions,{fixed:t==="Started",children:(0,lt.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,lt.jsxs)(hE.Fragment,{children:[(0,lt.jsx)(fE,{children:u})," ",(0,lt.jsx)("span",{children:a(l)})]})})})]})},yE=SL;var ah=x(w()),xL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},_L=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,ah.jsx)(vE.Fragment,{children:e.map(o=>(0,ah.jsx)(yE,{displayName:o.displayName,description:o.description,disabled:o.isBusy||xL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),wL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},EL={onStartAutoflow:nh,onStopAutoflow:rh},SE=xn(wL,EL)(_L);var vd=x(O());var ch=x(X());var lh=x(w()),uh=()=>(0,lh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,lh.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 xE={root:"_root_rjdyr_1",entity:"_entity_rjdyr_10",entityText:"_entityText_rjdyr_46",iconWrapper:"_iconWrapper_rjdyr_53",icon:"_icon_rjdyr_53",iconClicked:"_iconClicked_rjdyr_67"};var an=x(w()),CL=({entities:e})=>{let t=k("EntitiesWidgetList",xE),[n,r]=(0,vd.useState)(void 0),o=B(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),ba(a.text),o(st({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,vd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,an.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,an.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,an.jsx)("span",{className:t.entityText,children:a.text}),(0,an.jsxs)("span",{className:t.iconWrapper,children:[(0,an.jsx)("span",{className:(0,ch.default)(t.icon),children:(0,an.jsx)(uh,{})}),(0,an.jsx)("span",{className:(0,ch.default)(t.icon,n===l&&t.iconClicked),children:(0,an.jsx)(uh,{})})]})]},a.text))})},_E=CL;var wE=x(X()),dh=x(O());var Oa={};Ce(Oa,{enUS:()=>bL,nlNL:()=>TL});var bL={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"}],answer:[{type:0,value:"Answer"}]},TL={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"}],answer:[{type:0,value:"Antwoord"}]};var jn={root:"_root_1e6ej_1",title:"_title_1e6ej_8",isUsed:"_isUsed_1e6ej_13",quickReplies:"_quickReplies_1e6ej_22",quickReply:"_quickReply_1e6ej_29",hasError:"_hasError_1e6ej_39",label:"_label_1e6ej_43",errorIcon:"_errorIcon_1e6ej_48"};var et=x(w()),kL=({suggestion:e})=>{let t=j(Oa),n=B(),r=L(Z1(e.text)),o=L(J1(e.text)),i=L(eE(e.text)),s=L(pc),{replyOptions:a}=e,l=(0,dh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(hd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,dh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(yd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,et.jsxs)(oe,{onClick:l,className:(0,wE.default)(jn.root,{[jn.isUsed]:r,[jn.hasError]:i}),children:[(0,et.jsx)(me,{children:(0,et.jsxs)(me.Content,{children:[(0,et.jsxs)(me.Title,{className:jn.title,children:[e.text," ",(0,et.jsx)(gl,{className:jn.label,children:"analyse tool"})," ",i&&(0,et.jsx)("span",{className:jn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,et.jsx)("ul",{className:jn.quickReplies,children:a.map(c=>(0,et.jsx)("li",{className:jn.quickReply,children:c.title},c.title))})]})}),(0,et.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,et.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,et.jsx)(oe.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,et.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},EE=kL;var fh=x(w()),CE=()=>(0,fh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,fh.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 bE=x(O());var ut=x(w()),PL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Wc(o),s=j(Oa),a=D("showImages"),l=D("fallbackImage"),u=y=>{y.preventDefault(),y.stopPropagation(),r(o)},c=y=>{y.preventDefault(),y.stopPropagation(),n(e)},f=(0,bE.useCallback)(y=>{window.open(i,"_blank"),y.stopPropagation(),y.preventDefault()},[i]);return(0,ut.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,ut.jsxs)(me,{children:[a&&e.image&&(0,ut.jsx)(me.Image,{src:fd(e,"small",l||void 0),title:e.title}),(0,ut.jsxs)(me.Content,{children:[e.title&&(0,ut.jsx)(me.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,ut.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,ut.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,ut.jsxs)(oe.Actions,{children:[i&&(0,ut.jsx)(oe.ActionButton,{onClick:f,label:s("visitUrl")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,ut.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},TE=PL;var Na=x(w()),RL=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=L(xi),i=a=>{r.send(Rg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(In,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Na.jsx)(Na.Fragment,{children:n.map(a=>(0,Na.jsx)(TE,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},kE=RL;var ph={};Ce(ph,{enUS:()=>IL,nlNL:()=>LL});var IL={waiting:[{type:0,value:"Loading\u2026"}],notSupported:[{type:0,value:"This conversation is not supported"}],noResults:[{type:0,value:"No results found\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},LL={waiting:[{type:0,value:"Laden\u2026"}],notSupported:[{type:0,value:"Dit gesprek wordt niet ondersteund"}],noResults:[{type:0,value:"Geen resultaten gevonden\u2026"}],titleAutoflows:[{type:0,value:"Autoflows"}],titleCustomMessages:[{type:0,value:"Quick replies"}],actions:[{type:0,value:"Shortcuts"}],linkPersonalcollection:[{type:0,value:"Personal Collection"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var PE={root:"_root_x0pwe_1",loginText:"_loginText_x0pwe_7",stateText:"_stateText_x0pwe_8",sectionList:"_sectionList_x0pwe_20",shortcutList:"_shortcutList_x0pwe_24",shortcut:"_shortcut_x0pwe_24",link:"_link_x0pwe_52"};var mh=x(w()),RE=()=>(0,mh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,mh.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 gh=x(w()),IE=()=>(0,gh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,gh.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 z=x(w()),Sd=(e,t)=>{let n=L(Ut);(0,AE.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},AL=()=>{let e=j(ph),t=B(),n=D("isEmbedded"),r=k("Widget",PE),o=D("showAutoflows"),i=D("showCustomMessages"),s=D("showPersonalCollectionLink"),a=D("showSummaryCommand"),l=D("showKnowledgeSearch"),u=D("showSearch"),c=L(ki),f=L(Zc),d=L($1),y=L(Yc),S=L(Y1),h=L(mc),g=L(ai),m=L(Ut),p=L(pc),v=L(uE),_=L(xi),C=Pt(),E=L(rw),b=L(iE("/admin/personal-collection")),R=D("adminUrl");if(Sd(()=>(t(Aa(p)),t(nE(p)),()=>{t(rE(p))}),[t,g,i,p]),Sd(()=>(t(Fn(p)),t(q1(p)),()=>{t(G1(p))}),[t,g,o,p]),Sd(()=>{f.forEach(({type:N})=>{t(N==="entities"?Vt():Pn(N))})},[t,g,h,c]),Sd(()=>(t(ih()),()=>{t(aE())}),[t,g,s,h]),g===!1)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("notSupported")})})},"supported");if(m===!1)return(0,z.jsx)("div",{className:r.loginText,children:(0,z.jsx)("div",{children:(0,z.jsx)(td,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!p||m===null||E||v)return(0,z.jsx)("div",{className:r.stateText,children:(0,z.jsx)("div",{children:(0,z.jsx)("p",{children:e("waiting")})})},"waiting");let P=u||a||l||b;return(0,z.jsx)("div",{className:(0,LE.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(hl,{className:r.sectionList,children:[P&&(0,z.jsx)(Un,{title:e("actions"),type:"shortcuts",children:(0,z.jsxs)("div",{className:r.shortcutList,children:[u&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-search",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0}),children:[(0,z.jsx)(vi,{}),e("linkSearch")]}),a&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-summary",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,z.jsx)(IE,{}),e("linkSummary")]}),l&&(0,z.jsxs)("button",{className:r.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,z.jsx)(RE,{}),e("linkKnowledgeSearch")]}),b&&(0,z.jsxs)("a",{className:r.shortcut,target:"_blank",href:b,"data-testid":"shortcut-personal-collection",rel:"noreferrer",children:[(0,z.jsx)(CE,{}),e("linkPersonalcollection")]})]})}),i&&S.length>0&&(0,z.jsx)(Un,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(ht,{withDivider:!0,children:S.map(N=>(0,z.jsx)(EE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(Un,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(SE,{})})}),f.map(({type:N,title:G,amount:V,lines:He})=>{var ln;switch(N){case"entities":return y&&y.length>0&&(0,z.jsx)(Un,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(_E,{entities:y})},N);default:return((ln=_[N])==null?void 0:ln.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(Un,{type:N,title:G,"data-testid":`type-${N}`,children:(0,z.jsx)(ht,{withDivider:!0,children:(0,z.jsx)(kE,{lines:He,contentType:N,suggestions:_[N].suggestions.slice(0,V)||[]})})},N)}})]})})},OE=AL;function Mi(e){let t=new Range;return t.selectNodeContents(e),t}function NE(e,t,n){try{return Rr(e,t,n),!0}catch{return!1}}function xd(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function _d(e){return"tagName"in e&&e.tagName==="BR"}var Ma=/[\u200B-\u200D\uFEFF]/g;function Rr(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(Ma,""),f=o+c.length,d=t>=o&&t<=f,y=n>=o&&n<=f;if(d){let S=s(u,t-o);S===0&&!y?r.setStartBefore(l):r.setStart(l,S)}y&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(_d(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;xd(l)&&u&&!xd(u)&&!_d(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Da(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===n,y=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let S=f.textContent;d&&(a=u+S.substring(0,r).replace(Ma,"").length),y&&(l=u+S.substring(0,i).replace(Ma,"").length),u+=S.replace(Ma,"").length;break}case Node.ELEMENT_NODE:{let S=f.nextSibling===null;_d(f)&&!S&&u++;for(let h=0;h<f.childNodes.length;h++){let g=d&&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&&xd(f)&&!S&&u++,y&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function Fa(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}=t,s=-1,a="";function l(u){let c=u===n,f=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,y=f?i:void 0,S=u.textContent.replace(Ma,"");d===0&&y===void 0?a+=S:a+=S.substring(d,y);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&_d(u)&&!d&&(a+=`
20
20
  `);for(let y=c?r:0;y<(f?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[y]),s!==1);y++);!f&&s===0&&xd(u)&&!d&&(a+=`
21
- `);break}default:break}f&&s++}return l(e),a}function ME(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var uo=class extends bn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Fa(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!ME(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!ME(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Da(this.element,t);let n=this.lastKnownSelection;if(n&&NE(this.element,n.start,n.end))return n;let r=Ni(this.element);return r.collapse(!1),Da(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Fa(this.element,Rr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var hh=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(t)}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},yh=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=this.createIframe(),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];createIframe(){let t=`deepdesk-iframe-${this.name}`,n=document.getElementById(t);if(n)return n;let r=document.createElement("iframe"),o=`${this.targetOrigin}/v2/widget/liveengage/channel.html`,i=new URLSearchParams({channel:this.name,host:window.location.origin});return this.options.debug&&i.set("debug","1"),r.style.position="absolute",r.style.left="-999em",r.style.width="0px",r.style.height="0px",r.tabIndex=-1,r.id=t,r.title=`iframe-${this.name}`,r.src=`${o}?${i.toString()}`,r}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(t,this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},vh=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),U.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new yh(t,this.deepdeskUrl,{debug:!0}):new hh(t),r=o=>{var i,s;o.origin===this.deepdeskUrl&&o.data.type==="event"&&o.data.channel===t&&(U.info("Received broadcast event",this.sessionId,o),(s=(i=this.eventMap)[o.data.name])==null||s.call(i,o.data.payload))};return n.onMessage(r),n}send(t,n){var o,i,s;if(!this.sessionId)return;U.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(i=(o=this.eventMap)[t])==null||i.call(o,n),(s=this.channel)==null||s.postMessage({...r,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},DE=vh;var Mi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Sh=e=>new Promise(t=>{setTimeout(t,e)});var Di=class extends Mi{name="ClientError"},xh=class extends Mi{name="ServerError"},Wt=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;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,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:f=!0,retryOnError:d=_=>_ instanceof TypeError,retryOnResponse:y=_=>_.status>=500,version:S="v1",...h}=n,g={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(g.headers={...g.headers,"X-CSRFToken":this.csrfToken}),typeof S=="string"&&(g.headers={...g.headers,"X-Deepdesk-API-Version":S});let m=u,p=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let v=async()=>(m--,a(s,g).then(async _=>y(_)&&!i.isAborted&&m>0?(await Sh(c),v()):_.status===401&&f===!0&&p===!1?(p=!0,await this.refreshToken(),v()):_).catch(async _=>{if(d(_)&&!i.isAborted&&m>0)return await Sh(c),v();throw _}));v().then(_=>_.json().catch(()=>null).then(C=>{_.status>=500?o(new xh("Server Error",C)):_.status===401?o(new Di("Unauthorized",C)):_.status===403?o(new Di("Forbidden",C)):_.status===404?o(new Di("Not Found",C)):_.status>=400&&o(new Di("Bad Request",C)),delete this.latestRequestByUrl[s],r(C)})).catch(_=>{o(_)})})}async validateToken(){let{has_valid_access_token:t}=await this.get("/auth/validate");if(!t)return!1;let{is_logged_in:n}=await this.get("/apis/admin/session/validate/",{version:null});return!!n}refreshToken(){return e.refreshingToken||(e.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{e.refreshingToken=null},1e3*60)})),e.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,{method:"POST",body:JSON.stringify(n),...r})}patch(t,n,r){return this.request(t,{method:"PATCH",body:JSON.stringify(n),...r})}put(t,n,r){return this.request(t,{method:"PUT",body:JSON.stringify(n),...r})}delete(t,n){return this.request(t,{method:"DELETE",...n})}};var OL;(t=>{let e;(l=>(l.SEND_MESSAGE="Send Message",l.HANDLING_TIME="Handling Time",l.START_AUTOFLOW="Start Autoflow",l.ABORT_AUTOFLOW="Abort Autoflow",l.ADD_TO_PERSONAL_COLLECTION="Add to personal collection",l.DELETE_FROM_PERSONAL_COLLECTION="Delete from personal collection"))(e=t.EventType||={})})(OL||={});function wd(e){return{...re(e),tags:e.tags}}var Hn=class e{constructor(t,n={}){this.options=n;this.client=new Wt(t,{fetch:n.fetch}),this.client.patchFetch(r=>async(o,i)=>{let s=await r(o,i);return this.handleDeepdeskVersionHeaders(s),s})}latestReceivedDeepdeskVersions={};client;shouldFetchCsrfToken=!0;static exchangeTokenPromise=null;async preflight(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=await this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(e.exchangeTokenPromise||(e.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),e.exchangeTokenPromise):Promise.resolve()}async createConversation(t){await this.preflight(),U.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...we(t),tags:t.tags},{version:"v2"});return wd(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return re(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return re(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return re(t)}async checkUserExists(t){let{exists:n}=await this.client.get(`/apis/admin/users/exists?external_id=${t}`);return n}async getConversationBySessionId(t,n={}){await this.preflight(),U.info(`Getting conversation for session ${t}`);let{attempts:r=1,retryDelay:o=1e3}=n,i=await this.client.get(`/api/conversations/by_session_id/${t}`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"});return wd(i)}async isConversationSupported(t,n={}){U.info(`Check if conversation for session ${t} is supported`);let{attempts:r=1,retryDelay:o=1e3}=n;return(await this.client.get(`/api/conversations/by_session_id/${t}/active_profile`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"})).has_active_profile}async updateConversation(t,n){let r=we(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return wd(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...we(o),tags:o.tags})),{version:"v2"})).map(o=>wd(o))}async sendEvent(t,n){let{data:r,...o}=n,i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((s,[a,l])=>({...s,[a]:l}),{});return this.client.post("/api/events",we({...i,...o,data:r,name:t}),{version:"v2"})}async sendEventV1(t,n){let r=Object.entries(this.latestReceivedDeepdeskVersions).reduce((o,[i,s])=>({...o,[i]:s}),{});return this.client.post("/api/events",{event:t,data:we({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source)},prompt_instruction:n.promptInstruction,model:n.model})).summary}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.post("/apis/admin/session/jwt/",{jwt:t},{version:null}).catch(n=>{throw U.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",we(n),{version:null,refreshTokenOn401:!1,headers:{apikey:t}})}async getTextSuggestions(t,n={},r){return r==="sticky-messages"?this.getPinnedMessages(t):(await this.client.post(`/api/conversations/${t}/recommend/${r}`,we(n),{abortLatest:!0})).map(i=>({...re(i),text:i.text||i.url||i.message,source:r,type:r})).filter((i,s,a)=>s===a.findIndex(l=>l.text===i.text))}async isLoggedIn(){return await this.preflight(),this.client.validateToken()}async getAutocompleteSuggestions(t,n){return(await this.client.post(`/api/conversations/${t}/autocomplete`,we(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))}async getPinnedMessages(t){let n=await this.client.get(`/api/conversations/${t}/sticky-messages`,{abortLatest:!0});return re(n).map(r=>({...r,text:r.message,source:"sticky-messages",type:"pinned-message"}))}async getStyleSuggestions(t){let n=await this.client.post("/api/style-suggestions",we(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,we(t),{version:"v2"});return re(n)}async knowledgeAssist(t,n,r){let o=await this.client.post("/api/knowledge-search/search",we({question:t.question,promptInstruction:t.promptInstruction,profile:r,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return re(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return re(n)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return re(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Cy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&U.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var ja=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(wg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{U.warn(`Invalid JSON for ${t}: ${r}`)}})}connect(){clearTimeout(this.timeoutTimer);let t=new EventSource(this.url,{withCredentials:!0});this.eventSource=t;let n=!1;t.onopen=()=>{n=!0},t.onerror=()=>{n&&t.readyState===2&&this.connect()},this.timeoutTimer=setTimeout(()=>{t.close(),this.connect()},this.options.timeout),Object.keys(this.eventListeners).forEach(r=>{this.proxyEvent(r)})}disconnect(){var t;clearTimeout(this.timeoutTimer),this.eventListeners={},(t=this.eventSource)==null||t.close()}emit(t,n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>r(n))}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),this.proxyEvent(t),()=>{this.off(t,n)}}off(t,n){let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}};var NL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(NL||={});var Ha=class{constructor(t,n={}){this.apiUrl=t;this.client=new Wt(t,n)}client;streams={};logger=U;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return re(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,we(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,we(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return re(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",we(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new ja(`${this.apiUrl}/sessions/${t}/events`),this.streams[t].connect()),this.streams[t]}closeStream(t){this.streams[t]||(this.streams[t].disconnect(),delete this.streams[t])}};var FE={startTime:null,stopTime:null},jE=H({name:"handlingTime",initialState:FE,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(J,()=>FE)}}),{handlingTimeStart:HE,handlingTimeStop:Ed,handlingTimeReset:BE}=jE.actions,UE=jE.reducer;var zE=(e={})=>{let t={onAuthError:wi(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Cd={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var co=M("styleSuggestions/getAll",async({text:e},t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),{showStyleSuggestions:o}=r.settings,i=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)return Cd.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),ML=H({name:"styleSuggestions",initialState:Cd,reducers:{},extraReducers:e=>{e.addCase(co.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(co.rejected,t=>{t.fetchState="error"}).addCase(co.fulfilled,(t,n)=>{t.fetchState="done",mr(t.list,n.payload)||(t.list=n.payload)}).addCase(Jr,t=>{t.list=Cd.list}).addCase(J,()=>Cd)}}),VE=ML.reducer;var KE=(e={})=>{let t,n=!0,r={getStyleSuggestions:co,debounce:500,...e};return o=>i=>s=>{var y;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(!((y=u.conversation.current)==null?void 0:y.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 DL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var WE=(e={})=>{let t={getTextSuggestions:Pn,getAutocompleteSuggestions:Sa,debounce:200,check:Pi,...e},n;return r=>o=>i=>{var h;let{input:{userCommitted: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===Gc.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:y}}=l;return DL(y,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=ai(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var $E=co.fulfilled.toString();function FL(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 qE=e=>t=>n=>r=>{var u;if(r.type!==$E){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=FL(o,s);r.type===$E&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var jL=Fu({activeSuggestion:pw,answer:r1,auth:Tw,autoflows:X1,conversation:$x,contentTypes:Uw,customMessages:oE,exchangeToken:lE,entities:Ww,handlingTime:UE,info:B_,input:Ym.reducer,overlayInput:Xe.reducer,settings:Fx,profile:s1,search:$_,summary:Yw,styleSuggestions:VE,ui:yw,textSuggestions:lw});function GE(e){return V0({reducer:jL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),zE(),WE({debounce:200}),KE({debounce:500}),qE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var HL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},BL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Wm("inlineSuggestions")(o);switch(r.type){case Rn.toString():{let l=nw(r.payload.contentType)(t.getState()),u=l.indexOf(r.payload.suggestion);e.emit("edit-suggestion",{contentType:r.payload.contentType,index:u,suggestions:l});break}case wi.toString():{!r.payload&&e.emit("logout",void 0);break}case jt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:HL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case _c.toString():{let{start:l,end:u}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case oa.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case bc.toString():e.emit("select-image",r.payload,{mayApplyChanges:!0}),e.sendEvent("Image attached",{conversationId:o.conversation.current.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Vt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Ln.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case st.toString():e.sendEvent(r.payload.name,{conversationId:((a=r.payload.options)==null?void 0:a.includeConversationData)&&o.conversation.current.id,data:r.payload.data});break;case wc.toString():e.handleKeyDown(r.payload);break;case Jr.toString():e.logSendMessage(r.payload);break;case Ec.toString():e.logSendEditSuggestionMessage(r.payload);break;case Cc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Jr.toString():e.handleAfterSendMessage(r.payload);break;case xa.toString():e.onUpdateShowTabHint(r.payload);break;case Ed.toString():e.logHandlingTime();break;case jt.toString():{i&&(t.dispatch(_n([])),t.dispatch(hr()));break}default:break}return s},XE=BL;function _h(e){return e.toISOString().replace("T"," ").replace("Z","")}function QE(e,t){var o,i,s;let{startTime:n,stopTime:r}=e.handlingTime;if(!n||!r)throw new Error("No startTime and stopTime for handling time metrics");return{conversationId:e.conversation.current.id,clientVersion:t.version,agentId:(o=e.info.agentInfo)==null?void 0:o.agentId,agentName:(i=e.info.agentInfo)==null?void 0:i.agentName,agentEmail:(s=e.info.agentInfo)==null?void 0:s.agentEmail,timeStart:_h(n),timeStop:_h(r)}}function wh(e,t,n){var b,R,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:y,textSuggestions:S,offeredTextSuggestions:h}}=t[e],g=r.length,p=S.reduce((N,{text:G,searchTerm:V})=>N+G.length-(V?V.length:0),0),v=u??Date.now(),_=(Date.now()-v)/1e3+(c||0),C=o/_,E=S.reduce((N,{searchTerm:G})=>N+(G?G.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:y,lenTextTyped:o+E,lenTextTotal:g,lenTextAssisted:p,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:C,numPastes:l,textSuggestionsV2:S,suggestionsCounters:[{source:"gpt",countOffered:h.filter(N=>N.source==="gpt").length}],agentId:(b=t.info.agentInfo)==null?void 0:b.agentId,agentName:(R=t.info.agentInfo)==null?void 0:R.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function YE(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?YE(r,t):null}function ZE(e,t){return YE(e,t)}function JE(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function UL(e){return typeof e=="object"&&e!==null&&"tagName"in e}function bd(e){return UL(e)&&(Tr(e)||Mc(e))}var eC=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch{return t}}catch{return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch{U.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function zL(e){return e.offsetParent!==null}function tC(e){if(!zL(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 Td(e,t,n=100){let r=tC(e);t({isVisible:r});let o=setInterval(()=>{let i=tC(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var je=x(w()),nC=eC("showTabHint",!0),Ba=class e{static version="10.4.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new Hn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[XE({emit:(f,d,y)=>this.emit(f,d,y),handleAfterSendMessage:f=>this.handleAfterSendMessage(f),handleInputChanged:f=>this.handleInputChanged(f),handleKeyDown:f=>this.handleKeyDown(f),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:f=>this.logSendMessage(f),logSendEditSuggestionMessage:f=>this.logSendEditMessage(f),onUpdateShowTabHint:f=>nC.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Ha(n)}),this.store=GE(c),this.broadcastEvents=new DE({debug:!0,deepdeskUrl:u,eventMap:kw(this.store),createCustomChannel:l}),this.store.dispatch(na),this.store.dispatch(xa(nC.value())),this.store.dispatch(na({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(U.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(U.warn("Profile has not been loaded (yet)"),!0):(U.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(wi(null)),this.store.dispatch(Er()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Ut(r)&&xw(r)!=="loading"&&t()});this.unmountHandlers.push(()=>{n()})})}isLoggedIn(){return this.deepdeskApi.isLoggedIn()}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){U.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Xm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(gc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(hc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Qm(t))).payload}async postMessages(t){return(await this.store.dispatch(vc(t))).payload}async updateConversation(t){return(await this.store.dispatch(yc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Ln());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(na(t))}setVisitorInfo(t){this.store.dispatch(H_(t))}async setAgentInfo(t){await this.store.dispatch(ga(t))}async setAgentSettings(t){await this.store.dispatch(Eg(t))}async getAgentSettings(){return(await this.store.dispatch(Cg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Gc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Cc(t))}notifyKeyDown(t){this.store.dispatch(wc(t))}notifyPaste(t,n){this.store.dispatch(r_({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(t_(t))}notifyExternalSuggestion(t){this.store.dispatch(jt(t)),this.store.dispatch(hr())}notifyEditSuggestion(t){this.store.dispatch(sw(t.contentType,t.suggestions)),this.store.dispatch(Rn({contentType:t.contentType,suggestion:typeof t.index=="number"?t.suggestions[t.index]:null}))}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(wr({collapse:!1})),this.inputMediator&&this.store.dispatch(Xx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(_n([])))}handleKeyDown(t){let{overlayCollapsed:n}=this.state.ui,{textSuggestions:r,selectedSuggestionIndex:o,selection:i}=this.state.input,{inlineSuggestions:s}=this.state.settings,a=r.length>0,l=o!==-1;if(this.store.dispatch(n_(xc(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(Zx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(e_());let{selectedSuggestionIndex:f}=this.state.input;t.preventDefault(),!s&&(f===-1?this.store.dispatch(oa()):this.stageSelectedSuggestion({inputType:"arrow"}))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(ia(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(ia(-1)),this.store.dispatch(oa()),t.preventDefault()):n||(this.store.dispatch(wr({collapse:!0})),this.store.dispatch(gw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:y}=this.state.input;this.store.dispatch(xa(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&y&&y.text.startsWith(d)&&(this.store.dispatch(jt({text:y.text,suggestion:y,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(hr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(o_()),this.store.dispatch(_n([]))}handlingTimeStart(){this.state.handlingTime.startTime||(U.info("Start handling time"),this.store.dispatch(HE()))}handlingTimeStop(){this.state.handlingTime.startTime&&(U.info("Stop handling time"),this.store.dispatch(Ed()))}logSendMessage(t){let n=wh("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=wh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(Yx(this.state.overlayInput.metrics))}logHandlingTime(){let t=QE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(BE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(hr()),this.store.dispatch(Jr(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(jt({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{this.eventListeners[t]&&this.eventListeners[t].forEach(i=>{try{i(n)}catch(s){U.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),U.error(s)}})};this.inputMediator&&r.mayApplyChanges?this.inputMediator.applyChanges(o):o()}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}whenConversationLoaded(t){let n=()=>this.loadProfileConfig().then(()=>t());this.hasConversation()&&n();let r=this.hasConversation();this.store.subscribe(()=>{this.hasConversation()!==r&&(r=this.hasConversation(),r&&n())})}overlayContainerFactory(t,n,r,o){let[i,s]=oo(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;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=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=oo(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return ro(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,$t.unmountComponentAtNode)(o),o.remove()}),o}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!bd(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:f,detectSubmit:d,insertLink:y,inputMediator:S,closestScrollSelector:h,appendOverlayTo:g,inlineSuggestions:m}=n;if(this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:y,isEmbedded:f,inlineSuggestions:m}),n.automaticHandlingTime&&this.setupHandlingTime(t),ro(t),this.inputMediator=S||(Tr(t)?new Tn(t):new uo(t)),this.inputMediator.on("change",({plainText:v})=>{this.notifyInputChanged(v)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(i_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",v=>{this.notifyKeyDown(v)}),this.inputMediator.on("paste",({pastedText:v,selectionText:_})=>{this.notifyPaste(v,_)}),this.inputMediator.on("cut",({selectionText:v})=>{this.notifyCut(v)}),m){if(Tr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let v=this.createInlineContainer(t,"deepdesk-caret");(0,$t.render)((0,je.jsx)(Ai,{store:this.store,customStyles:r,children:(0,je.jsx)(_i,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(S1,{})})}),v),this.inputMediator.on("caret",_=>{this.store.dispatch(_n([])),_?(v.style.display="block",v.style.top=`${_.top}px`,v.style.left=`${_.left}px`):v.style.display="none"})}else{let v=h&&ZE(t,h)||void 0,_=this.overlayContainerFactory("deepdesk-tab-completion",v||t,{appendTo:g,closestScrollElement:v,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",v||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,$t.render)((0,je.jsx)(Ai,{store:this.store,customStyles:r,children:(0,je.jsx)(_i,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(V1,{inputElement:t})})}),_),(0,$t.render)((0,je.jsx)(Ai,{store:this.store,customStyles:r,children:(0,je.jsx)(_i,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(k1,{})})}),C)}(0,$t.render)((0,je.jsx)(Ai,{store:this.store,customStyles:r,children:(0,je.jsx)(_i,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(d1,{})})}),this.createContainer("deepdesk-overlays"));let p;this.inputMediator.on("selection",v=>{clearTimeout(p),v===null?p=setTimeout(()=>{v!==null&&this.store.dispatch(Zm(v))},500):this.store.dispatch(Zm(v))}),this.inputMediator.on("disabled",()=>{var v;(v=this.inputMediator)==null||v.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{d&&this.notifySubmit()}),this.inputMediator.on("blur",()=>this.store.dispatch(xi(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(xi(!0))),this.store.dispatch(Qx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var v;this.refresh(),this.broadcastEvents.setSessionId((v=this.state.conversation.current)==null?void 0:v.sessionId)}),this.isMounted=!0}unmount(){var t;this.unmountHandlers.forEach(n=>n()),this.unmountHandlers=[],(t=this.inputMediator)==null||t.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderWidget(t,n={}){if(this.widgetRoot&&U.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,showPersonalCollectionLink:i,isEmbedded:s}=n;this.widgetRoot=t,this.configure({showImages:o,showPersonalCollectionLink:i,isEmbedded:s}),(0,$t.render)((0,je.jsx)(Ai,{store:this.store,customStyles:r,children:(0,je.jsx)(_i,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(OE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,$t.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Td(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){JE(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Pa());let t=Ti(this.state);t&&this.store.dispatch(na({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeAssistForAgents,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(U.info("Trial is active"),!await this.deepdeskApi.checkUserExists(t))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;U.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Zc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Vt()):this.store.dispatch(Pn(r))})}catch(r){this.handleError(r)}}};async function rC(e,t,n={}){let{value:r}=e,{start:o,end:i}=n.replace??{start:0,end:r.length},s=`${r.slice(0,o)}${t}${r.slice(i)}`,a=n.selectionAfter??{start:o+t.length,end:o+t.length},l=()=>{if(n.setValue)return n.setValue(s);e.value=s};return Promise.resolve(l()).then(()=>{e.selectionStart=a.start,e.selectionEnd=a.end,e.blur(),e.focus()})}async function oC(e,t,n={}){let r=n.replace?Rr(e,n.replace.start,n.replace.end):Ni(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
21
+ `);break}default:break}f&&s++}return l(e),a}function ME(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var co=class extends bn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Fa(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!ME(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!ME(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Da(this.element,t);let n=this.lastKnownSelection;if(n&&NE(this.element,n.start,n.end))return n;let r=Mi(this.element);return r.collapse(!1),Da(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Fa(this.element,Rr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var hh=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(t)}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},yh=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=this.createIframe(),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];createIframe(){let t=`deepdesk-iframe-${this.name}`,n=document.getElementById(t);if(n)return n;let r=document.createElement("iframe"),o=`${this.targetOrigin}/v2/widget/liveengage/channel.html`,i=new URLSearchParams({channel:this.name,host:window.location.origin});return this.options.debug&&i.set("debug","1"),r.style.position="absolute",r.style.left="-999em",r.style.width="0px",r.style.height="0px",r.tabIndex=-1,r.id=t,r.title=`iframe-${this.name}`,r.src=`${o}?${i.toString()}`,r}onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(t,this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},vh=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),U.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new yh(t,this.deepdeskUrl,{debug:!0}):new hh(t),r=o=>{var i,s;o.origin===this.deepdeskUrl&&o.data.type==="event"&&o.data.channel===t&&(U.info("Received broadcast event",this.sessionId,o),(s=(i=this.eventMap)[o.data.name])==null||s.call(i,o.data.payload))};return n.onMessage(r),n}send(t,n){var o,i,s;if(!this.sessionId)return;U.info("broadcast event",{sessionId:this.sessionId,name:t,payload:n});let r={type:"event",name:t,payload:n};(i=(o=this.eventMap)[t])==null||i.call(o,n),(s=this.channel)==null||s.postMessage({...r,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},DE=vh;var Di=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Sh=e=>new Promise(t=>{setTimeout(t,e)});var Fi=class extends Di{name="ClientError"},xh=class extends Di{name="ServerError"},Wt=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;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,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:f=!0,retryOnError:d=_=>_ instanceof TypeError,retryOnResponse:y=_=>_.status>=500,version:S="v1",...h}=n,g={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(g.headers={...g.headers,"X-CSRFToken":this.csrfToken}),typeof S=="string"&&(g.headers={...g.headers,"X-Deepdesk-API-Version":S});let m=u,p=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let v=async()=>(m--,a(s,g).then(async _=>y(_)&&!i.isAborted&&m>0?(await Sh(c),v()):_.status===401&&f===!0&&p===!1?(p=!0,await this.refreshToken(),v()):_).catch(async _=>{if(d(_)&&!i.isAborted&&m>0)return await Sh(c),v();throw _}));v().then(_=>_.json().catch(()=>null).then(C=>{_.status>=500?o(new xh("Server Error",C)):_.status===401?o(new Fi("Unauthorized",C)):_.status===403?o(new Fi("Forbidden",C)):_.status===404?o(new Fi("Not Found",C)):_.status>=400&&o(new Fi("Bad Request",C)),delete this.latestRequestByUrl[s],r(C)})).catch(_=>{o(_)})})}async validateToken(){let{has_valid_access_token:t}=await this.get("/auth/validate");if(!t)return!1;let{is_logged_in:n}=await this.get("/apis/admin/session/validate/",{version:null});return!!n}refreshToken(){return e.refreshingToken||(e.refreshingToken=this.get("/auth/refresh",{refreshTokenOn401:!1}).finally(()=>{setTimeout(()=>{e.refreshingToken=null},1e3*60)})),e.refreshingToken}get(t,n){return this.request(t,n)}post(t,n,r){return this.request(t,{method:"POST",body:JSON.stringify(n),...r})}patch(t,n,r){return this.request(t,{method:"PATCH",body:JSON.stringify(n),...r})}put(t,n,r){return this.request(t,{method:"PUT",body:JSON.stringify(n),...r})}delete(t,n){return this.request(t,{method:"DELETE",...n})}};var OL;(t=>{let e;(l=>(l.SEND_MESSAGE="Send Message",l.HANDLING_TIME="Handling Time",l.START_AUTOFLOW="Start Autoflow",l.ABORT_AUTOFLOW="Abort Autoflow",l.ADD_TO_PERSONAL_COLLECTION="Add to personal collection",l.DELETE_FROM_PERSONAL_COLLECTION="Delete from personal collection"))(e=t.EventType||={})})(OL||={});function wd(e){return{...re(e),tags:e.tags}}var Hn=class e{constructor(t,n={}){this.options=n;this.client=new Wt(t,{fetch:n.fetch}),this.client.patchFetch(r=>async(o,i)=>{let s=await r(o,i);return this.handleDeepdeskVersionHeaders(s),s})}latestReceivedDeepdeskVersions={};client;shouldFetchCsrfToken=!0;static exchangeTokenPromise=null;async preflight(){if(this.shouldFetchCsrfToken){this.shouldFetchCsrfToken=!1;let t=await this.getCsrfToken();this.client.setCsrfToken(t)}return this.options.token?(e.exchangeTokenPromise||(e.exchangeTokenPromise=this.exchangeTokenForAccessCookie(this.options.token)),e.exchangeTokenPromise):Promise.resolve()}async createConversation(t){await this.preflight(),U.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...we(t),tags:t.tags},{version:"v2"});return wd(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return re(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return re(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return re(t)}async checkUserExists(t){let{exists:n}=await this.client.get(`/apis/admin/users/exists?external_id=${t}`);return n}async getConversationBySessionId(t,n={}){await this.preflight(),U.info(`Getting conversation for session ${t}`);let{attempts:r=1,retryDelay:o=1e3}=n,i=await this.client.get(`/api/conversations/by_session_id/${t}`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"});return wd(i)}async isConversationSupported(t,n={}){U.info(`Check if conversation for session ${t} is supported`);let{attempts:r=1,retryDelay:o=1e3}=n;return(await this.client.get(`/api/conversations/by_session_id/${t}/active_profile`,{attempts:r,retryDelay:o,retryOnResponse:s=>s.status===404||s.status>=500,version:"v2"})).has_active_profile}async updateConversation(t,n){let r=we(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return wd(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...we(o),tags:o.tags})),{version:"v2"})).map(o=>wd(o))}async sendEvent(t,n){let{data:r,...o}=n,i=Object.entries(this.latestReceivedDeepdeskVersions).reduce((s,[a,l])=>({...s,[a]:l}),{});return this.client.post("/api/events",we({...i,...o,data:r,name:t}),{version:"v2"})}async sendEventV1(t,n){let r=Object.entries(this.latestReceivedDeepdeskVersions).reduce((o,[i,s])=>({...o,[i]:s}),{});return this.client.post("/api/events",{event:t,data:we({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t,n={}){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(o=>o.text&&o.source)},prompt_instruction:n.promptInstruction,model:n.model})).summary}async getTemporaryExchangeToken(){return(await this.client.get("/auth/exchange-token",{version:null})).jwt}async exchangeTokenForAccessCookie(t){return this.client.post("/apis/admin/session/jwt/",{jwt:t},{version:null}).catch(n=>{throw U.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",we(n),{version:null,refreshTokenOn401:!1,headers:{apikey:t}})}async getTextSuggestions(t,n={},r){return r==="sticky-messages"?this.getPinnedMessages(t):(await this.client.post(`/api/conversations/${t}/recommend/${r}`,we(n),{abortLatest:!0})).map(i=>({...re(i),text:i.text||i.url||i.message,source:r,type:r})).filter((i,s,a)=>s===a.findIndex(l=>l.text===i.text))}async isLoggedIn(){return await this.preflight(),this.client.validateToken()}async getAutocompleteSuggestions(t,n){return(await this.client.post(`/api/conversations/${t}/autocomplete`,we(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))}async getPinnedMessages(t){let n=await this.client.get(`/api/conversations/${t}/sticky-messages`,{abortLatest:!0});return re(n).map(r=>({...r,text:r.message,source:"sticky-messages",type:"pinned-message"}))}async getStyleSuggestions(t){let n=await this.client.post("/api/style-suggestions",we(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,we(t),{version:"v2"});return re(n)}async knowledgeAssist(t,n,r){let o=await this.client.post("/api/knowledge-search/search",we({question:t.question,promptInstruction:t.promptInstruction,profile:r,chatHistory:n.map(i=>({question:i.question,answer:i.answer.answer}))}),{version:"v2"});return re(o)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return re(n)}async getCsrfToken(){let{token:t}=await this.client.get("/apis/admin/session/csrf/",{version:null});return t}async verifyLoginToken(t){let n=await this.client.post("/apis/admin/session/passwordless/login/",{token:t},{version:null});return re(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Cy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&U.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var ja=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(wg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{U.warn(`Invalid JSON for ${t}: ${r}`)}})}connect(){clearTimeout(this.timeoutTimer);let t=new EventSource(this.url,{withCredentials:!0});this.eventSource=t;let n=!1;t.onopen=()=>{n=!0},t.onerror=()=>{n&&t.readyState===2&&this.connect()},this.timeoutTimer=setTimeout(()=>{t.close(),this.connect()},this.options.timeout),Object.keys(this.eventListeners).forEach(r=>{this.proxyEvent(r)})}disconnect(){var t;clearTimeout(this.timeoutTimer),this.eventListeners={},(t=this.eventSource)==null||t.close()}emit(t,n){this.eventListeners[t]&&this.eventListeners[t].forEach(r=>r(n))}on(t,n){return this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n),this.proxyEvent(t),()=>{this.off(t,n)}}off(t,n){let r;this.eventListeners[t]&&(r=this.eventListeners[t].indexOf(n),r>-1&&this.eventListeners[t].splice(r,1))}};var NL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(NL||={});var Ha=class{constructor(t,n={}){this.apiUrl=t;this.client=new Wt(t,n)}client;streams={};logger=U;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return re(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,we(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,we(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return re(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",we(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new ja(`${this.apiUrl}/sessions/${t}/events`),this.streams[t].connect()),this.streams[t]}closeStream(t){this.streams[t]||(this.streams[t].disconnect(),delete this.streams[t])}};var FE={startTime:null,stopTime:null},jE=H({name:"handlingTime",initialState:FE,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(J,()=>FE)}}),{handlingTimeStart:HE,handlingTimeStop:Ed,handlingTimeReset:BE}=jE.actions,UE=jE.reducer;var zE=(e={})=>{let t={onAuthError:Ei(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var Cd={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var fo=M("styleSuggestions/getAll",async({text:e},t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),{showStyleSuggestions:o}=r.settings,i=(s=r.conversation.current)==null?void 0:s.profileCode;if(!o)return Cd.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),ML=H({name:"styleSuggestions",initialState:Cd,reducers:{},extraReducers:e=>{e.addCase(fo.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(fo.rejected,t=>{t.fetchState="error"}).addCase(fo.fulfilled,(t,n)=>{t.fetchState="done",mr(t.list,n.payload)||(t.list=n.payload)}).addCase(Jr,t=>{t.list=Cd.list}).addCase(J,()=>Cd)}}),VE=ML.reducer;var KE=(e={})=>{let t,n=!0,r={getStyleSuggestions:fo,debounce:500,...e};return o=>i=>s=>{var y;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(!((y=u.conversation.current)==null?void 0:y.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 DL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var WE=(e={})=>{let t={getTextSuggestions:Pn,getAutocompleteSuggestions:Sa,debounce:200,check:Ri,...e},n;return r=>o=>i=>{var h;let{input:{userCommitted: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===Gc.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:y}}=l;return DL(y,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=li(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var $E=fo.fulfilled.toString();function FL(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 qE=e=>t=>n=>r=>{var u;if(r.type!==$E){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=FL(o,s);r.type===$E&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var jL=Fu({activeSuggestion:pw,answer:r1,auth:Tw,autoflows:X1,conversation:$x,contentTypes:Uw,customMessages:oE,exchangeToken:lE,entities:Ww,handlingTime:UE,info:B_,input:Ym.reducer,overlayInput:Xe.reducer,settings:Fx,profile:s1,search:$_,summary:Yw,styleSuggestions:VE,ui:yw,textSuggestions:lw});function GE(e){return V0({reducer:jL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),zE(),WE({debounce:200}),KE({debounce:500}),qE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var HL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},BL=e=>t=>n=>r=>{var a;let o=t.getState(),i=Wm("inlineSuggestions")(o);switch(r.type){case Rn.toString():{let l=nw(r.payload.contentType)(t.getState()),u=l.indexOf(r.payload.suggestion);e.emit("edit-suggestion",{contentType:r.payload.contentType,index:u,suggestions:l});break}case Ei.toString():{!r.payload&&e.emit("logout",void 0);break}case jt.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:HL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case _c.toString():{let{start:l,end:u}=o.input.selection;e.emit("replace",{...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case ia.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case bc.toString():e.emit("select-image",r.payload,{mayApplyChanges:!0}),e.sendEvent("Image attached",{conversationId:o.conversation.current.id,data:{path:r.payload.suggestion.image,title:r.payload.suggestion.title}});break;case Vt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Ln.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case st.toString():e.sendEvent(r.payload.name,{conversationId:((a=r.payload.options)==null?void 0:a.includeConversationData)&&o.conversation.current.id,data:r.payload.data});break;case wc.toString():e.handleKeyDown(r.payload);break;case Jr.toString():e.logSendMessage(r.payload);break;case Ec.toString():e.logSendEditSuggestionMessage(r.payload);break;case Cc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Jr.toString():e.handleAfterSendMessage(r.payload);break;case xa.toString():e.onUpdateShowTabHint(r.payload);break;case Ed.toString():e.logHandlingTime();break;case jt.toString():{i&&(t.dispatch(nn([])),t.dispatch(hr()));break}case nn.toString():{i&&r.payload.length>0&&t.dispatch(eo(0));break}default:break}return s},XE=BL;function _h(e){return e.toISOString().replace("T"," ").replace("Z","")}function QE(e,t){var o,i,s;let{startTime:n,stopTime:r}=e.handlingTime;if(!n||!r)throw new Error("No startTime and stopTime for handling time metrics");return{conversationId:e.conversation.current.id,clientVersion:t.version,agentId:(o=e.info.agentInfo)==null?void 0:o.agentId,agentName:(i=e.info.agentInfo)==null?void 0:i.agentName,agentEmail:(s=e.info.agentInfo)==null?void 0:s.agentEmail,timeStart:_h(n),timeStop:_h(r)}}function wh(e,t,n){var b,R,P;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:y,textSuggestions:S,offeredTextSuggestions:h}}=t[e],g=r.length,p=S.reduce((N,{text:G,searchTerm:V})=>N+G.length-(V?V.length:0),0),v=u??Date.now(),_=(Date.now()-v)/1e3+(c||0),C=o/_,E=S.reduce((N,{searchTerm:G})=>N+(G?G.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:y,lenTextTyped:o+E,lenTextTotal:g,lenTextAssisted:p,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:_,charsPerSecond:C,numPastes:l,textSuggestionsV2:S,suggestionsCounters:[{source:"gpt",countOffered:h.filter(N=>N.source==="gpt").length}],agentId:(b=t.info.agentInfo)==null?void 0:b.agentId,agentName:(R=t.info.agentInfo)==null?void 0:R.agentName,agentEmail:(P=t.info.agentInfo)==null?void 0:P.agentEmail}}function YE(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?YE(r,t):null}function ZE(e,t){return YE(e,t)}function JE(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function UL(e){return typeof e=="object"&&e!==null&&"tagName"in e}function bd(e){return UL(e)&&(Tr(e)||Mc(e))}var eC=(e,t)=>({value(){try{let n=sessionStorage.getItem(`dd-${e}`);if(!n)return t;try{return JSON.parse(n)}catch{return t}}catch{return t}},update(n){try{sessionStorage.setItem(`dd-${e}`,JSON.stringify(n))}catch{U.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function zL(e){return e.offsetParent!==null}function tC(e){if(!zL(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 Td(e,t,n=100){let r=tC(e);t({isVisible:r});let o=setInterval(()=>{let i=tC(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var je=x(w()),nC=eC("showTabHint",!0),Ba=class e{static version="10.4.1-beta.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new Hn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[XE({emit:(f,d,y)=>this.emit(f,d,y),handleAfterSendMessage:f=>this.handleAfterSendMessage(f),handleInputChanged:f=>this.handleInputChanged(f),handleKeyDown:f=>this.handleKeyDown(f),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:f=>this.logSendMessage(f),logSendEditSuggestionMessage:f=>this.logSendEditMessage(f),onUpdateShowTabHint:f=>nC.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Ha(n)}),this.store=GE(c),this.broadcastEvents=new DE({debug:!0,deepdeskUrl:u,eventMap:kw(this.store),createCustomChannel:l}),this.store.dispatch(ra),this.store.dispatch(xa(nC.value())),this.store.dispatch(ra({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(U.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(U.warn("Profile has not been loaded (yet)"),!0):(U.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Ei(null)),this.store.dispatch(Er()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Ut(r)&&xw(r)!=="loading"&&t()});this.unmountHandlers.push(()=>{n()})})}isLoggedIn(){return this.deepdeskApi.isLoggedIn()}async setPlatformAgentId(t){try{if((await this.deepdeskApi.client.get("/apis/admin/session/me/",{version:null})).external_id)return;await this.deepdeskApi.client.request("/apis/admin/session/me/",{method:"PATCH",body:JSON.stringify({external_id:t}),version:null})}catch(n){U.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Xm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(gc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(hc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Qm(t))).payload}async postMessages(t){return(await this.store.dispatch(vc(t))).payload}async updateConversation(t){return(await this.store.dispatch(yc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Ln());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(ra(t))}setVisitorInfo(t){this.store.dispatch(H_(t))}async setAgentInfo(t){await this.store.dispatch(ga(t))}async setAgentSettings(t){await this.store.dispatch(Eg(t))}async getAgentSettings(){return(await this.store.dispatch(Cg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Gc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Cc(t))}notifyKeyDown(t){this.store.dispatch(wc(t))}notifyPaste(t,n){this.store.dispatch(r_({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(t_(t))}notifyExternalSuggestion(t){this.store.dispatch(jt(t)),this.store.dispatch(hr())}notifyEditSuggestion(t){this.store.dispatch(sw(t.contentType,t.suggestions)),this.store.dispatch(Rn({contentType:t.contentType,suggestion:typeof t.index=="number"?t.suggestions[t.index]:null}))}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(wr({collapse:!1})),this.inputMediator&&this.store.dispatch(Xx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(nn([])))}handleKeyDown(t){let{overlayCollapsed:n}=this.state.ui,{textSuggestions:r,selectedSuggestionIndex:o,selection:i}=this.state.input,{inlineSuggestions:s}=this.state.settings,a=r.length>0,l=o!==-1;if(this.store.dispatch(n_(xc(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(Zx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(e_());let{selectedSuggestionIndex:f}=this.state.input;t.preventDefault(),!s&&(f===-1?this.store.dispatch(ia()):this.stageSelectedSuggestion({inputType:"arrow"}))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(eo(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(eo(-1)),this.store.dispatch(ia()),t.preventDefault()):n||(this.store.dispatch(wr({collapse:!0})),this.store.dispatch(gw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:y}=this.state.input;this.store.dispatch(xa(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&y&&y.text.startsWith(d)&&(this.store.dispatch(jt({text:y.text,suggestion:y,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(hr())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(o_()),this.store.dispatch(nn([]))}handlingTimeStart(){this.state.handlingTime.startTime||(U.info("Start handling time"),this.store.dispatch(HE()))}handlingTimeStop(){this.state.handlingTime.startTime&&(U.info("Stop handling time"),this.store.dispatch(Ed()))}logSendMessage(t){let n=wh("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=wh("overlayInput",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.store.dispatch(Yx(this.state.overlayInput.metrics))}logHandlingTime(){let t=QE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(BE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(hr()),this.store.dispatch(Jr(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(jt({text:r[n].text,suggestion:r[n],eventMetrics:t,replace:"until-selection-end"}))}emit(t,n,r={}){let o=()=>{this.eventListeners[t]&&this.eventListeners[t].forEach(i=>{try{i(n)}catch(s){U.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),U.error(s)}})};this.inputMediator&&r.mayApplyChanges?this.inputMediator.applyChanges(o):o()}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}whenConversationLoaded(t){let n=()=>this.loadProfileConfig().then(()=>t());this.hasConversation()&&n();let r=this.hasConversation();this.store.subscribe(()=>{this.hasConversation()!==r&&(r=this.hasConversation(),r&&n())})}overlayContainerFactory(t,n,r,o){let[i,s]=io(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;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=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=io(i,{appendTo:document.body});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,$t.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return oo(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,$t.unmountComponentAtNode)(o),o.remove()}),o}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!bd(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:f,detectSubmit:d,insertLink:y,inputMediator:S,closestScrollSelector:h,appendOverlayTo:g,inlineSuggestions:m}=n;if(this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:y,isEmbedded:f,inlineSuggestions:m}),n.automaticHandlingTime&&this.setupHandlingTime(t),oo(t),this.inputMediator=S||(Tr(t)?new Tn(t):new co(t)),this.inputMediator.on("change",({plainText:v})=>{this.notifyInputChanged(v)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(i_({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",v=>{this.notifyKeyDown(v)}),this.inputMediator.on("paste",({pastedText:v,selectionText:_})=>{this.notifyPaste(v,_)}),this.inputMediator.on("cut",({selectionText:v})=>{this.notifyCut(v)}),m){if(Tr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let v=this.createInlineContainer(t,"deepdesk-caret");(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(S1,{})})}),v),this.inputMediator.on("caret",_=>{this.store.dispatch(nn([])),_?(v.style.display="block",v.style.top=`${_.top}px`,v.style.left=`${_.left}px`):v.style.display="none"})}else{let v=h&&ZE(t,h)||void 0,_=this.overlayContainerFactory("deepdesk-tab-completion",v||t,{appendTo:g,closestScrollElement:v,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),C=this.overlayContainerFactory("deepdesk-suggestions-overlay",v||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(V1,{inputElement:t})})}),_),(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(k1,{})})}),C)}(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(d1,{})})}),this.createContainer("deepdesk-overlays"));let p;this.inputMediator.on("selection",v=>{clearTimeout(p),v===null?p=setTimeout(()=>{v!==null&&this.store.dispatch(Zm(v))},500):this.store.dispatch(Zm(v))}),this.inputMediator.on("disabled",()=>{var v;(v=this.inputMediator)==null||v.deactivate(),this.configure({visible:!1})}),this.inputMediator.on("enabled",()=>{this.inputMediator&&(this.configure({visible:!0}),this.inputMediator.activate())}),this.inputMediator.on("submit",()=>{d&&this.notifySubmit()}),this.inputMediator.on("blur",()=>this.store.dispatch(_i(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(_i(!0))),this.store.dispatch(Qx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var v;this.refresh(),this.broadcastEvents.setSessionId((v=this.state.conversation.current)==null?void 0:v.sessionId)}),this.isMounted=!0}unmount(){var t;this.unmountHandlers.forEach(n=>n()),this.unmountHandlers=[],(t=this.inputMediator)==null||t.dispose(),this.broadcastEvents.cleanup(),this.isMounted=!1}renderWidget(t,n={}){if(this.widgetRoot&&U.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,showPersonalCollectionLink:i,isEmbedded:s}=n;this.widgetRoot=t,this.configure({showImages:o,showPersonalCollectionLink:i,isEmbedded:s}),(0,$t.render)((0,je.jsx)(Oi,{store:this.store,customStyles:r,children:(0,je.jsx)(wi,{broadcastEvents:this.broadcastEvents,children:(0,je.jsx)(OE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,$t.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Td(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){JE(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Pa());let t=ki(this.state);t&&this.store.dispatch(ra({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeAssistForAgents,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(U.info("Trial is active"),!await this.deepdeskApi.checkUserExists(t))throw new Error("User is not in trial");this.shouldRender=!0}catch(n){let{message:r}=n;U.info(r),this.shouldRender=!1}}async refreshWidgetSuggestions(){if(!this.widgetRoot||this.shouldAbort())return;let{uiConfig:t}=this.state.profile.data;if(!t.widget)return;let n=Zc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Vt()):this.store.dispatch(Pn(r))})}catch(r){this.handleError(r)}}};async function rC(e,t,n={}){let{value:r}=e,{start:o,end:i}=n.replace??{start:0,end:r.length},s=`${r.slice(0,o)}${t}${r.slice(i)}`,a=n.selectionAfter??{start:o+t.length,end:o+t.length},l=()=>{if(n.setValue)return n.setValue(s);e.value=s};return Promise.resolve(l()).then(()=>{e.selectionStart=a.start,e.selectionEnd=a.end,e.blur(),e.focus()})}async function oC(e,t,n={}){let r=n.replace?Rr(e,n.replace.start,n.replace.end):Mi(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
22
22
  `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?Rr(e,n.selectionAfter.start,n.selectionAfter.end):(r.collapse(!1),r),a=window.getSelection();a==null||a.removeAllRanges(),a==null||a.addRange(s)}if(!o)return;o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}async function iC(e,t){let n;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let r=()=>{let i=(e.ownerDocument.defaultView??window).getSelection();if(!i)return;let s=i.getRangeAt(0);s&&(s.deleteContents(),n=document.createElement("span"),s.insertNode(n),t.split(`
23
23
  `).reverse().forEach((a,l)=>{l>0&&s.insertNode(document.createElement("br")),s.insertNode(document.createTextNode(a))}),s.collapse(!1))};return Promise.resolve(r()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!n)try{n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"nearest"})}finally{n&&n.remove()}})}function sC(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function aC(e,t,n){await new Hn(e).authenticateWithKey(t,n)}async function lC(e){let n=await new Wt(e).get("/platform/config/",{version:null});return re(n)}async function VL(e){let n=await(e.fetch??window.fetch)(e.url),r=await n.blob();return new File([r],e.name,{type:e.mimeType??n.headers.get("Content-Type")??"image/jpeg"})}async function uC(e,t){let n=await VL(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}}return gC(KL);})();
24
24
  /*! Bundled license information: