@deepdesk/deepdesk-sdk 10.1.2 → 10.1.4
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.
- package/dist/index.cjs.js +5 -5
- package/dist/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.esm.js +5 -5
- package/dist/index.iife.js +10 -10
- package/package.json +1 -1
- package/styles/index.js +1 -1
- package/styles.css +1 -1
package/dist/index.iife.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";var Deepdesk=(()=>{var t1=Object.create;var Ha=Object.defineProperty;var n1=Object.getOwnPropertyDescriptor;var r1=Object.getOwnPropertyNames;var o1=Object.getPrototypeOf,i1=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Te=(e,t)=>{for(var n in t)Ha(e,n,{get:t[n],enumerable:!0})},yh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of r1(t))!i1.call(e,o)&&o!==n&&Ha(e,o,{get:()=>t[o],enumerable:!(r=n1(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?t1(o1(e)):{},yh(t||!e||!e.__esModule?Ha(n,"default",{value:e,enumerable:!0}):n,e)),s1=e=>yh(Ha({},"__esModule",{value:!0}),e);var X=pe((AL,Ba)=>{"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 Ba<"u"&&Ba.exports?(n.default=n,Ba.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ua=pe((OL,Sh)=>{"use strict";var vh=Object.getOwnPropertySymbols,a1=Object.prototype.hasOwnProperty,l1=Object.prototype.propertyIsEnumerable;function u1(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function c1(){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}}Sh.exports=c1()?Object.assign:function(e,t){for(var n,r=u1(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)a1.call(n,s)&&(r[s]=n[s]);if(vh){o=vh(n);for(var a=0;a<o.length;a++)l1.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Mh=pe(V=>{"use strict";var xd=Ua(),lo=60103,Eh=60106;V.Fragment=60107;V.StrictMode=60108;V.Profiler=60114;var Ch=60109,Th=60110,_h=60112;V.Suspense=60113;var bh=60115,Ph=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,lo=ft("react.element"),Eh=ft("react.portal"),V.Fragment=ft("react.fragment"),V.StrictMode=ft("react.strict_mode"),V.Profiler=ft("react.profiler"),Ch=ft("react.provider"),Th=ft("react.context"),_h=ft("react.forward_ref"),V.Suspense=ft("react.suspense"),bh=ft("react.memo"),Ph=ft("react.lazy"));var ft,wh=typeof Symbol=="function"&&Symbol.iterator;function d1(e){return e===null||typeof e!="object"?null:(e=wh&&e[wh]||e["@@iterator"],typeof e=="function"?e:null)}function Mi(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 kh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Rh={};function uo(e,t,n){this.props=e,this.context=t,this.refs=Rh,this.updater=n||kh}uo.prototype.isReactComponent={};uo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Mi(85));this.updater.enqueueSetState(this,e,t,"setState")};uo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ih(){}Ih.prototype=uo.prototype;function Ed(e,t,n){this.props=e,this.context=t,this.refs=Rh,this.updater=n||kh}var Cd=Ed.prototype=new Ih;Cd.constructor=Ed;xd(Cd,uo.prototype);Cd.isPureReactComponent=!0;var Td={current:null},Lh=Object.prototype.hasOwnProperty,Ah={key:!0,ref:!0,__self:!0,__source:!0};function Oh(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)Lh.call(t,r)&&!Ah.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:lo,type:e,key:i,ref:s,props:o,_owner:Td.current}}function f1(e,t){return{$$typeof:lo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function _d(e){return typeof e=="object"&&e!==null&&e.$$typeof===lo}function p1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var xh=/\/+/g;function wd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p1(""+e.key):t.toString(36)}function Va(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 lo:case Eh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+wd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(xh,"$&/")+"/"),Va(o,t,n,"",function(u){return u})):o!=null&&(_d(o)&&(o=f1(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(xh,"$&/")+"/")+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+wd(i,a);s+=Va(i,t,n,l,o)}else if(l=d1(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+wd(i,a++),s+=Va(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Mi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function za(e,t,n){if(e==null)return e;var r=[],o=0;return Va(e,r,"","",function(i){return t.call(n,i,o++)}),r}function m1(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 Nh={current:null};function ln(){var e=Nh.current;if(e===null)throw Error(Mi(321));return e}var g1={ReactCurrentDispatcher:Nh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Td,IsSomeRendererActing:{current:!1},assign:xd};V.Children={map:za,forEach:function(e,t,n){za(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!_d(e))throw Error(Mi(143));return e}};V.Component=uo;V.PureComponent=Ed;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g1;V.cloneElement=function(e,t,n){if(e==null)throw Error(Mi(267,e));var r=xd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Td.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Lh.call(t,l)&&!Ah.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:lo,type:e.type,key:o,ref:i,props:r,_owner:s}};V.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Th,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Ch,_context:e},e.Consumer=e};V.createElement=Oh;V.createFactory=function(e){var t=Oh.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:_h,render:e}};V.isValidElement=_d;V.lazy=function(e){return{$$typeof:Ph,_payload:{_status:-1,_result:e},_init:m1}};V.memo=function(e,t){return{$$typeof:bh,type:e,compare:t===void 0?null:t}};V.useCallback=function(e,t){return ln().useCallback(e,t)};V.useContext=function(e,t){return ln().useContext(e,t)};V.useDebugValue=function(){};V.useEffect=function(e,t){return ln().useEffect(e,t)};V.useImperativeHandle=function(e,t,n){return ln().useImperativeHandle(e,t,n)};V.useLayoutEffect=function(e,t){return ln().useLayoutEffect(e,t)};V.useMemo=function(e,t){return ln().useMemo(e,t)};V.useReducer=function(e,t,n){return ln().useReducer(e,t,n)};V.useRef=function(e){return ln().useRef(e)};V.useState=function(e){return ln().useState(e)};V.version="17.0.2"});var O=pe((ML,Dh)=>{"use strict";Dh.exports=Mh()});var Uh=pe(Fi=>{"use strict";Ua();var h1=O(),Hh=60103;Fi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(bd=Symbol.for,Hh=bd("react.element"),Fi.Fragment=bd("react.fragment"));var bd,y1=h1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,v1=Object.prototype.hasOwnProperty,S1={key:!0,ref:!0,__self:!0,__source:!0};function Bh(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)v1.call(t,r)&&!S1.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:Hh,type:e,key:i,ref:s,props:o,_owner:y1.current}}Fi.jsx=Bh;Fi.jsxs=Bh});var C=pe((zL,zh)=>{"use strict";zh.exports=Uh()});var _y=pe($=>{"use strict";var ho,Wi,hl,$d;typeof performance=="object"&&typeof performance.now=="function"?(wy=performance,$.unstable_now=function(){return wy.now()}):(Bd=Date,xy=Bd.now(),$.unstable_now=function(){return Bd.now()-xy});var wy,Bd,xy;typeof window>"u"||typeof MessageChannel!="function"?(go=null,Ud=null,zd=function(){if(go!==null)try{var e=$.unstable_now();go(!0,e),go=null}catch(t){throw setTimeout(zd,0),t}},ho=function(e){go!==null?setTimeout(ho,0,e):(go=e,setTimeout(zd,0))},Wi=function(e,t){Ud=setTimeout(e,t)},hl=function(){clearTimeout(Ud)},$.unstable_shouldYield=function(){return!1},$d=$.unstable_forceFrameRate=function(){}):(Ey=window.setTimeout,Cy=window.clearTimeout,typeof console<"u"&&(Ty=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 Ty!="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")),Vi=!1,Ki=null,pl=-1,Vd=5,Kd=0,$.unstable_shouldYield=function(){return $.unstable_now()>=Kd},$d=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"):Vd=0<e?Math.floor(1e3/e):5},Wd=new MessageChannel,ml=Wd.port2,Wd.port1.onmessage=function(){if(Ki!==null){var e=$.unstable_now();Kd=e+Vd;try{Ki(!0,e)?ml.postMessage(null):(Vi=!1,Ki=null)}catch(t){throw ml.postMessage(null),t}}else Vi=!1},ho=function(e){Ki=e,Vi||(Vi=!0,ml.postMessage(null))},Wi=function(e,t){pl=Ey(function(){e($.unstable_now())},t)},hl=function(){Cy(pl),pl=-1});var go,Ud,zd,Ey,Cy,Ty,Vi,Ki,pl,Vd,Kd,Wd,ml;function qd(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<gl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Ot(e){return e=e[0],e===void 0?null:e}function yl(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>gl(s,n))l!==void 0&&0>gl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>gl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function gl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var $t=[],zn=[],Q1=1,ht=null,Re=3,vl=!1,Ar=!1,$i=!1;function Gd(e){for(var t=Ot(zn);t!==null;){if(t.callback===null)yl(zn);else if(t.startTime<=e)yl(zn),t.sortIndex=t.expirationTime,qd($t,t);else break;t=Ot(zn)}}function Qd(e){if($i=!1,Gd(e),!Ar)if(Ot($t)!==null)Ar=!0,ho(Xd);else{var t=Ot(zn);t!==null&&Wi(Qd,t.startTime-e)}}function Xd(e,t){Ar=!1,$i&&($i=!1,hl()),vl=!0;var n=Re;try{for(Gd(t),ht=Ot($t);ht!==null&&(!(ht.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=ht.callback;if(typeof r=="function"){ht.callback=null,Re=ht.priorityLevel;var o=r(ht.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?ht.callback=o:ht===Ot($t)&&yl($t),Gd(t)}else yl($t);ht=Ot($t)}if(ht!==null)var i=!0;else{var s=Ot(zn);s!==null&&Wi(Qd,s.startTime-t),i=!1}return i}finally{ht=null,Re=n,vl=!1}}var X1=$d;$.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(){Ar||vl||(Ar=!0,ho(Xd))};$.unstable_getCurrentPriorityLevel=function(){return Re};$.unstable_getFirstCallbackNode=function(){return Ot($t)};$.unstable_next=function(e){switch(Re){case 1:case 2:case 3:var t=3;break;default:t=Re}var n=Re;Re=t;try{return e()}finally{Re=n}};$.unstable_pauseExecution=function(){};$.unstable_requestPaint=X1;$.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Re;Re=e;try{return t()}finally{Re=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:Q1++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,qd(zn,e),Ot($t)===null&&e===Ot(zn)&&($i?hl():$i=!0,Wi(Qd,n-r))):(e.sortIndex=o,qd($t,e),Ar||vl||(Ar=!0,ho(Xd))),e};$.unstable_wrapCallback=function(e){var t=Re;return function(){var n=Re;Re=t;try{return e.apply(this,arguments)}finally{Re=n}}}});var Py=pe((NO,by)=>{"use strict";by.exports=_y()});var pw=pe(Et=>{"use strict";var du=O(),ae=Ua(),we=Py();function b(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(!du)throw Error(b(227));var Bv=new Set,Es={};function Vr(e,t){Fo(e,t),Fo(e+"Capture",t)}function Fo(e,t){for(Es[e]=t,e=0;e<t.length;e++)Bv.add(t[e])}var mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Y1=/^[: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]*$/,ky=Object.prototype.hasOwnProperty,Ry={},Iy={};function Z1(e){return ky.call(Iy,e)?!0:ky.call(Ry,e)?!1:Y1.test(e)?Iy[e]=!0:(Ry[e]=!0,!1)}function J1(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 e_(e,t,n,r){if(t===null||typeof t>"u"||J1(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 Be(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 Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new Be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new Be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new Be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new Be(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){Pe[e]=new Be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new Be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new Be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new Be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new Be(e,5,!1,e.toLowerCase(),null,!1,!1)});var sp=/[\-:]([a-z])/g;function ap(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(sp,ap);Pe[t]=new Be(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(sp,ap);Pe[t]=new Be(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(sp,ap);Pe[t]=new Be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new Be(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new Be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new Be(e,1,!1,e.toLowerCase(),null,!0,!0)});function lp(e,t,n,r){var o=Pe.hasOwnProperty(t)?Pe[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||(e_(t,n,o,r)&&(n=null),r||o===null?Z1(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 Kr=du.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,is=60103,Nr=60106,Kn=60107,up=60108,cs=60114,cp=60109,dp=60110,fu=60112,ds=60113,zl=60120,pu=60115,fp=60116,pp=60121,mp=60128,Uv=60129,gp=60130,wf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,is=ye("react.element"),Nr=ye("react.portal"),Kn=ye("react.fragment"),up=ye("react.strict_mode"),cs=ye("react.profiler"),cp=ye("react.provider"),dp=ye("react.context"),fu=ye("react.forward_ref"),ds=ye("react.suspense"),zl=ye("react.suspense_list"),pu=ye("react.memo"),fp=ye("react.lazy"),pp=ye("react.block"),ye("react.scope"),mp=ye("react.opaque.id"),Uv=ye("react.debug_trace_mode"),gp=ye("react.offscreen"),wf=ye("react.legacy_hidden"));var ye,Ly=typeof Symbol=="function"&&Symbol.iterator;function qi(e){return e===null||typeof e!="object"?null:(e=Ly&&e[Ly]||e["@@iterator"],typeof e=="function"?e:null)}var Yd;function ss(e){if(Yd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yd=t&&t[1]||""}return`
|
|
2
|
-
`+Yd+e}var Zd=!1;function
|
|
1
|
+
"use strict";var Deepdesk=(()=>{var tC=Object.create;var Ha=Object.defineProperty;var nC=Object.getOwnPropertyDescriptor;var rC=Object.getOwnPropertyNames;var oC=Object.getPrototypeOf,iC=Object.prototype.hasOwnProperty;var pe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ce=(e,t)=>{for(var n in t)Ha(e,n,{get:t[n],enumerable:!0})},yh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of rC(t))!iC.call(e,o)&&o!==n&&Ha(e,o,{get:()=>t[o],enumerable:!(r=nC(t,o))||r.enumerable});return e};var S=(e,t,n)=>(n=e!=null?tC(oC(e)):{},yh(t||!e||!e.__esModule?Ha(n,"default",{value:e,enumerable:!0}):n,e)),sC=e=>yh(Ha({},"__esModule",{value:!0}),e);var Y=pe((OL,za)=>{"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 za<"u"&&za.exports?(n.default=n,za.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Ua=pe((NL,Sh)=>{"use strict";var vh=Object.getOwnPropertySymbols,aC=Object.prototype.hasOwnProperty,lC=Object.prototype.propertyIsEnumerable;function uC(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function cC(){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}}Sh.exports=cC()?Object.assign:function(e,t){for(var n,r=uC(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)aC.call(n,s)&&(r[s]=n[s]);if(vh){o=vh(n);for(var a=0;a<o.length;a++)lC.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Mh=pe(V=>{"use strict";var _d=Ua(),lo=60103,wh=60106;V.Fragment=60107;V.StrictMode=60108;V.Profiler=60114;var Eh=60109,Ch=60110,bh=60112;V.Suspense=60113;var Th=60115,kh=60116;typeof Symbol=="function"&&Symbol.for&&(ft=Symbol.for,lo=ft("react.element"),wh=ft("react.portal"),V.Fragment=ft("react.fragment"),V.StrictMode=ft("react.strict_mode"),V.Profiler=ft("react.profiler"),Eh=ft("react.provider"),Ch=ft("react.context"),bh=ft("react.forward_ref"),V.Suspense=ft("react.suspense"),Th=ft("react.memo"),kh=ft("react.lazy"));var ft,xh=typeof Symbol=="function"&&Symbol.iterator;function dC(e){return e===null||typeof e!="object"?null:(e=xh&&e[xh]||e["@@iterator"],typeof e=="function"?e:null)}function Fi(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 Ph={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ih={};function uo(e,t,n){this.props=e,this.context=t,this.refs=Ih,this.updater=n||Ph}uo.prototype.isReactComponent={};uo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Fi(85));this.updater.enqueueSetState(this,e,t,"setState")};uo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rh(){}Rh.prototype=uo.prototype;function wd(e,t,n){this.props=e,this.context=t,this.refs=Ih,this.updater=n||Ph}var Ed=wd.prototype=new Rh;Ed.constructor=wd;_d(Ed,uo.prototype);Ed.isPureReactComponent=!0;var Cd={current:null},Lh=Object.prototype.hasOwnProperty,Ah={key:!0,ref:!0,__self:!0,__source:!0};function Oh(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)Lh.call(t,r)&&!Ah.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:lo,type:e,key:i,ref:s,props:o,_owner:Cd.current}}function fC(e,t){return{$$typeof:lo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function bd(e){return typeof e=="object"&&e!==null&&e.$$typeof===lo}function pC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var _h=/\/+/g;function xd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?pC(""+e.key):t.toString(36)}function Ka(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 lo:case wh:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+xd(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(_h,"$&/")+"/"),Ka(o,t,n,"",function(u){return u})):o!=null&&(bd(o)&&(o=fC(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(_h,"$&/")+"/")+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+xd(i,a);s+=Ka(i,t,n,l,o)}else if(l=dC(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+xd(i,a++),s+=Ka(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Fi(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Va(e,t,n){if(e==null)return e;var r=[],o=0;return Ka(e,r,"","",function(i){return t.call(n,i,o++)}),r}function mC(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 Nh={current:null};function ln(){var e=Nh.current;if(e===null)throw Error(Fi(321));return e}var gC={ReactCurrentDispatcher:Nh,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Cd,IsSomeRendererActing:{current:!1},assign:_d};V.Children={map:Va,forEach:function(e,t,n){Va(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Va(e,function(){t++}),t},toArray:function(e){return Va(e,function(t){return t})||[]},only:function(e){if(!bd(e))throw Error(Fi(143));return e}};V.Component=uo;V.PureComponent=wd;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=gC;V.cloneElement=function(e,t,n){if(e==null)throw Error(Fi(267,e));var r=_d({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Cd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Lh.call(t,l)&&!Ah.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:lo,type:e.type,key:o,ref:i,props:r,_owner:s}};V.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:Ch,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Eh,_context:e},e.Consumer=e};V.createElement=Oh;V.createFactory=function(e){var t=Oh.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:bh,render:e}};V.isValidElement=bd;V.lazy=function(e){return{$$typeof:kh,_payload:{_status:-1,_result:e},_init:mC}};V.memo=function(e,t){return{$$typeof:Th,type:e,compare:t===void 0?null:t}};V.useCallback=function(e,t){return ln().useCallback(e,t)};V.useContext=function(e,t){return ln().useContext(e,t)};V.useDebugValue=function(){};V.useEffect=function(e,t){return ln().useEffect(e,t)};V.useImperativeHandle=function(e,t,n){return ln().useImperativeHandle(e,t,n)};V.useLayoutEffect=function(e,t){return ln().useLayoutEffect(e,t)};V.useMemo=function(e,t){return ln().useMemo(e,t)};V.useReducer=function(e,t,n){return ln().useReducer(e,t,n)};V.useRef=function(e){return ln().useRef(e)};V.useState=function(e){return ln().useState(e)};V.version="17.0.2"});var O=pe((DL,Dh)=>{"use strict";Dh.exports=Mh()});var zh=pe(Bi=>{"use strict";Ua();var hC=O(),Bh=60103;Bi.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Td=Symbol.for,Bh=Td("react.element"),Bi.Fragment=Td("react.fragment"));var Td,yC=hC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vC=Object.prototype.hasOwnProperty,SC={key:!0,ref:!0,__self:!0,__source:!0};function Hh(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)vC.call(t,r)&&!SC.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:Bh,type:e,key:i,ref:s,props:o,_owner:yC.current}}Bi.jsx=Hh;Bi.jsxs=Hh});var E=pe((VL,Uh)=>{"use strict";Uh.exports=zh()});var by=pe($=>{"use strict";var ho,qi,yl,$d;typeof performance=="object"&&typeof performance.now=="function"?(xy=performance,$.unstable_now=function(){return xy.now()}):(Hd=Date,_y=Hd.now(),$.unstable_now=function(){return Hd.now()-_y});var xy,Hd,_y;typeof window>"u"||typeof MessageChannel!="function"?(go=null,zd=null,Ud=function(){if(go!==null)try{var e=$.unstable_now();go(!0,e),go=null}catch(t){throw setTimeout(Ud,0),t}},ho=function(e){go!==null?setTimeout(ho,0,e):(go=e,setTimeout(Ud,0))},qi=function(e,t){zd=setTimeout(e,t)},yl=function(){clearTimeout(zd)},$.unstable_shouldYield=function(){return!1},$d=$.unstable_forceFrameRate=function(){}):(wy=window.setTimeout,Ey=window.clearTimeout,typeof console<"u"&&(Cy=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 Cy!="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")),Wi=!1,$i=null,ml=-1,Vd=5,Kd=0,$.unstable_shouldYield=function(){return $.unstable_now()>=Kd},$d=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"):Vd=0<e?Math.floor(1e3/e):5},Wd=new MessageChannel,gl=Wd.port2,Wd.port1.onmessage=function(){if($i!==null){var e=$.unstable_now();Kd=e+Vd;try{$i(!0,e)?gl.postMessage(null):(Wi=!1,$i=null)}catch(t){throw gl.postMessage(null),t}}else Wi=!1},ho=function(e){$i=e,Wi||(Wi=!0,gl.postMessage(null))},qi=function(e,t){ml=wy(function(){e($.unstable_now())},t)},yl=function(){Ey(ml),ml=-1});var go,zd,Ud,wy,Ey,Cy,Wi,$i,ml,Vd,Kd,Wd,gl;function qd(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<hl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Ot(e){return e=e[0],e===void 0?null:e}function vl(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>hl(s,n))l!==void 0&&0>hl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>hl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function hl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var $t=[],Un=[],XC=1,ht=null,Ie=3,Sl=!1,Or=!1,Gi=!1;function Gd(e){for(var t=Ot(Un);t!==null;){if(t.callback===null)vl(Un);else if(t.startTime<=e)vl(Un),t.sortIndex=t.expirationTime,qd($t,t);else break;t=Ot(Un)}}function Xd(e){if(Gi=!1,Gd(e),!Or)if(Ot($t)!==null)Or=!0,ho(Qd);else{var t=Ot(Un);t!==null&&qi(Xd,t.startTime-e)}}function Qd(e,t){Or=!1,Gi&&(Gi=!1,yl()),Sl=!0;var n=Ie;try{for(Gd(t),ht=Ot($t);ht!==null&&(!(ht.expirationTime>t)||e&&!$.unstable_shouldYield());){var r=ht.callback;if(typeof r=="function"){ht.callback=null,Ie=ht.priorityLevel;var o=r(ht.expirationTime<=t);t=$.unstable_now(),typeof o=="function"?ht.callback=o:ht===Ot($t)&&vl($t),Gd(t)}else vl($t);ht=Ot($t)}if(ht!==null)var i=!0;else{var s=Ot(Un);s!==null&&qi(Xd,s.startTime-t),i=!1}return i}finally{ht=null,Ie=n,Sl=!1}}var QC=$d;$.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(){Or||Sl||(Or=!0,ho(Qd))};$.unstable_getCurrentPriorityLevel=function(){return Ie};$.unstable_getFirstCallbackNode=function(){return Ot($t)};$.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=QC;$.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:XC++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,qd(Un,e),Ot($t)===null&&e===Ot(Un)&&(Gi?yl():Gi=!0,qi(Xd,n-r))):(e.sortIndex=o,qd($t,e),Or||Sl||(Or=!0,ho(Qd))),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 ky=pe((MO,Ty)=>{"use strict";Ty.exports=by()});var p0=pe(wt=>{"use strict";var fu=O(),ae=Ua(),xe=ky();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(!fu)throw Error(T(227));var Hv=new Set,Cs={};function Kr(e,t){Fo(e,t),Fo(e+"Capture",t)}function Fo(e,t){for(Cs[e]=t,e=0;e<t.length;e++)Hv.add(t[e])}var mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),YC=/^[: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]*$/,Py=Object.prototype.hasOwnProperty,Iy={},Ry={};function ZC(e){return Py.call(Ry,e)?!0:Py.call(Iy,e)?!1:YC.test(e)?Ry[e]=!0:(Iy[e]=!0,!1)}function JC(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 eb(e,t,n,r){if(t===null||typeof t>"u"||JC(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 He(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 He(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 He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ke[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ke[e]=new He(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 He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ke[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ke[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ke[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ke[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var sp=/[\-:]([a-z])/g;function ap(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(sp,ap);ke[t]=new He(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(sp,ap);ke[t]=new He(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(sp,ap);ke[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ke[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});ke.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ke[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function lp(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||(eb(t,n,o,r)&&(n=null),r||o===null?ZC(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 Wr=fu.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,as=60103,Mr=60106,Kn=60107,up=60108,fs=60114,cp=60109,dp=60110,pu=60112,ps=60113,Vl=60120,mu=60115,fp=60116,pp=60121,mp=60128,zv=60129,gp=60130,xf=60131;typeof Symbol=="function"&&Symbol.for&&(ye=Symbol.for,as=ye("react.element"),Mr=ye("react.portal"),Kn=ye("react.fragment"),up=ye("react.strict_mode"),fs=ye("react.profiler"),cp=ye("react.provider"),dp=ye("react.context"),pu=ye("react.forward_ref"),ps=ye("react.suspense"),Vl=ye("react.suspense_list"),mu=ye("react.memo"),fp=ye("react.lazy"),pp=ye("react.block"),ye("react.scope"),mp=ye("react.opaque.id"),zv=ye("react.debug_trace_mode"),gp=ye("react.offscreen"),xf=ye("react.legacy_hidden"));var ye,Ly=typeof Symbol=="function"&&Symbol.iterator;function Xi(e){return e===null||typeof e!="object"?null:(e=Ly&&e[Ly]||e["@@iterator"],typeof e=="function"?e:null)}var Yd;function ls(e){if(Yd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Yd=t&&t[1]||""}return`
|
|
2
|
+
`+Yd+e}var Zd=!1;function xl(e,t){if(!e||Zd)return"";Zd=!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{Zd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ss(e):""}function t_(e){switch(e.tag){case 5:return ss(e.type);case 16:return ss("Lazy");case 13:return ss("Suspense");case 19:return ss("SuspenseList");case 0:case 2:case 15:return e=Sl(e.type,!1),e;case 11:return e=Sl(e.type.render,!1),e;case 22:return e=Sl(e.type._render,!1),e;case 1:return e=Sl(e.type,!0),e;default:return""}}function Po(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 Kn:return"Fragment";case Nr:return"Portal";case cs:return"Profiler";case up:return"StrictMode";case ds:return"Suspense";case zl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dp:return(e.displayName||"Context")+".Consumer";case cp:return(e._context.displayName||"Context")+".Provider";case fu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case pu:return Po(e.type);case pp:return Po(e._render);case fp:t=e._payload,e=e._init;try{return Po(e(t))}catch{}}return null}function nr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function zv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function n_(e){var t=zv(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 wl(e){e._valueTracker||(e._valueTracker=n_(e))}function Vv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=zv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Vl(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 xf(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ay(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nr(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 Kv(e,t){t=t.checked,t!=null&&lp(e,"checked",t,!1)}function Ef(e,t){Kv(e,t);var n=nr(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")?Cf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cf(e,t.type,nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oy(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 Cf(e,t,n){(t!=="number"||Vl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function r_(e){var t="";return du.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Tf(e,t){return e=ae({children:void 0},t),(t=r_(t.children))&&(e.children=t),e}function ko(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=""+nr(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 _f(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(b(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ny(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(b(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(b(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:nr(n)}}function Wv(e,t){var n=nr(t.value),r=nr(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 My(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var bf={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function $v(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 Pf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$v(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xl,qv=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!==bf.svg||"innerHTML"in e)e.innerHTML=t;else{for(xl=xl||document.createElement("div"),xl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fs={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},o_=["Webkit","ms","Moz","O"];Object.keys(fs).forEach(function(e){o_.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fs[t]=fs[e]})});function Gv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fs.hasOwnProperty(e)&&fs[e]?(""+t).trim():t+"px"}function Qv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Gv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var i_=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 kf(e,t){if(t){if(i_[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(b(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(b(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(b(61))}if(t.style!=null&&typeof t.style!="object")throw Error(b(62))}}function Rf(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 hp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var If=null,Ro=null,Io=null;function Dy(e){if(e=Fs(e)){if(typeof If!="function")throw Error(b(280));var t=e.stateNode;t&&(t=Su(t),If(e.stateNode,e.type,t))}}function Xv(e){Ro?Io?Io.push(e):Io=[e]:Ro=e}function Yv(){if(Ro){var e=Ro,t=Io;if(Io=Ro=null,Dy(e),t)for(e=0;e<t.length;e++)Dy(t[e])}}function yp(e,t){return e(t)}function Zv(e,t,n,r,o){return e(t,n,r,o)}function vp(){}var Jv=yp,Mr=!1,Jd=!1;function Sp(){(Ro!==null||Io!==null)&&(vp(),Yv())}function s_(e,t,n){if(Jd)return e(t,n);Jd=!0;try{return Jv(e,t,n)}finally{Jd=!1,Sp()}}function Ts(e,t){var n=e.stateNode;if(n===null)return null;var r=Su(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(b(231,t,typeof n));return n}var Lf=!1;if(mn)try{yo={},Object.defineProperty(yo,"passive",{get:function(){Lf=!0}}),window.addEventListener("test",yo,yo),window.removeEventListener("test",yo,yo)}catch{Lf=!1}var yo;function a_(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 ps=!1,Kl=null,Wl=!1,Af=null,l_={onError:function(e){ps=!0,Kl=e}};function u_(e,t,n,r,o,i,s,a,l){ps=!1,Kl=null,a_.apply(l_,arguments)}function c_(e,t,n,r,o,i,s,a,l){if(u_.apply(this,arguments),ps){if(ps){var u=Kl;ps=!1,Kl=null}else throw Error(b(198));Wl||(Wl=!0,Af=u)}}function Wr(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 eS(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 Fy(e){if(Wr(e)!==e)throw Error(b(188))}function d_(e){var t=e.alternate;if(!t){if(t=Wr(e),t===null)throw Error(b(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 Fy(o),e;if(i===r)return Fy(o),t;i=i.sibling}throw Error(b(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(b(189))}}if(n.alternate!==r)throw Error(b(190))}if(n.tag!==3)throw Error(b(188));return n.stateNode.current===n?e:t}function tS(e){if(e=d_(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 jy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var nS,wp,rS,oS,Of=!1,qt=[],Gn=null,Qn=null,Xn=null,_s=new Map,bs=new Map,Gi=[],Hy="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 Nf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function By(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":_s.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":bs.delete(t.pointerId)}}function Qi(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Nf(t,n,r,o,i),t!==null&&(t=Fs(t),t!==null&&wp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function f_(e,t,n,r,o){switch(t){case"focusin":return Gn=Qi(Gn,e,t,n,r,o),!0;case"dragenter":return Qn=Qi(Qn,e,t,n,r,o),!0;case"mouseover":return Xn=Qi(Xn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return _s.set(i,Qi(_s.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,bs.set(i,Qi(bs.get(i)||null,e,t,n,r,o)),!0}return!1}function p_(e){var t=Dr(e.target);if(t!==null){var n=Wr(t);if(n!==null){if(t=n.tag,t===13){if(t=eS(n),t!==null){e.blockedOn=t,oS(e.lanePriority,function(){we.unstable_runWithPriority(e.priority,function(){rS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Al(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Tp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Fs(n),t!==null&&wp(t),e.blockedOn=n,!1;t.shift()}return!0}function Uy(e,t,n){Al(e)&&n.delete(t)}function m_(){for(Of=!1;0<qt.length;){var e=qt[0];if(e.blockedOn!==null){e=Fs(e.blockedOn),e!==null&&nS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Tp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&qt.shift()}Gn!==null&&Al(Gn)&&(Gn=null),Qn!==null&&Al(Qn)&&(Qn=null),Xn!==null&&Al(Xn)&&(Xn=null),_s.forEach(Uy),bs.forEach(Uy)}function Xi(e,t){e.blockedOn===t&&(e.blockedOn=null,Of||(Of=!0,we.unstable_scheduleCallback(we.unstable_NormalPriority,m_)))}function iS(e){function t(o){return Xi(o,e)}if(0<qt.length){Xi(qt[0],e);for(var n=1;n<qt.length;n++){var r=qt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&Xi(Gn,e),Qn!==null&&Xi(Qn,e),Xn!==null&&Xi(Xn,e),_s.forEach(t),bs.forEach(t),n=0;n<Gi.length;n++)r=Gi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Gi.length&&(n=Gi[0],n.blockedOn===null);)p_(n),n.blockedOn===null&&Gi.shift()}function El(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xo={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionend:El("Transition","TransitionEnd")},ef={},sS={};mn&&(sS=document.createElement("div").style,"AnimationEvent"in window||(delete xo.animationend.animation,delete xo.animationiteration.animation,delete xo.animationstart.animation),"TransitionEvent"in window||delete xo.transitionend.transition);function mu(e){if(ef[e])return ef[e];if(!xo[e])return e;var t=xo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sS)return ef[e]=t[n];return e}var aS=mu("animationend"),lS=mu("animationiteration"),uS=mu("animationstart"),cS=mu("transitionend"),dS=new Map,xp=new Map,g_=["abort","abort",aS,"animationEnd",lS,"animationIteration",uS,"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",cS,"transitionEnd","waiting","waiting"];function Ep(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)),xp.set(r,t),dS.set(r,o),Vr(o,[r])}}var h_=we.unstable_now;h_();var ne=8;function So(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 y_(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 v_(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(b(358,e))}}function Ps(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=So(l),o=ne):(a&=i,a!==0&&(r=So(a),o=ne))}else i=n&~s,i!==0?(r=So(i),o=ne):a!==0&&(r=So(a),o=ne);if(r===0)return 0;if(r=31-rr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(So(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-rr(t),o=1<<n,r|=e[n],t&=~o;return r}function fS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $l(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=wo(24&~t),e===0?$l(10,t):e;case 10:return e=wo(192&~t),e===0?$l(8,t):e;case 8:return e=wo(3584&~t),e===0&&(e=wo(4186112&~t),e===0&&(e=512)),e;case 2:return t=wo(805306368&~t),t===0&&(t=268435456),t}throw Error(b(358,e))}function wo(e){return e&-e}function tf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gu(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-rr(t),e[t]=n}var rr=Math.clz32?Math.clz32:x_,S_=Math.log,w_=Math.LN2;function x_(e){return e===0?32:31-(S_(e)/w_|0)|0}var E_=we.unstable_UserBlockingPriority,C_=we.unstable_runWithPriority,Ol=!0;function T_(e,t,n,r){Mr||vp();var o=Cp,i=Mr;Mr=!0;try{Zv(o,e,t,n,r)}finally{(Mr=i)||Sp()}}function __(e,t,n,r){C_(E_,Cp.bind(null,e,t,n,r))}function Cp(e,t,n,r){if(Ol){var o;if((o=(t&4)===0)&&0<qt.length&&-1<Hy.indexOf(e))e=Nf(null,e,t,n,r),qt.push(e);else{var i=Tp(e,t,n,r);if(i===null)o&&By(e,r);else{if(o){if(-1<Hy.indexOf(e)){e=Nf(i,e,t,n,r),qt.push(e);return}if(f_(i,e,t,n,r))return;By(e,r)}_S(e,t,r,null,n)}}}}function Tp(e,t,n,r){var o=hp(r);if(o=Dr(o),o!==null){var i=Wr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=eS(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 _S(e,t,r,o,n),null}var Wn=null,_p=null,Nl=null;function pS(){if(Nl)return Nl;var e,t=_p,n=t.length,r,o="value"in Wn?Wn.value:Wn.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 Nl=o.slice(e,1<r?1-r:void 0)}function Ml(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 Cl(){return!0}function zy(){return!1}function tt(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)?Cl:zy,this.isPropagationStopped=zy,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=Cl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cl)},persist:function(){},isPersistent:Cl}),t}var Uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bp=tt(Uo),Ds=ae({},Uo,{view:0,detail:0}),b_=tt(Ds),nf,rf,Yi,hu=ae({},Ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pp,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!==Yi&&(Yi&&e.type==="mousemove"?(nf=e.screenX-Yi.screenX,rf=e.screenY-Yi.screenY):rf=nf=0,Yi=e),nf)},movementY:function(e){return"movementY"in e?e.movementY:rf}}),Vy=tt(hu),P_=ae({},hu,{dataTransfer:0}),k_=tt(P_),R_=ae({},Ds,{relatedTarget:0}),of=tt(R_),I_=ae({},Uo,{animationName:0,elapsedTime:0,pseudoElement:0}),L_=tt(I_),A_=ae({},Uo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),O_=tt(A_),N_=ae({},Uo,{data:0}),Ky=tt(N_),M_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D_={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"},F_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function j_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=F_[e])?!!t[e]:!1}function Pp(){return j_}var H_=ae({},Ds,{key:function(e){if(e.key){var t=M_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ml(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?D_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pp,charCode:function(e){return e.type==="keypress"?Ml(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ml(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),B_=tt(H_),U_=ae({},hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wy=tt(U_),z_=ae({},Ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pp}),V_=tt(z_),K_=ae({},Uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),W_=tt(K_),$_=ae({},hu,{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}),q_=tt($_),G_=[9,13,27,32],kp=mn&&"CompositionEvent"in window,ms=null;mn&&"documentMode"in document&&(ms=document.documentMode);var Q_=mn&&"TextEvent"in window&&!ms,mS=mn&&(!kp||ms&&8<ms&&11>=ms),$y=String.fromCharCode(32),qy=!1;function gS(e,t){switch(e){case"keyup":return G_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eo=!1;function X_(e,t){switch(e){case"compositionend":return hS(t);case"keypress":return t.which!==32?null:(qy=!0,$y);case"textInput":return e=t.data,e===$y&&qy?null:e;default:return null}}function Y_(e,t){if(Eo)return e==="compositionend"||!kp&&gS(e,t)?(e=pS(),Nl=_p=Wn=null,Eo=!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 mS&&t.locale!=="ko"?null:t.data;default:return null}}var Z_={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 Gy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Z_[e.type]:t==="textarea"}function yS(e,t,n,r){Xv(r),t=ql(t,"onChange"),0<t.length&&(n=new bp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gs=null,ks=null;function J_(e){ES(e,0)}function yu(e){var t=To(e);if(Vv(t))return e}function eb(e,t){if(e==="change")return t}var vS=!1;mn&&(mn?(_l="oninput"in document,_l||(sf=document.createElement("div"),sf.setAttribute("oninput","return;"),_l=typeof sf.oninput=="function"),Tl=_l):Tl=!1,vS=Tl&&(!document.documentMode||9<document.documentMode));var Tl,_l,sf;function Qy(){gs&&(gs.detachEvent("onpropertychange",SS),ks=gs=null)}function SS(e){if(e.propertyName==="value"&&yu(ks)){var t=[];if(yS(t,ks,e,hp(e)),e=J_,Mr)e(t);else{Mr=!0;try{yp(e,t)}finally{Mr=!1,Sp()}}}}function tb(e,t,n){e==="focusin"?(Qy(),gs=t,ks=n,gs.attachEvent("onpropertychange",SS)):e==="focusout"&&Qy()}function nb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yu(ks)}function rb(e,t){if(e==="click")return yu(t)}function ob(e,t){if(e==="input"||e==="change")return yu(t)}function ib(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:ib,sb=Object.prototype.hasOwnProperty;function Rs(e,t){if(yt(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(!sb.call(t,n[r])||!yt(e[n[r]],t[n[r]]))return!1;return!0}function Xy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yy(e,t){var n=Xy(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=Xy(n)}}function wS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zy(){for(var e=window,t=Vl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vl(e.document)}return t}function Mf(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 ab=mn&&"documentMode"in document&&11>=document.documentMode,Co=null,Df=null,hs=null,Ff=!1;function Jy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ff||Co==null||Co!==Vl(r)||(r=Co,"selectionStart"in r&&Mf(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}),hs&&Rs(hs,r)||(hs=r,r=ql(Df,"onSelect"),0<r.length&&(t=new bp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Co)))}Ep("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);Ep("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);Ep(g_,2);for(af="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),bl=0;bl<af.length;bl++)xp.set(af[bl],0);var af,bl;Fo("onMouseEnter",["mouseout","mouseover"]);Fo("onMouseLeave",["mouseout","mouseover"]);Fo("onPointerEnter",["pointerout","pointerover"]);Fo("onPointerLeave",["pointerout","pointerover"]);Vr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Vr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Vr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Vr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Vr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),xS=new Set("cancel close invalid load scroll toggle".split(" ").concat(as));function ev(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,c_(r,t,void 0,e),e.currentTarget=null}function ES(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;ev(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;ev(o,a,u),i=l}}}if(Wl)throw e=Af,Wl=!1,Af=null,e}function ie(e,t){var n=PS(t),r=e+"__bubble";n.has(r)||(TS(t,e,2,!1),n.add(r))}var tv="_reactListening"+Math.random().toString(36).slice(2);function CS(e){e[tv]||(e[tv]=!0,Bv.forEach(function(t){xS.has(t)||nv(t,!1,e,null),nv(t,!0,e,null)}))}function nv(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&&xS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=PS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),TS(i,e,o,t),s.add(a))}function TS(e,t,n,r){var o=xp.get(t);switch(o===void 0?2:o){case 0:o=T_;break;case 1:o=__;break;default:o=Cp}n=o.bind(null,t,n,e),o=void 0,!Lf||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 _S(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=Dr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}s_(function(){var u=i,c=hp(n),p=[];e:{var d=dS.get(e);if(d!==void 0){var h=bp,v=e;switch(e){case"keypress":if(Ml(n)===0)break e;case"keydown":case"keyup":h=B_;break;case"focusin":v="focus",h=of;break;case"focusout":v="blur",h=of;break;case"beforeblur":case"afterblur":h=of;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":h=Vy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=k_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=V_;break;case aS:case lS:case uS:h=L_;break;case cS:h=W_;break;case"scroll":h=b_;break;case"wheel":h=q_;break;case"copy":case"cut":case"paste":h=O_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Wy}var y=(t&4)!==0,g=!y&&e==="scroll",m=y?d!==null?d+"Capture":null:d;y=[];for(var f=u,w;f!==null;){w=f;var x=w.stateNode;if(w.tag===5&&x!==null&&(w=x,m!==null&&(x=Ts(f,m),x!=null&&y.push(Is(f,x,w)))),g)break;f=f.return}0<y.length&&(d=new h(d,v,null,n,c),p.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(Dr(v)||v[zo]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Dr(v):null,v!==null&&(g=Wr(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(y=Vy,x="onMouseLeave",m="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(y=Wy,x="onPointerLeave",m="onPointerEnter",f="pointer"),g=h==null?d:To(h),w=v==null?d:To(v),d=new y(x,f+"leave",h,n,c),d.target=g,d.relatedTarget=w,x=null,Dr(c)===u&&(y=new y(m,f+"enter",v,n,c),y.target=w,y.relatedTarget=g,x=y),g=x,h&&v)t:{for(y=h,m=v,f=0,w=y;w;w=vo(w))f++;for(w=0,x=m;x;x=vo(x))w++;for(;0<f-w;)y=vo(y),f--;for(;0<w-f;)m=vo(m),w--;for(;f--;){if(y===m||m!==null&&y===m.alternate)break t;y=vo(y),m=vo(m)}y=null}else y=null;h!==null&&rv(p,d,h,y,!1),v!==null&&g!==null&&rv(p,g,v,y,!0)}}e:{if(d=u?To(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var T=eb;else if(Gy(d))if(vS)T=ob;else{T=nb;var E=tb}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(T=rb);if(T&&(T=T(e,u))){yS(p,T,n,c);break e}E&&E(e,d,u),e==="focusout"&&(E=d._wrapperState)&&E.controlled&&d.type==="number"&&Cf(d,"number",d.value)}switch(E=u?To(u):window,e){case"focusin":(Gy(E)||E.contentEditable==="true")&&(Co=E,Df=u,hs=null);break;case"focusout":hs=Df=Co=null;break;case"mousedown":Ff=!0;break;case"contextmenu":case"mouseup":case"dragend":Ff=!1,Jy(p,n,c);break;case"selectionchange":if(ab)break;case"keydown":case"keyup":Jy(p,n,c)}var _;if(kp)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 Eo?gS(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");R&&(mS&&n.locale!=="ko"&&(Eo||R!=="onCompositionStart"?R==="onCompositionEnd"&&Eo&&(_=pS()):(Wn=c,_p="value"in Wn?Wn.value:Wn.textContent,Eo=!0)),E=ql(u,R),0<E.length&&(R=new Ky(R,e,null,n,c),p.push({event:R,listeners:E}),_?R.data=_:(_=hS(n),_!==null&&(R.data=_)))),(_=Q_?X_(e,n):Y_(e,n))&&(u=ql(u,"onBeforeInput"),0<u.length&&(c=new Ky("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=_))}ES(p,t)})}function Is(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ql(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ts(e,n),i!=null&&r.unshift(Is(e,i,o)),i=Ts(e,t),i!=null&&r.push(Is(e,i,o))),e=e.return}return r}function vo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rv(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=Ts(n,i),l!=null&&s.unshift(Is(n,l,a))):o||(l=Ts(n,i),l!=null&&s.push(Is(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Gl(){}var lf=null,uf=null;function bS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function jf(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 ov=typeof setTimeout=="function"?setTimeout:void 0,lb=typeof clearTimeout=="function"?clearTimeout:void 0;function Rp(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Lo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function iv(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 cf=0;function ub(e){return{$$typeof:mp,toString:e,valueOf:e}}var vu=Math.random().toString(36).slice(2),$n="__reactFiber$"+vu,Ql="__reactProps$"+vu,zo="__reactContainer$"+vu,sv="__reactEvents$"+vu;function Dr(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[zo]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=iv(e);e!==null;){if(n=e[$n])return n;e=iv(e)}return t}e=n,n=e.parentNode}return null}function Fs(e){return e=e[$n]||e[zo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function To(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(b(33))}function Su(e){return e[Ql]||null}function PS(e){var t=e[sv];return t===void 0&&(t=e[sv]=new Set),t}var Hf=[],_o=-1;function ar(e){return{current:e}}function se(e){0>_o||(e.current=Hf[_o],Hf[_o]=null,_o--)}function de(e,t){_o++,Hf[_o]=e.current,e.current=t}var or={},Oe=ar(or),$e=ar(!1),Br=or;function jo(e,t){var n=e.type.contextTypes;if(!n)return or;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 qe(e){return e=e.childContextTypes,e!=null}function Xl(){se($e),se(Oe)}function av(e,t,n){if(Oe.current!==or)throw Error(b(168));de(Oe,t),de($e,n)}function kS(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(b(108,Po(t)||"Unknown",o));return ae({},n,r)}function Dl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,Br=Oe.current,de(Oe,e),de($e,$e.current),!0}function lv(e,t,n){var r=e.stateNode;if(!r)throw Error(b(169));n?(e=kS(e,t,Br),r.__reactInternalMemoizedMergedChildContext=e,se($e),se(Oe),de(Oe,e)):se($e),de($e,n)}var Ip=null,Hr=null,cb=we.unstable_runWithPriority,Lp=we.unstable_scheduleCallback,Bf=we.unstable_cancelCallback,db=we.unstable_shouldYield,uv=we.unstable_requestPaint,Uf=we.unstable_now,fb=we.unstable_getCurrentPriorityLevel,wu=we.unstable_ImmediatePriority,RS=we.unstable_UserBlockingPriority,IS=we.unstable_NormalPriority,LS=we.unstable_LowPriority,AS=we.unstable_IdlePriority,df={},pb=uv!==void 0?uv:function(){},un=null,Fl=null,ff=!1,cv=Uf(),Le=1e4>cv?Uf:function(){return Uf()-cv};function Ho(){switch(fb()){case wu:return 99;case RS:return 98;case IS:return 97;case LS:return 96;case AS:return 95;default:throw Error(b(332))}}function OS(e){switch(e){case 99:return wu;case 98:return RS;case 97:return IS;case 96:return LS;case 95:return AS;default:throw Error(b(332))}}function Ur(e,t){return e=OS(e),cb(e,t)}function Ls(e,t,n){return e=OS(e),Lp(e,t,n)}function Zt(){if(Fl!==null){var e=Fl;Fl=null,Bf(e)}NS()}function NS(){if(!ff&&un!==null){ff=!0;var e=0;try{var t=un;Ur(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),un=null}catch(n){throw un!==null&&(un=un.slice(e+1)),Lp(wu,Zt),n}finally{ff=!1}}}var mb=Kr.ReactCurrentBatchConfig;function Nt(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 Yl=ar(null),Zl=null,bo=null,Jl=null;function Ap(){Jl=bo=Zl=null}function Op(e){var t=Yl.current;se(Yl),e.type._context._currentValue=t}function MS(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 Ao(e,t){Zl=e,Jl=bo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function wt(e,t){if(Jl!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Jl=e,t=1073741823),t={context:e,observedBits:t,next:null},bo===null){if(Zl===null)throw Error(b(308));bo=t,Zl.dependencies={lanes:0,firstContext:t,responders:null}}else bo=bo.next=t;return e._currentValue}var Vn=!1;function Np(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function DS(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 Yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(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 dv(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 As(e,t,n,r){var o=e.updateQueue;Vn=!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 p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=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 h=e,v=i;switch(a=t,d=n,v.tag){case 1:if(h=v.payload,typeof h=="function"){p=h.call(d,p,a);break e}p=h;break e;case 3:h.flags=h.flags&-4097|64;case 0:if(h=v.payload,a=typeof h=="function"?h.call(d,p,a):h,a==null)break e;p=ae({},p,a);break e;case 2:Vn=!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=p):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=p),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,Hs|=s,e.lanes=s,e.memoizedState=p}}function fv(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(b(191,o));o.call(r)}}}var FS=new du.Component().refs;function eu(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 xu={isMounted:function(e){return(e=e._reactInternals)?Wr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=et(),o=Jn(e),i=Yn(r,o);i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=et(),o=Jn(e),i=Yn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=et(),r=Jn(e),o=Yn(n,r);o.tag=2,t!=null&&(o.callback=t),Zn(e,o),er(e,r,n)}};function pv(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?!Rs(n,r)||!Rs(o,i):!0}function jS(e,t,n){var r=!1,o=or,i=t.contextType;return typeof i=="object"&&i!==null?i=wt(i):(o=qe(t)?Br:Oe.current,r=t.contextTypes,i=(r=r!=null)?jo(e,o):or),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function mv(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&&xu.enqueueReplaceState(t,t.state,null)}function zf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=FS,Np(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=wt(i):(i=qe(t)?Br:Oe.current,o.context=jo(e,i)),As(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(eu(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&&xu.enqueueReplaceState(o,o.state,null),As(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Pl=Array.isArray;function Zi(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(b(309));var r=n.stateNode}if(!r)throw Error(b(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===FS&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(b(284));if(!n._owner)throw Error(b(290,e))}return e}function kl(e,t){if(e.type!=="textarea")throw Error(b(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function HS(e){function t(g,m){if(e){var f=g.lastEffect;f!==null?(f.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=sr(g,m),g.index=0,g.sibling=null,g}function i(g,m,f){return g.index=f,e?(f=g.alternate,f!==null?(f=f.index,f<m?(g.flags=2,m):f):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,f,w){return m===null||m.tag!==6?(m=yf(f,g.mode,w),m.return=g,m):(m=o(m,f),m.return=g,m)}function l(g,m,f,w){return m!==null&&m.elementType===f.type?(w=o(m,f.props),w.ref=Zi(g,m,f),w.return=g,w):(w=Ul(f.type,f.key,f.props,null,g.mode,w),w.ref=Zi(g,m,f),w.return=g,w)}function u(g,m,f,w){return m===null||m.tag!==4||m.stateNode.containerInfo!==f.containerInfo||m.stateNode.implementation!==f.implementation?(m=vf(f,g.mode,w),m.return=g,m):(m=o(m,f.children||[]),m.return=g,m)}function c(g,m,f,w,x){return m===null||m.tag!==7?(m=Do(f,g.mode,w,x),m.return=g,m):(m=o(m,f),m.return=g,m)}function p(g,m,f){if(typeof m=="string"||typeof m=="number")return m=yf(""+m,g.mode,f),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case is:return f=Ul(m.type,m.key,m.props,null,g.mode,f),f.ref=Zi(g,null,m),f.return=g,f;case Nr:return m=vf(m,g.mode,f),m.return=g,m}if(Pl(m)||qi(m))return m=Do(m,g.mode,f,null),m.return=g,m;kl(g,m)}return null}function d(g,m,f,w){var x=m!==null?m.key:null;if(typeof f=="string"||typeof f=="number")return x!==null?null:a(g,m,""+f,w);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case is:return f.key===x?f.type===Kn?c(g,m,f.props.children,w,x):l(g,m,f,w):null;case Nr:return f.key===x?u(g,m,f,w):null}if(Pl(f)||qi(f))return x!==null?null:c(g,m,f,w,null);kl(g,f)}return null}function h(g,m,f,w,x){if(typeof w=="string"||typeof w=="number")return g=g.get(f)||null,a(m,g,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case is:return g=g.get(w.key===null?f:w.key)||null,w.type===Kn?c(m,g,w.props.children,x,w.key):l(m,g,w,x);case Nr:return g=g.get(w.key===null?f:w.key)||null,u(m,g,w,x)}if(Pl(w)||qi(w))return g=g.get(f)||null,c(m,g,w,x,null);kl(m,w)}return null}function v(g,m,f,w){for(var x=null,T=null,E=m,_=m=0,R=null;E!==null&&_<f.length;_++){E.index>_?(R=E,E=null):R=E.sibling;var k=d(g,E,f[_],w);if(k===null){E===null&&(E=R);break}e&&E&&k.alternate===null&&t(g,E),m=i(k,m,_),T===null?x=k:T.sibling=k,T=k,E=R}if(_===f.length)return n(g,E),x;if(E===null){for(;_<f.length;_++)E=p(g,f[_],w),E!==null&&(m=i(E,m,_),T===null?x=E:T.sibling=E,T=E);return x}for(E=r(g,E);_<f.length;_++)R=h(E,g,_,f[_],w),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?_:R.key),m=i(R,m,_),T===null?x=R:T.sibling=R,T=R);return e&&E.forEach(function(N){return t(g,N)}),x}function y(g,m,f,w){var x=qi(f);if(typeof x!="function")throw Error(b(150));if(f=x.call(f),f==null)throw Error(b(151));for(var T=x=null,E=m,_=m=0,R=null,k=f.next();E!==null&&!k.done;_++,k=f.next()){E.index>_?(R=E,E=null):R=E.sibling;var N=d(g,E,k.value,w);if(N===null){E===null&&(E=R);break}e&&E&&N.alternate===null&&t(g,E),m=i(N,m,_),T===null?x=N:T.sibling=N,T=N,E=R}if(k.done)return n(g,E),x;if(E===null){for(;!k.done;_++,k=f.next())k=p(g,k.value,w),k!==null&&(m=i(k,m,_),T===null?x=k:T.sibling=k,T=k);return x}for(E=r(g,E);!k.done;_++,k=f.next())k=h(E,g,_,k.value,w),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?_:k.key),m=i(k,m,_),T===null?x=k:T.sibling=k,T=k);return e&&E.forEach(function(te){return t(g,te)}),x}return function(g,m,f,w){var x=typeof f=="object"&&f!==null&&f.type===Kn&&f.key===null;x&&(f=f.props.children);var T=typeof f=="object"&&f!==null;if(T)switch(f.$$typeof){case is:e:{for(T=f.key,x=m;x!==null;){if(x.key===T){switch(x.tag){case 7:if(f.type===Kn){n(g,x.sibling),m=o(x,f.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===f.type){n(g,x.sibling),m=o(x,f.props),m.ref=Zi(g,x,f),m.return=g,g=m;break e}}n(g,x);break}else t(g,x);x=x.sibling}f.type===Kn?(m=Do(f.props.children,g.mode,w,f.key),m.return=g,g=m):(w=Ul(f.type,f.key,f.props,null,g.mode,w),w.ref=Zi(g,m,f),w.return=g,g=w)}return s(g);case Nr:e:{for(x=f.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===f.containerInfo&&m.stateNode.implementation===f.implementation){n(g,m.sibling),m=o(m,f.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=vf(f,g.mode,w),m.return=g,g=m}return s(g)}if(typeof f=="string"||typeof f=="number")return f=""+f,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,f),m.return=g,g=m):(n(g,m),m=yf(f,g.mode,w),m.return=g,g=m),s(g);if(Pl(f))return v(g,m,f,w);if(qi(f))return y(g,m,f,w);if(T&&kl(g,f),typeof f>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(b(152,Po(g.type)||"Component"))}return n(g,m)}}var tu=HS(!0),BS=HS(!1),js={},Xt=ar(js),Os=ar(js),Ns=ar(js);function Fr(e){if(e===js)throw Error(b(174));return e}function Vf(e,t){switch(de(Ns,t),de(Os,e),de(Xt,js),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pf(t,e)}se(Xt),de(Xt,t)}function Bo(){se(Xt),se(Os),se(Ns)}function gv(e){Fr(Ns.current);var t=Fr(Xt.current),n=Pf(t,e.type);t!==n&&(de(Os,e),de(Xt,n))}function Mp(e){Os.current===e&&(se(Xt),se(Os))}var ce=ar(0);function nu(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 dn=null,qn=null,Yt=!1;function US(e,t){var n=vt(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 hv(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 Kf(e){if(Yt){var t=qn;if(t){var n=t;if(!hv(e,t)){if(t=Lo(n.nextSibling),!t||!hv(e,t)){e.flags=e.flags&-1025|2,Yt=!1,dn=e;return}US(dn,n)}dn=e,qn=Lo(t.firstChild)}else e.flags=e.flags&-1025|2,Yt=!1,dn=e}}function yv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;dn=e}function Rl(e){if(e!==dn)return!1;if(!Yt)return yv(e),Yt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!jf(t,e.memoizedProps))for(t=qn;t;)US(e,t),t=Lo(t.nextSibling);if(yv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(b(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){qn=Lo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qn=null}}else qn=dn?Lo(e.stateNode.nextSibling):null;return!0}function pf(){qn=dn=null,Yt=!1}var Oo=[];function Dp(){for(var e=0;e<Oo.length;e++)Oo[e]._workInProgressVersionPrimary=null;Oo.length=0}var ys=Kr.ReactCurrentDispatcher,St=Kr.ReactCurrentBatchConfig,Ms=0,ge=null,Ie=null,_e=null,ru=!1,vs=!1;function Ke(){throw Error(b(321))}function Fp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function jp(e,t,n,r,o,i){if(Ms=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ys.current=e===null||e.memoizedState===null?hb:yb,e=n(r,o),vs){i=0;do{if(vs=!1,!(25>i))throw Error(b(301));i+=1,_e=Ie=null,t.updateQueue=null,ys.current=vb,e=n(r,o)}while(vs)}if(ys.current=au,t=Ie!==null&&Ie.next!==null,Ms=0,_e=Ie=ge=null,ru=!1,t)throw Error(b(300));return e}function jr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _e===null?ge.memoizedState=_e=e:_e=_e.next=e,_e}function $r(){if(Ie===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=_e===null?ge.memoizedState:_e.next;if(t!==null)_e=t,Ie=e;else{if(e===null)throw Error(b(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},_e===null?ge.memoizedState=_e=e:_e=_e.next=e}return _e}function Gt(e,t){return typeof t=="function"?t(e):t}function Ji(e){var t=$r(),n=t.queue;if(n===null)throw Error(b(311));n.lastRenderedReducer=e;var r=Ie,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((Ms&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,Hs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,yt(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function es(e){var t=$r(),n=t.queue;if(n===null)throw Error(b(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);yt(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function vv(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=(Ms&e)===e)&&(t._workInProgressVersionPrimary=r,Oo.push(t))),e)return n(t._source);throw Oo.push(t),Error(b(350))}function zS(e,t,n,r){var o=He;if(o===null)throw Error(b(349));var i=t._getVersion,s=i(t._source),a=ys.current,l=a.useState(function(){return vv(o,t,n)}),u=l[1],c=l[0];l=_e;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,v=p.source;p=p.subscribe;var y=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(!yt(s,g)){g=n(t._source),yt(c,g)||(u(g),g=Jn(y),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,f=g;0<f;){var w=31-rr(f),x=1<<w;m[w]|=g,f&=~x}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var f=Jn(y);o.mutableReadLanes|=f&o.pendingLanes}catch(w){m(function(){throw w})}})},[t,r]),yt(h,n)&&yt(v,t)&&yt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Gt,lastRenderedState:c},e.dispatch=u=Up.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=vv(o,t,n),l.memoizedState=l.baseState=c),c}function VS(e,t,n){var r=$r();return zS(r,e,t,n)}function ts(e){var t=jr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Gt,lastRenderedState:e},e=e.dispatch=Up.bind(null,ge,e),[t.memoizedState,e]}function ou(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 Sv(e){var t=jr();return e={current:e},t.memoizedState=e}function iu(){return $r().memoizedState}function Wf(e,t,n,r){var o=jr();ge.flags|=e,o.memoizedState=ou(1|t,n,void 0,r===void 0?null:r)}function Hp(e,t,n,r){var o=$r();r=r===void 0?null:r;var i=void 0;if(Ie!==null){var s=Ie.memoizedState;if(i=s.destroy,r!==null&&Fp(r,s.deps)){ou(t,n,i,r);return}}ge.flags|=e,o.memoizedState=ou(1|t,n,i,r)}function wv(e,t){return Wf(516,4,e,t)}function su(e,t){return Hp(516,4,e,t)}function KS(e,t){return Hp(4,2,e,t)}function WS(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 $S(e,t,n){return n=n!=null?n.concat([e]):null,Hp(4,2,WS.bind(null,t,e),n)}function Bp(){}function qS(e,t){var n=$r();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function GS(e,t){var n=$r();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function gb(e,t){var n=Ho();Ur(98>n?98:n,function(){e(!0)}),Ur(97<n?97:n,function(){var r=St.transition;St.transition=1;try{e(!1),t()}finally{St.transition=r}})}function Up(e,t,n){var r=et(),o=Jn(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)vs=ru=!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,yt(l,a))return}catch{}finally{}er(e,o,r)}}var au={readContext:wt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useOpaqueIdentifier:Ke,unstable_isNewReconciler:!1},hb={readContext:wt,useCallback:function(e,t){return jr().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:wv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wf(4,2,WS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wf(4,2,e,t)},useMemo:function(e,t){var n=jr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jr();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=Up.bind(null,ge,e),[r.memoizedState,e]},useRef:Sv,useState:ts,useDebugValue:Bp,useDeferredValue:function(e){var t=ts(e),n=t[0],r=t[1];return wv(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ts(!1),t=e[0];return e=gb.bind(null,e[1]),Sv(e),[e,t]},useMutableSource:function(e,t,n){var r=jr();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},zS(r,e,t,n)},useOpaqueIdentifier:function(){if(Yt){var e=!1,t=ub(function(){throw e||(e=!0,n("r:"+(cf++).toString(36))),Error(b(355))}),n=ts(t)[1];return!(ge.mode&2)&&(ge.flags|=516,ou(5,function(){n("r:"+(cf++).toString(36))},void 0,null)),t}return t="r:"+(cf++).toString(36),ts(t),t},unstable_isNewReconciler:!1},yb={readContext:wt,useCallback:qS,useContext:wt,useEffect:su,useImperativeHandle:$S,useLayoutEffect:KS,useMemo:GS,useReducer:Ji,useRef:iu,useState:function(){return Ji(Gt)},useDebugValue:Bp,useDeferredValue:function(e){var t=Ji(Gt),n=t[0],r=t[1];return su(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=Ji(Gt)[0];return[iu().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return Ji(Gt)[0]},unstable_isNewReconciler:!1},vb={readContext:wt,useCallback:qS,useContext:wt,useEffect:su,useImperativeHandle:$S,useLayoutEffect:KS,useMemo:GS,useReducer:es,useRef:iu,useState:function(){return es(Gt)},useDebugValue:Bp,useDeferredValue:function(e){var t=es(Gt),n=t[0],r=t[1];return su(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=es(Gt)[0];return[iu().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return es(Gt)[0]},unstable_isNewReconciler:!1},Sb=Kr.ReactCurrentOwner,Mt=!1;function We(e,t,n,r){t.child=e===null?BS(t,null,n,r):tu(t,e.child,n,r)}function xv(e,t,n,r,o){n=n.render;var i=t.ref;return Ao(t,o),r=jp(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,fn(e,t,o)):(t.flags|=1,We(e,t,r,o),t.child)}function Ev(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!qp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,QS(e,t,s,r,o,i)):(e=Ul(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:Rs,n(o,r)&&e.ref===t.ref)?fn(e,t,i):(t.flags|=1,e=sr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function QS(e,t,n,r,o,i){if(e!==null&&Rs(e.memoizedProps,r)&&e.ref===t.ref)if(Mt=!1,(i&o)!==0)e.flags&16384&&(Mt=!0);else return t.lanes=e.lanes,fn(e,t,i);return $f(e,t,n,r,i)}function mf(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},Ll(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Ll(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Ll(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ll(t,r);return We(e,t,o,n),t.child}function XS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function $f(e,t,n,r,o){var i=qe(n)?Br:Oe.current;return i=jo(t,i),Ao(t,o),n=jp(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,fn(e,t,o)):(t.flags|=1,We(e,t,n,o),t.child)}function Cv(e,t,n,r,o){if(qe(n)){var i=!0;Dl(t)}else i=!1;if(Ao(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),jS(t,n,r),zf(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=wt(u):(u=qe(n)?Br:Oe.current,u=jo(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&mv(t,s,r,u),Vn=!1;var d=t.memoizedState;s.state=d,As(t,r,s,o),l=t.memoizedState,a!==r||d!==l||$e.current||Vn?(typeof c=="function"&&(eu(t,n,c,r),l=t.memoizedState),(a=Vn||pv(t,n,a,r,d,l,u))?(p||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,DS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Nt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=wt(l):(l=qe(n)?Br:Oe.current,l=jo(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&mv(t,s,r,l),Vn=!1,d=t.memoizedState,s.state=d,As(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||$e.current||Vn?(typeof h=="function"&&(eu(t,n,h,r),v=t.memoizedState),(u=Vn||pv(t,n,u,r,d,v,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=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=v),s.props=r,s.state=v,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 qf(e,t,n,r,i,o)}function qf(e,t,n,r,o,i){XS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&lv(t,n,!1),fn(e,t,i);r=t.stateNode,Sb.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=tu(t,e.child,null,i),t.child=tu(t,null,a,i)):We(e,t,a,i),t.memoizedState=r.state,o&&lv(t,n,!0),t.child}function Tv(e){var t=e.stateNode;t.pendingContext?av(e,t.pendingContext,t.pendingContext!==t.context):t.context&&av(e,t.context,!1),Vf(e,t.containerInfo)}var Il={dehydrated:null,retryLane:0};function _v(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&&Kf(t),e=r.children,o=r.fallback,i?(e=bv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Il,e):typeof r.unstable_expectedLoadTime=="number"?(e=bv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Il,t.lanes=33554432,e):(n=Gp({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=kv(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=Il,r):(n=Pv(e,t,r.children,n),t.memoizedState=null,n):i?(r=kv(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=Il,r):(n=Pv(e,t,r.children,n),t.memoizedState=null,n)}function bv(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=Gp(t,o,0,null),n=Do(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Pv(e,t,n,r){var o=e.child;return e=o.sibling,n=sr(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 kv(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=sr(s,a),e!==null?r=sr(e,r):(r=Do(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Rv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),MS(e.return,t)}function gf(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 Iv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(We(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&&Rv(e,n);else if(e.tag===19)Rv(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&&nu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),gf(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&&nu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}gf(t,!0,n,null,i,t.lastEffect);break;case"together":gf(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Hs|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(b(153));if(t.child!==null){for(e=t.child,n=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var YS,Gf,ZS,JS;YS=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}};Gf=function(){};ZS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Fr(Xt.current);var i=null;switch(n){case"input":o=xf(e,o),r=xf(e,r),i=[];break;case"option":o=Tf(e,o),r=Tf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=_f(e,o),r=_f(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gl)}kf(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"&&(Es.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"&&(Es.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===mp?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};JS=function(e,t,n,r){n!==r&&(t.flags|=4)};function ns(e,t){if(!Yt)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 wb(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 qe(t.type)&&Xl(),null;case 3:return Bo(),se($e),se(Oe),Dp(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Gf(t),null;case 5:Mp(t);var o=Fr(Ns.current);if(n=t.type,e!==null&&t.stateNode!=null)ZS(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(b(166));return null}if(e=Fr(Xt.current),Rl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[$n]=t,r[Ql]=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<as.length;e++)ie(as[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":Ay(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Ny(r,i),ie("invalid",r)}kf(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]):Es.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":wl(r),Oy(r,i,!0);break;case"textarea":wl(r),My(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Gl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===bf.html&&(e=$v(n)),e===bf.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[$n]=t,e[Ql]=r,YS(e,t,!1,!1),t.stateNode=e,s=Rf(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<as.length;o++)ie(as[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":Ay(e,r),o=xf(e,r),ie("invalid",e);break;case"option":o=Tf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Ny(e,r),o=_f(e,r),ie("invalid",e);break;default:o=r}kf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Qv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&qv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Cs(e,l):typeof l=="number"&&Cs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Es.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&lp(e,i,l,s))}switch(n){case"input":wl(e),Oy(e,r,!1);break;case"textarea":wl(e),My(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ko(e,!!r.multiple,i,!1):r.defaultValue!=null&&ko(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Gl)}bS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)JS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(b(166));n=Fr(Ns.current),Fr(Xt.current),Rl(t)?(r=t.stateNode,n=t.memoizedProps,r[$n]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=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&&Rl(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||ce.current&1?be===0&&(be=3):((be===0||be===3)&&(be=4),He===null||!(Hs&134217727)&&!(Ko&134217727)||No(He,Ae))),(r||n)&&(t.flags|=4),null);case 4:return Bo(),Gf(t),e===null&&CS(t.stateNode.containerInfo),null;case 10:return Op(t),null;case 17:return qe(t.type)&&Xl(),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)ns(r,!1);else{if(be!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=nu(e),s!==null){for(t.flags|=64,ns(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&&Le()>ep&&(t.flags|=64,i=!0,ns(r,!1),t.lanes=33554432)}else{if(!i)if(e=nu(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ns(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Yt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Le()-r.renderingStartTime>ep&&n!==1073741824&&(t.flags|=64,i=!0,ns(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=Le(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return $p(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(b(156,t.tag))}function xb(e){switch(e.tag){case 1:qe(e.type)&&Xl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Bo(),se($e),se(Oe),Dp(),t=e.flags,t&64)throw Error(b(285));return e.flags=t&-4097|64,e;case 5:return Mp(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 Bo(),null;case 10:return Op(e),null;case 23:case 24:return $p(),null;default:return null}}function zp(e,t){try{var n="",r=t;do n+=t_(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{Zd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ls(e):""}function tb(e){switch(e.tag){case 5:return ls(e.type);case 16:return ls("Lazy");case 13:return ls("Suspense");case 19:return ls("SuspenseList");case 0:case 2:case 15:return e=xl(e.type,!1),e;case 11:return e=xl(e.type.render,!1),e;case 22:return e=xl(e.type._render,!1),e;case 1:return e=xl(e.type,!0),e;default:return""}}function ko(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 Kn:return"Fragment";case Mr:return"Portal";case fs:return"Profiler";case up:return"StrictMode";case ps:return"Suspense";case Vl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case dp:return(e.displayName||"Context")+".Consumer";case cp:return(e._context.displayName||"Context")+".Provider";case pu:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case mu:return ko(e.type);case pp:return ko(e._render);case fp:t=e._payload,e=e._init;try{return ko(e(t))}catch{}}return null}function nr(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Uv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nb(e){var t=Uv(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 _l(e){e._valueTracker||(e._valueTracker=nb(e))}function Vv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Uv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Kl(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 _f(e,t){var n=t.checked;return ae({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ay(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=nr(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 Kv(e,t){t=t.checked,t!=null&&lp(e,"checked",t,!1)}function wf(e,t){Kv(e,t);var n=nr(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")?Ef(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ef(e,t.type,nr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oy(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 Ef(e,t,n){(t!=="number"||Kl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function rb(e){var t="";return fu.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function Cf(e,t){return e=ae({children:void 0},t),(t=rb(t.children))&&(e.children=t),e}function Po(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=""+nr(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 bf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ae({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ny(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:nr(n)}}function Wv(e,t){var n=nr(t.value),r=nr(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 My(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var Tf={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function $v(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 kf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?$v(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wl,qv=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!==Tf.svg||"innerHTML"in e)e.innerHTML=t;else{for(wl=wl||document.createElement("div"),wl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ms={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},ob=["Webkit","ms","Moz","O"];Object.keys(ms).forEach(function(e){ob.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ms[t]=ms[e]})});function Gv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ms.hasOwnProperty(e)&&ms[e]?(""+t).trim():t+"px"}function Xv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Gv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ib=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 Pf(e,t){if(t){if(ib[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 If(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 hp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Rf=null,Io=null,Ro=null;function Dy(e){if(e=Bs(e)){if(typeof Rf!="function")throw Error(T(280));var t=e.stateNode;t&&(t=xu(t),Rf(e.stateNode,e.type,t))}}function Qv(e){Io?Ro?Ro.push(e):Ro=[e]:Io=e}function Yv(){if(Io){var e=Io,t=Ro;if(Ro=Io=null,Dy(e),t)for(e=0;e<t.length;e++)Dy(t[e])}}function yp(e,t){return e(t)}function Zv(e,t,n,r,o){return e(t,n,r,o)}function vp(){}var Jv=yp,Dr=!1,Jd=!1;function Sp(){(Io!==null||Ro!==null)&&(vp(),Yv())}function sb(e,t,n){if(Jd)return e(t,n);Jd=!0;try{return Jv(e,t,n)}finally{Jd=!1,Sp()}}function Ts(e,t){var n=e.stateNode;if(n===null)return null;var r=xu(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 Lf=!1;if(mn)try{yo={},Object.defineProperty(yo,"passive",{get:function(){Lf=!0}}),window.addEventListener("test",yo,yo),window.removeEventListener("test",yo,yo)}catch{Lf=!1}var yo;function ab(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 gs=!1,Wl=null,$l=!1,Af=null,lb={onError:function(e){gs=!0,Wl=e}};function ub(e,t,n,r,o,i,s,a,l){gs=!1,Wl=null,ab.apply(lb,arguments)}function cb(e,t,n,r,o,i,s,a,l){if(ub.apply(this,arguments),gs){if(gs){var u=Wl;gs=!1,Wl=null}else throw Error(T(198));$l||($l=!0,Af=u)}}function $r(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 eS(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 Fy(e){if($r(e)!==e)throw Error(T(188))}function db(e){var t=e.alternate;if(!t){if(t=$r(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 Fy(o),e;if(i===r)return Fy(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 tS(e){if(e=db(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 jy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var nS,xp,rS,oS,Of=!1,qt=[],Gn=null,Xn=null,Qn=null,ks=new Map,Ps=new Map,Qi=[],By="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 Nf(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Hy(e,t){switch(e){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Xn=null;break;case"mouseover":case"mouseout":Qn=null;break;case"pointerover":case"pointerout":ks.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ps.delete(t.pointerId)}}function Yi(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Nf(t,n,r,o,i),t!==null&&(t=Bs(t),t!==null&&xp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function fb(e,t,n,r,o){switch(t){case"focusin":return Gn=Yi(Gn,e,t,n,r,o),!0;case"dragenter":return Xn=Yi(Xn,e,t,n,r,o),!0;case"mouseover":return Qn=Yi(Qn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ks.set(i,Yi(ks.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ps.set(i,Yi(Ps.get(i)||null,e,t,n,r,o)),!0}return!1}function pb(e){var t=Fr(e.target);if(t!==null){var n=$r(t);if(n!==null){if(t=n.tag,t===13){if(t=eS(n),t!==null){e.blockedOn=t,oS(e.lanePriority,function(){xe.unstable_runWithPriority(e.priority,function(){rS(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ol(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Bs(n),t!==null&&xp(t),e.blockedOn=n,!1;t.shift()}return!0}function zy(e,t,n){Ol(e)&&n.delete(t)}function mb(){for(Of=!1;0<qt.length;){var e=qt[0];if(e.blockedOn!==null){e=Bs(e.blockedOn),e!==null&&nS(e);break}for(var t=e.targetContainers;0<t.length;){var n=Cp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&qt.shift()}Gn!==null&&Ol(Gn)&&(Gn=null),Xn!==null&&Ol(Xn)&&(Xn=null),Qn!==null&&Ol(Qn)&&(Qn=null),ks.forEach(zy),Ps.forEach(zy)}function Zi(e,t){e.blockedOn===t&&(e.blockedOn=null,Of||(Of=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,mb)))}function iS(e){function t(o){return Zi(o,e)}if(0<qt.length){Zi(qt[0],e);for(var n=1;n<qt.length;n++){var r=qt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Gn!==null&&Zi(Gn,e),Xn!==null&&Zi(Xn,e),Qn!==null&&Zi(Qn,e),ks.forEach(t),Ps.forEach(t),n=0;n<Qi.length;n++)r=Qi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qi.length&&(n=Qi[0],n.blockedOn===null);)pb(n),n.blockedOn===null&&Qi.shift()}function El(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _o={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionend:El("Transition","TransitionEnd")},ef={},sS={};mn&&(sS=document.createElement("div").style,"AnimationEvent"in window||(delete _o.animationend.animation,delete _o.animationiteration.animation,delete _o.animationstart.animation),"TransitionEvent"in window||delete _o.transitionend.transition);function gu(e){if(ef[e])return ef[e];if(!_o[e])return e;var t=_o[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sS)return ef[e]=t[n];return e}var aS=gu("animationend"),lS=gu("animationiteration"),uS=gu("animationstart"),cS=gu("transitionend"),dS=new Map,_p=new Map,gb=["abort","abort",aS,"animationEnd",lS,"animationIteration",uS,"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",cS,"transitionEnd","waiting","waiting"];function wp(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)),_p.set(r,t),dS.set(r,o),Kr(o,[r])}}var hb=xe.unstable_now;hb();var ne=8;function So(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 yb(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 vb(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 Is(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=So(l),o=ne):(a&=i,a!==0&&(r=So(a),o=ne))}else i=n&~s,i!==0?(r=So(i),o=ne):a!==0&&(r=So(a),o=ne);if(r===0)return 0;if(r=31-rr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(So(t),o<=ne)return t;ne=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-rr(t),o=1<<n,r|=e[n],t&=~o;return r}function fS(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function ql(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=xo(24&~t),e===0?ql(10,t):e;case 10:return e=xo(192&~t),e===0?ql(8,t):e;case 8:return e=xo(3584&~t),e===0&&(e=xo(4186112&~t),e===0&&(e=512)),e;case 2:return t=xo(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function xo(e){return e&-e}function tf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function hu(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-rr(t),e[t]=n}var rr=Math.clz32?Math.clz32:_b,Sb=Math.log,xb=Math.LN2;function _b(e){return e===0?32:31-(Sb(e)/xb|0)|0}var wb=xe.unstable_UserBlockingPriority,Eb=xe.unstable_runWithPriority,Nl=!0;function Cb(e,t,n,r){Dr||vp();var o=Ep,i=Dr;Dr=!0;try{Zv(o,e,t,n,r)}finally{(Dr=i)||Sp()}}function bb(e,t,n,r){Eb(wb,Ep.bind(null,e,t,n,r))}function Ep(e,t,n,r){if(Nl){var o;if((o=(t&4)===0)&&0<qt.length&&-1<By.indexOf(e))e=Nf(null,e,t,n,r),qt.push(e);else{var i=Cp(e,t,n,r);if(i===null)o&&Hy(e,r);else{if(o){if(-1<By.indexOf(e)){e=Nf(i,e,t,n,r),qt.push(e);return}if(fb(i,e,t,n,r))return;Hy(e,r)}bS(e,t,r,null,n)}}}}function Cp(e,t,n,r){var o=hp(r);if(o=Fr(o),o!==null){var i=$r(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=eS(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 bS(e,t,r,o,n),null}var Wn=null,bp=null,Ml=null;function pS(){if(Ml)return Ml;var e,t=bp,n=t.length,r,o="value"in Wn?Wn.value:Wn.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 Ml=o.slice(e,1<r?1-r:void 0)}function Dl(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 Cl(){return!0}function Uy(){return!1}function nt(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)?Cl:Uy,this.isPropagationStopped=Uy,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=Cl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Cl)},persist:function(){},isPersistent:Cl}),t}var zo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Tp=nt(zo),js=ae({},zo,{view:0,detail:0}),Tb=nt(js),nf,rf,Ji,yu=ae({},js,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kp,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!==Ji&&(Ji&&e.type==="mousemove"?(nf=e.screenX-Ji.screenX,rf=e.screenY-Ji.screenY):rf=nf=0,Ji=e),nf)},movementY:function(e){return"movementY"in e?e.movementY:rf}}),Vy=nt(yu),kb=ae({},yu,{dataTransfer:0}),Pb=nt(kb),Ib=ae({},js,{relatedTarget:0}),of=nt(Ib),Rb=ae({},zo,{animationName:0,elapsedTime:0,pseudoElement:0}),Lb=nt(Rb),Ab=ae({},zo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ob=nt(Ab),Nb=ae({},zo,{data:0}),Ky=nt(Nb),Mb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Db={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"},Fb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fb[e])?!!t[e]:!1}function kp(){return jb}var Bb=ae({},js,{key:function(e){if(e.key){var t=Mb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Db[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kp,charCode:function(e){return e.type==="keypress"?Dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hb=nt(Bb),zb=ae({},yu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wy=nt(zb),Ub=ae({},js,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kp}),Vb=nt(Ub),Kb=ae({},zo,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wb=nt(Kb),$b=ae({},yu,{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}),qb=nt($b),Gb=[9,13,27,32],Pp=mn&&"CompositionEvent"in window,hs=null;mn&&"documentMode"in document&&(hs=document.documentMode);var Xb=mn&&"TextEvent"in window&&!hs,mS=mn&&(!Pp||hs&&8<hs&&11>=hs),$y=String.fromCharCode(32),qy=!1;function gS(e,t){switch(e){case"keyup":return Gb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wo=!1;function Qb(e,t){switch(e){case"compositionend":return hS(t);case"keypress":return t.which!==32?null:(qy=!0,$y);case"textInput":return e=t.data,e===$y&&qy?null:e;default:return null}}function Yb(e,t){if(wo)return e==="compositionend"||!Pp&&gS(e,t)?(e=pS(),Ml=bp=Wn=null,wo=!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 mS&&t.locale!=="ko"?null:t.data;default:return null}}var Zb={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 Gy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zb[e.type]:t==="textarea"}function yS(e,t,n,r){Qv(r),t=Gl(t,"onChange"),0<t.length&&(n=new Tp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ys=null,Rs=null;function Jb(e){wS(e,0)}function vu(e){var t=Co(e);if(Vv(t))return e}function eT(e,t){if(e==="change")return t}var vS=!1;mn&&(mn?(Tl="oninput"in document,Tl||(sf=document.createElement("div"),sf.setAttribute("oninput","return;"),Tl=typeof sf.oninput=="function"),bl=Tl):bl=!1,vS=bl&&(!document.documentMode||9<document.documentMode));var bl,Tl,sf;function Xy(){ys&&(ys.detachEvent("onpropertychange",SS),Rs=ys=null)}function SS(e){if(e.propertyName==="value"&&vu(Rs)){var t=[];if(yS(t,Rs,e,hp(e)),e=Jb,Dr)e(t);else{Dr=!0;try{yp(e,t)}finally{Dr=!1,Sp()}}}}function tT(e,t,n){e==="focusin"?(Xy(),ys=t,Rs=n,ys.attachEvent("onpropertychange",SS)):e==="focusout"&&Xy()}function nT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vu(Rs)}function rT(e,t){if(e==="click")return vu(t)}function oT(e,t){if(e==="input"||e==="change")return vu(t)}function iT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:iT,sT=Object.prototype.hasOwnProperty;function Ls(e,t){if(yt(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(!sT.call(t,n[r])||!yt(e[n[r]],t[n[r]]))return!1;return!0}function Qy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yy(e,t){var n=Qy(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=Qy(n)}}function xS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zy(){for(var e=window,t=Kl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Kl(e.document)}return t}function Mf(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 aT=mn&&"documentMode"in document&&11>=document.documentMode,Eo=null,Df=null,vs=null,Ff=!1;function Jy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ff||Eo==null||Eo!==Kl(r)||(r=Eo,"selectionStart"in r&&Mf(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}),vs&&Ls(vs,r)||(vs=r,r=Gl(Df,"onSelect"),0<r.length&&(t=new Tp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Eo)))}wp("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);wp("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);wp(gb,2);for(af="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),kl=0;kl<af.length;kl++)_p.set(af[kl],0);var af,kl;Fo("onMouseEnter",["mouseout","mouseover"]);Fo("onMouseLeave",["mouseout","mouseover"]);Fo("onPointerEnter",["pointerout","pointerover"]);Fo("onPointerLeave",["pointerout","pointerover"]);Kr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Kr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Kr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Kr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Kr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Kr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_S=new Set("cancel close invalid load scroll toggle".split(" ").concat(us));function ev(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,cb(r,t,void 0,e),e.currentTarget=null}function wS(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;ev(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;ev(o,a,u),i=l}}}if($l)throw e=Af,$l=!1,Af=null,e}function ie(e,t){var n=kS(t),r=e+"__bubble";n.has(r)||(CS(t,e,2,!1),n.add(r))}var tv="_reactListening"+Math.random().toString(36).slice(2);function ES(e){e[tv]||(e[tv]=!0,Hv.forEach(function(t){_S.has(t)||nv(t,!1,e,null),nv(t,!0,e,null)}))}function nv(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&&_S.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=kS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),CS(i,e,o,t),s.add(a))}function CS(e,t,n,r){var o=_p.get(t);switch(o===void 0?2:o){case 0:o=Cb;break;case 1:o=bb;break;default:o=Ep}n=o.bind(null,t,n,e),o=void 0,!Lf||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 bS(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=Fr(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}sb(function(){var u=i,c=hp(n),p=[];e:{var d=dS.get(e);if(d!==void 0){var h=Tp,v=e;switch(e){case"keypress":if(Dl(n)===0)break e;case"keydown":case"keyup":h=Hb;break;case"focusin":v="focus",h=of;break;case"focusout":v="blur",h=of;break;case"beforeblur":case"afterblur":h=of;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":h=Vy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Pb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=Vb;break;case aS:case lS:case uS:h=Lb;break;case cS:h=Wb;break;case"scroll":h=Tb;break;case"wheel":h=qb;break;case"copy":case"cut":case"paste":h=Ob;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Wy}var y=(t&4)!==0,g=!y&&e==="scroll",m=y?d!==null?d+"Capture":null:d;y=[];for(var f=u,x;f!==null;){x=f;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,m!==null&&(_=Ts(f,m),_!=null&&y.push(As(f,_,x)))),g)break;f=f.return}0<y.length&&(d=new h(d,v,null,n,c),p.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(Fr(v)||v[Uo]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?Fr(v):null,v!==null&&(g=$r(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=u),h!==v)){if(y=Vy,_="onMouseLeave",m="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(y=Wy,_="onPointerLeave",m="onPointerEnter",f="pointer"),g=h==null?d:Co(h),x=v==null?d:Co(v),d=new y(_,f+"leave",h,n,c),d.target=g,d.relatedTarget=x,_=null,Fr(c)===u&&(y=new y(m,f+"enter",v,n,c),y.target=x,y.relatedTarget=g,_=y),g=_,h&&v)t:{for(y=h,m=v,f=0,x=y;x;x=vo(x))f++;for(x=0,_=m;_;_=vo(_))x++;for(;0<f-x;)y=vo(y),f--;for(;0<x-f;)m=vo(m),x--;for(;f--;){if(y===m||m!==null&&y===m.alternate)break t;y=vo(y),m=vo(m)}y=null}else y=null;h!==null&&rv(p,d,h,y,!1),v!==null&&g!==null&&rv(p,g,v,y,!0)}}e:{if(d=u?Co(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var C=eT;else if(Gy(d))if(vS)C=oT;else{C=nT;var w=tT}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=rT);if(C&&(C=C(e,u))){yS(p,C,n,c);break e}w&&w(e,d,u),e==="focusout"&&(w=d._wrapperState)&&w.controlled&&d.type==="number"&&Ef(d,"number",d.value)}switch(w=u?Co(u):window,e){case"focusin":(Gy(w)||w.contentEditable==="true")&&(Eo=w,Df=u,vs=null);break;case"focusout":vs=Df=Eo=null;break;case"mousedown":Ff=!0;break;case"contextmenu":case"mouseup":case"dragend":Ff=!1,Jy(p,n,c);break;case"selectionchange":if(aT)break;case"keydown":case"keyup":Jy(p,n,c)}var b;if(Pp)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else wo?gS(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(mS&&n.locale!=="ko"&&(wo||I!=="onCompositionStart"?I==="onCompositionEnd"&&wo&&(b=pS()):(Wn=c,bp="value"in Wn?Wn.value:Wn.textContent,wo=!0)),w=Gl(u,I),0<w.length&&(I=new Ky(I,e,null,n,c),p.push({event:I,listeners:w}),b?I.data=b:(b=hS(n),b!==null&&(I.data=b)))),(b=Xb?Qb(e,n):Yb(e,n))&&(u=Gl(u,"onBeforeInput"),0<u.length&&(c=new Ky("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=b))}wS(p,t)})}function As(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ts(e,n),i!=null&&r.unshift(As(e,i,o)),i=Ts(e,t),i!=null&&r.push(As(e,i,o))),e=e.return}return r}function vo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rv(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=Ts(n,i),l!=null&&s.unshift(As(n,l,a))):o||(l=Ts(n,i),l!=null&&s.push(As(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Xl(){}var lf=null,uf=null;function TS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function jf(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 ov=typeof setTimeout=="function"?setTimeout:void 0,lT=typeof clearTimeout=="function"?clearTimeout:void 0;function Ip(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Lo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function iv(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 cf=0;function uT(e){return{$$typeof:mp,toString:e,valueOf:e}}var Su=Math.random().toString(36).slice(2),$n="__reactFiber$"+Su,Ql="__reactProps$"+Su,Uo="__reactContainer$"+Su,sv="__reactEvents$"+Su;function Fr(e){var t=e[$n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Uo]||n[$n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=iv(e);e!==null;){if(n=e[$n])return n;e=iv(e)}return t}e=n,n=e.parentNode}return null}function Bs(e){return e=e[$n]||e[Uo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Co(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function xu(e){return e[Ql]||null}function kS(e){var t=e[sv];return t===void 0&&(t=e[sv]=new Set),t}var Bf=[],bo=-1;function ar(e){return{current:e}}function se(e){0>bo||(e.current=Bf[bo],Bf[bo]=null,bo--)}function de(e,t){bo++,Bf[bo]=e.current,e.current=t}var or={},Oe=ar(or),$e=ar(!1),zr=or;function jo(e,t){var n=e.type.contextTypes;if(!n)return or;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 qe(e){return e=e.childContextTypes,e!=null}function Yl(){se($e),se(Oe)}function av(e,t,n){if(Oe.current!==or)throw Error(T(168));de(Oe,t),de($e,n)}function PS(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,ko(t)||"Unknown",o));return ae({},n,r)}function Fl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||or,zr=Oe.current,de(Oe,e),de($e,$e.current),!0}function lv(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=PS(e,t,zr),r.__reactInternalMemoizedMergedChildContext=e,se($e),se(Oe),de(Oe,e)):se($e),de($e,n)}var Rp=null,Hr=null,cT=xe.unstable_runWithPriority,Lp=xe.unstable_scheduleCallback,Hf=xe.unstable_cancelCallback,dT=xe.unstable_shouldYield,uv=xe.unstable_requestPaint,zf=xe.unstable_now,fT=xe.unstable_getCurrentPriorityLevel,_u=xe.unstable_ImmediatePriority,IS=xe.unstable_UserBlockingPriority,RS=xe.unstable_NormalPriority,LS=xe.unstable_LowPriority,AS=xe.unstable_IdlePriority,df={},pT=uv!==void 0?uv:function(){},un=null,jl=null,ff=!1,cv=zf(),Le=1e4>cv?zf:function(){return zf()-cv};function Bo(){switch(fT()){case _u:return 99;case IS:return 98;case RS:return 97;case LS:return 96;case AS:return 95;default:throw Error(T(332))}}function OS(e){switch(e){case 99:return _u;case 98:return IS;case 97:return RS;case 96:return LS;case 95:return AS;default:throw Error(T(332))}}function Ur(e,t){return e=OS(e),cT(e,t)}function Os(e,t,n){return e=OS(e),Lp(e,t,n)}function Zt(){if(jl!==null){var e=jl;jl=null,Hf(e)}NS()}function NS(){if(!ff&&un!==null){ff=!0;var e=0;try{var t=un;Ur(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),un=null}catch(n){throw un!==null&&(un=un.slice(e+1)),Lp(_u,Zt),n}finally{ff=!1}}}var mT=Wr.ReactCurrentBatchConfig;function Nt(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 Zl=ar(null),Jl=null,To=null,eu=null;function Ap(){eu=To=Jl=null}function Op(e){var t=Zl.current;se(Zl),e.type._context._currentValue=t}function MS(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 Ao(e,t){Jl=e,eu=To=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function xt(e,t){if(eu!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(eu=e,t=1073741823),t={context:e,observedBits:t,next:null},To===null){if(Jl===null)throw Error(T(308));To=t,Jl.dependencies={lanes:0,firstContext:t,responders:null}}else To=To.next=t;return e._currentValue}var Vn=!1;function Np(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function DS(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 Yn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Zn(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 dv(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 Ns(e,t,n,r){var o=e.updateQueue;Vn=!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 p=c.lastBaseUpdate;p!==s&&(p===null?c.firstBaseUpdate=u:p.next=u,c.lastBaseUpdate=l)}}if(i!==null){p=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 h=e,v=i;switch(a=t,d=n,v.tag){case 1:if(h=v.payload,typeof h=="function"){p=h.call(d,p,a);break e}p=h;break e;case 3:h.flags=h.flags&-4097|64;case 0:if(h=v.payload,a=typeof h=="function"?h.call(d,p,a):h,a==null)break e;p=ae({},p,a);break e;case 2:Vn=!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=p):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=p),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,zs|=s,e.lanes=s,e.memoizedState=p}}function fv(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 FS=new fu.Component().refs;function tu(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 wu={isMounted:function(e){return(e=e._reactInternals)?$r(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Jn(e),i=Yn(r,o);i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Jn(e),i=Yn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Zn(e,i),er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tt(),r=Jn(e),o=Yn(n,r);o.tag=2,t!=null&&(o.callback=t),Zn(e,o),er(e,r,n)}};function pv(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?!Ls(n,r)||!Ls(o,i):!0}function jS(e,t,n){var r=!1,o=or,i=t.contextType;return typeof i=="object"&&i!==null?i=xt(i):(o=qe(t)?zr:Oe.current,r=t.contextTypes,i=(r=r!=null)?jo(e,o):or),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function mv(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&&wu.enqueueReplaceState(t,t.state,null)}function Uf(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=FS,Np(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=xt(i):(i=qe(t)?zr:Oe.current,o.context=jo(e,i)),Ns(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(tu(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&&wu.enqueueReplaceState(o,o.state,null),Ns(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Pl=Array.isArray;function es(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===FS&&(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 Il(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 BS(e){function t(g,m){if(e){var f=g.lastEffect;f!==null?(f.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=sr(g,m),g.index=0,g.sibling=null,g}function i(g,m,f){return g.index=f,e?(f=g.alternate,f!==null?(f=f.index,f<m?(g.flags=2,m):f):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,f,x){return m===null||m.tag!==6?(m=yf(f,g.mode,x),m.return=g,m):(m=o(m,f),m.return=g,m)}function l(g,m,f,x){return m!==null&&m.elementType===f.type?(x=o(m,f.props),x.ref=es(g,m,f),x.return=g,x):(x=Ul(f.type,f.key,f.props,null,g.mode,x),x.ref=es(g,m,f),x.return=g,x)}function u(g,m,f,x){return m===null||m.tag!==4||m.stateNode.containerInfo!==f.containerInfo||m.stateNode.implementation!==f.implementation?(m=vf(f,g.mode,x),m.return=g,m):(m=o(m,f.children||[]),m.return=g,m)}function c(g,m,f,x,_){return m===null||m.tag!==7?(m=Do(f,g.mode,x,_),m.return=g,m):(m=o(m,f),m.return=g,m)}function p(g,m,f){if(typeof m=="string"||typeof m=="number")return m=yf(""+m,g.mode,f),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case as:return f=Ul(m.type,m.key,m.props,null,g.mode,f),f.ref=es(g,null,m),f.return=g,f;case Mr:return m=vf(m,g.mode,f),m.return=g,m}if(Pl(m)||Xi(m))return m=Do(m,g.mode,f,null),m.return=g,m;Il(g,m)}return null}function d(g,m,f,x){var _=m!==null?m.key:null;if(typeof f=="string"||typeof f=="number")return _!==null?null:a(g,m,""+f,x);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case as:return f.key===_?f.type===Kn?c(g,m,f.props.children,x,_):l(g,m,f,x):null;case Mr:return f.key===_?u(g,m,f,x):null}if(Pl(f)||Xi(f))return _!==null?null:c(g,m,f,x,null);Il(g,f)}return null}function h(g,m,f,x,_){if(typeof x=="string"||typeof x=="number")return g=g.get(f)||null,a(m,g,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case as:return g=g.get(x.key===null?f:x.key)||null,x.type===Kn?c(m,g,x.props.children,_,x.key):l(m,g,x,_);case Mr:return g=g.get(x.key===null?f:x.key)||null,u(m,g,x,_)}if(Pl(x)||Xi(x))return g=g.get(f)||null,c(m,g,x,_,null);Il(m,x)}return null}function v(g,m,f,x){for(var _=null,C=null,w=m,b=m=0,I=null;w!==null&&b<f.length;b++){w.index>b?(I=w,w=null):I=w.sibling;var P=d(g,w,f[b],x);if(P===null){w===null&&(w=I);break}e&&w&&P.alternate===null&&t(g,w),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P,w=I}if(b===f.length)return n(g,w),_;if(w===null){for(;b<f.length;b++)w=p(g,f[b],x),w!==null&&(m=i(w,m,b),C===null?_=w:C.sibling=w,C=w);return _}for(w=r(g,w);b<f.length;b++)I=h(w,g,b,f[b],x),I!==null&&(e&&I.alternate!==null&&w.delete(I.key===null?b:I.key),m=i(I,m,b),C===null?_=I:C.sibling=I,C=I);return e&&w.forEach(function(N){return t(g,N)}),_}function y(g,m,f,x){var _=Xi(f);if(typeof _!="function")throw Error(T(150));if(f=_.call(f),f==null)throw Error(T(151));for(var C=_=null,w=m,b=m=0,I=null,P=f.next();w!==null&&!P.done;b++,P=f.next()){w.index>b?(I=w,w=null):I=w.sibling;var N=d(g,w,P.value,x);if(N===null){w===null&&(w=I);break}e&&w&&N.alternate===null&&t(g,w),m=i(N,m,b),C===null?_=N:C.sibling=N,C=N,w=I}if(P.done)return n(g,w),_;if(w===null){for(;!P.done;b++,P=f.next())P=p(g,P.value,x),P!==null&&(m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return _}for(w=r(g,w);!P.done;b++,P=f.next())P=h(w,g,b,P.value,x),P!==null&&(e&&P.alternate!==null&&w.delete(P.key===null?b:P.key),m=i(P,m,b),C===null?_=P:C.sibling=P,C=P);return e&&w.forEach(function(Q){return t(g,Q)}),_}return function(g,m,f,x){var _=typeof f=="object"&&f!==null&&f.type===Kn&&f.key===null;_&&(f=f.props.children);var C=typeof f=="object"&&f!==null;if(C)switch(f.$$typeof){case as:e:{for(C=f.key,_=m;_!==null;){if(_.key===C){switch(_.tag){case 7:if(f.type===Kn){n(g,_.sibling),m=o(_,f.props.children),m.return=g,g=m;break e}break;default:if(_.elementType===f.type){n(g,_.sibling),m=o(_,f.props),m.ref=es(g,_,f),m.return=g,g=m;break e}}n(g,_);break}else t(g,_);_=_.sibling}f.type===Kn?(m=Do(f.props.children,g.mode,x,f.key),m.return=g,g=m):(x=Ul(f.type,f.key,f.props,null,g.mode,x),x.ref=es(g,m,f),x.return=g,g=x)}return s(g);case Mr:e:{for(_=f.key;m!==null;){if(m.key===_)if(m.tag===4&&m.stateNode.containerInfo===f.containerInfo&&m.stateNode.implementation===f.implementation){n(g,m.sibling),m=o(m,f.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=vf(f,g.mode,x),m.return=g,g=m}return s(g)}if(typeof f=="string"||typeof f=="number")return f=""+f,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,f),m.return=g,g=m):(n(g,m),m=yf(f,g.mode,x),m.return=g,g=m),s(g);if(Pl(f))return v(g,m,f,x);if(Xi(f))return y(g,m,f,x);if(C&&Il(g,f),typeof f>"u"&&!_)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,ko(g.type)||"Component"))}return n(g,m)}}var nu=BS(!0),HS=BS(!1),Hs={},Qt=ar(Hs),Ms=ar(Hs),Ds=ar(Hs);function jr(e){if(e===Hs)throw Error(T(174));return e}function Vf(e,t){switch(de(Ds,t),de(Ms,e),de(Qt,Hs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kf(t,e)}se(Qt),de(Qt,t)}function Ho(){se(Qt),se(Ms),se(Ds)}function gv(e){jr(Ds.current);var t=jr(Qt.current),n=kf(t,e.type);t!==n&&(de(Ms,e),de(Qt,n))}function Mp(e){Ms.current===e&&(se(Qt),se(Ms))}var ce=ar(0);function ru(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 dn=null,qn=null,Yt=!1;function zS(e,t){var n=vt(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 hv(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 Kf(e){if(Yt){var t=qn;if(t){var n=t;if(!hv(e,t)){if(t=Lo(n.nextSibling),!t||!hv(e,t)){e.flags=e.flags&-1025|2,Yt=!1,dn=e;return}zS(dn,n)}dn=e,qn=Lo(t.firstChild)}else e.flags=e.flags&-1025|2,Yt=!1,dn=e}}function yv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;dn=e}function Rl(e){if(e!==dn)return!1;if(!Yt)return yv(e),Yt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!jf(t,e.memoizedProps))for(t=qn;t;)zS(e,t),t=Lo(t.nextSibling);if(yv(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){qn=Lo(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qn=null}}else qn=dn?Lo(e.stateNode.nextSibling):null;return!0}function pf(){qn=dn=null,Yt=!1}var Oo=[];function Dp(){for(var e=0;e<Oo.length;e++)Oo[e]._workInProgressVersionPrimary=null;Oo.length=0}var Ss=Wr.ReactCurrentDispatcher,St=Wr.ReactCurrentBatchConfig,Fs=0,ge=null,Re=null,be=null,ou=!1,xs=!1;function Ke(){throw Error(T(321))}function Fp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function jp(e,t,n,r,o,i){if(Fs=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ss.current=e===null||e.memoizedState===null?hT:yT,e=n(r,o),xs){i=0;do{if(xs=!1,!(25>i))throw Error(T(301));i+=1,be=Re=null,t.updateQueue=null,Ss.current=vT,e=n(r,o)}while(xs)}if(Ss.current=lu,t=Re!==null&&Re.next!==null,Fs=0,be=Re=ge=null,ou=!1,t)throw Error(T(300));return e}function Br(){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 qr(){if(Re===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Re.next;var t=be===null?ge.memoizedState:be.next;if(t!==null)be=t,Re=e;else{if(e===null)throw Error(T(310));Re=e,e={memoizedState:Re.memoizedState,baseState:Re.baseState,baseQueue:Re.baseQueue,queue:Re.queue,next:null},be===null?ge.memoizedState=be=e:be=be.next=e}return be}function Gt(e,t){return typeof t=="function"?t(e):t}function ts(e){var t=qr(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Re,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((Fs&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,zs|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,yt(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function ns(e){var t=qr(),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);yt(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function vv(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=(Fs&e)===e)&&(t._workInProgressVersionPrimary=r,Oo.push(t))),e)return n(t._source);throw Oo.push(t),Error(T(350))}function US(e,t,n,r){var o=Be;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=Ss.current,l=a.useState(function(){return vv(o,t,n)}),u=l[1],c=l[0];l=be;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,v=p.source;p=p.subscribe;var y=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(!yt(s,g)){g=n(t._source),yt(c,g)||(u(g),g=Jn(y),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,f=g;0<f;){var x=31-rr(f),_=1<<x;m[x]|=g,f&=~_}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var f=Jn(y);o.mutableReadLanes|=f&o.pendingLanes}catch(x){m(function(){throw x})}})},[t,r]),yt(h,n)&&yt(v,t)&&yt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Gt,lastRenderedState:c},e.dispatch=u=zp.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=vv(o,t,n),l.memoizedState=l.baseState=c),c}function VS(e,t,n){var r=qr();return US(r,e,t,n)}function rs(e){var t=Br();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Gt,lastRenderedState:e},e=e.dispatch=zp.bind(null,ge,e),[t.memoizedState,e]}function iu(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 Sv(e){var t=Br();return e={current:e},t.memoizedState=e}function su(){return qr().memoizedState}function Wf(e,t,n,r){var o=Br();ge.flags|=e,o.memoizedState=iu(1|t,n,void 0,r===void 0?null:r)}function Bp(e,t,n,r){var o=qr();r=r===void 0?null:r;var i=void 0;if(Re!==null){var s=Re.memoizedState;if(i=s.destroy,r!==null&&Fp(r,s.deps)){iu(t,n,i,r);return}}ge.flags|=e,o.memoizedState=iu(1|t,n,i,r)}function xv(e,t){return Wf(516,4,e,t)}function au(e,t){return Bp(516,4,e,t)}function KS(e,t){return Bp(4,2,e,t)}function WS(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 $S(e,t,n){return n=n!=null?n.concat([e]):null,Bp(4,2,WS.bind(null,t,e),n)}function Hp(){}function qS(e,t){var n=qr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function GS(e,t){var n=qr();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Fp(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function gT(e,t){var n=Bo();Ur(98>n?98:n,function(){e(!0)}),Ur(97<n?97:n,function(){var r=St.transition;St.transition=1;try{e(!1),t()}finally{St.transition=r}})}function zp(e,t,n){var r=tt(),o=Jn(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)xs=ou=!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,yt(l,a))return}catch{}finally{}er(e,o,r)}}var lu={readContext:xt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useOpaqueIdentifier:Ke,unstable_isNewReconciler:!1},hT={readContext:xt,useCallback:function(e,t){return Br().memoizedState=[e,t===void 0?null:t],e},useContext:xt,useEffect:xv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Wf(4,2,WS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Wf(4,2,e,t)},useMemo:function(e,t){var n=Br();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Br();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=zp.bind(null,ge,e),[r.memoizedState,e]},useRef:Sv,useState:rs,useDebugValue:Hp,useDeferredValue:function(e){var t=rs(e),n=t[0],r=t[1];return xv(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=rs(!1),t=e[0];return e=gT.bind(null,e[1]),Sv(e),[e,t]},useMutableSource:function(e,t,n){var r=Br();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},US(r,e,t,n)},useOpaqueIdentifier:function(){if(Yt){var e=!1,t=uT(function(){throw e||(e=!0,n("r:"+(cf++).toString(36))),Error(T(355))}),n=rs(t)[1];return!(ge.mode&2)&&(ge.flags|=516,iu(5,function(){n("r:"+(cf++).toString(36))},void 0,null)),t}return t="r:"+(cf++).toString(36),rs(t),t},unstable_isNewReconciler:!1},yT={readContext:xt,useCallback:qS,useContext:xt,useEffect:au,useImperativeHandle:$S,useLayoutEffect:KS,useMemo:GS,useReducer:ts,useRef:su,useState:function(){return ts(Gt)},useDebugValue:Hp,useDeferredValue:function(e){var t=ts(Gt),n=t[0],r=t[1];return au(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ts(Gt)[0];return[su().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return ts(Gt)[0]},unstable_isNewReconciler:!1},vT={readContext:xt,useCallback:qS,useContext:xt,useEffect:au,useImperativeHandle:$S,useLayoutEffect:KS,useMemo:GS,useReducer:ns,useRef:su,useState:function(){return ns(Gt)},useDebugValue:Hp,useDeferredValue:function(e){var t=ns(Gt),n=t[0],r=t[1];return au(function(){var o=St.transition;St.transition=1;try{r(e)}finally{St.transition=o}},[e]),n},useTransition:function(){var e=ns(Gt)[0];return[su().current,e]},useMutableSource:VS,useOpaqueIdentifier:function(){return ns(Gt)[0]},unstable_isNewReconciler:!1},ST=Wr.ReactCurrentOwner,Mt=!1;function We(e,t,n,r){t.child=e===null?HS(t,null,n,r):nu(t,e.child,n,r)}function _v(e,t,n,r,o){n=n.render;var i=t.ref;return Ao(t,o),r=jp(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,fn(e,t,o)):(t.flags|=1,We(e,t,r,o),t.child)}function wv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!qp(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,XS(e,t,s,r,o,i)):(e=Ul(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:Ls,n(o,r)&&e.ref===t.ref)?fn(e,t,i):(t.flags|=1,e=sr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function XS(e,t,n,r,o,i){if(e!==null&&Ls(e.memoizedProps,r)&&e.ref===t.ref)if(Mt=!1,(i&o)!==0)e.flags&16384&&(Mt=!0);else return t.lanes=e.lanes,fn(e,t,i);return $f(e,t,n,r,i)}function mf(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},Al(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},Al(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},Al(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Al(t,r);return We(e,t,o,n),t.child}function QS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function $f(e,t,n,r,o){var i=qe(n)?zr:Oe.current;return i=jo(t,i),Ao(t,o),n=jp(e,t,n,r,i,o),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,fn(e,t,o)):(t.flags|=1,We(e,t,n,o),t.child)}function Ev(e,t,n,r,o){if(qe(n)){var i=!0;Fl(t)}else i=!1;if(Ao(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),jS(t,n,r),Uf(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=xt(u):(u=qe(n)?zr:Oe.current,u=jo(t,u));var c=n.getDerivedStateFromProps,p=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";p||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&mv(t,s,r,u),Vn=!1;var d=t.memoizedState;s.state=d,Ns(t,r,s,o),l=t.memoizedState,a!==r||d!==l||$e.current||Vn?(typeof c=="function"&&(tu(t,n,c,r),l=t.memoizedState),(a=Vn||pv(t,n,a,r,d,l,u))?(p||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,DS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Nt(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=xt(l):(l=qe(n)?zr:Oe.current,l=jo(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&mv(t,s,r,l),Vn=!1,d=t.memoizedState,s.state=d,Ns(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||$e.current||Vn?(typeof h=="function"&&(tu(t,n,h,r),v=t.memoizedState),(u=Vn||pv(t,n,u,r,d,v,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,v,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,v,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=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=v),s.props=r,s.state=v,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 qf(e,t,n,r,i,o)}function qf(e,t,n,r,o,i){QS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&lv(t,n,!1),fn(e,t,i);r=t.stateNode,ST.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=nu(t,e.child,null,i),t.child=nu(t,null,a,i)):We(e,t,a,i),t.memoizedState=r.state,o&&lv(t,n,!0),t.child}function Cv(e){var t=e.stateNode;t.pendingContext?av(e,t.pendingContext,t.pendingContext!==t.context):t.context&&av(e,t.context,!1),Vf(e,t.containerInfo)}var Ll={dehydrated:null,retryLane:0};function bv(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&&Kf(t),e=r.children,o=r.fallback,i?(e=Tv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ll,e):typeof r.unstable_expectedLoadTime=="number"?(e=Tv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Ll,t.lanes=33554432,e):(n=Gp({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=Pv(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=Ll,r):(n=kv(e,t,r.children,n),t.memoizedState=null,n):i?(r=Pv(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=Ll,r):(n=kv(e,t,r.children,n),t.memoizedState=null,n)}function Tv(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=Gp(t,o,0,null),n=Do(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function kv(e,t,n,r){var o=e.child;return e=o.sibling,n=sr(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 Pv(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=sr(s,a),e!==null?r=sr(e,r):(r=Do(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Iv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),MS(e.return,t)}function gf(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 Rv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(We(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&&Iv(e,n);else if(e.tag===19)Iv(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&&ru(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),gf(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&&ru(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}gf(t,!0,n,null,i,t.lastEffect);break;case"together":gf(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function fn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),zs|=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=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var YS,Gf,ZS,JS;YS=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}};Gf=function(){};ZS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,jr(Qt.current);var i=null;switch(n){case"input":o=_f(e,o),r=_f(e,r),i=[];break;case"option":o=Cf(e,o),r=Cf(e,r),i=[];break;case"select":o=ae({},o,{value:void 0}),r=ae({},r,{value:void 0}),i=[];break;case"textarea":o=bf(e,o),r=bf(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Xl)}Pf(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"&&(Cs.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"&&(Cs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===mp?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};JS=function(e,t,n,r){n!==r&&(t.flags|=4)};function os(e,t){if(!Yt)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 xT(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 qe(t.type)&&Yl(),null;case 3:return Ho(),se($e),se(Oe),Dp(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Rl(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Gf(t),null;case 5:Mp(t);var o=jr(Ds.current);if(n=t.type,e!==null&&t.stateNode!=null)ZS(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=jr(Qt.current),Rl(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[$n]=t,r[Ql]=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<us.length;e++)ie(us[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":Ay(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":Ny(r,i),ie("invalid",r)}Pf(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]):Cs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":_l(r),Oy(r,i,!0);break;case"textarea":_l(r),My(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Xl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===Tf.html&&(e=$v(n)),e===Tf.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[$n]=t,e[Ql]=r,YS(e,t,!1,!1),t.stateNode=e,s=If(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<us.length;o++)ie(us[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":Ay(e,r),o=_f(e,r),ie("invalid",e);break;case"option":o=Cf(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ae({},r,{value:void 0}),ie("invalid",e);break;case"textarea":Ny(e,r),o=bf(e,r),ie("invalid",e);break;default:o=r}Pf(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Xv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&qv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&bs(e,l):typeof l=="number"&&bs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Cs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&lp(e,i,l,s))}switch(n){case"input":_l(e),Oy(e,r,!1);break;case"textarea":_l(e),My(e);break;case"option":r.value!=null&&e.setAttribute("value",""+nr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Po(e,!!r.multiple,i,!1):r.defaultValue!=null&&Po(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Xl)}TS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)JS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=jr(Ds.current),jr(Qt.current),Rl(t)?(r=t.stateNode,n=t.memoizedProps,r[$n]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[$n]=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&&Rl(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||!(zs&134217727)&&!(Ko&134217727)||No(Be,Ae))),(r||n)&&(t.flags|=4),null);case 4:return Ho(),Gf(t),e===null&&ES(t.stateNode.containerInfo),null;case 10:return Op(t),null;case 17:return qe(t.type)&&Yl(),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)os(r,!1);else{if(Te!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=ru(e),s!==null){for(t.flags|=64,os(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&&Le()>ep&&(t.flags|=64,i=!0,os(r,!1),t.lanes=33554432)}else{if(!i)if(e=ru(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),os(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Yt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Le()-r.renderingStartTime>ep&&n!==1073741824&&(t.flags|=64,i=!0,os(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=Le(),n.sibling=null,t=ce.current,de(ce,i?t&1|2:t&1),n):null;case 23:case 24:return $p(),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 _T(e){switch(e.tag){case 1:qe(e.type)&&Yl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Ho(),se($e),se(Oe),Dp(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return Mp(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 Ho(),null;case 10:return Op(e),null;case 23:case 24:return $p(),null;default:return null}}function Up(e,t){try{var n="",r=t;do n+=tb(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 Qf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Eb=typeof WeakMap=="function"?WeakMap:Map;function ew(e,t,n){n=Yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){uu||(uu=!0,tp=r),Qf(e,t)},n}function tw(e,t,n){n=Yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Qf(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Qt===null?Qt=new Set([this]):Qt.add(this),Qf(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var Cb=typeof WeakSet=="function"?WeakSet:Set;function Lv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){tr(e,n)}else t.current=null}function Tb(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:Nt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Rp(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(b(163))}function _b(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&&(cw(n,e),Ob(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:Nt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&fv(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}fv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&bS(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&&iS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(b(163))}function Av(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=Gv("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 Ov(e,t){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(Ip,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)cw(t,n);else{r=t;try{o()}catch(i){tr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Lv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){tr(t,i)}break;case 5:Lv(t);break;case 4:nw(e,t)}}function Nv(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 Mv(e){return e.tag===5||e.tag===3||e.tag===4}function Dv(e){e:{for(var t=e.return;t!==null;){if(Mv(t))break e;t=t.return}throw Error(b(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(b(161))}n.flags&16&&(Cs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Mv(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?Xf(e,n,t):Yf(e,n,t)}function Xf(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=Gl));else if(r!==4&&(e=e.child,e!==null))for(Xf(e,t,n),e=e.sibling;e!==null;)Xf(e,t,n),e=e.sibling}function Yf(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(Yf(e,t,n),e=e.sibling;e!==null;)Yf(e,t,n),e=e.sibling}function nw(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(b(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(Ov(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(Ov(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 hf(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[Ql]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Kv(n,r),Rf(e,o),t=Rf(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Qv(n,a):s==="dangerouslySetInnerHTML"?qv(n,a):s==="children"?Cs(n,a):lp(n,s,a,t)}switch(e){case"input":Ef(n,r);break;case"textarea":Wv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?ko(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?ko(n,!!r.multiple,r.defaultValue,!0):ko(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(b(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,iS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Wp=Le(),Av(t.child,!0)),Fv(t);return;case 19:Fv(t);return;case 17:return;case 23:case 24:Av(t,t.memoizedState!==null);return}throw Error(b(163))}function Fv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Cb),t.forEach(function(r){var o=Db.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function bb(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var Pb=Math.ceil,lu=Kr.ReactCurrentDispatcher,Vp=Kr.ReactCurrentOwner,D=0,He=null,ve=null,Ae=0,zr=0,Zf=ar(0),be=0,Eu=null,Vo=0,Hs=0,Ko=0,Kp=0,Jf=null,Wp=0,ep=1/0;function Wo(){ep=Le()+500}var L=null,uu=!1,tp=null,Qt=null,ir=!1,Ss=null,ls=90,np=[],rp=[],pn=null,ws=0,op=null,jl=-1,cn=0,Hl=0,xs=null,Bl=!1;function et(){return D&48?Le():jl!==-1?jl:jl=Le()}function Jn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Ho()===99?1:2;if(cn===0&&(cn=Vo),mb.transition!==0){Hl!==0&&(Hl=Jf!==null?Jf.pendingLanes:0),e=cn;var t=4186112&~Hl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Ho(),D&4&&e===98?e=$l(12,cn):(e=y_(e),e=$l(e,cn)),e}function er(e,t,n){if(50<ws)throw ws=0,op=null,Error(b(185));if(e=Cu(e,t),e===null)return null;gu(e,t,n),e===He&&(Ko|=t,be===4&&No(e,Ae));var r=Ho();t===1?D&8&&!(D&48)?ip(e):(xt(e,n),D===0&&(Wo(),Zt())):(!(D&4)||r!==98&&r!==99||(pn===null?pn=new Set([e]):pn.add(e)),xt(e,n)),Jf=e}function Cu(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 xt(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-rr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,So(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=Ps(e,e===He?Ae:0),t=ne,r===0)n!==null&&(n!==df&&Bf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==df&&Bf(n)}t===15?(n=ip.bind(null,e),un===null?(un=[n],Fl=Lp(wu,NS)):un.push(n),n=df):t===14?n=Ls(99,ip.bind(null,e)):(n=v_(t),n=Ls(n,rw.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function rw(e){if(jl=-1,Hl=cn=0,D&48)throw Error(b(327));var t=e.callbackNode;if(lr()&&e.callbackNode!==t)return null;var n=Ps(e,e===He?Ae:0);if(n===0)return null;var r=n,o=D;D|=16;var i=aw();(He!==e||Ae!==r)&&(Wo(),Mo(e,r));do try{Ib();break}catch(a){sw(e,a)}while(1);if(Ap(),lu.current=i,D=o,ve!==null?r=0:(He=null,Ae=0,r=be),Vo&Ko)Mo(e,0);else if(r!==0){if(r===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Rp(e.containerInfo)),n=fS(e),n!==0&&(r=us(e,n))),r===1)throw t=Eu,Mo(e,0),No(e,n),xt(e,Le()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(b(345));case 2:Or(e);break;case 3:if(No(e,n),(n&62914560)===n&&(r=Wp+500-Le(),10<r)){if(Ps(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){et(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ov(Or.bind(null,e),r);break}Or(e);break;case 4:if(No(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-rr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Pb(n/1960))-n,10<n){e.timeoutHandle=ov(Or.bind(null,e),n);break}Or(e);break;case 5:Or(e);break;default:throw Error(b(329))}}return xt(e,Le()),e.callbackNode===t?rw.bind(null,e):null}function No(e,t){for(t&=~Kp,t&=~Ko,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rr(t),r=1<<n;e[n]=-1,t&=~r}}function ip(e){if(D&48)throw Error(b(327));if(lr(),e===He&&e.expiredLanes&Ae){var t=Ae,n=us(e,t);Vo&Ko&&(t=Ps(e,t),n=us(e,t))}else t=Ps(e,0),n=us(e,t);if(e.tag!==0&&n===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Rp(e.containerInfo)),t=fS(e),t!==0&&(n=us(e,t))),n===1)throw n=Eu,Mo(e,0),No(e,t),xt(e,Le()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Or(e),xt(e,Le()),null}function kb(){if(pn!==null){var e=pn;pn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,xt(t,Le())})}Zt()}function ow(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}}function iw(e,t){var n=D;D&=-2,D|=8;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}}function Ll(e,t){de(Zf,zr),zr|=t,Vo|=t}function $p(){zr=Zf.current,se(Zf)}function Mo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,lb(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xl();break;case 3:Bo(),se($e),se(Oe),Dp();break;case 5:Mp(r);break;case 4:Bo();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Op(r);break;case 23:case 24:$p()}n=n.return}He=e,ve=sr(e.current,null),Ae=zr=Vo=t,be=0,Eu=null,Kp=Ko=Hs=0}function sw(e,t){do{var n=ve;try{if(Ap(),ys.current=au,ru){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ru=!1}if(Ms=0,_e=Ie=ge=null,vs=!1,Vp.current=null,n===null||n.return===null){be=1,Eu=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ae,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 p=(ce.current&1)!==0,d=s;do{var h;if(h=d.tag===13){var v=d.memoizedState;if(v!==null)h=v.dehydrated!==null;else{var y=d.memoizedProps;h=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(h){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 f=Yn(-1,1);f.tag=2,Zn(a,f)}a.lanes|=1;break e}l=void 0,a=t;var w=i.pingCache;if(w===null?(w=i.pingCache=new Eb,l=new Set,w.set(u,l)):(l=w.get(u),l===void 0&&(l=new Set,w.set(u,l))),!l.has(a)){l.add(a);var x=Mb.bind(null,i,u,a);u.then(x,x)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((Po(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 Xf(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wT=typeof WeakMap=="function"?WeakMap:Map;function e0(e,t,n){n=Yn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){cu||(cu=!0,tp=r),Xf(e,t)},n}function t0(e,t,n){n=Yn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Xf(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(Xt===null?Xt=new Set([this]):Xt.add(this),Xf(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var ET=typeof WeakSet=="function"?WeakSet:Set;function Lv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){tr(e,n)}else t.current=null}function CT(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:Nt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&Ip(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function bT(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&&(c0(n,e),OT(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:Nt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&fv(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}fv(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&TS(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&&iS(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function Av(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=Gv("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 Ov(e,t){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(Rp,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)c0(t,n);else{r=t;try{o()}catch(i){tr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(Lv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){tr(t,i)}break;case 5:Lv(t);break;case 4:n0(e,t)}}function Nv(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 Mv(e){return e.tag===5||e.tag===3||e.tag===4}function Dv(e){e:{for(var t=e.return;t!==null;){if(Mv(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&&(bs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||Mv(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?Qf(e,n,t):Yf(e,n,t)}function Qf(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=Xl));else if(r!==4&&(e=e.child,e!==null))for(Qf(e,t,n),e=e.sibling;e!==null;)Qf(e,t,n),e=e.sibling}function Yf(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(Yf(e,t,n),e=e.sibling;e!==null;)Yf(e,t,n),e=e.sibling}function n0(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(Ov(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(Ov(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 hf(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[Ql]=r,e==="input"&&r.type==="radio"&&r.name!=null&&Kv(n,r),If(e,o),t=If(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Xv(n,a):s==="dangerouslySetInnerHTML"?qv(n,a):s==="children"?bs(n,a):lp(n,s,a,t)}switch(e){case"input":wf(n,r);break;case"textarea":Wv(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?Po(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?Po(n,!!r.multiple,r.defaultValue,!0):Po(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,iS(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Wp=Le(),Av(t.child,!0)),Fv(t);return;case 19:Fv(t);return;case 17:return;case 23:case 24:Av(t,t.memoizedState!==null);return}throw Error(T(163))}function Fv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ET),t.forEach(function(r){var o=DT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function TT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var kT=Math.ceil,uu=Wr.ReactCurrentDispatcher,Vp=Wr.ReactCurrentOwner,D=0,Be=null,ve=null,Ae=0,Vr=0,Zf=ar(0),Te=0,Eu=null,Vo=0,zs=0,Ko=0,Kp=0,Jf=null,Wp=0,ep=1/0;function Wo(){ep=Le()+500}var L=null,cu=!1,tp=null,Xt=null,ir=!1,_s=null,cs=90,np=[],rp=[],pn=null,ws=0,op=null,Bl=-1,cn=0,Hl=0,Es=null,zl=!1;function tt(){return D&48?Le():Bl!==-1?Bl:Bl=Le()}function Jn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return Bo()===99?1:2;if(cn===0&&(cn=Vo),mT.transition!==0){Hl!==0&&(Hl=Jf!==null?Jf.pendingLanes:0),e=cn;var t=4186112&~Hl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=Bo(),D&4&&e===98?e=ql(12,cn):(e=yb(e),e=ql(e,cn)),e}function er(e,t,n){if(50<ws)throw ws=0,op=null,Error(T(185));if(e=Cu(e,t),e===null)return null;hu(e,t,n),e===Be&&(Ko|=t,Te===4&&No(e,Ae));var r=Bo();t===1?D&8&&!(D&48)?ip(e):(_t(e,n),D===0&&(Wo(),Zt())):(!(D&4)||r!==98&&r!==99||(pn===null?pn=new Set([e]):pn.add(e)),_t(e,n)),Jf=e}function Cu(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 _t(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-rr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,So(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=Is(e,e===Be?Ae:0),t=ne,r===0)n!==null&&(n!==df&&Hf(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==df&&Hf(n)}t===15?(n=ip.bind(null,e),un===null?(un=[n],jl=Lp(_u,NS)):un.push(n),n=df):t===14?n=Os(99,ip.bind(null,e)):(n=vb(t),n=Os(n,r0.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function r0(e){if(Bl=-1,Hl=cn=0,D&48)throw Error(T(327));var t=e.callbackNode;if(lr()&&e.callbackNode!==t)return null;var n=Is(e,e===Be?Ae:0);if(n===0)return null;var r=n,o=D;D|=16;var i=a0();(Be!==e||Ae!==r)&&(Wo(),Mo(e,r));do try{RT();break}catch(a){s0(e,a)}while(1);if(Ap(),uu.current=i,D=o,ve!==null?r=0:(Be=null,Ae=0,r=Te),Vo&Ko)Mo(e,0);else if(r!==0){if(r===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Ip(e.containerInfo)),n=fS(e),n!==0&&(r=ds(e,n))),r===1)throw t=Eu,Mo(e,0),No(e,n),_t(e,Le()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:Nr(e);break;case 3:if(No(e,n),(n&62914560)===n&&(r=Wp+500-Le(),10<r)){if(Is(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ov(Nr.bind(null,e),r);break}Nr(e);break;case 4:if(No(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-rr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Le()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*kT(n/1960))-n,10<n){e.timeoutHandle=ov(Nr.bind(null,e),n);break}Nr(e);break;case 5:Nr(e);break;default:throw Error(T(329))}}return _t(e,Le()),e.callbackNode===t?r0.bind(null,e):null}function No(e,t){for(t&=~Kp,t&=~Ko,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rr(t),r=1<<n;e[n]=-1,t&=~r}}function ip(e){if(D&48)throw Error(T(327));if(lr(),e===Be&&e.expiredLanes&Ae){var t=Ae,n=ds(e,t);Vo&Ko&&(t=Is(e,t),n=ds(e,t))}else t=Is(e,0),n=ds(e,t);if(e.tag!==0&&n===2&&(D|=64,e.hydrate&&(e.hydrate=!1,Ip(e.containerInfo)),t=fS(e),t!==0&&(n=ds(e,t))),n===1)throw n=Eu,Mo(e,0),No(e,t),_t(e,Le()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nr(e),_t(e,Le()),null}function PT(){if(pn!==null){var e=pn;pn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,_t(t,Le())})}Zt()}function o0(e,t){var n=D;D|=1;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}}function i0(e,t){var n=D;D&=-2,D|=8;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}}function Al(e,t){de(Zf,Vr),Vr|=t,Vo|=t}function $p(){Vr=Zf.current,se(Zf)}function Mo(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,lT(n)),ve!==null)for(n=ve.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yl();break;case 3:Ho(),se($e),se(Oe),Dp();break;case 5:Mp(r);break;case 4:Ho();break;case 13:se(ce);break;case 19:se(ce);break;case 10:Op(r);break;case 23:case 24:$p()}n=n.return}Be=e,ve=sr(e.current,null),Ae=Vr=Vo=t,Te=0,Eu=null,Kp=Ko=zs=0}function s0(e,t){do{var n=ve;try{if(Ap(),Ss.current=lu,ou){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ou=!1}if(Fs=0,be=Re=ge=null,xs=!1,Vp.current=null,n===null||n.return===null){Te=1,Eu=t,ve=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ae,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 p=(ce.current&1)!==0,d=s;do{var h;if(h=d.tag===13){var v=d.memoizedState;if(v!==null)h=v.dehydrated!==null;else{var y=d.memoizedProps;h=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(h){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 f=Yn(-1,1);f.tag=2,Zn(a,f)}a.lanes|=1;break e}l=void 0,a=t;var x=i.pingCache;if(x===null?(x=i.pingCache=new wT,l=new Set,x.set(u,l)):(l=x.get(u),l===void 0&&(l=new Set,x.set(u,l))),!l.has(a)){l.add(a);var _=MT.bind(null,i,u,a);u.then(_,_)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((ko(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.`)}be!==5&&(be=2),l=zp(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var T=ew(d,i,t);dv(d,T);break e;case 1:i=l;var E=d.type,_=d.stateNode;if(!(d.flags&64)&&(typeof E.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(Qt===null||!Qt.has(_)))){d.flags|=4096,t&=-t,d.lanes|=t;var R=tw(d,i,t);dv(d,R);break e}}d=d.return}while(d!==null)}uw(n)}catch(k){t=k,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function aw(){var e=lu.current;return lu.current=au,e===null?au:e}function us(e,t){var n=D;D|=16;var r=aw();He===e&&Ae===t||Mo(e,t);do try{Rb();break}catch(o){sw(e,o)}while(1);if(Ap(),D=n,lu.current=r,ve!==null)throw Error(b(261));return He=null,Ae=0,be}function Rb(){for(;ve!==null;)lw(ve)}function Ib(){for(;ve!==null&&!db();)lw(ve)}function lw(e){var t=dw(e.alternate,e,zr);e.memoizedProps=e.pendingProps,t===null?uw(e):ve=t,Vp.current=null}function uw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=xb(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=wb(n,t,zr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||zr&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);be===0&&(be=5)}function Or(e){var t=Ho();return Ur(99,Lb.bind(null,e,t)),null}function Lb(e,t){do lr();while(Ss!==null);if(D&48)throw Error(b(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(b(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-rr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(pn!==null&&!(r&24)&&pn.has(e)&&pn.delete(e),e===He&&(ve=He=null,Ae=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=D,D|=32,Vp.current=null,lf=Ol,s=Zy(),Mf(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,p=-1,d=-1,h=0,v=0,y=s,g=null;t:for(;;){for(var m;y!==a||i!==0&&y.nodeType!==3||(p=c+i),y!==l||u!==0&&y.nodeType!==3||(d=c+u),y.nodeType===3&&(c+=y.nodeValue.length),(m=y.firstChild)!==null;)g=y,y=m;for(;;){if(y===s)break t;if(g===a&&++h===i&&(p=c),g===l&&++v===u&&(d=c),(m=y.nextSibling)!==null)break;y=g,g=y.parentNode}y=m}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;uf={focusedElem:s,selectionRange:a},Ol=!1,xs=null,Bl=!1,L=r;do try{Ab()}catch(k){if(L===null)throw Error(b(330));tr(L,k),L=L.nextEffect}while(L!==null);xs=null,L=r;do try{for(s=e;L!==null;){var f=L.flags;if(f&16&&Cs(L.stateNode,""),f&128){var w=L.alternate;if(w!==null){var x=w.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(f&1038){case 2:Dv(L),L.flags&=-3;break;case 6:Dv(L),L.flags&=-3,hf(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,hf(L.alternate,L);break;case 4:hf(L.alternate,L);break;case 8:a=L,nw(s,a);var T=a.alternate;Nv(a),T!==null&&Nv(T)}L=L.nextEffect}}catch(k){if(L===null)throw Error(b(330));tr(L,k),L=L.nextEffect}while(L!==null);if(x=uf,w=Zy(),f=x.focusedElem,s=x.selectionRange,w!==f&&f&&f.ownerDocument&&wS(f.ownerDocument.documentElement,f)){for(s!==null&&Mf(f)&&(w=s.start,x=s.end,x===void 0&&(x=w),"selectionStart"in f?(f.selectionStart=w,f.selectionEnd=Math.min(x,f.value.length)):(x=(w=f.ownerDocument||document)&&w.defaultView||window,x.getSelection&&(x=x.getSelection(),a=f.textContent.length,T=Math.min(s.start,a),s=s.end===void 0?T:Math.min(s.end,a),!x.extend&&T>s&&(a=s,s=T,T=a),a=Yy(f,T),i=Yy(f,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(w=w.createRange(),w.setStart(a.node,a.offset),x.removeAllRanges(),T>s?(x.addRange(w),x.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),x.addRange(w)))))),w=[],x=f;x=x.parentNode;)x.nodeType===1&&w.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<w.length;f++)x=w[f],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}Ol=!!lf,uf=lf=null,e.current=n,L=r;do try{for(f=e;L!==null;){var E=L.flags;if(E&36&&_b(f,L.alternate,L),E&128){w=void 0;var _=L.ref;if(_!==null){var R=L.stateNode;switch(L.tag){case 5:w=R;break;default:w=R}typeof _=="function"?_(w):_.current=w}}L=L.nextEffect}}catch(k){if(L===null)throw Error(b(330));tr(L,k),L=L.nextEffect}while(L!==null);L=null,pb(),D=o}else e.current=n;if(ir)ir=!1,Ss=e,ls=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(E=L,E.sibling=null,E.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(Qt=null),r===1?e===op?ws++:(ws=0,op=e):ws=0,n=n.stateNode,Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(Ip,n,void 0,(n.current.flags&64)===64)}catch{}if(xt(e,Le()),uu)throw uu=!1,e=tp,tp=null,e;return D&8||Zt(),null}function Ab(){for(;L!==null;){var e=L.alternate;Bl||xs===null||(L.flags&8?jy(L,xs)&&(Bl=!0):L.tag===13&&bb(e,L)&&jy(L,xs)&&(Bl=!0));var t=L.flags;t&256&&Tb(e,L),!(t&512)||ir||(ir=!0,Ls(97,function(){return lr(),null})),L=L.nextEffect}}function lr(){if(ls!==90){var e=97<ls?97:ls;return ls=90,Ur(e,Nb)}return!1}function Ob(e,t){np.push(t,e),ir||(ir=!0,Ls(97,function(){return lr(),null}))}function cw(e,t){rp.push(t,e),ir||(ir=!0,Ls(97,function(){return lr(),null}))}function Nb(){if(Ss===null)return!1;var e=Ss;if(Ss=null,D&48)throw Error(b(331));var t=D;D|=32;var n=rp;rp=[];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(b(330));tr(i,l)}}for(n=np,np=[],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(b(330));tr(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 D=t,Zt(),!0}function jv(e,t,n){t=zp(n,t),t=ew(e,t,1),Zn(e,t),t=et(),e=Cu(e,1),e!==null&&(gu(e,1,t),xt(e,t))}function tr(e,t){if(e.tag===3)jv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){jv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Qt===null||!Qt.has(r))){e=zp(t,e);var o=tw(n,e,1);if(Zn(n,o),o=et(),n=Cu(n,1),n!==null)gu(n,1,o),xt(n,o);else if(typeof r.componentDidCatch=="function"&&(Qt===null||!Qt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function Mb(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=et(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Ae&n)===n&&(be===4||be===3&&(Ae&62914560)===Ae&&500>Le()-Wp?Mo(e,0):Kp|=n),xt(e,t)}function Db(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(cn===0&&(cn=Vo),t=wo(62914560&~cn),t===0&&(t=4194304)):t=Ho()===99?1:2:t=1),n=et(),e=Cu(e,t),e!==null&&(gu(e,t,n),xt(e,n))}var dw;dw=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)Mt=!0;else if(n&r)Mt=!!(e.flags&16384);else{switch(Mt=!1,t.tag){case 3:Tv(t),pf();break;case 5:gv(t);break;case 1:qe(t.type)&&Dl(t);break;case 4:Vf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(Yl,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?_v(e,t,n):(de(ce,ce.current&1),t=fn(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 Iv(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,mf(e,t,n)}return fn(e,t,n)}else Mt=!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=jo(t,Oe.current),Ao(t,n),o=jp(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,qe(r)){var i=!0;Dl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Np(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&eu(t,r,s,e),o.updater=xu,t.stateNode=o,o._reactInternals=t,zf(t,r,e,n),t=qf(null,t,r,!0,i,n)}else t.tag=0,We(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=jb(o),e=Nt(o,e),i){case 0:t=$f(null,t,o,e,n);break e;case 1:t=Cv(null,t,o,e,n);break e;case 11:t=xv(null,t,o,e,n);break e;case 14:t=Ev(null,t,o,Nt(o.type,e),r,n);break e}throw Error(b(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),$f(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Cv(e,t,r,o,n);case 3:if(Tv(t),r=t.updateQueue,e===null||r===null)throw Error(b(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,DS(e,t),As(t,r,null,n),r=t.memoizedState.element,r===o)pf(),t=fn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(qn=Lo(t.stateNode.containerInfo.firstChild),dn=t,i=Yt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Oo.push(i);for(n=BS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else We(e,t,r,n),pf();t=t.child}return t;case 5:return gv(t),e===null&&Kf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,jf(r,o)?s=null:i!==null&&jf(r,i)&&(t.flags|=16),XS(e,t),We(e,t,s,n),t.child;case 6:return e===null&&Kf(t),null;case 13:return _v(e,t,n);case 4:return Vf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=tu(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),xv(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(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(Yl,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=yt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!$e.current){t=fn(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=Yn(-1,n&-n),u.tag=2,Zn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),MS(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}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Ao(t,n),o=wt(o,i.unstable_observedBits),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return o=t.type,i=Nt(o,t.pendingProps),i=Nt(o.type,i),Ev(e,t,o,i,r,n);case 15:return QS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,qe(r)?(e=!0,Dl(t)):e=!1,Ao(t,n),jS(t,r,o),zf(t,r,o,n),qf(null,t,r,!0,e,n);case 19:return Iv(e,t,n);case 23:return mf(e,t,n);case 24:return mf(e,t,n)}throw Error(b(156,t.tag))};function Fb(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 vt(e,t,n,r){return new Fb(e,t,n,r)}function qp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jb(e){if(typeof e=="function")return qp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fu)return 11;if(e===pu)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=vt(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 Ul(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")qp(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Kn:return Do(n.children,o,i,t);case Uv:s=8,o|=16;break;case up:s=8,o|=1;break;case cs:return e=vt(12,n,t,o|8),e.elementType=cs,e.type=cs,e.lanes=i,e;case ds:return e=vt(13,n,t,o),e.type=ds,e.elementType=ds,e.lanes=i,e;case zl:return e=vt(19,n,t,o),e.elementType=zl,e.lanes=i,e;case gp:return Gp(n,o,i,t);case wf:return e=vt(24,n,t,o),e.elementType=wf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cp:s=10;break e;case dp:s=9;break e;case fu:s=11;break e;case pu:s=14;break e;case fp:s=16,r=null;break e;case pp:s=22;break e}throw Error(b(130,e==null?e:typeof e,""))}return t=vt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Do(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Gp(e,t,n,r){return e=vt(23,e,r,t),e.elementType=gp,e.lanes=n,e}function yf(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function vf(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hb(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=tf(0),this.expirationTimes=tf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tf(0),this.mutableSourceEagerHydrationData=null}function Bb(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Nr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function cu(e,t,n,r){var o=t.current,i=et(),s=Jn(o);e:if(n){n=n._reactInternals;t:{if(Wr(n)!==n||n.tag!==1)throw Error(b(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(qe(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(b(171))}if(n.tag===1){var l=n.type;if(qe(l)){n=kS(n,l,a);break e}}n=a}else n=or;return t.context===null?t.context=n:t.pendingContext=n,t=Yn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Zn(o,t),er(o,s,i),s}function Sf(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 Hv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qp(e,t){Hv(e,t),(e=e.alternate)&&Hv(e,t)}function Ub(){return null}function Xp(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new Hb(e,t,n!=null&&n.hydrate===!0),t=vt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Np(t),e[zo]=n.current,CS(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}Xp.prototype.render=function(e){cu(e,this._internalRoot,null,null)};Xp.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;cu(null,e,null,function(){t[zo]=null})};function Bs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zb(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 Xp(e,0,t?{hydrate:!0}:void 0)}function Tu(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=Sf(s);a.call(u)}}cu(t,s,e,o)}else{if(i=n._reactRootContainer=zb(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=Sf(s);l.call(u)}}iw(function(){cu(t,s,e,o)})}return Sf(s)}nS=function(e){if(e.tag===13){var t=et();er(e,4,t),Qp(e,4)}};wp=function(e){if(e.tag===13){var t=et();er(e,67108864,t),Qp(e,67108864)}};rS=function(e){if(e.tag===13){var t=et(),n=Jn(e);er(e,n,t),Qp(e,n)}};oS=function(e,t){return t()};If=function(e,t,n){switch(t){case"input":if(Ef(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=Su(r);if(!o)throw Error(b(90));Vv(r),Ef(r,o)}}}break;case"textarea":Wv(e,n);break;case"select":t=n.value,t!=null&&ko(e,!!n.multiple,t,!1)}};yp=ow;Zv=function(e,t,n,r,o){var i=D;D|=4;try{return Ur(98,e.bind(null,t,n,r,o))}finally{D=i,D===0&&(Wo(),Zt())}};vp=function(){!(D&49)&&(kb(),lr())};Jv=function(e,t){var n=D;D|=2;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}};function fw(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bs(t))throw Error(b(200));return Bb(e,t,null,n)}var Vb={Events:[Fs,To,Su,Xv,Yv,lr,{current:!1}]},rs={findFiberByHostInstance:Dr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},Kb={bundleType:rs.bundleType,version:rs.version,rendererPackageName:rs.rendererPackageName,rendererConfig:rs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Kr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tS(e),e===null?null:e.stateNode},findFiberByHostInstance:rs.findFiberByHostInstance||Ub,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(os=__REACT_DEVTOOLS_GLOBAL_HOOK__,!os.isDisabled&&os.supportsFiber))try{Ip=os.inject(Kb),Hr=os}catch{}var os;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vb;Et.createPortal=fw;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(b(188)):Error(b(268,Object.keys(e)));return e=tS(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e,t){var n=D;if(n&48)return e(t);D|=1;try{if(e)return Ur(99,e.bind(null,t))}finally{D=n,Zt()}};Et.hydrate=function(e,t,n){if(!Bs(t))throw Error(b(200));return Tu(null,e,t,!0,n)};Et.render=function(e,t,n){if(!Bs(t))throw Error(b(200));return Tu(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!Bs(e))throw Error(b(40));return e._reactRootContainer?(iw(function(){Tu(null,null,e,!1,function(){e._reactRootContainer=null,e[zo]=null})}),!0):!1};Et.unstable_batchedUpdates=ow;Et.unstable_createPortal=function(e,t){return fw(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Bs(n))throw Error(b(200));if(e==null||e._reactInternals===void 0)throw Error(b(38));return Tu(e,t,n,!1,r)};Et.version="17.0.2"});var _u=pe((DO,gw)=>{"use strict";function mw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mw)}catch(e){console.error(e)}}mw(),gw.exports=pw()});var Vw=pe(zw=>{"use strict";var Yo=O();function kP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var RP=typeof Object.is=="function"?Object.is:kP,IP=Yo.useState,LP=Yo.useEffect,AP=Yo.useLayoutEffect,OP=Yo.useDebugValue;function NP(e,t){var n=t(),r=IP({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return AP(function(){o.value=n,o.getSnapshot=t,Cm(o)&&i({inst:o})},[e,n,t]),LP(function(){return Cm(o)&&i({inst:o}),e(function(){Cm(o)&&i({inst:o})})},[e]),OP(n),n}function Cm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!RP(e,n)}catch{return!0}}function MP(e,t){return t()}var DP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?MP:NP;zw.useSyncExternalStore=Yo.useSyncExternalStore!==void 0?Yo.useSyncExternalStore:DP});var Tm=pe((CN,Kw)=>{"use strict";Kw.exports=Vw()});var $w=pe(Ww=>{"use strict";var Ou=O(),FP=Tm();function jP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var HP=typeof Object.is=="function"?Object.is:jP,BP=FP.useSyncExternalStore,UP=Ou.useRef,zP=Ou.useEffect,VP=Ou.useMemo,KP=Ou.useDebugValue;Ww.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=UP(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=VP(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var v=s.value;if(o(v,h))return p=v}return p=h}if(v=p,HP(c,h))return v;var y=r(h);return o!==void 0&&o(v,y)?v:(c=h,p=y)}var u=!1,c,p,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=BP(e,i[0],i[1]);return zP(function(){s.hasValue=!0,s.value=a},[a]),KP(a),a}});var Gw=pe((_N,qw)=>{"use strict";qw.exports=$w()});var i0=pe(G=>{"use strict";var xe=typeof Symbol=="function"&&Symbol.for,bm=xe?Symbol.for("react.element"):60103,Pm=xe?Symbol.for("react.portal"):60106,Fu=xe?Symbol.for("react.fragment"):60107,ju=xe?Symbol.for("react.strict_mode"):60108,Hu=xe?Symbol.for("react.profiler"):60114,Bu=xe?Symbol.for("react.provider"):60109,Uu=xe?Symbol.for("react.context"):60110,km=xe?Symbol.for("react.async_mode"):60111,zu=xe?Symbol.for("react.concurrent_mode"):60111,Vu=xe?Symbol.for("react.forward_ref"):60112,Ku=xe?Symbol.for("react.suspense"):60113,GP=xe?Symbol.for("react.suspense_list"):60120,Wu=xe?Symbol.for("react.memo"):60115,$u=xe?Symbol.for("react.lazy"):60116,QP=xe?Symbol.for("react.block"):60121,XP=xe?Symbol.for("react.fundamental"):60117,YP=xe?Symbol.for("react.responder"):60118,ZP=xe?Symbol.for("react.scope"):60119;function rt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case bm:switch(e=e.type,e){case km:case zu:case Fu:case Hu:case ju:case Ku:return e;default:switch(e=e&&e.$$typeof,e){case Uu:case Vu:case $u:case Wu:case Bu:return e;default:return t}}case Pm:return t}}}function o0(e){return rt(e)===zu}G.AsyncMode=km;G.ConcurrentMode=zu;G.ContextConsumer=Uu;G.ContextProvider=Bu;G.Element=bm;G.ForwardRef=Vu;G.Fragment=Fu;G.Lazy=$u;G.Memo=Wu;G.Portal=Pm;G.Profiler=Hu;G.StrictMode=ju;G.Suspense=Ku;G.isAsyncMode=function(e){return o0(e)||rt(e)===km};G.isConcurrentMode=o0;G.isContextConsumer=function(e){return rt(e)===Uu};G.isContextProvider=function(e){return rt(e)===Bu};G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===bm};G.isForwardRef=function(e){return rt(e)===Vu};G.isFragment=function(e){return rt(e)===Fu};G.isLazy=function(e){return rt(e)===$u};G.isMemo=function(e){return rt(e)===Wu};G.isPortal=function(e){return rt(e)===Pm};G.isProfiler=function(e){return rt(e)===Hu};G.isStrictMode=function(e){return rt(e)===ju};G.isSuspense=function(e){return rt(e)===Ku};G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Fu||e===zu||e===Hu||e===ju||e===Ku||e===GP||typeof e=="object"&&e!==null&&(e.$$typeof===$u||e.$$typeof===Wu||e.$$typeof===Bu||e.$$typeof===Uu||e.$$typeof===Vu||e.$$typeof===XP||e.$$typeof===YP||e.$$typeof===ZP||e.$$typeof===QP)};G.typeOf=rt});var a0=pe((HN,s0)=>{"use strict";s0.exports=i0()});var m0=pe((BN,p0)=>{"use strict";var Rm=a0(),JP={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ek={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},tk={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},d0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Im={};Im[Rm.ForwardRef]=tk;Im[Rm.Memo]=d0;function l0(e){return Rm.isMemo(e)?d0:Im[e.$$typeof]||JP}var nk=Object.defineProperty,rk=Object.getOwnPropertyNames,u0=Object.getOwnPropertySymbols,ok=Object.getOwnPropertyDescriptor,ik=Object.getPrototypeOf,c0=Object.prototype;function f0(e,t,n){if(typeof t!="string"){if(c0){var r=ik(t);r&&r!==c0&&f0(e,r,n)}var o=rk(t);u0&&(o=o.concat(u0(t)));for(var i=l0(e),s=l0(t),a=0;a<o.length;++a){var l=o[a];if(!ek[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=ok(t,l);try{nk(e,l,u)}catch{}}}}return e}p0.exports=f0});var h0=pe(Q=>{"use strict";var Lm=Symbol.for("react.element"),Am=Symbol.for("react.portal"),qu=Symbol.for("react.fragment"),Gu=Symbol.for("react.strict_mode"),Qu=Symbol.for("react.profiler"),Xu=Symbol.for("react.provider"),Yu=Symbol.for("react.context"),sk=Symbol.for("react.server_context"),Zu=Symbol.for("react.forward_ref"),Ju=Symbol.for("react.suspense"),ec=Symbol.for("react.suspense_list"),tc=Symbol.for("react.memo"),nc=Symbol.for("react.lazy"),ak=Symbol.for("react.offscreen"),g0;g0=Symbol.for("react.module.reference");function Tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lm:switch(e=e.type,e){case qu:case Qu:case Gu:case Ju:case ec:return e;default:switch(e=e&&e.$$typeof,e){case sk:case Yu:case Zu:case nc:case tc:case Xu:return e;default:return t}}case Am:return t}}}Q.ContextConsumer=Yu;Q.ContextProvider=Xu;Q.Element=Lm;Q.ForwardRef=Zu;Q.Fragment=qu;Q.Lazy=nc;Q.Memo=tc;Q.Portal=Am;Q.Profiler=Qu;Q.StrictMode=Gu;Q.Suspense=Ju;Q.SuspenseList=ec;Q.isAsyncMode=function(){return!1};Q.isConcurrentMode=function(){return!1};Q.isContextConsumer=function(e){return Tt(e)===Yu};Q.isContextProvider=function(e){return Tt(e)===Xu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lm};Q.isForwardRef=function(e){return Tt(e)===Zu};Q.isFragment=function(e){return Tt(e)===qu};Q.isLazy=function(e){return Tt(e)===nc};Q.isMemo=function(e){return Tt(e)===tc};Q.isPortal=function(e){return Tt(e)===Am};Q.isProfiler=function(e){return Tt(e)===Qu};Q.isStrictMode=function(e){return Tt(e)===Gu};Q.isSuspense=function(e){return Tt(e)===Ju};Q.isSuspenseList=function(e){return Tt(e)===ec};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===qu||e===Qu||e===Gu||e===Ju||e===ec||e===ak||typeof e=="object"&&e!==null&&(e.$$typeof===nc||e.$$typeof===tc||e.$$typeof===Xu||e.$$typeof===Yu||e.$$typeof===Zu||e.$$typeof===g0||e.getModuleId!==void 0)};Q.typeOf=Tt});var v0=pe((zN,y0)=>{"use strict";y0.exports=h0()});var sx=pe((W2,ix)=>{"use strict";var Hk=/["'&<>]/;ix.exports=Bk;function Bk(e){var t=""+e,n=Hk.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=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";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 Pg=pe((Z4,OE)=>{"use strict";var RR="Expected a function",LE=NaN,IR="[object Symbol]",LR=/^\s+|\s+$/g,AR=/^[-+]0x[0-9a-f]+$/i,OR=/^0b[01]+$/i,NR=/^0o[0-7]+$/i,MR=parseInt,DR=typeof global=="object"&&global&&global.Object===Object&&global,FR=typeof self=="object"&&self&&self.Object===Object&&self,jR=DR||FR||Function("return this")(),HR=Object.prototype,BR=HR.toString,UR=Math.max,zR=Math.min,_g=function(){return jR.Date.now()};function VR(e,t,n){var r,o,i,s,a,l,u=0,c=!1,p=!1,d=!0;if(typeof e!="function")throw new TypeError(RR);t=AE(t)||0,bg(n)&&(c=!!n.leading,p="maxWait"in n,i=p?UR(AE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(E){var _=r,R=o;return r=o=void 0,u=E,s=e.apply(R,_),s}function v(E){return u=E,a=setTimeout(m,t),c?h(E):s}function y(E){var _=E-l,R=E-u,k=t-_;return p?zR(k,i-R):k}function g(E){var _=E-l,R=E-u;return l===void 0||_>=t||_<0||p&&R>=i}function m(){var E=_g();if(g(E))return f(E);a=setTimeout(m,y(E))}function f(E){return a=void 0,d&&r?h(E):(r=o=void 0,s)}function w(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:f(_g())}function T(){var E=_g(),_=g(E);if(r=arguments,o=this,l=E,_){if(a===void 0)return v(l);if(p)return a=setTimeout(m,t),h(l)}return a===void 0&&(a=setTimeout(m,t)),s}return T.cancel=w,T.flush=x,T}function bg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function KR(e){return!!e&&typeof e=="object"}function WR(e){return typeof e=="symbol"||KR(e)&&BR.call(e)==IR}function AE(e){if(typeof e=="number")return e;if(WR(e))return LE;if(bg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=bg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(LR,"");var n=OR.test(e);return n||NR.test(e)?MR(e.slice(2),n?2:8):AR.test(e)?LE:+e}OE.exports=VR});var IL={};Te(IL,{Card:()=>me,Chip:()=>ty,ContentEditableInput:()=>io,DeepdeskAPI:()=>Dn,DeepdeskSDK:()=>Da,InputMediator:()=>Sn,InputType:()=>Un,KeyboardHint:()=>ul,Label:()=>cl,Locale:()=>Gs,Section:()=>Hn,SectionList:()=>dl,Sources:()=>Bn,Suggestion:()=>oe,SuggestionList:()=>Wt,TextAreaInput:()=>wn,ToggleButton:()=>Lr,attachFile:()=>e1,authenticateWithKey:()=>ZT,createOverlayContainer:()=>di,createRangeFromOffsets:()=>oo,escapeHTML:()=>Ei,fetchPlatformConfig:()=>JT,formatTextMarkup:()=>YT,getRangeOffsets:()=>gd,getRangeText:()=>Oa,isSupportedInputElement:()=>vd,updateContentEditable:()=>XT,updateTextArea:()=>QT,useStyles:()=>P,waitForElementVisibilityChange:()=>Sd});var Wa=S(X()),pt=S(O());var Ka=S(O()),Fh=S(X()),Di=Ka.default.createContext({});function P(e,t){let r=(0,Ka.useContext)(Di)[e];return r?Object.entries(t).reduce((o,[i,s])=>{let a=r[i];return{...o,[i]:(0,Fh.default)(s,a)}},{}):t}var jh={root:"_root_vr71j_1"};var kr=S(C()),Vh=()=>(0,kr.jsxs)("svg",{className:jh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,kr.jsx)("defs",{children:(0,kr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,kr.jsx)("title",{children:"Failed loading image"}),(0,kr.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 Pd={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 Rr=S(C()),$a=(0,pt.createContext)(Pd),w1=({title:e,src:t})=>{let n=(0,pt.useContext)($a),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Rr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Rr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Rr.jsx)(Vh,{})})},x1=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)($a);return(0,Rr.jsx)("div",{className:(0,Wa.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},E1=({as:e="h1",cropText:t=!1,className:n,children:r})=>{let o=(0,pt.useContext)($a);return pt.default.createElement(e,{className:(0,Wa.default)(o.title,n,{[o.contentIsCropped]:t})},r)},qa=({children:e})=>{let t=P("Card",Pd);return(0,Rr.jsx)("div",{className:(0,Wa.default)(t.root),children:(0,Rr.jsx)($a.Provider,{value:t,children:e})})};qa.Image=w1;qa.Content=x1;qa.Title=E1;var me=qa;var Kh={root:"_root_nkim0_1"};var al=S(O());var kd=function(e,t){return kd=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])},kd(e,t)};function ji(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");kd(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Je=function(){return Je=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},Je.apply(this,arguments)};function Wh(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 Ga(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 Qa;(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"})(Qa||(Qa={}));var Xa=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 Ya;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Ya||(Ya={}));function Rd(e){return e.type===At.literal}function $h(e){return e.type===At.argument}function Za(e){return e.type===At.number}function Ja(e){return e.type===At.date}function el(e){return e.type===At.time}function tl(e){return e.type===At.select}function nl(e){return e.type===At.plural}function qh(e){return e.type===At.pound}function rl(e){return e.type===At.tag}function ol(e){return!!(e&&typeof e=="object"&&e.type===Ya.number)}function Hi(e){return!!(e&&typeof e=="object"&&e.type===Ya.dateTime)}function Id(e){e.forEach(function(t){if(delete t.location,tl(t)||nl(t))for(var n in t.options)delete t.options[n].location,Id(t.options[n].value);else Za(t)&&ol(t.style)||(Ja(t)||el(t))&&Hi(t.style)?delete t.style.location:rl(t)&&Id(t.children)})}function Gh(e,t){t===void 0&&(t={}),t=Je({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Xa(e,t).parse();if(n.err){var r=SyntaxError(Qa[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Id(n.val),n.val}function il(e,t){var n=t&&t.cache?t.cache:k1,r=t&&t.serializer?t.serializer:P1,o=t&&t.strategy?t.strategy:T1;return o(e,{cache:n,serializer:r})}function C1(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Qh(e,t,n,r){var o=C1(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Xh(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 Ld(e,t,n,r,o){return n.bind(t,e,r,o)}function T1(e,t){var n=e.length===1?Qh:Xh;return Ld(e,this,n,t.cache.create(),t.serializer)}function _1(e,t){return Ld(e,this,Xh,t.cache.create(),t.serializer)}function b1(e,t){return Ld(e,this,Qh,t.cache.create(),t.serializer)}var P1=function(){return JSON.stringify(arguments)};function Ad(){this.cache=Object.create(null)}Ad.prototype.get=function(e){return this.cache[e]};Ad.prototype.set=function(e,t){this.cache[e]=t};var k1={create:function(){return new Ad}},sl={variadic:_1,monadic:b1};var Ir;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Ir||(Ir={}));var Bi=function(e){ji(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 Od=function(e){ji(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('", "'),'"'),Ir.INVALID_VALUE,i)||this}return t}(Bi);var Yh=function(e){ji(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Ir.INVALID_VALUE,o)||this}return t}(Bi);var Zh=function(e){ji(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,'"'),Ir.MISSING_VALUE,r)||this}return t}(Bi);var ke;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(ke||(ke={}));function R1(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==ke.literal||n.type!==ke.literal?t.push(n):r.value+=n.value,t},[])}function I1(e){return typeof e=="function"}function Ui(e,t,n,r,o,i,s){if(e.length===1&&Rd(e[0]))return[{type:ke.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Rd(c)){a.push({type:ke.literal,value:c.value});continue}if(qh(c)){typeof i=="number"&&a.push({type:ke.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new Zh(p,s);var d=o[p];if($h(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?ke.literal:ke.object,value:d});continue}if(Ja(c)){var h=typeof c.style=="string"?r.date[c.style]:Hi(c.style)?c.style.parsedOptions:void 0;a.push({type:ke.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(el(c)){var h=typeof c.style=="string"?r.time[c.style]:Hi(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:ke.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(Za(c)){var h=typeof c.style=="string"?r.number[c.style]:ol(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),a.push({type:ke.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(rl(c)){var v=c.children,y=c.value,g=o[y];if(!I1(g))throw new Yh(y,"function",s);var m=Ui(v,t,n,r,o,i),f=g(m.map(function(T){return T.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(T){return{type:typeof T=="string"?ke.literal:ke.object,value:T}}))}if(tl(c)){var w=c.options[d]||c.options.other;if(!w)throw new Od(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ui(w.value,t,n,r,o));continue}if(nl(c)){var w=c.options["=".concat(d)];if(!w){if(!Intl.PluralRules)throw new Bi(`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=Up(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=e0(d,i,t);dv(d,C);break e;case 1:i=l;var w=d.type,b=d.stateNode;if(!(d.flags&64)&&(typeof w.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Xt===null||!Xt.has(b)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=t0(d,i,t);dv(d,I);break e}}d=d.return}while(d!==null)}u0(n)}catch(P){t=P,ve===n&&n!==null&&(ve=n=n.return);continue}break}while(1)}function a0(){var e=uu.current;return uu.current=lu,e===null?lu:e}function ds(e,t){var n=D;D|=16;var r=a0();Be===e&&Ae===t||Mo(e,t);do try{IT();break}catch(o){s0(e,o)}while(1);if(Ap(),D=n,uu.current=r,ve!==null)throw Error(T(261));return Be=null,Ae=0,Te}function IT(){for(;ve!==null;)l0(ve)}function RT(){for(;ve!==null&&!dT();)l0(ve)}function l0(e){var t=d0(e.alternate,e,Vr);e.memoizedProps=e.pendingProps,t===null?u0(e):ve=t,Vp.current=null}function u0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=_T(t),n!==null){n.flags&=2047,ve=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=xT(n,t,Vr),n!==null){ve=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Vr&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 Nr(e){var t=Bo();return Ur(99,LT.bind(null,e,t)),null}function LT(e,t){do lr();while(_s!==null);if(D&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-rr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(pn!==null&&!(r&24)&&pn.has(e)&&pn.delete(e),e===Be&&(ve=Be=null,Ae=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=D,D|=32,Vp.current=null,lf=Nl,s=Zy(),Mf(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,p=-1,d=-1,h=0,v=0,y=s,g=null;t:for(;;){for(var m;y!==a||i!==0&&y.nodeType!==3||(p=c+i),y!==l||u!==0&&y.nodeType!==3||(d=c+u),y.nodeType===3&&(c+=y.nodeValue.length),(m=y.firstChild)!==null;)g=y,y=m;for(;;){if(y===s)break t;if(g===a&&++h===i&&(p=c),g===l&&++v===u&&(d=c),(m=y.nextSibling)!==null)break;y=g,g=y.parentNode}y=m}a=p===-1||d===-1?null:{start:p,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;uf={focusedElem:s,selectionRange:a},Nl=!1,Es=null,zl=!1,L=r;do try{AT()}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);Es=null,L=r;do try{for(s=e;L!==null;){var f=L.flags;if(f&16&&bs(L.stateNode,""),f&128){var x=L.alternate;if(x!==null){var _=x.ref;_!==null&&(typeof _=="function"?_(null):_.current=null)}}switch(f&1038){case 2:Dv(L),L.flags&=-3;break;case 6:Dv(L),L.flags&=-3,hf(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,hf(L.alternate,L);break;case 4:hf(L.alternate,L);break;case 8:a=L,n0(s,a);var C=a.alternate;Nv(a),C!==null&&Nv(C)}L=L.nextEffect}}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);if(_=uf,x=Zy(),f=_.focusedElem,s=_.selectionRange,x!==f&&f&&f.ownerDocument&&xS(f.ownerDocument.documentElement,f)){for(s!==null&&Mf(f)&&(x=s.start,_=s.end,_===void 0&&(_=x),"selectionStart"in f?(f.selectionStart=x,f.selectionEnd=Math.min(_,f.value.length)):(_=(x=f.ownerDocument||document)&&x.defaultView||window,_.getSelection&&(_=_.getSelection(),a=f.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=Yy(f,C),i=Yy(f,s),a&&i&&(_.rangeCount!==1||_.anchorNode!==a.node||_.anchorOffset!==a.offset||_.focusNode!==i.node||_.focusOffset!==i.offset)&&(x=x.createRange(),x.setStart(a.node,a.offset),_.removeAllRanges(),C>s?(_.addRange(x),_.extend(i.node,i.offset)):(x.setEnd(i.node,i.offset),_.addRange(x)))))),x=[],_=f;_=_.parentNode;)_.nodeType===1&&x.push({element:_,left:_.scrollLeft,top:_.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<x.length;f++)_=x[f],_.element.scrollLeft=_.left,_.element.scrollTop=_.top}Nl=!!lf,uf=lf=null,e.current=n,L=r;do try{for(f=e;L!==null;){var w=L.flags;if(w&36&&bT(f,L.alternate,L),w&128){x=void 0;var b=L.ref;if(b!==null){var I=L.stateNode;switch(L.tag){case 5:x=I;break;default:x=I}typeof b=="function"?b(x):b.current=x}}L=L.nextEffect}}catch(P){if(L===null)throw Error(T(330));tr(L,P),L=L.nextEffect}while(L!==null);L=null,pT(),D=o}else e.current=n;if(ir)ir=!1,_s=e,cs=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(w=L,w.sibling=null,w.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(Xt=null),r===1?e===op?ws++:(ws=0,op=e):ws=0,n=n.stateNode,Hr&&typeof Hr.onCommitFiberRoot=="function")try{Hr.onCommitFiberRoot(Rp,n,void 0,(n.current.flags&64)===64)}catch{}if(_t(e,Le()),cu)throw cu=!1,e=tp,tp=null,e;return D&8||Zt(),null}function AT(){for(;L!==null;){var e=L.alternate;zl||Es===null||(L.flags&8?jy(L,Es)&&(zl=!0):L.tag===13&&TT(e,L)&&jy(L,Es)&&(zl=!0));var t=L.flags;t&256&&CT(e,L),!(t&512)||ir||(ir=!0,Os(97,function(){return lr(),null})),L=L.nextEffect}}function lr(){if(cs!==90){var e=97<cs?97:cs;return cs=90,Ur(e,NT)}return!1}function OT(e,t){np.push(t,e),ir||(ir=!0,Os(97,function(){return lr(),null}))}function c0(e,t){rp.push(t,e),ir||(ir=!0,Os(97,function(){return lr(),null}))}function NT(){if(_s===null)return!1;var e=_s;if(_s=null,D&48)throw Error(T(331));var t=D;D|=32;var n=rp;rp=[];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));tr(i,l)}}for(n=np,np=[],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));tr(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 D=t,Zt(),!0}function jv(e,t,n){t=Up(n,t),t=e0(e,t,1),Zn(e,t),t=tt(),e=Cu(e,1),e!==null&&(hu(e,1,t),_t(e,t))}function tr(e,t){if(e.tag===3)jv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){jv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Xt===null||!Xt.has(r))){e=Up(t,e);var o=t0(n,e,1);if(Zn(n,o),o=tt(),n=Cu(n,1),n!==null)hu(n,1,o),_t(n,o);else if(typeof r.componentDidCatch=="function"&&(Xt===null||!Xt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function MT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Ae&n)===n&&(Te===4||Te===3&&(Ae&62914560)===Ae&&500>Le()-Wp?Mo(e,0):Kp|=n),_t(e,t)}function DT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(cn===0&&(cn=Vo),t=xo(62914560&~cn),t===0&&(t=4194304)):t=Bo()===99?1:2:t=1),n=tt(),e=Cu(e,t),e!==null&&(hu(e,t,n),_t(e,n))}var d0;d0=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||$e.current)Mt=!0;else if(n&r)Mt=!!(e.flags&16384);else{switch(Mt=!1,t.tag){case 3:Cv(t),pf();break;case 5:gv(t);break;case 1:qe(t.type)&&Fl(t);break;case 4:Vf(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;de(Zl,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?bv(e,t,n):(de(ce,ce.current&1),t=fn(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 Rv(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,mf(e,t,n)}return fn(e,t,n)}else Mt=!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=jo(t,Oe.current),Ao(t,n),o=jp(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,qe(r)){var i=!0;Fl(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Np(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&tu(t,r,s,e),o.updater=wu,t.stateNode=o,o._reactInternals=t,Uf(t,r,e,n),t=qf(null,t,r,!0,i,n)}else t.tag=0,We(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=jT(o),e=Nt(o,e),i){case 0:t=$f(null,t,o,e,n);break e;case 1:t=Ev(null,t,o,e,n);break e;case 11:t=_v(null,t,o,e,n);break e;case 14:t=wv(null,t,o,Nt(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:Nt(r,o),$f(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),Ev(e,t,r,o,n);case 3:if(Cv(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,DS(e,t),Ns(t,r,null,n),r=t.memoizedState.element,r===o)pf(),t=fn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(qn=Lo(t.stateNode.containerInfo.firstChild),dn=t,i=Yt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Oo.push(i);for(n=HS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else We(e,t,r,n),pf();t=t.child}return t;case 5:return gv(t),e===null&&Kf(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,jf(r,o)?s=null:i!==null&&jf(r,i)&&(t.flags|=16),QS(e,t),We(e,t,s,n),t.child;case 6:return e===null&&Kf(t),null;case 13:return bv(e,t,n);case 4:return Vf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nu(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),_v(e,t,r,o,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(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(Zl,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=yt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!$e.current){t=fn(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=Yn(-1,n&-n),u.tag=2,Zn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),MS(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}We(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Ao(t,n),o=xt(o,i.unstable_observedBits),r=r(o),t.flags|=1,We(e,t,r,n),t.child;case 14:return o=t.type,i=Nt(o,t.pendingProps),i=Nt(o.type,i),wv(e,t,o,i,r,n);case 15:return XS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Nt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,qe(r)?(e=!0,Fl(t)):e=!1,Ao(t,n),jS(t,r,o),Uf(t,r,o,n),qf(null,t,r,!0,e,n);case 19:return Rv(e,t,n);case 23:return mf(e,t,n);case 24:return mf(e,t,n)}throw Error(T(156,t.tag))};function FT(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 vt(e,t,n,r){return new FT(e,t,n,r)}function qp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jT(e){if(typeof e=="function")return qp(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pu)return 11;if(e===mu)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=vt(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 Ul(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")qp(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Kn:return Do(n.children,o,i,t);case zv:s=8,o|=16;break;case up:s=8,o|=1;break;case fs:return e=vt(12,n,t,o|8),e.elementType=fs,e.type=fs,e.lanes=i,e;case ps:return e=vt(13,n,t,o),e.type=ps,e.elementType=ps,e.lanes=i,e;case Vl:return e=vt(19,n,t,o),e.elementType=Vl,e.lanes=i,e;case gp:return Gp(n,o,i,t);case xf:return e=vt(24,n,t,o),e.elementType=xf,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case cp:s=10;break e;case dp:s=9;break e;case pu:s=11;break e;case mu:s=14;break e;case fp:s=16,r=null;break e;case pp:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=vt(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Do(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Gp(e,t,n,r){return e=vt(23,e,r,t),e.elementType=gp,e.lanes=n,e}function yf(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function vf(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function BT(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=tf(0),this.expirationTimes=tf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tf(0),this.mutableSourceEagerHydrationData=null}function HT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Mr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function du(e,t,n,r){var o=t.current,i=tt(),s=Jn(o);e:if(n){n=n._reactInternals;t:{if($r(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(qe(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(qe(l)){n=PS(n,l,a);break e}}n=a}else n=or;return t.context===null?t.context=n:t.pendingContext=n,t=Yn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Zn(o,t),er(o,s,i),s}function Sf(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 Bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xp(e,t){Bv(e,t),(e=e.alternate)&&Bv(e,t)}function zT(){return null}function Qp(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new BT(e,t,n!=null&&n.hydrate===!0),t=vt(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Np(t),e[Uo]=n.current,ES(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}Qp.prototype.render=function(e){du(e,this._internalRoot,null,null)};Qp.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;du(null,e,null,function(){t[Uo]=null})};function Us(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function UT(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 Qp(e,0,t?{hydrate:!0}:void 0)}function bu(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=Sf(s);a.call(u)}}du(t,s,e,o)}else{if(i=n._reactRootContainer=UT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=Sf(s);l.call(u)}}i0(function(){du(t,s,e,o)})}return Sf(s)}nS=function(e){if(e.tag===13){var t=tt();er(e,4,t),Xp(e,4)}};xp=function(e){if(e.tag===13){var t=tt();er(e,67108864,t),Xp(e,67108864)}};rS=function(e){if(e.tag===13){var t=tt(),n=Jn(e);er(e,n,t),Xp(e,n)}};oS=function(e,t){return t()};Rf=function(e,t,n){switch(t){case"input":if(wf(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=xu(r);if(!o)throw Error(T(90));Vv(r),wf(r,o)}}}break;case"textarea":Wv(e,n);break;case"select":t=n.value,t!=null&&Po(e,!!n.multiple,t,!1)}};yp=o0;Zv=function(e,t,n,r,o){var i=D;D|=4;try{return Ur(98,e.bind(null,t,n,r,o))}finally{D=i,D===0&&(Wo(),Zt())}};vp=function(){!(D&49)&&(PT(),lr())};Jv=function(e,t){var n=D;D|=2;try{return e(t)}finally{D=n,D===0&&(Wo(),Zt())}};function f0(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Us(t))throw Error(T(200));return HT(e,t,null,n)}var VT={Events:[Bs,Co,xu,Qv,Yv,lr,{current:!1}]},is={findFiberByHostInstance:Fr,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},KT={bundleType:is.bundleType,version:is.version,rendererPackageName:is.rendererPackageName,rendererConfig:is.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=tS(e),e===null?null:e.stateNode},findFiberByHostInstance:is.findFiberByHostInstance||zT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ss=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ss.isDisabled&&ss.supportsFiber))try{Rp=ss.inject(KT),Hr=ss}catch{}var ss;wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VT;wt.createPortal=f0;wt.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=tS(t),e=e===null?null:e.stateNode,e};wt.flushSync=function(e,t){var n=D;if(n&48)return e(t);D|=1;try{if(e)return Ur(99,e.bind(null,t))}finally{D=n,Zt()}};wt.hydrate=function(e,t,n){if(!Us(t))throw Error(T(200));return bu(null,e,t,!0,n)};wt.render=function(e,t,n){if(!Us(t))throw Error(T(200));return bu(null,e,t,!1,n)};wt.unmountComponentAtNode=function(e){if(!Us(e))throw Error(T(40));return e._reactRootContainer?(i0(function(){bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Uo]=null})}),!0):!1};wt.unstable_batchedUpdates=o0;wt.unstable_createPortal=function(e,t){return f0(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};wt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Us(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return bu(e,t,n,!1,r)};wt.version="17.0.2"});var Tu=pe((FO,g0)=>{"use strict";function m0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m0)}catch(e){console.error(e)}}m0(),g0.exports=p0()});var V0=pe(U0=>{"use strict";var Yo=O();function Pk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ik=typeof Object.is=="function"?Object.is:Pk,Rk=Yo.useState,Lk=Yo.useEffect,Ak=Yo.useLayoutEffect,Ok=Yo.useDebugValue;function Nk(e,t){var n=t(),r=Rk({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Ak(function(){o.value=n,o.getSnapshot=t,Em(o)&&i({inst:o})},[e,n,t]),Lk(function(){return Em(o)&&i({inst:o}),e(function(){Em(o)&&i({inst:o})})},[e]),Ok(n),n}function Em(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ik(e,n)}catch{return!0}}function Mk(e,t){return t()}var Dk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Mk:Nk;U0.useSyncExternalStore=Yo.useSyncExternalStore!==void 0?Yo.useSyncExternalStore:Dk});var Cm=pe((CN,K0)=>{"use strict";K0.exports=V0()});var $0=pe(W0=>{"use strict";var Nu=O(),Fk=Cm();function jk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bk=typeof Object.is=="function"?Object.is:jk,Hk=Fk.useSyncExternalStore,zk=Nu.useRef,Uk=Nu.useEffect,Vk=Nu.useMemo,Kk=Nu.useDebugValue;W0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=zk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=Vk(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var v=s.value;if(o(v,h))return p=v}return p=h}if(v=p,Bk(c,h))return v;var y=r(h);return o!==void 0&&o(v,y)?v:(c=h,p=y)}var u=!1,c,p,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=Hk(e,i[0],i[1]);return Uk(function(){s.hasValue=!0,s.value=a},[a]),Kk(a),a}});var G0=pe((TN,q0)=>{"use strict";q0.exports=$0()});var ix=pe(G=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,Tm=_e?Symbol.for("react.element"):60103,km=_e?Symbol.for("react.portal"):60106,ju=_e?Symbol.for("react.fragment"):60107,Bu=_e?Symbol.for("react.strict_mode"):60108,Hu=_e?Symbol.for("react.profiler"):60114,zu=_e?Symbol.for("react.provider"):60109,Uu=_e?Symbol.for("react.context"):60110,Pm=_e?Symbol.for("react.async_mode"):60111,Vu=_e?Symbol.for("react.concurrent_mode"):60111,Ku=_e?Symbol.for("react.forward_ref"):60112,Wu=_e?Symbol.for("react.suspense"):60113,Gk=_e?Symbol.for("react.suspense_list"):60120,$u=_e?Symbol.for("react.memo"):60115,qu=_e?Symbol.for("react.lazy"):60116,Xk=_e?Symbol.for("react.block"):60121,Qk=_e?Symbol.for("react.fundamental"):60117,Yk=_e?Symbol.for("react.responder"):60118,Zk=_e?Symbol.for("react.scope"):60119;function ot(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Tm:switch(e=e.type,e){case Pm:case Vu:case ju:case Hu:case Bu:case Wu:return e;default:switch(e=e&&e.$$typeof,e){case Uu:case Ku:case qu:case $u:case zu:return e;default:return t}}case km:return t}}}function ox(e){return ot(e)===Vu}G.AsyncMode=Pm;G.ConcurrentMode=Vu;G.ContextConsumer=Uu;G.ContextProvider=zu;G.Element=Tm;G.ForwardRef=Ku;G.Fragment=ju;G.Lazy=qu;G.Memo=$u;G.Portal=km;G.Profiler=Hu;G.StrictMode=Bu;G.Suspense=Wu;G.isAsyncMode=function(e){return ox(e)||ot(e)===Pm};G.isConcurrentMode=ox;G.isContextConsumer=function(e){return ot(e)===Uu};G.isContextProvider=function(e){return ot(e)===zu};G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Tm};G.isForwardRef=function(e){return ot(e)===Ku};G.isFragment=function(e){return ot(e)===ju};G.isLazy=function(e){return ot(e)===qu};G.isMemo=function(e){return ot(e)===$u};G.isPortal=function(e){return ot(e)===km};G.isProfiler=function(e){return ot(e)===Hu};G.isStrictMode=function(e){return ot(e)===Bu};G.isSuspense=function(e){return ot(e)===Wu};G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ju||e===Vu||e===Hu||e===Bu||e===Wu||e===Gk||typeof e=="object"&&e!==null&&(e.$$typeof===qu||e.$$typeof===$u||e.$$typeof===zu||e.$$typeof===Uu||e.$$typeof===Ku||e.$$typeof===Qk||e.$$typeof===Yk||e.$$typeof===Zk||e.$$typeof===Xk)};G.typeOf=ot});var ax=pe((HN,sx)=>{"use strict";sx.exports=ix()});var mx=pe((zN,px)=>{"use strict";var Im=ax(),Jk={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},eP={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},tP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},dx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Rm={};Rm[Im.ForwardRef]=tP;Rm[Im.Memo]=dx;function lx(e){return Im.isMemo(e)?dx:Rm[e.$$typeof]||Jk}var nP=Object.defineProperty,rP=Object.getOwnPropertyNames,ux=Object.getOwnPropertySymbols,oP=Object.getOwnPropertyDescriptor,iP=Object.getPrototypeOf,cx=Object.prototype;function fx(e,t,n){if(typeof t!="string"){if(cx){var r=iP(t);r&&r!==cx&&fx(e,r,n)}var o=rP(t);ux&&(o=o.concat(ux(t)));for(var i=lx(e),s=lx(t),a=0;a<o.length;++a){var l=o[a];if(!eP[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=oP(t,l);try{nP(e,l,u)}catch{}}}}return e}px.exports=fx});var hx=pe(X=>{"use strict";var Lm=Symbol.for("react.element"),Am=Symbol.for("react.portal"),Gu=Symbol.for("react.fragment"),Xu=Symbol.for("react.strict_mode"),Qu=Symbol.for("react.profiler"),Yu=Symbol.for("react.provider"),Zu=Symbol.for("react.context"),sP=Symbol.for("react.server_context"),Ju=Symbol.for("react.forward_ref"),ec=Symbol.for("react.suspense"),tc=Symbol.for("react.suspense_list"),nc=Symbol.for("react.memo"),rc=Symbol.for("react.lazy"),aP=Symbol.for("react.offscreen"),gx;gx=Symbol.for("react.module.reference");function Ct(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Lm:switch(e=e.type,e){case Gu:case Qu:case Xu:case ec:case tc:return e;default:switch(e=e&&e.$$typeof,e){case sP:case Zu:case Ju:case rc:case nc:case Yu:return e;default:return t}}case Am:return t}}}X.ContextConsumer=Zu;X.ContextProvider=Yu;X.Element=Lm;X.ForwardRef=Ju;X.Fragment=Gu;X.Lazy=rc;X.Memo=nc;X.Portal=Am;X.Profiler=Qu;X.StrictMode=Xu;X.Suspense=ec;X.SuspenseList=tc;X.isAsyncMode=function(){return!1};X.isConcurrentMode=function(){return!1};X.isContextConsumer=function(e){return Ct(e)===Zu};X.isContextProvider=function(e){return Ct(e)===Yu};X.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lm};X.isForwardRef=function(e){return Ct(e)===Ju};X.isFragment=function(e){return Ct(e)===Gu};X.isLazy=function(e){return Ct(e)===rc};X.isMemo=function(e){return Ct(e)===nc};X.isPortal=function(e){return Ct(e)===Am};X.isProfiler=function(e){return Ct(e)===Qu};X.isStrictMode=function(e){return Ct(e)===Xu};X.isSuspense=function(e){return Ct(e)===ec};X.isSuspenseList=function(e){return Ct(e)===tc};X.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Gu||e===Qu||e===Xu||e===ec||e===tc||e===aP||typeof e=="object"&&e!==null&&(e.$$typeof===rc||e.$$typeof===nc||e.$$typeof===Yu||e.$$typeof===Zu||e.$$typeof===Ju||e.$$typeof===gx||e.getModuleId!==void 0)};X.typeOf=Ct});var vx=pe((VN,yx)=>{"use strict";yx.exports=hx()});var s_=pe(($2,i_)=>{"use strict";var BP=/["'&<>]/;i_.exports=HP;function HP(e){var t=""+e,n=BP.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=""";break;case 38:r="&";break;case 39:r="'";break;case 60:r="<";break;case 62:r=">";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 kg=pe((J4,Ow)=>{"use strict";var RI="Expected a function",Lw=NaN,LI="[object Symbol]",AI=/^\s+|\s+$/g,OI=/^[-+]0x[0-9a-f]+$/i,NI=/^0b[01]+$/i,MI=/^0o[0-7]+$/i,DI=parseInt,FI=typeof global=="object"&&global&&global.Object===Object&&global,jI=typeof self=="object"&&self&&self.Object===Object&&self,BI=FI||jI||Function("return this")(),HI=Object.prototype,zI=HI.toString,UI=Math.max,VI=Math.min,bg=function(){return BI.Date.now()};function KI(e,t,n){var r,o,i,s,a,l,u=0,c=!1,p=!1,d=!0;if(typeof e!="function")throw new TypeError(RI);t=Aw(t)||0,Tg(n)&&(c=!!n.leading,p="maxWait"in n,i=p?UI(Aw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function h(w){var b=r,I=o;return r=o=void 0,u=w,s=e.apply(I,b),s}function v(w){return u=w,a=setTimeout(m,t),c?h(w):s}function y(w){var b=w-l,I=w-u,P=t-b;return p?VI(P,i-I):P}function g(w){var b=w-l,I=w-u;return l===void 0||b>=t||b<0||p&&I>=i}function m(){var w=bg();if(g(w))return f(w);a=setTimeout(m,y(w))}function f(w){return a=void 0,d&&r?h(w):(r=o=void 0,s)}function x(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function _(){return a===void 0?s:f(bg())}function C(){var w=bg(),b=g(w);if(r=arguments,o=this,l=w,b){if(a===void 0)return v(l);if(p)return a=setTimeout(m,t),h(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=x,C.flush=_,C}function Tg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function WI(e){return!!e&&typeof e=="object"}function $I(e){return typeof e=="symbol"||WI(e)&&zI.call(e)==LI}function Aw(e){if(typeof e=="number")return e;if($I(e))return Lw;if(Tg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Tg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(AI,"");var n=NI.test(e);return n||MI.test(e)?DI(e.slice(2),n?2:8):OI.test(e)?Lw:+e}Ow.exports=KI});var LL={};Ce(LL,{Card:()=>me,Chip:()=>ty,ContentEditableInput:()=>io,DeepdeskAPI:()=>Dn,DeepdeskSDK:()=>Fa,InputMediator:()=>Sn,InputType:()=>zn,KeyboardHint:()=>cl,Label:()=>dl,Locale:()=>Qs,Section:()=>Bn,SectionList:()=>fl,Sources:()=>Hn,Suggestion:()=>oe,SuggestionList:()=>Wt,TextAreaInput:()=>xn,ToggleButton:()=>Ar,attachFile:()=>eC,authenticateWithKey:()=>ZE,createOverlayContainer:()=>di,createRangeFromOffsets:()=>oo,escapeHTML:()=>Ci,fetchPlatformConfig:()=>JE,formatTextMarkup:()=>YE,getRangeOffsets:()=>gd,getRangeText:()=>Na,isSupportedInputElement:()=>vd,updateContentEditable:()=>QE,updateTextArea:()=>XE,useStyles:()=>k,waitForElementVisibilityChange:()=>Sd});var $a=S(Y()),pt=S(O());var Wa=S(O()),Fh=S(Y()),ji=Wa.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Wa.useContext)(ji),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Fh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var jh={root:"_root_vr71j_1"};var Ir=S(E()),Vh=()=>(0,Ir.jsxs)("svg",{className:jh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Ir.jsx)("defs",{children:(0,Ir.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Ir.jsx)("title",{children:"Failed loading image"}),(0,Ir.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 kd={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 Rr=S(E()),qa=(0,pt.createContext)(kd),xC=({title:e,src:t})=>{let n=(0,pt.useContext)(qa),[r,o]=(0,pt.useState)(!1);return(0,pt.useEffect)(()=>{o(!1)},[t]),(0,Rr.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,Rr.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,Rr.jsx)(Vh,{})})},_C=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,pt.useContext)(qa);return(0,Rr.jsx)("div",{className:(0,$a.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},wC=({as:e="h1",cropText:t=!1,className:n,children:r})=>{let o=(0,pt.useContext)(qa);return pt.default.createElement(e,{className:(0,$a.default)(o.title,n,{[o.contentIsCropped]:t})},r)},Ga=({children:e})=>{let t=k("Card",kd);return(0,Rr.jsx)("div",{className:(0,$a.default)(t.root),children:(0,Rr.jsx)(qa.Provider,{value:t,children:e})})};Ga.Image=xC;Ga.Content=_C;Ga.Title=wC;var me=Ga;var Kh={root:"_root_nkim0_1"};var ll=S(O());var Pd=function(e,t){return Pd=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])},Pd(e,t)};function Hi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Pd(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var et=function(){return et=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},et.apply(this,arguments)};function Wh(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 Xa(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 Qa;(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"})(Qa||(Qa={}));var Ya=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 Za;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Za||(Za={}));function Id(e){return e.type===At.literal}function $h(e){return e.type===At.argument}function Ja(e){return e.type===At.number}function el(e){return e.type===At.date}function tl(e){return e.type===At.time}function nl(e){return e.type===At.select}function rl(e){return e.type===At.plural}function qh(e){return e.type===At.pound}function ol(e){return e.type===At.tag}function il(e){return!!(e&&typeof e=="object"&&e.type===Za.number)}function zi(e){return!!(e&&typeof e=="object"&&e.type===Za.dateTime)}function Rd(e){e.forEach(function(t){if(delete t.location,nl(t)||rl(t))for(var n in t.options)delete t.options[n].location,Rd(t.options[n].value);else Ja(t)&&il(t.style)||(el(t)||tl(t))&&zi(t.style)?delete t.style.location:ol(t)&&Rd(t.children)})}function Gh(e,t){t===void 0&&(t={}),t=et({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Ya(e,t).parse();if(n.err){var r=SyntaxError(Qa[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Rd(n.val),n.val}function sl(e,t){var n=t&&t.cache?t.cache:PC,r=t&&t.serializer?t.serializer:kC,o=t&&t.strategy?t.strategy:CC;return o(e,{cache:n,serializer:r})}function EC(e){return e==null||typeof e=="number"||typeof e=="boolean"}function Xh(e,t,n,r){var o=EC(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function Qh(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 Ld(e,t,n,r,o){return n.bind(t,e,r,o)}function CC(e,t){var n=e.length===1?Xh:Qh;return Ld(e,this,n,t.cache.create(),t.serializer)}function bC(e,t){return Ld(e,this,Qh,t.cache.create(),t.serializer)}function TC(e,t){return Ld(e,this,Xh,t.cache.create(),t.serializer)}var kC=function(){return JSON.stringify(arguments)};function Ad(){this.cache=Object.create(null)}Ad.prototype.get=function(e){return this.cache[e]};Ad.prototype.set=function(e,t){this.cache[e]=t};var PC={create:function(){return new Ad}},al={variadic:bC,monadic:TC};var Lr;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(Lr||(Lr={}));var Ui=function(e){Hi(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 Od=function(e){Hi(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('", "'),'"'),Lr.INVALID_VALUE,i)||this}return t}(Ui);var Yh=function(e){Hi(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),Lr.INVALID_VALUE,o)||this}return t}(Ui);var Zh=function(e){Hi(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,'"'),Lr.MISSING_VALUE,r)||this}return t}(Ui);var Pe;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Pe||(Pe={}));function IC(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Pe.literal||n.type!==Pe.literal?t.push(n):r.value+=n.value,t},[])}function RC(e){return typeof e=="function"}function Vi(e,t,n,r,o,i,s){if(e.length===1&&Id(e[0]))return[{type:Pe.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(Id(c)){a.push({type:Pe.literal,value:c.value});continue}if(qh(c)){typeof i=="number"&&a.push({type:Pe.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new Zh(p,s);var d=o[p];if($h(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Pe.literal:Pe.object,value:d});continue}if(el(c)){var h=typeof c.style=="string"?r.date[c.style]:zi(c.style)?c.style.parsedOptions:void 0;a.push({type:Pe.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(tl(c)){var h=typeof c.style=="string"?r.time[c.style]:zi(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Pe.literal,value:n.getDateTimeFormat(t,h).format(d)});continue}if(Ja(c)){var h=typeof c.style=="string"?r.number[c.style]:il(c.style)?c.style.parsedOptions:void 0;h&&h.scale&&(d=d*(h.scale||1)),a.push({type:Pe.literal,value:n.getNumberFormat(t,h).format(d)});continue}if(ol(c)){var v=c.children,y=c.value,g=o[y];if(!RC(g))throw new Yh(y,"function",s);var m=Vi(v,t,n,r,o,i),f=g(m.map(function(C){return C.value}));Array.isArray(f)||(f=[f]),a.push.apply(a,f.map(function(C){return{type:typeof C=="string"?Pe.literal:Pe.object,value:C}}))}if(nl(c)){var x=c.options[d]||c.options.other;if(!x)throw new Od(c.value,d,Object.keys(c.options),s);a.push.apply(a,Vi(x.value,t,n,r,o));continue}if(rl(c)){var x=c.options["=".concat(d)];if(!x){if(!Intl.PluralRules)throw new Ui(`Intl.PluralRules is not available in this environment.
|
|
10
10
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
11
|
-
`,Ir.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));w=c.options[x]||c.options.other}if(!w)throw new Od(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ui(w.value,t,n,r,o,d-(c.offset||0)));continue}}return R1(a)}function L1(e,t){return t?Je(Je(Je({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=Je(Je({},e[r]),t[r]||{}),n},{})):e}function A1(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=L1(e[r],t[r]),n},Je({},e)):e}function Nd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function O1(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:il(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Ga([void 0],n,!1)))},{cache:Nd(e.number),strategy:sl.variadic}),getDateTimeFormat:il(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Ga([void 0],n,!1)))},{cache:Nd(e.dateTime),strategy:sl.variadic}),getPluralRules:il(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Ga([void 0],n,!1)))},{cache:Nd(e.pluralRules),strategy:sl.variadic})}}var Jh=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 p=c.reduce(function(d,h){return!d.length||h.type!==ke.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return Ui(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=Wh(s,["formatters"]);this.ast=e.__parse(t,Je(Je({},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=A1(e.formats,r),this.formatters=o&&o.formatters||O1(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=Gh,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 N1(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var M1="dummy",Md=(0,al.createContext)(null);function H(e){let t=(0,al.useContext)(Md);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=N1(n,r);return i?new Jh(i).format(o):(t!==M1&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Dd={};Te(Dd,{enUS:()=>D1,nlNL:()=>F1});var D1={experimental:[{type:0,value:"Experimental"}]},F1={experimental:[{type:0,value:"Experimenteel"}]};var Fd=S(C()),ey=({children:e})=>{let t=P("Chip",Kh);return(0,Fd.jsx)("span",{className:t.root,children:e})},ll=()=>{let e=H(Dd);return(0,Fd.jsx)(ey,{children:e("experimental")})},ty=ey;var ry=S(X());var ny={root:"_root_cq1yq_1"};var oy=S(C());var j1={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},H1=({className:e,keyCode:t,...n})=>{let r=P("KeyboardHint",ny);return(0,oy.jsx)("span",{"data-key":j1[t],className:(0,ry.default)(e,r.root),...n})},ul=H1;var sy=S(X());var iy={root:"_root_4a08n_1"};var ay=S(C()),B1=({className:e,children:t,...n})=>{let r=P("Label",iy);return(0,ay.jsx)("span",{...n,className:(0,sy.default)(e,r.root),children:t})},cl=B1;var ly={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var co=S(C()),U1=({title:e,children:t,type:n,...r})=>{let o=P("Section",ly);return(0,co.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,co.jsx)("div",{className:o.subTitleContainer,children:(0,co.jsx)("span",{className:o.subtitle,children:e})}),(0,co.jsx)("div",{className:o.suggestions,children:t})]})},Hn=U1;var cy=S(X()),dy=S(O());var uy={root:"_root_19wxp_1"};var fy=S(C()),z1=dy.default.forwardRef(({className:e,children:t},n)=>{let r=P("SectionList",uy);return(0,fy.jsx)("div",{ref:n,className:(0,cy.default)(r.root,e),children:t})}),dl=z1;var zi=S(X()),gt=S(O());var jd={root:"_root_9kn3u_10",fadein:"_fadein_9kn3u_1",isClickable:"_isClickable_9kn3u_47",isSelected:"_isSelected_9kn3u_52",actions:"_actions_9kn3u_76",actionsIsFixed:"_actionsIsFixed_9kn3u_98",actionButton:"_actionButton_9kn3u_106",dropdownList:"_dropdownList_9kn3u_127",dropdownButton:"_dropdownButton_9kn3u_142",dropdownItem:"_dropdownItem_9kn3u_152",dropdownItemButton:"_dropdownItemButton_9kn3u_161",actionButtonIsPrimary:"_actionButtonIsPrimary_9kn3u_175",actionButtonIsDisabled:"_actionButtonIsDisabled_9kn3u_179",labels:"_labels_9kn3u_187",label:"_label_9kn3u_187"};var mt=S(C()),fo=(0,gt.createContext)(jd),V1=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(fo);return(0,mt.jsx)("div",{...n,className:(0,zi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},K1=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(fo);return(0,mt.jsxs)("div",{className:(0,zi.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})]})},W1=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(fo);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})})},$1=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(fo);return(0,mt.jsx)("button",{type:"button",className:(0,zi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Hd=({labels:e})=>{let t=(0,gt.useContext)(fo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},po=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=P("Suggestion",jd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,zi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(fo.Provider,{value:a,children:r})})});po.Labels=Hd;po.Actions=V1;po.ActionButton=$1;po.DropdownButton=K1;po.DropdownItem=W1;var oe=po;var my=S(X());var py={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var gy=S(C()),q1=({withDivider:e,children:t})=>{let n=P("SuggestionList",py);return(0,gy.jsx)("div",{className:(0,my.default)(n.root,{[n.isWithDivider]:e}),children:t})},Wt=q1;var yy=S(X());var hy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var fl=S(C()),G1=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=P("ToggleButton",hy);return(0,fl.jsx)("button",{type:"button",className:(0,yy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,fl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,fl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Lr=G1;var vy=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,mo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Sy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Bn=(d=>(d.SEARCH="search",d.TEMPLATE="template",d.ELASTIC_SEARCH="studio-search",d.GPT="gpt",d.TRIE="trie",d.TRIE_WITH_TYPOS="trie-with-typos",d.SEMANTIC="semantic",d.TEXT_RECOMMENDATION="text_recommendation",d.URL_RECOMMENDATION="url_recommendation",d.LINK_RECOMMENDATION="link_recommendation",d.PERSONAL_COLLECTION="personal-collection",d.PERSONAL_COLLECTION_SEARCH="personal-collection-search",d))(Bn||{}),Un=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(Un||{});var Fn=S(_u());var oC=S(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 gn(e){return!!e&&!!e[le]}function Dt(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)===Zb}(e)||Array.isArray(e)||!!e[Ew]||!!(!((t=e.constructor)===null||t===void 0)&&t[Ew])||im(e)||sm(e))}function qr(e,t,n){n===void 0&&(n=!1),Go(e)===0?(n?Object.keys:qo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Go(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:im(e)?2:sm(e)?3:0}function $o(e,t){return Go(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wb(e,t){return Go(e)===2?e.get(t):e[t]}function Cw(e,t,n){var r=Go(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Tw(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function im(e){return Xb&&e instanceof Map}function sm(e){return Yb&&e instanceof Set}function ur(e){return e.o||e.t}function am(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Pw(e);delete t[le];for(var n=qo(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 lm(e,t){return t===void 0&&(t=!1),um(e)||gn(e)||!Dt(e)||(Go(e)>1&&(e.set=e.add=e.clear=e.delete=$b),Object.freeze(e),t&&qr(e,function(n,r){return lm(r,!0)},!0)),e}function $b(){Ct(2)}function um(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Jt(e){var t=om[e];return t||Ct(18,e),t}function qb(e,t){om[e]||(om[e]=t)}function tm(){return zs}function Yp(e,t){t&&(Jt("Patches"),e.u=[],e.s=[],e.v=t)}function bu(e){nm(e),e.p.forEach(Gb),e.p=null}function nm(e){e===zs&&(zs=e.l)}function hw(e){return zs={p:[],l:zs,h:e,m:!0,_:0}}function Gb(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function Zp(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Jt("ES5").S(t,e,r),r?(n[le].P&&(bu(t),Ct(4)),Dt(e)&&(e=Pu(t,e),t.l||ku(t,e)),t.u&&Jt("Patches").M(n[le].t,e,t.u,t.s)):e=Pu(t,n,[]),bu(t),t.u&&t.v(t.u,t.s),e!==bw?e:void 0}function Pu(e,t,n){if(um(t))return t;var r=t[le];if(!r)return qr(t,function(a,l){return yw(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return ku(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=am(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),qr(i,function(a,l){return yw(e,r,o,a,l,n,s)}),ku(e,o,!1),n&&e.u&&Jt("Patches").N(r,n,e.u,e.s)}return r.o}function yw(e,t,n,r,o,i,s){if(gn(o)){var a=Pu(e,o,i&&t&&t.i!==3&&!$o(t.R,r)?i.concat(r):void 0);if(Cw(n,r,a),!gn(a))return;e.m=!1}else s&&n.add(o);if(Dt(o)&&!um(o)){if(!e.h.D&&e._<1)return;Pu(e,o),t&&t.A.l||ku(e,o)}}function ku(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&lm(t,n)}function Jp(e,t){var n=e[le];return(n?ur(n):e)[t]}function vw(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 cr(e){e.P||(e.P=!0,e.l&&cr(e.l))}function em(e){e.o||(e.o=am(e.t))}function rm(e,t,n){var r=im(t)?Jt("MapSet").F(t,n):sm(t)?Jt("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:tm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Vs;s&&(l=[a],u=Us);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):Jt("ES5").J(t,n);return(n?n.A:tm()).p.push(r),r}function Qb(e){return gn(e)||Ct(22,e),function t(n){if(!Dt(n))return n;var r,o=n[le],i=Go(n);if(o){if(!o.P&&(o.i<4||!Jt("ES5").K(o)))return o.t;o.I=!0,r=Sw(n,i),o.I=!1}else r=Sw(n,i);return qr(r,function(s,a){o&&Wb(o.t,s)===a||Cw(r,s,t(a))}),i===3?new Set(r):r}(e)}function Sw(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return am(e)}function _w(){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 Vs.get(u,s)},set:function(u){var c=this[le];Vs.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)&&cr(l);break;case 4:n(l)&&cr(l)}}}function n(s){for(var a=s.t,l=s.k,u=qo(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!$o(a,p))return!0;var h=l[p],v=h&&h[le];if(v?v.t!==d:!Tw(h,d))return!0}}var y=!!a[le];return u.length!==qo(a).length+(y?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(ur(s)))}var i={};qb("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var h=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(h,""+v,e(v,!0));return h}var y=Pw(d);delete y[le];for(var g=qo(y),m=0;m<g.length;m++){var f=g[m];y[f]=e(f,p||!!y[f].enumerable)}return Object.create(Object.getPrototypeOf(d),y)}(l,s),c={i:l?5:4,A:a?a.A:tm(),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?gn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[le];if(p){var d=p.t,h=p.k,v=p.R,y=p.i;if(y===4)qr(h,function(x){x!==le&&(d[x]!==void 0||$o(d,x)?v[x]||u(h[x]):(v[x]=!0,cr(p)))}),qr(d,function(x){h[x]!==void 0||$o(h,x)||(v[x]=!1,cr(p))});else if(y===5){if(r(p)&&(cr(p),v.length=!0),h.length<d.length)for(var g=h.length;g<d.length;g++)v[g]=!1;else for(var m=d.length;m<h.length;m++)v[m]=!0;for(var f=Math.min(h.length,d.length),w=0;w<f;w++)h.hasOwnProperty(w)||(v[w]=!0),v[w]===void 0&&u(h[w])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var ww,zs,cm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",Xb=typeof Map<"u",Yb=typeof Set<"u",xw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",bw=cm?Symbol.for("immer-nothing"):((ww={})["immer-nothing"]=!0,ww),Ew=cm?Symbol.for("immer-draftable"):"__$immer_draftable",le=cm?Symbol.for("immer-state"):"__$immer_state";var Zb=""+Object.prototype.constructor,qo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Pw=Object.getOwnPropertyDescriptors||function(e){var t={};return qo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},om={},Vs={get:function(e,t){if(t===le)return e;var n=ur(e);if(!$o(n,t))return function(o,i,s){var a,l=vw(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||!Dt(r)?r:r===Jp(e.t,t)?(em(e),e.o[t]=rm(e.A.h,r,e)):r},has:function(e,t){return t in ur(e)},ownKeys:function(e){return Reflect.ownKeys(ur(e))},set:function(e,t,n){var r=vw(ur(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Jp(ur(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(Tw(n,o)&&(n!==void 0||$o(e.t,t)))return!0;em(e),cr(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 Jp(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,em(e),cr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ur(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)}},Us={};qr(Vs,function(e,t){Us[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Us.deleteProperty=function(e,t){return Us.set.call(this,e,t,void 0)},Us.set=function(e,t,n){return Vs.set.call(this,e[0],t,n,e[0])};var Jb=function(){function e(n){var r=this;this.O=xw,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(y){var g=this;y===void 0&&(y=a);for(var m=arguments.length,f=Array(m>1?m-1:0),w=1;w<m;w++)f[w-1]=arguments[w];return l.produce(y,function(x){var T;return(T=i).call.apply(T,[g,x].concat(f))})}}var u;if(typeof i!="function"&&Ct(6),s!==void 0&&typeof s!="function"&&Ct(7),Dt(o)){var c=hw(r),p=rm(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?bu(c):nm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Yp(c,s),Zp(y,c)},function(y){throw bu(c),y}):(Yp(c,s),Zp(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===bw&&(u=void 0),r.D&&lm(u,!0),s){var h=[],v=[];Jt("Patches").M(o,u,h,v),s(h,v)}return u}Ct(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(h){return o.apply(void 0,[h].concat(p))})};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){Dt(n)||Ct(8),gn(n)&&(n=Qb(n));var r=hw(this),o=rm(this,n,void 0);return o[le].C=!0,nm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return Yp(i,r),Zp(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!xw&&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=Jt("Patches").$;return gn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),nt=new Jb,eP=nt.produce,FO=nt.produceWithPatches.bind(nt),jO=nt.setAutoFreeze.bind(nt),HO=nt.setUseProxies.bind(nt),BO=nt.applyPatches.bind(nt),UO=nt.createDraft.bind(nt),zO=nt.finishDraft.bind(nt),Ru=eP;function dr(e){"@babel/helpers - typeof";return dr=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},dr(e)}function dm(e,t){if(dr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fm(e){var t=dm(e,"string");return dr(t)==="symbol"?t:String(t)}function pm(e,t,n){return t=fm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kw(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 Iu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kw(Object(n),!0).forEach(function(r){pm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(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 Rw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mm=function(){return Math.random().toString(36).substring(7).split("").join(".")},Lu={INIT:"@@redux/INIT"+mm(),REPLACE:"@@redux/REPLACE"+mm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mm()}};function tP(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 gm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ne(1));return n(gm)(e,t)}if(typeof e!="function")throw new Error(Ne(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(Ne(3));return i}function p(y){if(typeof y!="function")throw new Error(Ne(4));if(l)throw new Error(Ne(5));var g=!0;return u(),a.push(y),function(){if(g){if(l)throw new Error(Ne(6));g=!1,u();var f=a.indexOf(y);a.splice(f,1),s=null}}}function d(y){if(!tP(y))throw new Error(Ne(7));if(typeof y.type>"u")throw new Error(Ne(8));if(l)throw new Error(Ne(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var f=g[m];f()}return y}function h(y){if(typeof y!="function")throw new Error(Ne(10));o=y,d({type:Lu.REPLACE})}function v(){var y,g=p;return y={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(Ne(11));function w(){f.next&&f.next(c())}w();var x=g(w);return{unsubscribe:x}}},y[Rw]=function(){return this},y}return d({type:Lu.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:h},r[Rw]=v,r}function nP(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Lu.INIT});if(typeof r>"u")throw new Error(Ne(12));if(typeof n(void 0,{type:Lu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ne(13))})}function Au(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{nP(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,h={},v=0;v<i.length;v++){var y=i[v],g=n[y],m=u[y],f=g(m,c);if(typeof f>"u"){var w=c&&c.type;throw new Error(Ne(14))}h[y]=f,d=d||f!==m}return d=d||i.length!==Object.keys(u).length,d?h:u}}function Qo(){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 Iw(){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(Ne(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Qo.apply(void 0,a)(o.dispatch),Iu(Iu({},o),{},{dispatch:i})}}}function Lw(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 Aw=Lw();Aw.withExtraArgument=Lw;var hm=Aw;var Fw=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)}}(),rP=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}}},Xo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},oP=Object.defineProperty,iP=Object.defineProperties,sP=Object.getOwnPropertyDescriptors,Ow=Object.getOwnPropertySymbols,aP=Object.prototype.hasOwnProperty,lP=Object.prototype.propertyIsEnumerable,Nw=function(e,t,n){return t in e?oP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},fr=function(e,t){for(var n in t||(t={}))aP.call(t,n)&&Nw(e,n,t[n]);if(Ow)for(var r=0,o=Ow(t);r<o.length;r++){var n=o[r];lP.call(t,n)&&Nw(e,n,t[n])}return e},ym=function(e,t){return iP(e,sP(t))},uP=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 cP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Qo:Qo.apply(null,arguments)},sN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function dP(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 fP=function(e){Fw(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,Xo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Xo([void 0],n.concat(this))))},t}(Array),pP=function(e){Fw(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,Xo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Xo([void 0],n.concat(this))))},t}(Array);function wm(e){return Dt(e)?Ru(e,function(){}):e}function mP(e){return typeof e=="boolean"}function gP(){return function(t){return hP(t)}}function hP(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 fP;if(n&&(mP(n)?a.push(hm):a.push(hm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var vm=!0;function jw(e){var t=gP(),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,p=n.enhancers,d=p===void 0?void 0:p,h;if(typeof o=="function")h=o;else if(dP(o))h=Au(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 v=s;if(typeof v=="function"&&(v=v(t),!vm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vm&&v.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=Iw.apply(void 0,v),g=Qo;l&&(g=cP(fr({trace:!vm},typeof l=="object"&&l)));var m=new pP(y),f=m;Array.isArray(d)?f=Xo([y],d):typeof d=="function"&&(f=d(m));var w=g.apply(void 0,f);return gm(h,c,w)}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 fr(fr({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 Hw(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 yP(e){return typeof e=="function"}function vP(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?Hw(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(yP(e))l=function(){return wm(e())};else{var u=wm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var h=Xo([i[d.type]],s.filter(function(v){var y=v.matcher;return y(d)}).map(function(v){var y=v.reducer;return y}));return h.filter(function(v){return!!v}).length===0&&(h=[a]),h.reduce(function(v,y){if(y)if(gn(v)){var g=v,m=y(g,d);return m===void 0?v:m}else{if(Dt(v))return Ru(v,function(f){return y(f,d)});var m=y(v,d);if(m===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return v},p)}return c.getInitialState=l,c}function SP(e,t){return e+"/"+t}function j(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:wm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=SP(t,c),h,v;"reducer"in p?(h=p.reducer,v=p.prepare):h=p,i[c]=h,s[d]=h,a[c]=v?fe(d,v):fe(d)});function l(){var c=typeof e.extraReducers=="function"?Hw(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,h=c[1],v=h===void 0?[]:h,y=c[2],g=y===void 0?void 0:y,m=fr(fr({},d),s);return vP(n,function(f){for(var w in m)f.addCase(w,m[w]);for(var x=0,T=v;x<T.length;x++){var E=T[x];f.addMatcher(E.matcher,E.reducer)}g&&f.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var wP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",xP=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=wP[Math.random()*64|0];return t},EP=["name","message","stack","code"],Sm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Mw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),CP=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=EP;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,p,d,h){return{payload:c,meta:ym(fr({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:ym(fr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,h,v){return{payload:h,error:(r&&r.serializeError||CP)(c||"Rejected"),meta:ym(fr({},v||{}),{arg:d,requestId:p,rejectedWithValue:!!h,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(p,d,h){var v=r!=null&&r.idGenerator?r.idGenerator(c):xP(),y=new l,g,m=!1;function f(x){g=x,y.abort()}var w=function(){return uP(this,null,function(){var x,T,E,_,R,k,N;return rP(this,function(te){switch(te.label){case 0:return te.trys.push([0,4,,5]),_=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:h}),_P(_)?[4,_]:[3,2];case 1:_=te.sent(),te.label=2;case 2:if(_===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,R=new Promise(function(z,je){return y.signal.addEventListener("abort",function(){return je({name:"AbortError",message:g||"Aborted"})})}),p(i(v,c,(T=r==null?void 0:r.getPendingMeta)==null?void 0:T.call(r,{requestId:v,arg:c},{getState:d,extra:h}))),[4,Promise.race([R,Promise.resolve(n(c,{dispatch:p,getState:d,extra:h,requestId:v,signal:y.signal,abort:f,rejectWithValue:function(z,je){return new Sm(z,je)},fulfillWithValue:function(z,je){return new Mw(z,je)}})).then(function(z){if(z instanceof Sm)throw z;return z instanceof Mw?o(z.payload,v,c,z.meta):o(z,v,c)})])];case 3:return E=te.sent(),[3,5];case 4:return k=te.sent(),E=k instanceof Sm?s(null,v,c,k.payload,k.meta):s(k,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition,N||p(E),[2,E]}})})}();return Object.assign(w,{abort:f,requestId:v,arg:c,unwrap:function(){return w.then(TP)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function TP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function _P(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var bP="task",Bw="listener",Uw="completed",xm="cancelled",cN="task-"+xm,dN="task-"+Uw,fN=Bw+"-"+xm,pN=Bw+"-"+Uw,mN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=bP+" "+xm+" (reason: "+t+")"}return e}();var Em="listenerMiddleware";var gN=fe(Em+"/add"),hN=fe(Em+"/removeAll"),yN=fe(Em+"/remove");var Dw,vN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(Dw||(Dw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},PP=function(e){return function(t){setTimeout(t,e)}},SN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:PP(10);_w();var R0=S(Tm()),I0=S(Gw());var _m=S(_u());function WP(e){e()}var Qw=WP,Xw=e=>Qw=e,Yw=()=>Qw;var Zo=S(O());var e0=S(O());var Nu=S(O()),Zw=Symbol.for(`react-redux-context-${Nu.version}`),Jw=globalThis;function $P(){let e=Jw[Zw];return e||(e=(0,Nu.createContext)(null),Jw[Zw]=e),e}var Me=new Proxy({},new Proxy({},{get(e,t){let n=$P();return(r,...o)=>Reflect[t](n,...o)}}));function Ks(e=Me){return function(){return(0,e0.useContext)(e)}}var Mu=Ks();var Du=()=>{throw new Error("uSES not initialized!")};var t0=Du,n0=e=>{t0=e},qP=(e,t)=>e===t;function r0(e=Me){let t=e===Me?Mu:Ks(e);return function(r,o={}){let{equalityFn:i=qP,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),h=(0,Zo.useRef)(!0),v=(0,Zo.useCallback)({[r.name](g){return r(g)}}[r.name],[r,p,s]),y=t0(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,Zo.useDebugValue)(y),y}}var A=r0();function hn(){return hn=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},hn.apply(this,arguments)}function Ws(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 Mm=S(m0()),Y=S(O()),_0=S(v0());var uk=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function ck(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function h(f,w){return l=f,u=w,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function y(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function g(){let f=e(l,u),w=!s(f,c);return c=f,w&&(d=n(c,p,u)),d}function m(f,w){let x=!i(w,u),T=!o(f,l,w,u);return l=f,u=w,x&&T?v():x?y():T?g():d}return function(w,x){return a?m(w,x):h(w,x)}}function Om(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=Ws(t,uk),s=n(e,i),a=r(e,i),l=o(e,i);return ck(s,a,l,e,i)}function Nm(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 $s(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function S0(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function rc(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=S0(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=S0(u),u=i(a,l)),u},i}}function Jo(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function w0(e){return e&&typeof e=="object"?$s(t=>Nm(e,t)):e?typeof e=="function"?rc(e,"mapDispatchToProps"):Jo(e,"mapDispatchToProps"):$s(t=>({dispatch:t}))}function x0(e){return e?typeof e=="function"?rc(e,"mapStateToProps"):Jo(e,"mapStateToProps"):$s(()=>({}))}function dk(e,t,n){return hn({},n,e,t)}function fk(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let p=e(l,u,c);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function E0(e){return e?typeof e=="function"?fk(e):Jo(e,"mergeProps"):()=>dk}function pk(){let e=Yw(),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 C0={notify(){},get:()=>[]};function oc(e,t){let n,r=C0;function o(p){return l(),r.subscribe(p)}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=pk())}function u(){n&&(n(),n=void 0,r.clear(),r=C0)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var ic=S(O()),mk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ei=mk?ic.useLayoutEffect:ic.useEffect;function T0(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ti(e,t){if(T0(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])||!T0(e[n[o]],t[n[o]]))return!1;return!0}var gk=["reactReduxForwardedRef"],b0=Du,P0=e=>{b0=e};var hk=[null,null];function yk(e,t,n){ei(()=>e(...t),n)}function vk(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function Sk(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,h=()=>{if(p||!a.current)return;let y=t.getState(),g,m;try{g=r(y,o.current)}catch(f){m=f,d=f}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function wk(e,t){return e===t}function xk(e,t,n,{pure:r,areStatesEqual:o=wk,areOwnPropsEqual:i=ti,areStatePropsEqual:s=ti,areMergedPropsEqual:a=ti,forwardRef:l=!1,context:u=Me}={}){let c=u,p=x0(e),d=w0(t),h=E0(n),v=!!e;return g=>{let m=g.displayName||g.name||"Component",f=`Connect(${m})`,w={shouldHandleStateChanges:v,displayName:f,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(_){let[R,k,N]=(0,Y.useMemo)(()=>{let{reactReduxForwardedRef:dt}=_,Pr=Ws(_,gk);return[_.context,dt,Pr]},[_]),te=(0,Y.useMemo)(()=>R&&R.Consumer&&(0,_0.isContextConsumer)(Y.default.createElement(R.Consumer,null))?R:c,[R,c]),z=(0,Y.useContext)(te),je=!!_.store&&!!_.store.getState&&!!_.store.dispatch,on=!!z&&!!z.store,Kt=je?_.store:z.store,ao=on?z.getServerState:Kt.getState,Ii=(0,Y.useMemo)(()=>Om(Kt.dispatch,w),[Kt]),[_r,Fa]=(0,Y.useMemo)(()=>{if(!v)return hk;let dt=oc(Kt,je?void 0:z.subscription),Pr=dt.notifyNestedSubs.bind(dt);return[dt,Pr]},[Kt,je,z]),ja=(0,Y.useMemo)(()=>je?z:hn({},z,{subscription:_r}),[je,z,_r]),Li=(0,Y.useRef)(),Ai=(0,Y.useRef)(N),sn=(0,Y.useRef)(),Oi=(0,Y.useRef)(!1),br=(0,Y.useRef)(!1),I=(0,Y.useRef)(!1),W=(0,Y.useRef)();ei(()=>(I.current=!0,()=>{I.current=!1}),[]);let Lt=(0,Y.useMemo)(()=>()=>sn.current&&N===Ai.current?sn.current:Ii(Kt.getState(),N),[Kt,N]),jn=(0,Y.useMemo)(()=>Pr=>_r?Sk(v,Kt,_r,Ii,Ai,Li,Oi,I,sn,Fa,Pr):()=>{},[_r]);yk(vk,[Ai,Li,Oi,N,sn,Fa]);let an;try{an=b0(jn,Lt,ao?()=>Ii(ao(),N):Lt)}catch(dt){throw W.current&&(dt.message+=`
|
|
11
|
+
`,Lr.MISSING_INTL_API,s);var _=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));x=c.options[_]||c.options.other}if(!x)throw new Od(c.value,d,Object.keys(c.options),s);a.push.apply(a,Vi(x.value,t,n,r,o,d-(c.offset||0)));continue}}return IC(a)}function LC(e,t){return t?et(et(et({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=et(et({},e[r]),t[r]||{}),n},{})):e}function AC(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=LC(e[r],t[r]),n},et({},e)):e}function Nd(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function OC(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:sl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,Xa([void 0],n,!1)))},{cache:Nd(e.number),strategy:al.variadic}),getDateTimeFormat:sl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,Xa([void 0],n,!1)))},{cache:Nd(e.dateTime),strategy:al.variadic}),getPluralRules:sl(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,Xa([void 0],n,!1)))},{cache:Nd(e.pluralRules),strategy:al.variadic})}}var Jh=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 p=c.reduce(function(d,h){return!d.length||h.type!==Pe.literal||typeof d[d.length-1]!="string"?d.push(h.value):d[d.length-1]+=h.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return Vi(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=Wh(s,["formatters"]);this.ast=e.__parse(t,et(et({},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=AC(e.formats,r),this.formatters=o&&o.formatters||OC(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=Gh,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 NC(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var MC="dummy",Md=(0,ll.createContext)(null);function B(e){let t=(0,ll.useContext)(Md);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=NC(n,r);return i?new Jh(i).format(o):(t!==MC&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var Dd={};Ce(Dd,{enUS:()=>DC,nlNL:()=>FC});var DC={experimental:[{type:0,value:"Experimental"}]},FC={experimental:[{type:0,value:"Experimenteel"}]};var Fd=S(E()),ey=({children:e})=>{let t=k("Chip",Kh);return(0,Fd.jsx)("span",{className:t.root,children:e})},ul=()=>{let e=B(Dd);return(0,Fd.jsx)(ey,{children:e("experimental")})},ty=ey;var ry=S(Y());var ny={root:"_root_cq1yq_1"};var oy=S(E());var jC={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},BC=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",ny);return(0,oy.jsx)("span",{"data-key":jC[t],className:(0,ry.default)(e,r.root),...n})},cl=BC;var sy=S(Y());var iy={root:"_root_4a08n_1"};var ay=S(E()),HC=({className:e,children:t,...n})=>{let r=k("Label",iy);return(0,ay.jsx)("span",{...n,className:(0,sy.default)(e,r.root),children:t})},dl=HC;var ly={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var co=S(E()),zC=({title:e,children:t,type:n,...r})=>{let o=k("Section",ly);return(0,co.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,co.jsx)("div",{className:o.subTitleContainer,children:(0,co.jsx)("span",{className:o.subtitle,children:e})}),(0,co.jsx)("div",{className:o.suggestions,children:t})]})},Bn=zC;var cy=S(Y()),dy=S(O());var uy={root:"_root_19wxp_1"};var fy=S(E()),UC=dy.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",uy);return(0,fy.jsx)("div",{ref:n,className:(0,cy.default)(r.root,e),children:t})}),fl=UC;var Ki=S(Y()),gt=S(O());var jd={root:"_root_9kn3u_10",fadein:"_fadein_9kn3u_1",isClickable:"_isClickable_9kn3u_47",isSelected:"_isSelected_9kn3u_52",actions:"_actions_9kn3u_76",actionsIsFixed:"_actionsIsFixed_9kn3u_98",actionButton:"_actionButton_9kn3u_106",dropdownList:"_dropdownList_9kn3u_127",dropdownButton:"_dropdownButton_9kn3u_142",dropdownItem:"_dropdownItem_9kn3u_152",dropdownItemButton:"_dropdownItemButton_9kn3u_161",actionButtonIsPrimary:"_actionButtonIsPrimary_9kn3u_175",actionButtonIsDisabled:"_actionButtonIsDisabled_9kn3u_179",labels:"_labels_9kn3u_187",label:"_label_9kn3u_187"};var mt=S(E()),fo=(0,gt.createContext)(jd),VC=({fixed:e,children:t,...n})=>{let r=(0,gt.useContext)(fo);return(0,mt.jsx)("div",{...n,className:(0,Ki.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},KC=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,gt.useContext)(fo);return(0,mt.jsxs)("div",{className:(0,Ki.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})]})},WC=({index:e,label:t,onClick:n})=>{let r=(0,gt.useContext)(fo);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})})},$C=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,gt.useContext)(fo);return(0,mt.jsx)("button",{type:"button",className:(0,Ki.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},Bd=({labels:e})=>{let t=(0,gt.useContext)(fo);return(0,mt.jsx)("div",{className:t.labels,children:e.map(n=>(0,mt.jsx)("span",{className:t.label,children:n},n))})},po=gt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",jd),l=(0,gt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,mt.jsx)(o,{...i,ref:s,className:(0,Ki.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,mt.jsx)(fo.Provider,{value:a,children:r})})});po.Labels=Bd;po.Actions=VC;po.ActionButton=$C;po.DropdownButton=KC;po.DropdownItem=WC;var oe=po;var my=S(Y());var py={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var gy=S(E()),qC=({withDivider:e,children:t})=>{let n=k("SuggestionList",py);return(0,gy.jsx)("div",{className:(0,my.default)(n.root,{[n.isWithDivider]:e}),children:t})},Wt=qC;var yy=S(Y());var hy={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var pl=S(E()),GC=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",hy);return(0,pl.jsx)("button",{type:"button",className:(0,yy.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,pl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,pl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},Ar=GC;var vy=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,mo=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Sy=/x-deepdesk-(([a-z0-9\-_])+-version)/,Hn=(d=>(d.SEARCH="search",d.TEMPLATE="template",d.ELASTIC_SEARCH="studio-search",d.GPT="gpt",d.TRIE="trie",d.TRIE_WITH_TYPOS="trie-with-typos",d.SEMANTIC="semantic",d.TEXT_RECOMMENDATION="text_recommendation",d.URL_RECOMMENDATION="url_recommendation",d.LINK_RECOMMENDATION="link_recommendation",d.PERSONAL_COLLECTION="personal-collection",d.PERSONAL_COLLECTION_SEARCH="personal-collection-search",d))(Hn||{}),zn=(o=>(o.TAB="tab",o.ARROW="arrow",o.HOTKEY="hotkey",o.MOUSE="mouse",o))(zn||{});var Fn=S(Tu());var o1=S(O());function Et(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 gn(e){return!!e&&!!e[le]}function Dt(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)===ZT}(e)||Array.isArray(e)||!!e[w0]||!!(!((t=e.constructor)===null||t===void 0)&&t[w0])||im(e)||sm(e))}function Gr(e,t,n){n===void 0&&(n=!1),Go(e)===0?(n?Object.keys:qo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Go(e){var t=e[le];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:im(e)?2:sm(e)?3:0}function $o(e,t){return Go(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function WT(e,t){return Go(e)===2?e.get(t):e[t]}function E0(e,t,n){var r=Go(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function C0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function im(e){return QT&&e instanceof Map}function sm(e){return YT&&e instanceof Set}function ur(e){return e.o||e.t}function am(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=k0(e);delete t[le];for(var n=qo(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 lm(e,t){return t===void 0&&(t=!1),um(e)||gn(e)||!Dt(e)||(Go(e)>1&&(e.set=e.add=e.clear=e.delete=$T),Object.freeze(e),t&&Gr(e,function(n,r){return lm(r,!0)},!0)),e}function $T(){Et(2)}function um(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Jt(e){var t=om[e];return t||Et(18,e),t}function qT(e,t){om[e]||(om[e]=t)}function tm(){return Ks}function Yp(e,t){t&&(Jt("Patches"),e.u=[],e.s=[],e.v=t)}function ku(e){nm(e),e.p.forEach(GT),e.p=null}function nm(e){e===Ks&&(Ks=e.l)}function h0(e){return Ks={p:[],l:Ks,h:e,m:!0,_:0}}function GT(e){var t=e[le];t.i===0||t.i===1?t.j():t.g=!0}function Zp(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Jt("ES5").S(t,e,r),r?(n[le].P&&(ku(t),Et(4)),Dt(e)&&(e=Pu(t,e),t.l||Iu(t,e)),t.u&&Jt("Patches").M(n[le].t,e,t.u,t.s)):e=Pu(t,n,[]),ku(t),t.u&&t.v(t.u,t.s),e!==T0?e:void 0}function Pu(e,t,n){if(um(t))return t;var r=t[le];if(!r)return Gr(t,function(a,l){return y0(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Iu(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=am(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Gr(i,function(a,l){return y0(e,r,o,a,l,n,s)}),Iu(e,o,!1),n&&e.u&&Jt("Patches").N(r,n,e.u,e.s)}return r.o}function y0(e,t,n,r,o,i,s){if(gn(o)){var a=Pu(e,o,i&&t&&t.i!==3&&!$o(t.R,r)?i.concat(r):void 0);if(E0(n,r,a),!gn(a))return;e.m=!1}else s&&n.add(o);if(Dt(o)&&!um(o)){if(!e.h.D&&e._<1)return;Pu(e,o),t&&t.A.l||Iu(e,o)}}function Iu(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&lm(t,n)}function Jp(e,t){var n=e[le];return(n?ur(n):e)[t]}function v0(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 cr(e){e.P||(e.P=!0,e.l&&cr(e.l))}function em(e){e.o||(e.o=am(e.t))}function rm(e,t,n){var r=im(t)?Jt("MapSet").F(t,n):sm(t)?Jt("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:tm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ws;s&&(l=[a],u=Vs);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):Jt("ES5").J(t,n);return(n?n.A:tm()).p.push(r),r}function XT(e){return gn(e)||Et(22,e),function t(n){if(!Dt(n))return n;var r,o=n[le],i=Go(n);if(o){if(!o.P&&(o.i<4||!Jt("ES5").K(o)))return o.t;o.I=!0,r=S0(n,i),o.I=!1}else r=S0(n,i);return Gr(r,function(s,a){o&&WT(o.t,s)===a||E0(r,s,t(a))}),i===3?new Set(r):r}(e)}function S0(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return am(e)}function b0(){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 Ws.get(u,s)},set:function(u){var c=this[le];Ws.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)&&cr(l);break;case 4:n(l)&&cr(l)}}}function n(s){for(var a=s.t,l=s.k,u=qo(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==le){var d=a[p];if(d===void 0&&!$o(a,p))return!0;var h=l[p],v=h&&h[le];if(v?v.t!==d:!C0(h,d))return!0}}var y=!!a[le];return u.length!==qo(a).length+(y?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&&Et(3,JSON.stringify(ur(s)))}var i={};qT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var h=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(h,""+v,e(v,!0));return h}var y=k0(d);delete y[le];for(var g=qo(y),m=0;m<g.length;m++){var f=g[m];y[f]=e(f,p||!!y[f].enumerable)}return Object.create(Object.getPrototypeOf(d),y)}(l,s),c={i:l?5:4,A:a?a.A:tm(),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?gn(a)&&a[le].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[le];if(p){var d=p.t,h=p.k,v=p.R,y=p.i;if(y===4)Gr(h,function(_){_!==le&&(d[_]!==void 0||$o(d,_)?v[_]||u(h[_]):(v[_]=!0,cr(p)))}),Gr(d,function(_){h[_]!==void 0||$o(h,_)||(v[_]=!1,cr(p))});else if(y===5){if(r(p)&&(cr(p),v.length=!0),h.length<d.length)for(var g=h.length;g<d.length;g++)v[g]=!1;else for(var m=d.length;m<h.length;m++)v[m]=!0;for(var f=Math.min(h.length,d.length),x=0;x<f;x++)h.hasOwnProperty(x)||(v[x]=!0),v[x]===void 0&&u(h[x])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var x0,Ks,cm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",QT=typeof Map<"u",YT=typeof Set<"u",_0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",T0=cm?Symbol.for("immer-nothing"):((x0={})["immer-nothing"]=!0,x0),w0=cm?Symbol.for("immer-draftable"):"__$immer_draftable",le=cm?Symbol.for("immer-state"):"__$immer_state";var ZT=""+Object.prototype.constructor,qo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,k0=Object.getOwnPropertyDescriptors||function(e){var t={};return qo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},om={},Ws={get:function(e,t){if(t===le)return e;var n=ur(e);if(!$o(n,t))return function(o,i,s){var a,l=v0(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||!Dt(r)?r:r===Jp(e.t,t)?(em(e),e.o[t]=rm(e.A.h,r,e)):r},has:function(e,t){return t in ur(e)},ownKeys:function(e){return Reflect.ownKeys(ur(e))},set:function(e,t,n){var r=v0(ur(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Jp(ur(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(C0(n,o)&&(n!==void 0||$o(e.t,t)))return!0;em(e),cr(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 Jp(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,em(e),cr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ur(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){Et(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Et(12)}},Vs={};Gr(Ws,function(e,t){Vs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Vs.deleteProperty=function(e,t){return Vs.set.call(this,e,t,void 0)},Vs.set=function(e,t,n){return Ws.set.call(this,e[0],t,n,e[0])};var JT=function(){function e(n){var r=this;this.O=_0,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(y){var g=this;y===void 0&&(y=a);for(var m=arguments.length,f=Array(m>1?m-1:0),x=1;x<m;x++)f[x-1]=arguments[x];return l.produce(y,function(_){var C;return(C=i).call.apply(C,[g,_].concat(f))})}}var u;if(typeof i!="function"&&Et(6),s!==void 0&&typeof s!="function"&&Et(7),Dt(o)){var c=h0(r),p=rm(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?ku(c):nm(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Yp(c,s),Zp(y,c)},function(y){throw ku(c),y}):(Yp(c,s),Zp(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===T0&&(u=void 0),r.D&&lm(u,!0),s){var h=[],v=[];Jt("Patches").M(o,u,h,v),s(h,v)}return u}Et(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,p=Array(c>1?c-1:0),d=1;d<c;d++)p[d-1]=arguments[d];return r.produceWithPatches(u,function(h){return o.apply(void 0,[h].concat(p))})};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){Dt(n)||Et(8),gn(n)&&(n=XT(n));var r=h0(this),o=rm(this,n,void 0);return o[le].C=!0,nm(r),o},t.finishDraft=function(n,r){var o=n&&n[le],i=o.A;return Yp(i,r),Zp(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!_0&&Et(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=Jt("Patches").$;return gn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),rt=new JT,ek=rt.produce,jO=rt.produceWithPatches.bind(rt),BO=rt.setAutoFreeze.bind(rt),HO=rt.setUseProxies.bind(rt),zO=rt.applyPatches.bind(rt),UO=rt.createDraft.bind(rt),VO=rt.finishDraft.bind(rt),Ru=ek;function dr(e){"@babel/helpers - typeof";return dr=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},dr(e)}function dm(e,t){if(dr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(dr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fm(e){var t=dm(e,"string");return dr(t)==="symbol"?t:String(t)}function pm(e,t,n){return t=fm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P0(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 Lu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P0(Object(n),!0).forEach(function(r){pm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ne(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 I0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),mm=function(){return Math.random().toString(36).substring(7).split("").join(".")},Au={INIT:"@@redux/INIT"+mm(),REPLACE:"@@redux/REPLACE"+mm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+mm()}};function tk(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 gm(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ne(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ne(1));return n(gm)(e,t)}if(typeof e!="function")throw new Error(Ne(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(Ne(3));return i}function p(y){if(typeof y!="function")throw new Error(Ne(4));if(l)throw new Error(Ne(5));var g=!0;return u(),a.push(y),function(){if(g){if(l)throw new Error(Ne(6));g=!1,u();var f=a.indexOf(y);a.splice(f,1),s=null}}}function d(y){if(!tk(y))throw new Error(Ne(7));if(typeof y.type>"u")throw new Error(Ne(8));if(l)throw new Error(Ne(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var f=g[m];f()}return y}function h(y){if(typeof y!="function")throw new Error(Ne(10));o=y,d({type:Au.REPLACE})}function v(){var y,g=p;return y={subscribe:function(f){if(typeof f!="object"||f===null)throw new Error(Ne(11));function x(){f.next&&f.next(c())}x();var _=g(x);return{unsubscribe:_}}},y[I0]=function(){return this},y}return d({type:Au.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:h},r[I0]=v,r}function nk(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:Au.INIT});if(typeof r>"u")throw new Error(Ne(12));if(typeof n(void 0,{type:Au.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ne(13))})}function Ou(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{nk(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var p;for(var d=!1,h={},v=0;v<i.length;v++){var y=i[v],g=n[y],m=u[y],f=g(m,c);if(typeof f>"u"){var x=c&&c.type;throw new Error(Ne(14))}h[y]=f,d=d||f!==m}return d=d||i.length!==Object.keys(u).length,d?h:u}}function Xo(){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 R0(){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(Ne(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Xo.apply(void 0,a)(o.dispatch),Lu(Lu({},o),{},{dispatch:i})}}}function L0(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 A0=L0();A0.withExtraArgument=L0;var hm=A0;var F0=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)}}(),rk=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}}},Qo=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},ok=Object.defineProperty,ik=Object.defineProperties,sk=Object.getOwnPropertyDescriptors,O0=Object.getOwnPropertySymbols,ak=Object.prototype.hasOwnProperty,lk=Object.prototype.propertyIsEnumerable,N0=function(e,t,n){return t in e?ok(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},fr=function(e,t){for(var n in t||(t={}))ak.call(t,n)&&N0(e,n,t[n]);if(O0)for(var r=0,o=O0(t);r<o.length;r++){var n=o[r];lk.call(t,n)&&N0(e,n,t[n])}return e},ym=function(e,t){return ik(e,sk(t))},uk=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 ck=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xo:Xo.apply(null,arguments)},aN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function dk(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 fk=function(e){F0(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,Qo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Qo([void 0],n.concat(this))))},t}(Array),pk=function(e){F0(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,Qo([void 0],n[0].concat(this)))):new(t.bind.apply(t,Qo([void 0],n.concat(this))))},t}(Array);function xm(e){return Dt(e)?Ru(e,function(){}):e}function mk(e){return typeof e=="boolean"}function gk(){return function(t){return hk(t)}}function hk(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 fk;if(n&&(mk(n)?a.push(hm):a.push(hm.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var vm=!0;function j0(e){var t=gk(),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,p=n.enhancers,d=p===void 0?void 0:p,h;if(typeof o=="function")h=o;else if(dk(o))h=Ou(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 v=s;if(typeof v=="function"&&(v=v(t),!vm&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!vm&&v.some(function(_){return typeof _!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=R0.apply(void 0,v),g=Xo;l&&(g=ck(fr({trace:!vm},typeof l=="object"&&l)));var m=new pk(y),f=m;Array.isArray(d)?f=Qo([y],d):typeof d=="function"&&(f=d(m));var x=g.apply(void 0,f);return gm(h,c,x)}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 fr(fr({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 B0(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 yk(e){return typeof e=="function"}function vk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?B0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(yk(e))l=function(){return xm(e())};else{var u=xm(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var h=Qo([i[d.type]],s.filter(function(v){var y=v.matcher;return y(d)}).map(function(v){var y=v.reducer;return y}));return h.filter(function(v){return!!v}).length===0&&(h=[a]),h.reduce(function(v,y){if(y)if(gn(v)){var g=v,m=y(g,d);return m===void 0?v:m}else{if(Dt(v))return Ru(v,function(f){return y(f,d)});var m=y(v,d);if(m===void 0){if(v===null)return v;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return v},p)}return c.getInitialState=l,c}function Sk(e,t){return e+"/"+t}function j(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:xm(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=Sk(t,c),h,v;"reducer"in p?(h=p.reducer,v=p.prepare):h=p,i[c]=h,s[d]=h,a[c]=v?fe(d,v):fe(d)});function l(){var c=typeof e.extraReducers=="function"?B0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,h=c[1],v=h===void 0?[]:h,y=c[2],g=y===void 0?void 0:y,m=fr(fr({},d),s);return vk(n,function(f){for(var x in m)f.addCase(x,m[x]);for(var _=0,C=v;_<C.length;_++){var w=C[_];f.addMatcher(w.matcher,w.reducer)}g&&f.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,p){return u||(u=l()),u(c,p)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var xk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_k=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=xk[Math.random()*64|0];return t},wk=["name","message","stack","code"],Sm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),M0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Ek=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=wk;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,p,d,h){return{payload:c,meta:ym(fr({},h||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=fe(t+"/pending",function(c,p,d){return{payload:void 0,meta:ym(fr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=fe(t+"/rejected",function(c,p,d,h,v){return{payload:h,error:(r&&r.serializeError||Ek)(c||"Rejected"),meta:ym(fr({},v||{}),{arg:d,requestId:p,rejectedWithValue:!!h,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(p,d,h){var v=r!=null&&r.idGenerator?r.idGenerator(c):_k(),y=new l,g,m=!1;function f(_){g=_,y.abort()}var x=function(){return uk(this,null,function(){var _,C,w,b,I,P,N;return rk(this,function(Q){switch(Q.label){case 0:return Q.trys.push([0,4,,5]),b=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,c,{getState:d,extra:h}),bk(b)?[4,b]:[3,2];case 1:b=Q.sent(),Q.label=2;case 2:if(b===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,I=new Promise(function(U,je){return y.signal.addEventListener("abort",function(){return je({name:"AbortError",message:g||"Aborted"})})}),p(i(v,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:v,arg:c},{getState:d,extra:h}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:p,getState:d,extra:h,requestId:v,signal:y.signal,abort:f,rejectWithValue:function(U,je){return new Sm(U,je)},fulfillWithValue:function(U,je){return new M0(U,je)}})).then(function(U){if(U instanceof Sm)throw U;return U instanceof M0?o(U.payload,v,c,U.meta):o(U,v,c)})])];case 3:return w=Q.sent(),[3,5];case 4:return P=Q.sent(),w=P instanceof Sm?s(null,v,c,P.payload,P.meta):s(P,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(w)&&w.meta.condition,N||p(w),[2,w]}})})}();return Object.assign(x,{abort:f,requestId:v,arg:c,unwrap:function(){return x.then(Ck)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Ck(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function bk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Tk="task",H0="listener",z0="completed",_m="cancelled",dN="task-"+_m,fN="task-"+z0,pN=H0+"-"+_m,mN=H0+"-"+z0,gN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=Tk+" "+_m+" (reason: "+t+")"}return e}();var wm="listenerMiddleware";var hN=fe(wm+"/add"),yN=fe(wm+"/removeAll"),vN=fe(wm+"/remove");var D0,SN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(D0||(D0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},kk=function(e){return function(t){setTimeout(t,e)}},xN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:kk(10);b0();var Ix=S(Cm()),Rx=S(G0());var bm=S(Tu());function Wk(e){e()}var X0=Wk,Q0=e=>X0=e,Y0=()=>X0;var Zo=S(O());var ex=S(O());var Mu=S(O()),Z0=Symbol.for(`react-redux-context-${Mu.version}`),J0=globalThis;function $k(){let e=J0[Z0];return e||(e=(0,Mu.createContext)(null),J0[Z0]=e),e}var Me=new Proxy({},new Proxy({},{get(e,t){let n=$k();return(r,...o)=>Reflect[t](n,...o)}}));function $s(e=Me){return function(){return(0,ex.useContext)(e)}}var Du=$s();var Fu=()=>{throw new Error("uSES not initialized!")};var tx=Fu,nx=e=>{tx=e},qk=(e,t)=>e===t;function rx(e=Me){let t=e===Me?Du:$s(e);return function(r,o={}){let{equalityFn:i=qk,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:p,noopCheck:d}=t(),h=(0,Zo.useRef)(!0),v=(0,Zo.useCallback)({[r.name](g){return r(g)}}[r.name],[r,p,s]),y=tx(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,Zo.useDebugValue)(y),y}}var A=rx();function hn(){return hn=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},hn.apply(this,arguments)}function qs(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 Mm=S(mx()),Z=S(O()),bx=S(vx());var uP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function cP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function h(f,x){return l=f,u=x,c=e(l,u),p=t(r,u),d=n(c,p,u),a=!0,d}function v(){return c=e(l,u),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function y(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(p=t(r,u)),d=n(c,p,u),d}function g(){let f=e(l,u),x=!s(f,c);return c=f,x&&(d=n(c,p,u)),d}function m(f,x){let _=!i(x,u),C=!o(f,l,x,u);return l=f,u=x,_&&C?v():_?y():C?g():d}return function(x,_){return a?m(x,_):h(x,_)}}function Om(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=qs(t,uP),s=n(e,i),a=r(e,i),l=o(e,i);return cP(s,a,l,e,i)}function Nm(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 Gs(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Sx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function oc(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=Sx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Sx(u),u=i(a,l)),u},i}}function Jo(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function xx(e){return e&&typeof e=="object"?Gs(t=>Nm(e,t)):e?typeof e=="function"?oc(e,"mapDispatchToProps"):Jo(e,"mapDispatchToProps"):Gs(t=>({dispatch:t}))}function _x(e){return e?typeof e=="function"?oc(e,"mapStateToProps"):Jo(e,"mapStateToProps"):Gs(()=>({}))}function dP(e,t,n){return hn({},n,e,t)}function fP(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let p=e(l,u,c);return i?o(p,s)||(s=p):(i=!0,s=p),s}}}function wx(e){return e?typeof e=="function"?fP(e):Jo(e,"mergeProps"):()=>dP}function pP(){let e=Y0(),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 Ex={notify(){},get:()=>[]};function ic(e,t){let n,r=Ex;function o(p){return l(),r.subscribe(p)}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=pP())}function u(){n&&(n(),n=void 0,r.clear(),r=Ex)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var sc=S(O()),mP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ei=mP?sc.useLayoutEffect:sc.useEffect;function Cx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ti(e,t){if(Cx(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])||!Cx(e[n[o]],t[n[o]]))return!1;return!0}var gP=["reactReduxForwardedRef"],Tx=Fu,kx=e=>{Tx=e};var hP=[null,null];function yP(e,t,n){ei(()=>e(...t),n)}function vP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function SP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,h=()=>{if(p||!a.current)return;let y=t.getState(),g,m;try{g=r(y,o.current)}catch(f){m=f,d=f}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=h,n.trySubscribe(),h(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function xP(e,t){return e===t}function _P(e,t,n,{pure:r,areStatesEqual:o=xP,areOwnPropsEqual:i=ti,areStatePropsEqual:s=ti,areMergedPropsEqual:a=ti,forwardRef:l=!1,context:u=Me}={}){let c=u,p=_x(e),d=xx(t),h=wx(n),v=!!e;return g=>{let m=g.displayName||g.name||"Component",f=`Connect(${m})`,x={shouldHandleStateChanges:v,displayName:f,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:h,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function _(b){let[I,P,N]=(0,Z.useMemo)(()=>{let{reactReduxForwardedRef:dt}=b,Pr=qs(b,gP);return[b.context,dt,Pr]},[b]),Q=(0,Z.useMemo)(()=>I&&I.Consumer&&(0,bx.isContextConsumer)(Z.default.createElement(I.Consumer,null))?I:c,[I,c]),U=(0,Z.useContext)(Q),je=!!b.store&&!!b.store.getState&&!!b.store.dispatch,on=!!U&&!!U.store,Kt=je?b.store:U.store,ao=on?U.getServerState:Kt.getState,Ai=(0,Z.useMemo)(()=>Om(Kt.dispatch,x),[Kt]),[Tr,ja]=(0,Z.useMemo)(()=>{if(!v)return hP;let dt=ic(Kt,je?void 0:U.subscription),Pr=dt.notifyNestedSubs.bind(dt);return[dt,Pr]},[Kt,je,U]),Ba=(0,Z.useMemo)(()=>je?U:hn({},U,{subscription:Tr}),[je,U,Tr]),Oi=(0,Z.useRef)(),Ni=(0,Z.useRef)(N),sn=(0,Z.useRef)(),Mi=(0,Z.useRef)(!1),kr=(0,Z.useRef)(!1),R=(0,Z.useRef)(!1),W=(0,Z.useRef)();ei(()=>(R.current=!0,()=>{R.current=!1}),[]);let Lt=(0,Z.useMemo)(()=>()=>sn.current&&N===Ni.current?sn.current:Ai(Kt.getState(),N),[Kt,N]),jn=(0,Z.useMemo)(()=>Pr=>Tr?SP(v,Kt,Tr,Ai,Ni,Oi,Mi,R,sn,ja,Pr):()=>{},[Tr]);yP(vP,[Ni,Oi,Mi,N,sn,ja]);let an;try{an=Tx(jn,Lt,ao?()=>Ai(ao(),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}ei(()=>{W.current=void 0,sn.current=void 0,Li.current=an});let Ni=(0,Y.useMemo)(()=>Y.default.createElement(g,hn({},an,{ref:k})),[k,g,an]);return(0,Y.useMemo)(()=>v?Y.default.createElement(te.Provider,{value:ja},Ni):Ni,[te,Ni,ja])}let E=Y.default.memo(x);if(E.WrappedComponent=g,E.displayName=x.displayName=f,l){let R=Y.default.forwardRef(function(N,te){return Y.default.createElement(E,hn({},N,{reactReduxForwardedRef:te}))});return R.displayName=f,R.WrappedComponent=g,(0,Mm.default)(R,g)}return(0,Mm.default)(E,g)}}var Gr=xk;var qs=S(O());function Ek({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,qs.useMemo)(()=>{let u=oc(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,qs.useMemo)(()=>e.getState(),[e]);ei(()=>{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||Me;return qs.default.createElement(l.Provider,{value:s},n)}var Dm=Ek;function sc(e=Me){let t=e===Me?Mu:Ks(e);return function(){let{store:r}=t();return r}}var Fm=sc();function k0(e=Me){let t=e===Me?Fm:sc(e);return function(){return t().dispatch}}var K=k0();n0(I0.useSyncExternalStoreWithSelector);P0(R0.useSyncExternalStore);Xw(_m.unstable_batchedUpdates);var Gs=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Gs||{});var Ck={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"},L0=j({name:"settings",initialState:Ck,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Qs}=L0.actions,jm=e=>t=>t.settings[e],F=e=>A(jm(e)),A0=L0.reducer;var EE=S(O());function yn(){}yn.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(y){return o?(setTimeout(function(){o(void 0,y)},0),!0):y}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 p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function h(){for(var y=-1*u;y<=u;y+=2){var g=void 0,m=p[y-1],f=p[y+1],w=(f?f.newPos:0)-y;m&&(p[y-1]=void 0);var x=m&&m.newPos+1<a,T=f&&0<=w&&w<l;if(!x&&!T){p[y]=void 0;continue}if(!x||T&&m.newPos<f.newPos?(g=_k(f),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),w=i.extractCommon(g,n,t,y),g.newPos+1>=a&&w+1>=l)return s(Tk(i,g.components,n,t,i.useLongestToken));p[y]=g}u++}if(o)(function y(){setTimeout(function(){if(u>c)return o();h()||y()},0)})();else for(;u<=c;){var v=h();if(v)return v}},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 Tk(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 p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(h,v){var y=r[l+v];return y.length>h.length?y:h}),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 _k(e){return{newPos:e.newPos,components:e.components.slice(0)}}var bk=new yn;function M0(e,t,n){return bk.diff(e,t,n)}var O0=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,N0=/\S/,D0=new yn;D0.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!N0.test(e)&&!N0.test(t)};D0.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]&&O0.test(t[n])&&O0.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var F0=new yn;F0.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 Pk=new yn;Pk.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var kk=new yn;kk.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function ac(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ac=function(t){return typeof t}:ac=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(e)}var Rk=Object.prototype.toString,Xs=new yn;Xs.useLongestToken=!0;Xs.tokenize=F0.tokenize;Xs.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(Hm(e,null,null,o),o," ")};Xs.equals=function(e,t){return yn.prototype.equals.call(Xs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Hm(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(Rk.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]=Hm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),ac(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]=Hm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Bm=new yn;Bm.tokenize=function(e){return e.slice()};Bm.join=Bm.removeEmpty=function(e){return e};function j0(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function pr(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)=>pr(i,t[s],n-1)):j0(e)&&j0(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>pr(e[s],t[s],n-1)):!1}function Ik(e){return Math.max(...e.map(t=>t.length))}function Lk(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 H0(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<Ik(r);o++){let i=Lk(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 Ak=2;function Um(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=H0(e,Ak);return n&&n.text!==t?n:e[0]}var B0={current:null,isSupported:null},Z=fe("resetConversation"),lc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},uc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},cc=e=>e.conversation.isSupported,zm=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),dc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),fc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),pc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=uc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Vm=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})})}),mc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=uc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),Ok=[dc.rejected,fc.rejected,pc.rejected,mc.rejected].map(e=>e==null?void 0:e.toString()),Nk=j({name:"conversation",initialState:B0,reducers:{},extraReducers:e=>{e.addCase(zm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(dc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(fc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Vm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(pc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(mc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(Z,()=>B0).addMatcher(t=>Ok.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),U0=Nk.reducer;var mr={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,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function hc(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 yc=fe("input/replaceText"),vc=fe("input/keyDown"),Ys=fe("input/sendMessage"),Sc=fe("input/sendEditSuggestionMessage"),wc=fe("input/uiInputChange"),xc=fe("input/applyImageSuggestion"),ot=fe("input/sendEvent");function gc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s},eventMetrics:{inputType:a},replace:l}=e.stagedSuggestion,u=n==="search"||n==="personal-collection-search",c=u||l==="selection"?t:t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions=[...e.metrics.textSuggestions,{text:c,source:n,abVariant:r,abTestName:o,inputType:a,sourceText:s,trainingJobs:i||[],searchTerm:u?e.userCommitted.text:null}],e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var z0=e=>j({name:e,initialState:mr,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,{...mr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=Um(t.textSuggestions,t.userCommitted.text)},setInputHtml(t,n){t.html=n.payload},changeSelection(t,n){n.payload&&(pr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&gc(t)))},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:p,ctrlKey:d,metaKey:h,altKey:v}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=t,{text:g}=n.payload,m=M0(y,g);y.length-g.length>1&&t.metrics.deletions.push(...m.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=y.length-g.length;break}case"C":case"V":case"X":if(!d&&!h){t.metrics.numCharsTyped+=1;let y=((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;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}break;case"Shift":break;default:if(!d&&!h&&!v){t.metrics.numCharsTyped+=1;let y=((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;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=mr.metrics,t.textSuggestions=[]),t.text!==n.payload.text&&gc(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"&&gc(t)},commitSuggestion(t){gc(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=Um(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}){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(Z,n=>{n.tabCompletionSuggestion=mr.tabCompletionSuggestion,n.previousKeyDownEvent=mr.previousKeyDownEvent,n.textSuggestions=mr.textSuggestions,n.selectedSuggestionIndex=mr.selectedSuggestionIndex,n.metrics=mr.metrics})}}),Km=z0("input"),ni=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),Mk=e=>e.input.selection,V0=()=>A(Mk),{userInput:K0,changeSelection:Wm,initialInput:W0,mergeMetrics:$0,nextTextSuggestionIndex:q0,offeredTextSuggestion:G0,previousTextSuggestionIndex:Q0,registerCut:X0,registerKeyDown:Y0,registerPaste:Z0,reset:J0,resetToCommitted:Zs,setInputHtml:ex,setSelectedTextSuggestionIndex:Ec,setTextSuggestions:gr,stageSuggestion:Ft,commitSuggestion:hr}=Km.actions,Ge=z0("overlay");var ri=S(O());var tx={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var $m=S(C()),Dk=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ri.useRef)(null),l=(0,ri.useRef)(null),u=P("Dialog",tx);return(0,ri.useEffect)(()=>{var d,h;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},p=v=>{let y=window.getSelection();y!=null&&y.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(h=a.current)==null||h.addEventListener("keyup",c),()=>{var v,y;(v=a.current)==null||v.removeEventListener("click",p),(y=a.current)==null||y.removeEventListener("keyup",c)}},[a,l,o,r]),(0,ri.useEffect)(()=>{var c,p;!a.current||!e||!t||(p=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||p.focus()},[e,t,a]),e?(0,$m.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,$m.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},oi=Dk;var yg=S(O());var qm={};Te(qm,{enUS:()=>Fk,nlNL:()=>jk});var Fk={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?"}]},jk={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 nx={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 Js=S(C()),Cc=()=>(0,Js.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Js.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Js.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 ea=S(C()),rx=()=>(0,ea.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,ea.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,ea.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 bt=S(O());var Tc=S(O());function ta(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,Qm=2,Xm=4,Se=8,_c=16,na=32,jt=64,Gm={a:{content:q|Se,self:!1,type:q|Se|na|jt},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|Qm|Xm|Se|_c|na|jt},button:{content:Se,type:q|Se|na|jt},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|na|jt},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|_c},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 Xr(e){return t=>{Gm[t]={...e,...Gm[t]}}}["address","main","div","figure","p","pre"].forEach(Xr({content:q,type:q|jt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Xr({content:Se,type:q|Se|jt}));["p","pre"].forEach(Xr({content:Se,type:q|jt}));["s","small","span","del","ins"].forEach(Xr({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(Xr({content:q,type:q|Qm|jt}));["h1","h2","h3","h4","h5","h6"].forEach(Xr({content:Se,type:q|Xm|jt}));["audio","canvas","iframe","img","video"].forEach(Xr({type:q|Se|_c|jt}));var oa=Object.freeze(Gm),Ym=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Zm=Object.keys(oa).filter(e=>e!=="canvas"&&e!=="iframe"),J=1,Jm=2,Qr=3,yr=4,Pc=5,kc=Object.freeze({alt:J,cite:J,class:J,colspan:Qr,controls:yr,datetime:J,default:yr,disabled:yr,dir:J,height:J,href:J,id:J,kind:J,label:J,lang:J,loading:J,loop:yr,media:J,muted:yr,poster:J,rel:J,role:J,rowspan:Qr,scope:J,sizes:J,span:Qr,start:Qr,style:Pc,src:J,srclang:J,srcset:J,tabindex:J,target:J,title:J,type:J,width:J}),eg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function bc(){return bc=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},bc.apply(this,arguments)}function Rc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?Tc.default.createElement(i,bc({className:t},e)):Tc.default.createElement(i,bc({className:t},e),n)}var ra=class{attribute(t,n){return n}node(t,n){return n}};function ox(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 Ht=class{constructor(t,n,r){ta(this,"greedy",!1),ta(this,"options",void 0),ta(this,"propName",void 0),ta(this,"inverseName",void 0),ta(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?Tc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return ox(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Yr=S(O()),lx=S(sx());function vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Uk=/(url|image|image-set)\(/i,tg=class extends ra{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(Uk)&&delete n[r]}),n}},ax=1,zk=3,Vk=/^<(!doctype|(html|head|body)(\s|>))/i,Kk=/^(aria-|data-|\w+:)/iu,Wk=/{{{(\w+)\/?}}}/;function $k(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Ic=class{constructor(t,n={},r=[],o=[]){var i;vn(this,"allowed",void 0),vn(this,"banned",void 0),vn(this,"blocked",void 0),vn(this,"container",void 0),vn(this,"content",[]),vn(this,"props",void 0),vn(this,"matchers",void 0),vn(this,"filters",void 0),vn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new tg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Zm),this.banned=new Set(Ym),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 p="";for(;i&&(a=l.match(i));){let{index:d,length:h,match:v,valid:y,void:g,...m}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=g?`{{{${f}/}}}`:`{{{${f}}}}${v}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:v,matcher:l,props:{...o,...m,key:this.keyIndex}}):p+=v,l.greedy?(i=p+i.slice(d+h),p=""):i=i.slice(d+(h||v.length))}l.greedy||(i=p+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}ei(()=>{W.current=void 0,sn.current=void 0,Oi.current=an});let Di=(0,Z.useMemo)(()=>Z.default.createElement(g,hn({},an,{ref:P})),[P,g,an]);return(0,Z.useMemo)(()=>v?Z.default.createElement(Q.Provider,{value:Ba},Di):Di,[Q,Di,Ba])}let w=Z.default.memo(_);if(w.WrappedComponent=g,w.displayName=_.displayName=f,l){let I=Z.default.forwardRef(function(N,Q){return Z.default.createElement(w,hn({},N,{reactReduxForwardedRef:Q}))});return I.displayName=f,I.WrappedComponent=g,(0,Mm.default)(I,g)}return(0,Mm.default)(w,g)}}var Xr=_P;var Xs=S(O());function wP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Xs.useMemo)(()=>{let u=ic(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Xs.useMemo)(()=>e.getState(),[e]);ei(()=>{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||Me;return Xs.default.createElement(l.Provider,{value:s},n)}var Dm=wP;function ac(e=Me){let t=e===Me?Du:$s(e);return function(){let{store:r}=t();return r}}var Fm=ac();function Px(e=Me){let t=e===Me?Fm:ac(e);return function(){return t().dispatch}}var K=Px();nx(Rx.useSyncExternalStoreWithSelector);kx(Ix.useSyncExternalStore);Q0(bm.unstable_batchedUpdates);var Qs=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Qs||{});var EP={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"},Lx=j({name:"settings",initialState:EP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Ys}=Lx.actions,jm=e=>t=>t.settings[e],F=e=>A(jm(e)),Ax=Lx.reducer;var ww=S(O());function yn(){}yn.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(y){return o?(setTimeout(function(){o(void 0,y)},0),!0):y}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 p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function h(){for(var y=-1*u;y<=u;y+=2){var g=void 0,m=p[y-1],f=p[y+1],x=(f?f.newPos:0)-y;m&&(p[y-1]=void 0);var _=m&&m.newPos+1<a,C=f&&0<=x&&x<l;if(!_&&!C){p[y]=void 0;continue}if(!_||C&&m.newPos<f.newPos?(g=bP(f),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),x=i.extractCommon(g,n,t,y),g.newPos+1>=a&&x+1>=l)return s(CP(i,g.components,n,t,i.useLongestToken));p[y]=g}u++}if(o)(function y(){setTimeout(function(){if(u>c)return o();h()||y()},0)})();else for(;u<=c;){var v=h();if(v)return v}},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 CP(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 p=t[i-1];t[i-1]=t[i],t[i]=p}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(h,v){var y=r[l+v];return y.length>h.length?y:h}),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 bP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var TP=new yn;function Mx(e,t,n){return TP.diff(e,t,n)}var Ox=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Nx=/\S/,Dx=new yn;Dx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!Nx.test(e)&&!Nx.test(t)};Dx.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]&&Ox.test(t[n])&&Ox.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Fx=new yn;Fx.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 kP=new yn;kP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var PP=new yn;PP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function lc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?lc=function(t){return typeof t}:lc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}var IP=Object.prototype.toString,Zs=new yn;Zs.useLongestToken=!0;Zs.tokenize=Fx.tokenize;Zs.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(Bm(e,null,null,o),o," ")};Zs.equals=function(e,t){return yn.prototype.equals.call(Zs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Bm(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(IP.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]=Bm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),lc(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]=Bm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Hm=new yn;Hm.tokenize=function(e){return e.slice()};Hm.join=Hm.removeEmpty=function(e){return e};function jx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function pr(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)=>pr(i,t[s],n-1)):jx(e)&&jx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>pr(e[s],t[s],n-1)):!1}function RP(e){return Math.max(...e.map(t=>t.length))}function LP(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 Bx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<RP(r);o++){let i=LP(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 AP=2;function zm(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Bx(e,AP);return n&&n.text!==t?n:e[0]}var Hx={current:null,isSupported:null},J=fe("resetConversation"),uc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},cc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},dc=e=>e.conversation.isSupported,Um=M("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),fc=M("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),pc=M("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),mc=M("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=cc(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Vm=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})})}),gc=M("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=cc(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),OP=[fc.rejected,pc.rejected,mc.rejected,gc.rejected].map(e=>e==null?void 0:e.toString()),NP=j({name:"conversation",initialState:Hx,reducers:{},extraReducers:e=>{e.addCase(Um.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(fc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(pc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Vm.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(mc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(gc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(J,()=>Hx).addMatcher(t=>OP.includes(t.type),(t,n)=>{throw new Error(n.error.message)})}}),zx=NP.reducer;var mr={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,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function yc(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 vc=fe("input/replaceText"),Sc=fe("input/keyDown"),Js=fe("input/sendMessage"),xc=fe("input/sendEditSuggestionMessage"),_c=fe("input/uiInputChange"),wc=fe("input/applyImageSuggestion"),it=fe("input/sendEvent");function hc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s},eventMetrics:{inputType:a},replace:l}=e.stagedSuggestion,u=n==="search"||n==="personal-collection-search",c=u||l==="selection"?t:t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:c,source:n,abVariant:r,abTestName:o,inputType:a,sourceText:s,trainingJobs:i||[],searchTerm:u?e.userCommitted.text:null}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var Ux=e=>j({name:e,initialState:mr,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,{...mr,selection:t.selection})},resetToCommitted(t){t.text=t.userCommitted.text,t.selection=t.userCommitted.selection,t.stagedSuggestion=null,t.tabCompletionSuggestion=zm(t.textSuggestions,t.userCommitted.text)},setInputHtml(t,n){t.html=n.payload},changeSelection(t,n){n.payload&&(pr(t.selection,n.payload)||(t.selection=n.payload,t.userCommitted.selection=t.selection,t.stagedSuggestion&&hc(t)))},userInput(t,n){var s,a,l,u;if(t.previousKeyDownEvent){let{key:c,shiftKey:p,ctrlKey:d,metaKey:h,altKey:v}=t.previousKeyDownEvent;switch(c){case"Enter":p&&(t.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=t,{text:g}=n.payload,m=Mx(y,g);y.length-g.length>1&&t.metrics.deletions.push(...m.filter(f=>f.removed).map(f=>f.value)),t.metrics.numCharsDeleted+=y.length-g.length;break}case"C":case"V":case"X":if(!d&&!h){t.metrics.numCharsTyped+=1;let y=((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;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}break;case"Shift":break;default:if(!d&&!h&&!v){t.metrics.numCharsTyped+=1;let y=((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;y&&y.length>0&&(t.metrics.numCharsDeleted+=y.length,t.metrics.deletions.push(y))}}}!t.metrics.agentStartedTypingTimestamp&&n.payload.text!==t.text&&(t.metrics.agentStartedTypingTimestamp=Date.now()),n.payload.text===""&&(t.metrics=mr.metrics,t.textSuggestions=[]),t.text!==n.payload.text&&hc(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"&&hc(t)},commitSuggestion(t){hc(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=zm(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}){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=mr.tabCompletionSuggestion,n.previousKeyDownEvent=mr.previousKeyDownEvent,n.textSuggestions=mr.textSuggestions,n.selectedSuggestionIndex=mr.selectedSuggestionIndex,n.metrics=mr.metrics})}}),Km=Ux("input"),ni=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),MP=e=>e.input.selection,Vx=()=>A(MP),{userInput:Kx,changeSelection:Wm,initialInput:Wx,mergeMetrics:$x,nextTextSuggestionIndex:qx,offeredTextSuggestion:Gx,previousTextSuggestionIndex:Xx,registerCut:Qx,registerKeyDown:Yx,registerPaste:Zx,reset:Jx,resetToCommitted:ea,setInputHtml:e_,setSelectedTextSuggestionIndex:Ec,setTextSuggestions:gr,stageSuggestion:Ft,commitSuggestion:hr}=Km.actions,Ge=Ux("overlay");var ri=S(O());var t_={root:"_root_1qp5s_1",content:"_content_1qp5s_23"};var $m=S(E()),DP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,overlayAriaLabel:i,contentAriaLabel:s})=>{let a=(0,ri.useRef)(null),l=(0,ri.useRef)(null),u=k("Dialog",t_);return(0,ri.useEffect)(()=>{var d,h;let c=v=>{v.key==="Escape"&&(v.preventDefault(),v.stopPropagation(),o())},p=v=>{let y=window.getSelection();y!=null&&y.toString()||v.target===a.current&&e&&r()};return(d=a.current)==null||d.addEventListener("click",p),(h=a.current)==null||h.addEventListener("keyup",c),()=>{var v,y;(v=a.current)==null||v.removeEventListener("click",p),(y=a.current)==null||y.removeEventListener("keyup",c)}},[a,l,o,r]),(0,ri.useEffect)(()=>{var c,p;!a.current||!e||!t||(p=(c=a.current)==null?void 0:c.querySelector("input, textarea"))==null||p.focus()},[e,t,a]),e?(0,$m.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":i,ref:a,children:(0,$m.jsx)("div",{ref:l,"data-testid":"dialog-content",className:u.content,"aria-label":s,children:n})}):null},oi=DP;var yg=S(O());var qm={};Ce(qm,{enUS:()=>FP,nlNL:()=>jP});var FP={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?"}]},jP={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 n_={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 ta=S(E()),Cc=()=>(0,ta.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,ta.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,ta.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 na=S(E()),r_=()=>(0,na.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleRightTitle",children:[(0,na.jsx)("title",{id:"angleRightTitle",children:"AngleRight"}),(0,na.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=S(O());var bc=S(O());function ra(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,Xm=2,Qm=4,Se=8,Tc=16,oa=32,jt=64,Gm={a:{content:q|Se,self:!1,type:q|Se|oa|jt},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|Xm|Qm|Se|Tc|oa|jt},button:{content:Se,type:q|Se|oa|jt},caption:{content:q,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:q|oa|jt},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|Tc},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 Yr(e){return t=>{Gm[t]={...e,...Gm[t]}}}["address","main","div","figure","p","pre"].forEach(Yr({content:q,type:q|jt}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Yr({content:Se,type:q|Se|jt}));["p","pre"].forEach(Yr({content:Se,type:q|jt}));["s","small","span","del","ins"].forEach(Yr({content:Se,type:q|Se}));["article","aside","footer","header","nav","section","blockquote"].forEach(Yr({content:q,type:q|Xm|jt}));["h1","h2","h3","h4","h5","h6"].forEach(Yr({content:Se,type:q|Qm|jt}));["audio","canvas","iframe","img","video"].forEach(Yr({type:q|Se|Tc|jt}));var sa=Object.freeze(Gm),Ym=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],Zm=Object.keys(sa).filter(e=>e!=="canvas"&&e!=="iframe"),ee=1,Jm=2,Qr=3,yr=4,Pc=5,Ic=Object.freeze({alt:ee,cite:ee,class:ee,colspan:Qr,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:Qr,scope:ee,sizes:ee,span:Qr,start:Qr,style:Pc,src:ee,srclang:ee,srcset:ee,tabindex:ee,target:ee,title:ee,type:ee,width:ee}),eg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function kc(){return kc=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},kc.apply(this,arguments)}function Rc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?bc.default.createElement(i,kc({className:t},e)):bc.default.createElement(i,kc({className:t},e),n)}var ia=class{attribute(t,n){return n}node(t,n){return n}};function o_(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 Bt=class{constructor(t,n,r){ra(this,"greedy",!1),ra(this,"options",void 0),ra(this,"propName",void 0),ra(this,"inverseName",void 0),ra(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?bc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return o_(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Zr=S(O()),l_=S(s_());function vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var zP=/(url|image|image-set)\(/i,tg=class extends ia{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(zP)&&delete n[r]}),n}},a_=1,UP=3,VP=/^<(!doctype|(html|head|body)(\s|>))/i,KP=/^(aria-|data-|\w+:)/iu,WP=/{{{(\w+)\/?}}}/;function $P(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var Lc=class{constructor(t,n={},r=[],o=[]){var i;vn(this,"allowed",void 0),vn(this,"banned",void 0),vn(this,"blocked",void 0),vn(this,"container",void 0),vn(this,"content",[]),vn(this,"props",void 0),vn(this,"matchers",void 0),vn(this,"filters",void 0),vn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new tg],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:Zm),this.banned=new Set(Ym),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 p="";for(;i&&(a=l.match(i));){let{index:d,length:h,match:v,valid:y,void:g,...m}=a,f=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=g?`{{{${f}/}}}`:`{{{${f}}}}${v}{{{/${f}}}}`,this.keyIndex+=1,s+=1,r[f]={children:v,matcher:l,props:{...o,...m,key:this.keyIndex}}):p+=v,l.greedy?(i=p+i.slice(d+h),p=""):i=i.slice(d+(h||v.length))}l.greedy||(i=p+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||$k)();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(Vk)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,lx.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==ax||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=kc[l]||kc[s];if(!this.isSafe(t)||!l.match(Kk)&&(!n&&(!u||u===Jm)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===yr?c=!0:u===Qr?c=Number.parseFloat(String(c)):u!==Pc&&(c=String(c)),r[eg[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 oa[t]?{...n,...oa[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===ax){let d=c.nodeName.toLowerCase(),h=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let y;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;y=this.parseNode(v,h);let m=s(v,y,h);if(m===null)return;if(typeof m<"u"){l.push(Yr.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,h))){var p;this.keyIndex+=1;let g=this.extractAttributes(v),m={tagName:d};g&&(m.attributes=g),h.void&&(m.selfClose=h.void),l.push(Yr.default.createElement(Rc,{...m,key:this.keyIndex},(p=y)!==null&&p!==void 0?p:this.parseNode(v,h)))}else l=[...l,...this.parseNode(v,h.tagName?h:n)]}else if(c.nodeType===zk){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(Wk);){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:p,props:d}=n[a],h;if(u)h=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));h=v.index+v[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(h)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function qk(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",p=c==="fragment"?!0:u,d;if(a)d=a;else{let h=new Ic(i??"",e).parse();h.length>0&&(d=h)}return d||(d=s),p?Yr.default.createElement(Yr.default.Fragment,null,d):Yr.default.createElement(Rc,{attributes:n,className:r,tagName:c},d)}function ii(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:p="span",noWrap:d=!1,...h}=e,v=i?[]:l,y=o?[]:a,g=c?[c]:[],m=u?[u]:[];v.forEach(T=>{T.onBeforeParse&&g.push(T.onBeforeParse.bind(T)),T.onAfterParse&&m.push(T.onAfterParse.bind(T))});let f=g.reduce((T,E)=>E(T,e),r??""),w=new Ic(f,h,v,y),x=m.reduce((T,E)=>E(T,e),w.parse());return Yr.default.createElement(qk,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:p})}var ug=S(X());var ng={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 cx=S(X());var si=S(O());function ux(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Lc(e){let t=(0,si.useRef)(null),[n,r]=(0,si.useState)(!1);return(0,si.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=ux((c,p)=>{let d=t.current;if(!d)return;let h=c/i,v=p/i,y=d.getBoundingClientRect(),g=h>y.x&&h<y.x+y.width&&v>y.y&&v<y.y+y.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=ux(()=>{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 _t={root:"_root_1l8n5_1",container:"_container_1l8n5_4",agentText:"_agentText_1l8n5_7",tabText:"_tabText_1l8n5_8",hint:"_hint_1l8n5_8",matchSelection:"_matchSelection_1l8n5_12",focus:"_focus_1l8n5_18",resetIndent:"_resetIndent_1l8n5_22",matchKeyword:"_matchKeyword_1l8n5_26",matchPlaceholder:"_matchPlaceholder_1l8n5_27",hover:"_hover_1l8n5_33",hintText:"_hintText_1l8n5_66",popover:"_popover_1l8n5_74",popoverRoot:"_popoverRoot_1l8n5_79",popoverContentContainer:"_popoverContentContainer_1l8n5_83",popoverContent:"_popoverContent_1l8n5_83",selectionOptions:"_selectionOptions_1l8n5_109",selectionOptionsIsHidden:"_selectionOptionsIsHidden_1l8n5_114",selectionOptionsButton:"_selectionOptionsButton_1l8n5_118",caret:"_caret_1l8n5_134",popoverSuggestionsRoot:"_popoverSuggestionsRoot_1l8n5_138",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_1l8n5_143"};var rg=S(C()),Gk=({inputElement:e,children:t})=>{let n=P("TabCompletion",_t),[r,o]=Lc(e);return(0,rg.jsx)("mark",{ref:r,className:(0,cx.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},ai=class extends Ht{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,rg.jsx)(Gk,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var li=S(O());function Ac(e){return e.contentEditable==="true"}function Qk(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 dx(e){let{selectionStart:t,selectionEnd:n}=Ac(e)?Qk(e):e;return[t,n]}function Oc(e){let[,t]=(0,li.useState)(),n=(0,li.useRef)(null);return n.current=dx(e),(0,li.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=dx(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 Nc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(mo);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 fx=S(O());function ui(e){(0,fx.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Zr(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var px,en=new Map,Xk=["bottom","height","left","right","top","width"],Yk=(e={},t={})=>Xk.some(n=>e[n]!==t[n]),mx=()=>{let e=[];en.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),en.delete(n);return}let r=n.getBoundingClientRect();Yk(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),en.size!==0&&(px=window.requestAnimationFrame(mx))};function gx(e,t){return{observe(){let n=en.size===0;if(en.has(e)){let r=en.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else en.set(e,{rect:void 0,callbacks:[t]});n&&mx()},unobserve(){let n=en.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||en.delete(e),en.size||cancelAnimationFrame(px)}}}}var hx,tn=new Map,yx=()=>{tn.forEach((e,t)=>{if(!t.isConnected){tn.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)))}),tn.size!==0&&(hx=window.requestAnimationFrame(yx))};function vx(e,t){return{observe(){let n=tn.size===0;tn.has(e)?tn.get(e).callbacks.push(t):tn.set(e,{visible:void 0,callbacks:[t]}),n&&yx()},unobserve(){let n=tn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||tn.delete(e),tn.size||cancelAnimationFrame(hx)}}}}var og=["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 ig(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function ci(e){return parseFloat(e)}function Mc(e){return Math.round(e*1e6)}function Sx(e){return e/1e6}function sg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=ci(e.width),i=ci(e.borderLeftWidth),s=ci(e.borderRightWidth),a=ci(e.paddingRight),l=Sx(Mc(o)-Mc(i)-Mc(s)),u=Sx(Mc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function di(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position="fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",Zr(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};ig(r,n,og),sg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=vx(e,()=>{ig(r,n,og),sg(r,e,n),i(),setTimeout(i,0)}),a=gx(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(ig(r,n,og),sg(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(),p=window.getComputedStyle(t.closestScrollElement),d=ci(p.borderTopWidth),h=ci(p.borderBottomWidth),v=c.top+d-u.top,y=u.top+u.height+-(c.top+c.height-h);n.style.clipPath=`inset(${v}px 0px ${y}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 ag={};Te(ag,{enUS:()=>Zk,nlNL:()=>Jk});var Zk={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"}]},Jk={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 ia=S(C()),wx=()=>(0,ia.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,ia.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,ia.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 lg=S(C()),xx=()=>(0,lg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,lg.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});var Ex=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(Ex||{}),Sn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentHTML="";currentSelection=null;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,rawHtml:n}),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t,rawHtml:n}),this.currentHTML=n))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange()}handleFocus(){this.isFocused||this.emit("focus"),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(Ex).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){let t=this.currentSelection;this.isPossibleClearInputAction=!0,t&&this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){let n=(t.clipboardData||window.clipboardData).getData("text");this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){let t=()=>{let r=document.activeElement===this.element?this.getSelection():null;pr(this.currentSelection,r)||(this.currentSelection=r,this.emit("selection",r))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)}),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)),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}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 wn=class extends Sn{getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){return this.currentSelection?this.getText().slice(this.currentSelection.start,this.currentSelection.end):""}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);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=S(C()),eR=({value:e,onUse:t,...n})=>{var c;let r=H(ag),o=K(),i=P("EditSuggestionTextInput",ng),[s,a]=(0,bt.useState)(null),l=(0,bt.useRef)(null),u=((c=e.match(mo))==null?void 0:c.length)||0;return(0,bt.useEffect)(()=>{let p;return l.current&&(a(l.current),p=new wn(l.current),p.on("change",({plainText:d})=>{o(Ge.actions.userInput({text:d,selection:p.getSelection()}))}),p.on("keydown",d=>{o(Ge.actions.registerKeyDown(hc(d))),d.code==="Enter"&&d.shiftKey&&t(p.getText())}),p.on("paste",({pastedText:d,selectionText:h})=>{o(Ge.actions.registerPaste({text:d,selectionText:h}))}),p.on("cut",({selectionText:d})=>{o(Ge.actions.registerCut(d))})),()=>{o(Ge.actions.reset()),p.dispose(),p.deactivate()}},[l]),(0,bt.useEffect)(()=>{e&&l.current&&(l.current.value=e)},[e,l]),(0,bt.useEffect)(()=>{l.current&&setTimeout(()=>{if(!l.current)return;let p=l.current.value.length;l.current.setSelectionRange(p,p),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)(tR,{inputElement:l.current,value:e}),(0,Qe.jsxs)("div",{className:(0,ug.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)(wx,{}):(0,Qe.jsx)(xx,{})]})]})},tR=({inputElement:e,value:t})=>{let n=P("EditSuggestionTextInput",ng),r=(0,bt.useRef)(null),o=Oc(e);return(0,bt.useEffect)(()=>{Nc(e,o)},[o,e]),(0,Qe.jsx)(nR,{inputElement:e,children:(0,Qe.jsxs)("div",{ref:r,className:(0,ug.default)(n.root,n.agentText),children:[(0,Qe.jsx)(ii,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new ai("placeholders")],inputElement:e,boundaryRef:r}),(0,Qe.jsx)("br",{})]})})},nR=({inputElement:e,children:t})=>{let n=(0,bt.useRef)(null);return(0,bt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=di(e,{overlayContainer:n.current,mirrorOverflow:!0});return()=>{o()}},[n.current]),(0,Qe.jsx)("div",{ref:n,children:t})},Cx=eR;var mi=S(O());var Xe={root:"_root_m5usm_1",list:"_list_m5usm_2",listWrapper:"_listWrapper_m5usm_6",listHorizontal:"_listHorizontal_m5usm_10",page:"_page_m5usm_19",search:"_search_m5usm_25",pageNav:"_pageNav_m5usm_33",pageTitle:"_pageTitle_m5usm_41",pageBackButton:"_pageBackButton_m5usm_48",listHeading:"_listHeading_m5usm_62",listItem:"_listItem_m5usm_70",listItemContent:"_listItemContent_m5usm_79",listItemText:"_listItemText_m5usm_97",listItemDescription:"_listItemDescription_m5usm_105",truncate:"_truncate_m5usm_112",lineClamp:"_lineClamp_m5usm_118",listItemTitle:"_listItemTitle_m5usm_125",listItemAction:"_listItemAction_m5usm_132",listItemPrimaryAction:"_listItemPrimaryAction_m5usm_146",listItemSelected:"_listItemSelected_m5usm_151",sources:"_sources_m5usm_155",sourcesTitle:"_sourcesTitle_m5usm_162",source:"_source_m5usm_155",icon:"_icon_m5usm_177",searchIcon:"_searchIcon_m5usm_194",searchInputWrapper:"_searchInputWrapper_m5usm_199",searchInput:"_searchInput_m5usm_199",select:"_select_m5usm_220",selectType:"_selectType_m5usm_237",selectWrapper:"_selectWrapper_m5usm_241",image:"_image_m5usm_271",imageSrc:"_imageSrc_m5usm_278",imageTitle:"_imageTitle_m5usm_289",actions:"_actions_m5usm_294",actionsWrapper:"_actionsWrapper_m5usm_298",actionsBar:"_actionsBar_m5usm_304",actionButton:"_actionButton_m5usm_313",actionShortcut:"_actionShortcut_m5usm_331",actionShortcutFixKerning:"_actionShortcutFixKerning_m5usm_338"};var sa=S(C()),rR=({src:e,title:t})=>{let n=P("CommandPalette",Xe);return(0,sa.jsxs)("div",{className:n.image,children:[(0,sa.jsx)("img",{src:e,alt:t,className:n.imageSrc}),t&&(0,sa.jsx)("span",{className:n.imageTitle,children:t})]})},Tx=rR;var _x=S(O()),bx=S(X());var aa=S(C());function cg({children:e,heading:t,orientation:n}){let r=P("CommandPalette",Xe);return _x.default.Children.count(e)===0?null:(0,aa.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,aa.jsx)("h4",{className:r.listHeading,children:t}),(0,aa.jsx)("div",{className:(0,bx.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var la=S(X());var Dc=S(O()),Rx=S(C()),Px=Dc.default.createContext(void 0);function vr(){let e=Dc.default.useContext(Px);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var kx=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Dc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,Rx.jsx)(Px.Provider,{value:s,children:e})};var Pt=S(C());function dg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:p,onChangeOpen:d}=vr(),h=P("CommandPalette",Xe);function v(y){r(y),e&&d(!1)}return(0,Pt.jsxs)("div",{className:(0,la.default)(h.listItem,p===i&&h.listItemSelected),children:[(0,Pt.jsxs)("button",{type:"button",className:(0,la.default)("command-palette-list-item",h.listItemAction,h.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,...c,children:[(0,Pt.jsxs)("div",{className:h.listItemContent,children:[typeof n=="string"?(0,Pt.jsx)("p",{className:(0,la.default)(h.listItemText,h.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,Pt.jsx)("p",{className:(0,la.default)(h.listItemDescription,u==null?void 0:u.description,t?h.lineClamp:h.truncate),children:a})]}),s&&(0,Pt.jsx)(ll,{})]}),l&&(0,Pt.jsxs)("div",{className:h.sources,children:[(0,Pt.jsx)("span",{className:h.sourcesTitle,children:"Sources"}),l.map(y=>y.url?(0,Pt.jsx)("a",{className:h.source,href:y.url,target:"_blank",title:y.url,rel:"noopener noreferrer",onClick:()=>o&&o(y),children:y.name},y.url):(0,Pt.jsx)("span",{className:h.source,children:y.name},y.name))]})]})}var ua={};Te(ua,{enUS:()=>oR,nlNL:()=>iR});var oR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}]},iR={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}]};var Sr=S(C());function fg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=H(ua),s=P("CommandPalette",Xe),{page:a}=vr();return a!==n?null:(0,Sr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Sr.jsxs)("div",{className:s.pageNav,children:[(0,Sr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,Sr.jsx)(Cc,{}),i("back")]}),t&&(0,Sr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,Sr.jsx)(ll,{})]}),e]})}var wr=S(O());var Fc=()=>/Mac/i.test(navigator.platform);var sR={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},B=sR;function aR(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,[aR(n)]:re(e[n])}),{}):e}function pg(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Ee(e){return Array.isArray(e)?e.map(Ee):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[pg(n)]:Ee(e[n])}),{}):e}var lR={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},da=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)||""}},ca=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))}),mg=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}),gg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),Ix=e=>e.info.agentInfo,Lx=j({name:"info",initialState:lR,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(ca.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(ca.rejected,t=>{t.fetchState="error"}).addCase(ca.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(mg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(gg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Z,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:Ax}=Lx.actions,Ox=Lx.reducer;var jc={list:[],fetchState:"idle",isOpen:!1,page:"search"},Nx=e=>e.search.isOpen,Mx=e=>e.search.page,Dx=e=>e.search.list;function Fx(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Jr=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:da(r),tags:e.tags});return i}),jx=j({name:"search",initialState:jc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=jc.fetchState,e.list=jc.list}},extraReducers:e=>{e.addCase(Jr.pending,t=>{t.fetchState="loading"}).addCase(Jr.rejected,(t,n)=>{t.fetchState="error",B.error(n.error)}).addCase(Jr.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(Z,()=>jc)}}),{resetSearch:Hc,setIsOpen:it,setPage:Ue}=jx.actions,Hx=jx.reducer;var uR=/(https?:\/\/[^\s]+)/,Bc=e=>e.split(" ").find(t=>uR.test(t));var hg=S(X());var Uc=S(C()),cR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=P("CommandPalette",Xe);return(0,Uc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,hg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Uc.jsx)("span",{className:(0,hg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},fi=cR;var xn=S(C()),dR=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=P("CommandPalette",Xe),a=H(ua),{selected:l,setSelected:u}=vr(),c=i[l],p=c&&typeof c.text=="string"&&Bc(c.text),d=(0,wr.useRef)(null);function h(w){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),T=0,E=0;w==="down"?(x.forEach((R,k)=>{k===l&&(T=k)}),E=T===x.length-1?0:T+1):w==="up"?(x.forEach((R,k)=>{k===l&&(T=k)}),E=T?T-1:x.length-1):u(0);let _=x[E];_&&typeof E=="number"&&(u(E),_.scrollIntoView&&_.scrollIntoView({behavior:"smooth",block:E?"center":"end"}))}function v(){if(!d.current)return;let w=d.current.querySelectorAll(".command-palette-list-item"),x=0;w.forEach((E,_)=>{_===l&&(x=_)});let T=w[x];T&&T.click()}let y=()=>{p&&window.open(p,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,wr.useCallback)(w=>{if(w.key==="Enter"&&w.altKey&&p){y();return}if(w.key==="Enter"&&w.shiftKey){m();return}if(w.key==="ArrowDown"){w.preventDefault(),w.stopPropagation(),h("down");return}if(w.key==="ArrowUp"){w.preventDefault(),w.stopPropagation(),h("up");return}w.key==="Enter"&&l!==-1&&(w.preventDefault(),w.stopPropagation(),v())},[l]);return(0,wr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,xn.jsxs)("div",{className:s.actions,children:[(0,xn.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,xn.jsxs)("div",{className:s.actionsBar,children:[p&&(0,xn.jsx)(fi,{onClick:y,shortKeys:[Fc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,xn.jsxs)(wr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,xn.jsx)(fi,{onClick:m,shortKeys:[8679,8629],children:n}),(0,xn.jsx)(fi,{onClick:g,shortKeys:[8629],children:t})]})]})]})},Ux=dR;var zx=S(O());var fa=S(C()),pi=()=>(0,fa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,fa.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,fa.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=S(C());function fR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=P("CommandPalette",Xe);return(0,Bt.jsxs)("div",{className:l.search,children:[(0,Bt.jsx)("div",{className:l.searchIcon,children:(0,Bt.jsx)(pi,{})}),(0,Bt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Bt.jsx)("input",{ref:a,spellCheck:!1,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 Vx=(0,zx.forwardRef)(fR);var pa=S(C());function eo({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:p,search:d}){let[h,v]=(0,mi.useState)(0),y=(0,mi.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var f;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(f=y.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,mi.useEffect)(()=>{v(0)},[d,r]),(0,pa.jsx)(oi,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:m,onClose:g,children:(0,pa.jsxs)(kx,{selected:h,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,pa.jsx)(Vx,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}eo.Page=fg;eo.List=cg;eo.Image=Tx;eo.ListItem=dg;eo.ActionsBar=Ux;eo.Button=fi;var ee=eo;var Fe=S(C()),pR=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=P("EditSuggestionForm",nx),l=K(),u=H(qm),c=A(v=>v.overlayInput.text);(0,yg.useEffect)(()=>{e&&(l(Ge.actions.reset()),l(Ge.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Ge.actions.commitSuggestion()))},[e]);let p=v=>{v.preventDefault(),d(c)},d=v=>{l(Sc(v)),t(v)},h=v=>y=>{c!==s?window.confirm(u("warning"))&&v(y):v(y)};return(0,yg.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)(Hd,{labels:e.searchKeywords}),(0,Fe.jsx)(Cx,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,Fe.jsxs)("div",{children:[(0,Fe.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&h(i),children:(0,Fe.jsx)(Cc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&h(o),children:(0,Fe.jsx)(rx,{})})]}),(0,Fe.jsxs)("div",{className:a.primaryButtons,children:[(0,Fe.jsx)(ee.Button,{onClick:h(n),shortKeys:["esc"],children:u("dismiss")}),(0,Fe.jsx)(ee.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},zc=pR;var mR=["{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}"],gR=new RegExp(mR.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function Kx(e,t){let n=e.split(gR),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 p=a.charAt(0),d=0;do u=p?t.indexOf(p,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 Wx(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var qx={suggestions:[],fetchState:"idle",isInitialRequest:null},$x={default:qx},Gx=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Qx=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Xx=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")},gi=e=>e.textSuggestions,Yx=e=>t=>t.text.startsWith(e),Vc=fe("textSuggestions/refresh"),En=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=ni(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,da(r),e);if(e==="default"){let c=s?l.filter(Yx(a)):l;t.dispatch(gr(c.slice(0,i)))}return l}),ma=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,{...da(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(Yx(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?Kx(c.text,e):c.text}))),l=Wx(l,i),t.dispatch(gr(l)),l}),Zx=j({name:"textSuggestions",initialState:$x,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(En.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||qx;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(En.rejected,(t,n)=>{let r=n.meta.arg;t[r].fetchState="error"}).addCase(En.fulfilled,(t,n)=>{let r=n.meta.arg;t[r].fetchState="done",t[r].suggestions=n.payload}).addCase(ma.pending,t=>{t.default.fetchState="loading"}).addCase(ma.rejected,t=>{t.default.fetchState="error"}).addCase(ma.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(Z,()=>$x)}}),{setTextSuggestions:Jx,setSuggestionState:eE}=Zx.actions,tE=Zx.reducer;var nE={contentType:null,suggestion:null},rE=e=>e.activeSuggestion.suggestion,oE=e=>e.activeSuggestion.contentType,iE=j({name:"activeSuggestion",initialState:nE,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(Z,()=>nE)}}),{setActiveSuggestion:Cn,resetActiveSuggestion:vg}=iE.actions,sE=iE.reducer;var Sg={};Te(Sg,{enUS:()=>hR,nlNL:()=>yR});var hR={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"}]},yR={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 vR={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var aE=({ui:e})=>e.overlayCollapsed;var lE=j({name:"ui",initialState:vR,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:ga,setInputHasFocus:hi,setOverlayCollapsed:yi,setOpenOverlayWhenTyping:uE,setOverlayCollapsedUserOverwrite:cE}=lE.actions,dE=lE.reducer;var ha=S(O()),pE=S(C()),fE=ha.default.createContext(null),ya=({broadcastEvents:e,children:t})=>{let n=ha.default.useMemo(()=>e,[]);return(0,pE.jsx)(fE.Provider,{value:n,children:t})},kt=()=>{let e=(0,ha.useContext)(fE);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var SR={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Tn=e=>e.auth.isLoggedIn,mE=e=>e.auth.loginFetchState,gE=e=>e.auth.verifyFetchState,hE=e=>e.auth.showLoginOverlay,to=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),yE=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),va=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),vE=j({name:"auth",initialState:SR,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(to.pending,t=>{t.loginFetchState="loading"}),e.addCase(to.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(to.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(va.pending,t=>{t.verifyFetchState="loading"}),e.addCase(va.rejected,t=>{t.verifyFetchState="error"}),e.addCase(va.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:Kc,setShowLoginOverlay:SE}=vE.actions,wE=vE.reducer;var wg="SetActiveSuggestion",vi="ShowLoginOverlay",xg="UserLoggedIn",_n="ApplySuggestion",Eg="ApplyImageSuggestion",wR="ShowCommandPalette",xR=e=>({[wg]:t=>{e.dispatch(eE(t.state)),e.dispatch(Cn({contentType:t.contentType,suggestion:t.suggestion}))},[wR]:t=>{e.dispatch(it(t.isOpen)),t.page&&e.dispatch(Ue(t.page))},[vi]:t=>{e.dispatch(SE(t))},[xg]:()=>{e.dispatch(to())},[Eg]:t=>{e.dispatch(xc({suggestion:t.suggestion}))},[_n]:t=>{e.dispatch(Ft({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(hr())}}),xE=xR;var Cg=S(C()),ER=()=>{var v;let[e,t]=(0,EE.useState)(!1),n=A(rE),r=A(oE),o=A(gi),i=K(),s=kt(),a=H(Sg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(vg()),i(hi(!0)),i(Ge.actions.reset())},c=(y,g)=>{i(vg()),i(hi(!0)),s.send(_n,{text:y,suggestion:g})};if(n===null||r===null)return null;let p=(v=o[r])==null?void 0:v.suggestions.indexOf(n),d=p===0||p===null?void 0:()=>i(Cn({contentType:r,suggestion:o[r].suggestions[p-1]})),h=p===o[r].suggestions.length-1||p===null?void 0:()=>i(Cn({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,Cg.jsx)(oi,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Cg.jsx)(zc,{onTouched:t,onDismiss:u,onUse:y=>c(y,n),suggestion:n,onNext:h,onPrevious:d})})},CE=ER;var Wc=S(X()),Ut=S(O());var _E=S(X());var TE={root:"_root_1ukx5_1"};var bE=S(C()),CR=({className:e,value:t,...n})=>{let r=P("TextInput",TE);return(0,bE.jsx)("input",{className:(0,_E.default)(e,r.root),type:"text",value:t,...n})},Sa=CR;var Tg={};Te(Tg,{enUS:()=>TR,nlNL:()=>_R});var TR={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"}]},_R={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 PE={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=S(C());var bR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},PR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=H(Tg),s=P("LoginTokenDialog",PE),a=A(gE),l=K(),u=F("productName"),[c,p]=(0,Ut.useState)(e||""),[d,h]=(0,Ut.useState)(0),[v,y]=(0,Ut.useState)(""),g=(0,Ut.useCallback)(async x=>{x.preventDefault(),l(yE({email:c})),h(1)},[n,c]),m=()=>{y(""),h(0)},f=(0,Ut.useCallback)(async x=>{x.preventDefault();let T=bR(x.target.elements.token.value);if(!T){y(i("verifyCodeError",{login:w}));return}l(va({token:T}))},[n]),w=(0,Ut.useMemo)(()=>x=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:x},"back-button"),[]);return(0,Ut.useEffect)(()=>{a==="error"&&y(i("verifyCodeError",{login:w})),a==="done"&&r()},[a]),(0,he.jsx)(oi,{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)(Sa,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>p(x.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,Wc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:f,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Sa,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,he.jsx)("div",{className:s.errorMessage,children:v}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Wc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Wc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},kE=PR;var IE=S(C()),kR=()=>{let e=A(hE),t=A(Ix),n=F("adminUrl"),r=kt(),o=()=>r.send(vi,!1),i=()=>{r.send(vi,!1),r.send(xg)};return(0,IE.jsx)(kE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},RE=kR;var nC=S(Pg()),st=S(O());var $R={data:null,fetchState:"idle"},NE=e=>e.contentTypes.data,wa=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),qR=j({name:"contentTypes",initialState:$R,reducers:{},extraReducers:e=>{e.addCase(wa.pending,t=>{t.fetchState="loading"}).addCase(wa.rejected,t=>{t.fetchState="error"}).addCase(wa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),ME=qR.reducer;function xa(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 DE=S(O());function FE(e,t){(0,DE.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 Ea=S(O());var jE={data:null,fetchState:"idle"},$c=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},zt=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)}),GR=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),QR=j({name:"entities",initialState:jE,reducers:{},extraReducers:e=>{e.addCase(zt.pending,t=>{t.fetchState="loading"}).addCase(zt.rejected,t=>{t.fetchState="error"}).addCase(zt.fulfilled,(t,n)=>{t.fetchState="done",t.data=GR(t.data?[...t.data,...n.payload]:n.payload)}).addCase(Z,()=>jE)}}),HE=QR.reducer;var kg={};Te(kg,{enUS:()=>XR,nlNL:()=>YR});var XR={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},YR={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var BE={root:"_root_17kae_1",empty:"_empty_17kae_5"};var no=S(C()),ZR=({onCopy:e,onUse:t})=>{let n=(0,Ea.useRef)(null),r=P("EntitiesList",BE),o=H(kg),i=A($c),s=K();return(0,Ea.useEffect)(()=>{s(zt())},[]),(0,Ea.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,no.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,no.jsx)(ee.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,no.jsx)(ee.List,{children:i.map((a,l)=>(0,no.jsx)(ee.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,no.jsx)("p",{className:r.empty,children:o("noResults")})]})},UE=ZR;var Vt=S(O());var zE={data:null,fetchState:"idle"},VE=e=>e.summary.data,KE=e=>e.summary.fetchState==="error",bn=M("summary/getSummary",async(e,t)=>{let{deepdeskAPI:n,dynamicThunkObject:r}=t.extra;if(!r.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let o=r.conversationQuery,i=await o();if(i.length===0)return Promise.reject(new Error("No messages are included"));let s=await n.getSummary(i);return{original:i,summary:s}}),JR=j({name:"summary",initialState:zE,reducers:{},extraReducers:e=>{e.addCase(bn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(bn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(bn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(Z,()=>zE)}}),WE=JR.reducer;var Rg={};Te(Rg,{enUS:()=>eI,nlNL:()=>tI});var eI={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."}]},tI={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 $E={root:"_root_18y7z_1",actions:"_actions_18y7z_5",main:"_main_18y7z_11",textInput:"_textInput_18y7z_15",loading:"_loading_18y7z_34",error:"_error_18y7z_38"};var Pn=S(C()),nI=({onCopy:e})=>{let t=(0,Vt.useRef)(null),n=P("SummaryForm",$E),[r,o]=(0,Vt.useState)(""),i=H(Rg),s=A(VE),a=A(KE),l=K(),u=()=>{l(ot({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(ot({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Vt.useEffect)(()=>{l(bn())},[]),(0,Vt.useEffect)(()=>{o(s||"")},[s]),(0,Vt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Vt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,Pn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Pn.jsx)("p",{className:n.error,children:i("error")}):(0,Pn.jsxs)(Vt.Fragment,{children:[(0,Pn.jsx)("div",{className:n.main,children:(0,Pn.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:p=>o(p.target.value)})}),(0,Pn.jsx)("div",{className:n.actions,children:(0,Pn.jsx)(ee.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},qE=nI;var Ig={};Te(Ig,{enUS:()=>rI,nlNL:()=>oI});var rI={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"}],knowledgeSearch:[{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?"}]},oI={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:"Vat gesprek samen"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeSearch:[{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 ro=S(O());var Lg={};Te(Lg,{enUS:()=>iI,nlNL:()=>sI});var iI={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"}]},sI={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 GE={root:"_root_cnaw4_1",title:"_title_cnaw4_9",empty:"_empty_cnaw4_20",status:"_status_cnaw4_24",form:"_form_cnaw4_30",input:"_input_cnaw4_43",submit:"_submit_cnaw4_55",question:"_question_cnaw4_63",answer:"_answer_cnaw4_67",alignRight:"_alignRight_cnaw4_73"};var Ag={data:[],fetchState:"idle"},QE=e=>{var t;return(t=e.answer)==null?void 0:t.data},XE=e=>e.answer.fetchState,Ca=fe("answer/resetKnowledgeSearch"),Si=M("answer/getAnswer",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=(s=t.getState().profile.data)==null?void 0:s.code;if(!o)throw new Error("Profile is not defined");let i=await n.knowledgeSearch({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),aI=j({name:"answer",initialState:Ag,reducers:{},extraReducers:e=>{e.addCase(Si.pending,t=>{t.fetchState="loading"}).addCase(Si.rejected,t=>{t.fetchState="error"}).addCase(Si.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(Z,()=>Ag).addCase(Ca,()=>Ag)}}),YE=aI.reducer;var Ta=S(C()),ZE=()=>(0,Ta.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ta.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ta.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 Ye=S(C()),lI=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=ro.default.useState(""),{setSelected:s}=vr(),a=(0,ro.useRef)(null),l=P("EntitiesList",GE),u=H(Lg),c=K(),p=A(QE),d=A(XE),h=async y=>{y.preventDefault(),y.stopPropagation(),o!==""&&c(Si({question:o,promptInstruction:r}))},v=(y,g)=>{c(ot({name:"knowledge assist source viewed",data:{question:g,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,ro.useEffect)(()=>{var y;n&&d==="idle"?c(Si({question:n,promptInstruction:r})):(y=a.current)==null||y.focus()},[a,d]),(0,ro.useEffect)(()=>{d==="done"&&(c(ot({name:"knowledge assist question answered",data:{question:o||n,sources:p[p.length-1].answer.sources,isFollowUpQuestion:p.length>1},options:{includeConversationData:!0}})),s(0),i(""))},[d,p]),(0,Ye.jsxs)("div",{className:l.root,children:[p.length>0&&(0,Ye.jsx)("div",{className:l.alignRight,children:(0,Ye.jsx)(ee.Button,{onClick:t,children:u("reset")})}),(0,Ye.jsxs)(ee.ActionsBar,{list:p.map(({answer:y})=>({text:y.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:y=>e(y.text),children:[p.map(({question:y,answer:g},m)=>(0,Ye.jsx)(ee.List,{children:(0,Ye.jsx)(ee.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:g.answer,closeOnSelect:!0,onClick:()=>e(g.answer),onSourceClick:f=>v(f,y),sources:g.sources,styles:{title:l.question,description:l.answer},children:y})},`${g.answer}_${m}`)),d==="loading"&&(0,Ye.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ye.jsx)("p",{className:l.status,children:u("error")}),(0,Ye.jsxs)("form",{className:l.form,onSubmit:h,children:[(0,Ye.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:y=>{s(-1),i(y.target.value)}}),(0,Ye.jsx)("button",{type:"submit",className:l.submit,children:(0,Ye.jsx)(ZE,{})})]})]})]})},JE=lI;var uI={data:null,fetchState:"idle"},wi=e=>e.profile.data,qc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],_a=M("profile/getProfile",async(e,t)=>{let{deepdeskAPI:n}=t.extra,o=t.getState().conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");return n.getProfile(o.profileCode)}),cI=j({name:"profile",initialState:uI,reducers:{},extraReducers:e=>{e.addCase(_a.pending,t=>{t.fetchState="loading"}).addCase(_a.rejected,t=>{t.fetchState="error"}).addCase(_a.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),eC=cI.reducer;var Ce=S(C()),dI=200,fI=5,pI=4,mI=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),tC=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),gI=()=>{let e=K(),t=kt(),n=H(Ig),[r,o]=(0,st.useState)(!1),[i,s]=(0,st.useState)(""),a=A(Mx),l=A(wi),[u,c]=(0,st.useState)(null),[p,d]=(0,st.useState)([]),[h,v]=(0,st.useState)(),y=A(Tn),g=F("showSearch"),m=F("showEntitiesCommand"),f=F("showSummaryCommand"),w=F("showKnowledgeSearch"),x=F("showImageSearch"),T=F("searchTriggerKey"),E=A(NE),_=A(Dx),R=A(Nx),k=I=>sn(_.filter(W=>W.type===I.toUpperCase()),I),N=[{value:"PERSONAL",label:n("personalSuggestions"),list:k("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:k("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:k("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:k("IMAGE"),listOrientation:"horizontal",shouldShow:x}].filter(I=>I.shouldShow),te=[{label:n("entitiesClipboard"),onClick:()=>e(Ue("entities")),shouldShow:m&&tC(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(Ue("summary")),shouldShow:f&&tC(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeSearch")}: ${i}`:n("knowledgeSearch"),onClick:()=>e(Ue("knowledgeSearch")),shouldShow:w,experimental:!0}].filter(I=>I.shouldShow),z=(E==null?void 0:E.map(I=>({value:I.code.toUpperCase(),label:`${I.name}s`,list:k(I.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],je=(0,st.useCallback)((0,nC.default)((I,W)=>{e(Jr({query:I,type:W,tags:["search-overlay"]}))},dI),[]),on=mI([...z,...N]),Kt=(0,st.useCallback)((I,W)=>{if(!W)return;let Lt=[...N,...z].find(({value:jn})=>jn===W);Lt&&(e(Ue("edit")),c(I),d(Lt.list))},[e,u,z]),ao=(0,st.useCallback)((I,W)=>{switch(W.type){case"IMAGE":t.send(Eg,{suggestion:W});break;default:t.send(_n,{text:I,suggestion:W})}e(it(!1))},[e]),Ii=I=>{xa(I.text),e(ot({name:"entity copied",data:{entity:I,type:"copy"}})),e(it(!1))},_r=I=>{t.send(_n,{text:I,suggestion:{source:"knowledge-assist",text:I}}),e(ot({name:"answer used",data:{originalText:I},options:{includeConversationData:!0}})),s(""),e(Ue("search")),e(Ca()),e(it(!1))},Fa=I=>{xa(I),e(it(!1))},ja=I=>{t.send(_n,{text:I.text,suggestion:{source:"entity",text:I.text}}),e(it(!1))},Li=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Ai=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function sn(I,W){return I.slice(0,h?10:W.toLowerCase()==="image"?pI:fI)}function Oi(I,W,Lt){return W.reduce((jn,an)=>Lt&&h===Lt?an.length+jn:sn(an,Lt).length+jn,I)}function br(I){return W=>{r?window.confirm(n("warning"))&&(I(W),o(!1)):I(W)}}return(0,st.useEffect)(()=>{i?je(i,h):e(Hc())},[i,h]),(0,st.useEffect)(()=>{y&&e(wa())},[y]),FE(T,()=>e(it(!0))),!g||!l?null:(0,Ce.jsxs)(ee,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:br(I=>e(it(I))),onChangeType:I=>v(I),onChangePage:br(I=>e(Ue(I))),selectedType:h,search:i,page:a,isOpen:R,types:[...z,...N],children:[(0,Ce.jsx)(ee.Page,{id:"search",children:(0,Ce.jsxs)(ee.ActionsBar,{list:[...te.map(I=>({text:I.label,type:"command"})),...on.map(I=>({text:I.text||I.url||I.message,type:I.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:I},W)=>ao(I,on[W]),onSecondary:(I,W)=>Kt(on[W],on[W].type),children:[te.length>0&&(0,Ce.jsx)(ee.List,{heading:n("commands"),children:te.map((I,W)=>(0,Ce.jsx)(ee.ListItem,{index:Oi(W,[],"commands"),closeOnSelect:!1,onClick:I.onClick,isExperimental:I.experimental,children:I.label},I.label))}),[...z,...N].map(({value:I,label:W,list:Lt,lineClamp:jn,listOrientation:an},Ni)=>(0,Ce.jsx)(ee.List,{heading:W,orientation:an==="horizontal"?"horizontal":"vertical",children:sn(Lt,I).map((ct,dt)=>(0,Ce.jsx)(ee.ListItem,{index:Oi(te.length+dt,[...z,...N].slice(0,Ni).map(({list:Pr})=>Pr),I),closeOnSelect:!1,lineClamp:jn,onClick:()=>ao(ct.text,ct),description:I!=="IMAGE"?ct.title&&ct.text:void 0,children:I==="IMAGE"?(0,Ce.jsx)(ee.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},I))]})}),(0,Ce.jsx)(ee.Page,{id:"edit",onDismiss:br(()=>{e(Ue("search")),c(null)}),children:u&&(0,Ce.jsx)(zc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(Ue("search")),c(null),d([])},onNext:Ai,onPrevious:Li,onUse:I=>{e(Ue("search")),ao(I,u),e(it(!1)),d([]),c(null)}})}),(0,Ce.jsx)(ee.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:br(()=>{e(Ue("search"))}),children:(0,Ce.jsx)(UE,{onUse:ja,onCopy:Ii})}),(0,Ce.jsx)(ee.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:br(()=>{e(Ue("search"))}),children:(0,Ce.jsx)(qE,{onCopy:Fa})}),(0,Ce.jsx)(ee.Page,{id:"knowledgeSearch",title:n("knowledgeSearch"),isExperimental:!0,onDismiss:br(()=>{e(Ca()),e(Ue("search"))}),children:(0,Ce.jsx)(JE,{promptInstruction:l.knowledgeSearchPromptInstruction,question:i,onUse:_r,onResetQuestion:()=>{e(Ca()),s("")}})})]})},rC=gI;var xi=S(C()),hI=()=>{let e=F("showSearch"),t=F("isEmbedded");return(0,xi.jsxs)(oC.Fragment,{children:[e&&(0,xi.jsx)(rC,{}),(0,xi.jsx)(CE,{}),t&&(0,xi.jsx)(RE,{})]})},iC=hI;var ba=S(C()),yI=({children:e})=>{let n=F("locale").replace("-","");return(0,ba.jsx)(Md.Provider,{value:n,children:e})},vI=({store:e,customStyles:t={},children:n})=>(0,ba.jsx)(Dm,{store:e,children:(0,ba.jsx)(yI,{children:(0,ba.jsx)(Di.Provider,{value:t,children:n})})}),Pa=vI;var Xc=S(X()),Ti=S(O());var sC=S(O());function aC(e,t){let[n,r]=(0,sC.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return B.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){B.error(s)}}]}function Gc(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 uC=S(X()),kn=S(O());var Og={};Te(Og,{enUS:()=>SI,nlNL:()=>wI});var SI={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"}]}]},wI={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 lC={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var xr=S(C()),Ng=(e,t,n)=>r=>(0,xr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),xI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=H(Og),i=kt(),s=P("Login",lC),a=F("productName"),l=(0,kn.useCallback)(y=>{y.preventDefault(),r&&r(parseInt(y.target.value,10))},[]),u=(0,kn.useCallback)(y=>{y.preventDefault(),i.send(vi,!0)},[t]),c=(0,kn.useMemo)(()=>y=>(0,xr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:y},"login"),[t]),p=(0,kn.useCallback)(y=>(0,xr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:y},"prompt"),[u]),{min:d,hour:h,day:v}=(0,kn.useMemo)(()=>({min:Ng(s,60*10,l),hour:Ng(s,60*60,l),day:Ng(s,60*60*12,l)}),[]);return(0,xr.jsxs)("div",{className:(0,uC.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,xr.jsxs)(kn.Fragment,{children:[(0,xr.jsx)("br",{}),o("snooze",{min:d,hour:h,day:v})]})]})},Qc=xI;var cC={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var ka=S(C()),EI=({title:e})=>{let t=P("SearchTrigger",cC),n=K();return(0,ka.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(it(!0)),children:[(0,ka.jsx)(pi,{}),(0,ka.jsx)("span",{className:t.text,children:e})]})},dC=EI;var vC=S(O());var Ci=S(O());var fC=S(O());function pC(e,t,n){(0,fC.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var CI=/[.*+?^${}()|[\]\\]/g,TI=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function _I(e){return e.replace(CI,"\\$&")}function bI(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function Mg(e){return e.search(TI)}function mC(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${_I(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function gC(e){return e.replace(mo,'<mark data-type="placeholder">$1</mark>')}function Ei(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function PI(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 Dg(e,t,n={}){if(t){let r=bI(t.toLowerCase(),e.toLowerCase()),o=Ei(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=Mg(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(vy).length>3||t.length>30?PI(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ei(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var hC={badge:"_badge_8rv7b_1",formattedText:"_formattedText_8rv7b_5"};var Fg=S(C()),RI=["search","personal-collection-search","studio-search"];function II(e,t,n,r={}){let o="";return RI.includes(t)?o=mC(Dg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Dg(e,n,r),r.placeholders===!0&&(o=gC(o)),o}var LI=()=>{},AI=({index:e,selected:t,suggestion:n})=>{let r=F("inlineSuggestions"),o=A(ni),i=K(),s=P("TextSuggestion",hC),a=(0,Ci.useRef)(null);(0,Ci.useEffect)(()=>{let u=setTimeout(()=>{i(G0({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),pC(a,"click",()=>{i(Ec(e)),i(Ft({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,Ci.useMemo)(()=>II(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"?null:(0,Fg.jsx)(oe,{ref:a,as:"button",selected:t,onClick:LI,children:(0,Fg.jsx)(ii,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},yC=AI;var jg=S(C()),OI=({suggestions:e,selectedIndex:t})=>(0,jg.jsx)(vC.Fragment,{children:e.slice().map((n,r)=>(0,jg.jsx)(yC,{index:r,selected:r===t,suggestion:n},`${n.text}-${n.source}`)).reverse()}),SC=OI;var Hg={};Te(Hg,{enUS:()=>NI,nlNL:()=>MI});var NI={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"}]},MI={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 wC={root:"_root_4kcme_1",isInline:"_isInline_4kcme_14",toggleButton:"_toggleButton_4kcme_18",toggleButtonWrapper:"_toggleButtonWrapper_4kcme_22",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_4kcme_29",isCollapsed:"_isCollapsed_4kcme_33",collapsible:"_collapsible_4kcme_33",hints:"_hints_4kcme_41",hintsHidden:"_hintsHidden_4kcme_48",triggers:"_triggers_4kcme_53",triggersRight:"_triggersRight_4kcme_68"};var ue=S(C()),DI=({inline:e=!1,textSuggestions:t,selectedIndex:n})=>{let r=P("SuggestionsOverlay",wC),o=H(Hg),i=F("inlineSuggestions"),s=A(Gc),a=V0(),l=K(),u=(0,Ti.useRef)(null),c=F("searchTriggerKey"),p=F("productName"),d=A(aE),h=A(Tn),v=A(cc),[y,g]=(0,Ti.useState)(null),m=F("showSearch"),f=F("showTextSuggestions"),w=F("adminUrl"),x=F("isEmbedded"),[T,E]=aC("dd-snooze-until-ms",0),_=d||T>Date.now(),R=t.filter(te=>te.source!=="gpt").length,k=()=>{_&&E(0),l(cE(!_))},N=te=>{let z=Date.now()+te*1e3;E(z),B.info(`Snooze until: ${new Date(z)}`),l(yi({collapse:!0}))};return(0,Ti.useEffect)(()=>{R===0&&g(null)},[t,R]),ui(()=>{l(yi({collapse:!0,skipWhenInputFocus:!0}))}),i!==e||h===null||v===!1?null:h===!1?(0,ue.jsxs)("div",{ref:u,className:(0,Xc.default)(r.root,{[r.isCollapsed]:_,[r.isInline]:e}),"data-inline":e,children:[!_&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:r.triggersRight,children:(0,ue.jsx)(Lr,{className:r.toggleButton,title:o("collapse"),onClick:k,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Lr,{className:r.toggleButton,title:o("open",{productName:p}),onClick:k,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(Qc,{loginUrl:w,isEmbedded:x,onSnooze:N})})]}):!a||!s?null:(0,ue.jsxs)("div",{ref:u,className:(0,Xc.default)(r.root,{[r.isCollapsed]:_,[r.isInline]:e}),"data-inline":e,children:[!_&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:m&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>g(o(Fc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>g(null),children:(0,ue.jsx)(dC,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,Xc.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,ue.jsx)(Lr,{className:r.toggleButton,title:o("collapse"),onClick:k,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Lr,{className:r.toggleButton,title:o("open",{productName:p}),onClick:k,isCollapsed:!0})}),R>0&&f&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(Wt,{children:(0,ue.jsx)(SC,{suggestions:t,selectedIndex:n})})})]})},FI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Yc=Gr(FI)(DI);var cd=S(X());var An=S(O());var xC=S(O()),jI=["div","span","mark","strong","b","i","u","em"];function Bg(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(jI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,xC.cloneElement)(r,{children:Bg(s,t,n+1)})]}return[...e,...t]}function Rn(e){return e.tagName.toLowerCase()==="textarea"}var EC={root:"_root_1l8n5_1",container:"_container_1l8n5_4",agentText:"_agentText_1l8n5_7",tabText:"_tabText_1l8n5_8",hint:"_hint_1l8n5_8",matchSelection:"_matchSelection_1l8n5_12",focus:"_focus_1l8n5_18",resetIndent:"_resetIndent_1l8n5_22",matchKeyword:"_matchKeyword_1l8n5_26",matchPlaceholder:"_matchPlaceholder_1l8n5_27",hover:"_hover_1l8n5_33",hintText:"_hintText_1l8n5_66",popover:"_popover_1l8n5_74",popoverRoot:"_popoverRoot_1l8n5_79",popoverContentContainer:"_popoverContentContainer_1l8n5_83",popoverContent:"_popoverContent_1l8n5_83",selectionOptions:"_selectionOptions_1l8n5_109",selectionOptionsIsHidden:"_selectionOptionsIsHidden_1l8n5_114",selectionOptionsButton:"_selectionOptionsButton_1l8n5_118",caret:"_caret_1l8n5_134",popoverSuggestionsRoot:"_popoverSuggestionsRoot_1l8n5_138",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_1l8n5_143"};var td=S(O());var zg=S(X()),Rt=S(O());var Zc=S(O()),HI=["bottom","height","left","right","top","width"],BI=(e={},t={})=>HI.some(n=>e[n]!==t[n]),In=new Map,CC,TC=()=>{let e=[],t=[];In.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();BI(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{In.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),CC=window.requestAnimationFrame(TC)};function UI(e,t){return{observe(){let n=In.size===0;if(In.has(e)){let r=In.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else In.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&TC()},unobserve(){let n=In.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||In.delete(e),In.size||cancelAnimationFrame(CC)}}}}function Ug(e){let[t,n]=(0,Zc.useState)(null);return(0,Zc.useLayoutEffect)(()=>{if(!e.current)return;let r=UI(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var _i=S(O()),bC=S(_u());var _C={root:"_root_1jq08_1"};var PC=({children:e})=>{let[t,n]=(0,_i.useState)(null),r=(0,_i.useContext)(Di);return(0,_i.useLayoutEffect)(()=>{let o=document.createElement("div");return Zr(o),o.classList.add(_C.root),r!=null&&r.rootNode&&o.classList.add(r==null?void 0:r.rootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,bC.createPortal)(e,t):null};var nn={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 Jc=S(C()),bi=(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 Vg(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 Pi=({className:e,triggerRef:t,boundaryRef:n=(0,Rt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Vg,...a})=>{let l=Ug(t),u=Ug(n),c=(0,Rt.useMemo)(()=>s(l,u,0),[l,u]);return(0,Jc.jsx)(PC,{children:(0,Jc.jsx)("div",{className:(0,zg.default)(nn.ref,{[nn.positionAbove]:r==="above",[nn.positionBelow]:r==="below",[nn.positionLeft]:r==="left",[nn.positionRight]:r==="right",[nn.alignStart]:o==="start",[nn.alignCenter]:o==="center",[nn.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,Jc.jsx)("div",{className:(0,zg.default)(e,nn.root),children:i})})})};var Er=S(C()),zI=({inputStyle:e,inputElement:t})=>{let n=P("TabCompletion",_t),r=bi(document.activeElement===t);return ui(()=>r.close()),(0,td.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Er.jsxs)(td.Fragment,{children:[(0,Er.jsx)("mark",{className:_t.caret,ref:r.triggerRef}),r.opened&&(0,Er.jsx)(Pi,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Er.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Er.jsx)(Yc,{inline:!0})})})]})},ed=class extends Ht{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(Rn(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:Mg(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Er.jsx)(zI,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var LC=S(X());var sd=S(O());function kC(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function nd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function RC(e){return e!=null}var IC=S(X()),rd=S(O());var Kg=S(C()),od=(0,rd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,rd.useRef)(null),i=P("TabCompletion",_t);return(0,Kg.jsx)("div",{ref:nd([o,r]),className:(0,IC.default)(e,i.popoverContentContainer),...n,children:(0,Kg.jsx)("div",{className:i.popoverContent,children:t})})});var Cr=S(C()),VI=e=>t=>{let n=Vg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},KI=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=P("TabCompletion",_t),s=bi(),a=(0,sd.useMemo)(()=>VI(e.getBoundingClientRect()),[e]),[l,u]=Lc(e);return(0,sd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Cr.jsxs)("span",{children:[(0,Cr.jsx)("mark",{ref:nd([l,s.triggerRef]),className:(0,LC.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Cr.jsx)(Pi,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Cr.jsx)(od,{style:n,children:(0,Cr.jsx)("div",{className:i.hintText,children:o})})})]})},id=class extends Ht{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${kC(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(RC);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,Cr.jsx)(KI,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ld=S(X());var Ve=S(O());var Wg=S(C()),AC=()=>(0,Wg.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,Wg.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 Tr=S(O());var NC=S(Pg());var OC={root:"_root_1muu8_1",content:"_content_1muu8_7"};function ad(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 $g(e){return e.replace("https://www.","").replace("https://","")}var It=S(C()),WI=3,$I=e=>({image:e.image||"",text:`https://${e.text}`,id:e.id,title:e.title}),qI=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=WI})=>{let i=P("LinkSearch",OC),[s,a]=(0,Tr.useState)(""),l=K(),u=A(Gx("url")),c=A(Fx("URL",$I)),[p,d]=(0,Tr.useState)(c.length-1),h=F("fallbackImage"),v=f=>{let w=f.target;a(w.value)},y=(f,w)=>{f.stopPropagation(),f.preventDefault(),window.open(w,"_blank")},g=f=>{var T;let w=p-1<0?c.length-1:p-1,x=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(w),f.code==="ArrowDown"&&d(x),f.code==="Enter"&&e(((T=c[p])==null?void 0:T.text)||s)},m=(0,Tr.useCallback)((0,NC.default)(f=>{l(Jr({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,Tr.useEffect)(()=>{s&&m(s)},[s]),(0,Tr.useEffect)(()=>()=>{l(Hc())},[]),(0,It.jsxs)("div",{className:i.root,children:[(0,It.jsx)(Wt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,w)=>(0,It.jsx)(oe,{selected:p===w,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,It.jsxs)(me,{children:[(0,It.jsx)(me.Image,{src:ad(f,"small",h||void 0),title:f.title||f.text}),(0,It.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,It.jsx)(me.Title,{children:f.title||$g(f.text)}),f.title&&$g(f.text)]}),(0,It.jsx)(oe.Actions,{children:(0,It.jsx)(oe.ActionButton,{label:r,onClick:x=>y(x,f.text)})})]})},f.text))}),(0,It.jsx)(Sa,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:g})]})},MC=qI;var qg={};Te(qg,{enUS:()=>GI,nlNL:()=>QI});var GI={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},QI={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var ze=S(C()),XI=(0,Ve.forwardRef)((e,t)=>{let n=P("TabCompletion",_t);return(0,ze.jsx)("mark",{ref:t,className:(0,ld.default)(n.matchSelection)},"selection-start")}),YI=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=H(qg),s=P("TabCompletion",_t),a=(0,Ve.useRef)(null),l=(0,Ve.useRef)(null),[u,c]=(0,Ve.useState)(null),p=K(),d=bi(document.activeElement===r),[h]=(0,Ve.useState)(()=>document.createRange());d.triggerRef.current=h,(0,Ve.useEffect)(()=>()=>h.detach(),[]),(0,Ve.useEffect)(()=>{let y=e.current,g=a.current;!y||!g||(h.setStart(y,0),h.setEnd(g,0))},[e.current,a.current]),ui(()=>{d.close()});let v=(0,Ve.useCallback)(y=>{let g=h.toString(),m=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(yc({text:`[${g}](${m})`}))},[]);return(0,ze.jsxs)("span",{children:[(0,ze.jsx)("mark",{ref:a,className:(0,ld.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,ze.jsx)(Pi,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,ze.jsxs)(od,{style:n,ref:l,children:[(0,ze.jsx)("div",{className:(0,ld.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,ze.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,ze.jsx)(AC,{}),(0,ze.jsx)("span",{children:"\xA0"}),(0,ze.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,ze.jsx)(MC,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},ud=class extends Ht{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ve.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,ze.jsx)(XI,{ref:this.startRef}):(0,ze.jsx)(YI,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Ln=S(C()),ZI=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=P("TabCompletion",EC),c=F("insertLink"),p=F("showMidSentenceSuggestions"),d=F("inlineSuggestions"),h=Oc(a),v=(0,An.useRef)(null);(0,An.useEffect)(()=>{Rn(a)&&h&&Nc(a,h)},[h]);let y=(0,An.useCallback)(f=>{if(!o||!n)return f;let w=[(0,Ln.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Ln.jsx)("span",{className:(0,cd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,Ln.jsx)("span",{className:(0,cd.default)(u.hint,u.resetIndent),children:(0,Ln.jsx)(ul,{keyCode:"tab"},"tabHint")})),Bg(f,w)},[o,n,r]),g=(0,An.useMemo)(()=>{let f=[];return d&&f.push(new ed("inline")),c&&f.push(new ud("selection")),f.push(new ai("placeholders")),i&&f.push(new id("keywords")),f},[d,c,i]),m=(0,An.useMemo)(()=>{let f=window.getComputedStyle(a);return{"--dd-color":f.color,"--dd-font-size":f.fontSize,"--dd-font-family":f.fontFamily,"--dd-font-variant":f.fontVariant}},[]);return e?(0,Ln.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(v.current=f==null?void 0:f.parentElement)},className:u.root,style:m,children:[(0,Ln.jsx)(ii,{tagName:"span",containerTagName:"div",className:(0,cd.default)(u.container,u.agentText),disableLineBreaks:Rn(a),content:t||"\u200B",onAfterParse:y,matchers:g,selection:h,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,Ln.jsx)("br",{})]}):null},JI=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var y;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Ei(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:h,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((y=r.list)==null?void 0:y.keywordMatches)??[],enabled:h&&p!==!1}},DC=Gr(JI)(ZI);var TT=S(X()),_T=S(O());var FC={list:[],fetchState:"idle",isInitialRequest:null},HC=e=>e.autoflows.list||[],jC=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},On=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Gg=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(On(e.platformSessionId))}),Qg=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(On(e.platformSessionId))}),eL=j({name:"autoflows",initialState:FC,reducers:{},extraReducers:e=>{e.addCase(Gg.pending,(t,n)=>{let r=jC(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Qg.pending,(t,n)=>{let r=jC(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(On.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(On.rejected,t=>{t.fetchState="error"}),e.addCase(On.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(Z,()=>FC)}}),BC=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(On(e))}),o.on("sessionCompleted",()=>{n(On(e))})}),UC=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),zC=eL.reducer;var VC={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},KC=e=>e.customMessages.list,WC=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),$C=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),qC=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ra=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),dd=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)}),fd=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)}),GC=j({name:"customMessages",initialState:VC,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ra.rejected,t=>{t.fetchState="error"}).addCase(Ra.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(dd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(dd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(fd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(fd.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(Z,()=>VC)}}),QC=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(GC.actions.onCustomMessage(i))})}),XC=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),YC=GC.reducer;var tL={jwt:null,accountUrl:null,interval:null},ZC=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},Xg=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),Yg=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(Xg()),setInterval(()=>r(Xg()),n)}),JC=j({name:"exchangeToken",initialState:tL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Xg.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(Yg.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:eT}=JC.actions,tT=JC.reducer;function nT(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var dT=S(O());var lT=S(X()),uT=S(O());var oT=S(X());var rT={root:"_root_838fd_1"};var sT=S(C()),nL=({className:e,children:t})=>{let n=P("Unicode",rT);return(0,sT.jsx)("span",{className:(0,oT.default)(e,n.root),children:t})},iT=nL;var aT={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 Zg={};Te(Zg,{enUS:()=>rL,nlNL:()=>oL});var rL={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"}]},oL={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 at=S(C()),sL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=P("Autoflow",aT),a=H(Zg),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,at.jsxs)(oe,{className:(0,lT.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,at.jsx)(me,{children:(0,at.jsxs)(me.Content,{children:[(0,at.jsxs)(me.Title,{children:[t&&(0,at.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,at.jsx)("span",{children:r})]})}),(0,at.jsx)(oe.Actions,{fixed:t==="Started",children:(0,at.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,at.jsxs)(uT.Fragment,{children:[(0,at.jsx)(iT,{children:u})," ",(0,at.jsx)("span",{children:a(l)})]})})})]})},cT=sL;var Jg=S(C()),aL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},lL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Jg.jsx)(dT.Fragment,{children:e.map(o=>(0,Jg.jsx)(cT,{displayName:o.displayName,description:o.description,disabled:o.isBusy||aL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),uL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},cL={onStartAutoflow:Gg,onStopAutoflow:Qg},fT=Gr(uL,cL)(lL);var pd=S(O());var nh=S(X());var eh=S(C()),th=()=>(0,eh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,eh.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 pT={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 rn=S(C()),dL=({entities:e})=>{let t=P("EntitiesWidgetList",pT),[n,r]=(0,pd.useState)(void 0),o=K(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),xa(a.text),o(ot({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,pd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,rn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,rn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,rn.jsx)("span",{className:t.entityText,children:a.text}),(0,rn.jsxs)("span",{className:t.iconWrapper,children:[(0,rn.jsx)("span",{className:(0,nh.default)(t.icon),children:(0,rn.jsx)(th,{})}),(0,rn.jsx)("span",{className:(0,nh.default)(t.icon,n===l&&t.iconClicked),children:(0,rn.jsx)(th,{})})]})]},a.text))})},mT=dL;var gT=S(X()),rh=S(O());var Ia={};Te(Ia,{enUS:()=>fL,nlNL:()=>pL});var fL={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"}]},pL={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 Nn={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 Ze=S(C()),mL=({suggestion:e})=>{let t=H(Ia),n=K(),r=A(WC(e.text)),o=A($C(e.text)),i=A(qC(e.text)),s=A(lc),{replyOptions:a}=e,l=(0,rh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(dd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,rh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(fd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Ze.jsxs)(oe,{onClick:l,className:(0,gT.default)(Nn.root,{[Nn.isUsed]:r,[Nn.hasError]:i}),children:[(0,Ze.jsx)(me,{children:(0,Ze.jsxs)(me.Content,{children:[(0,Ze.jsxs)(me.Title,{className:Nn.title,children:[e.text," ",(0,Ze.jsx)(cl,{className:Nn.label,children:"analyse tool"})," ",i&&(0,Ze.jsx)("span",{className:Nn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,Ze.jsx)("ul",{className:Nn.quickReplies,children:a.map(c=>(0,Ze.jsx)("li",{className:Nn.quickReply,children:c.title},c.title))})]})}),(0,Ze.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Ze.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,Ze.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,Ze.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},hT=mL;var oh=S(C()),yT=()=>(0,oh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oh.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 vT=S(O());var lt=S(C()),gL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=Bc(o),s=H(Ia),a=F("showImages"),l=F("fallbackImage"),u=h=>{h.preventDefault(),h.stopPropagation(),r(o)},c=h=>{h.preventDefault(),h.stopPropagation(),n(e)},p=(0,vT.useCallback)(h=>{window.open(i,"_blank"),h.stopPropagation(),h.preventDefault()},[i]);return(0,lt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,lt.jsxs)(me,{children:[a&&e.image&&(0,lt.jsx)(me.Image,{src:ad(e,"small",l||void 0),title:e.title}),(0,lt.jsxs)(me.Content,{children:[e.title&&(0,lt.jsx)(me.Title,{children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,lt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,lt.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,lt.jsxs)(oe.Actions,{children:[i&&(0,lt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},ST=gL;var La=S(C()),hL=({contentType:e,lines:t,suggestions:n})=>{let r=kt(),o=A(gi),i=a=>{r.send(wg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(_n,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,La.jsx)(La.Fragment,{children:n.map(a=>(0,La.jsx)(ST,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},wT=hL;var ih={};Te(ih,{enUS:()=>yL,nlNL:()=>vL});var yL={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"}]},vL={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:"Vat gesprek samen"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var xT={root:"_root_1bwme_1",loginText:"_loginText_1bwme_7",stateText:"_stateText_1bwme_8",sectionList:"_sectionList_1bwme_20",shortcutList:"_shortcutList_1bwme_24",shortcut:"_shortcut_1bwme_24",link:"_link_1bwme_50"};var sh=S(C()),ET=()=>(0,sh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,sh.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 ah=S(C()),CT=()=>(0,ah.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ah.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 U=S(C()),md=(e,t)=>{let n=A(Tn);(0,_T.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},SL=()=>{let e=H(ih),t=K(),n=F("isEmbedded"),r=P("Widget",xT),o=F("showAutoflows"),i=F("showCustomMessages"),s=F("showPersonalCollectionLink"),a=F("showSummaryCommand"),l=F("showKnowledgeSearch"),u=F("showSearch"),c=A(wi),p=A(qc),d=A(HC),h=A($c),v=A(KC),y=A(uc),g=A(cc),m=A(Tn),f=A(lc),w=A(nT),x=A(gi),T=kt(),E=A(Xx),_=A(ZC("/admin/personal-collection")),R=F("adminUrl");if(md(()=>(t(Ra(f)),t(QC(f)),()=>{t(XC(f))}),[t,g,i,f]),md(()=>(t(On(f)),t(BC(f)),()=>{t(UC(f))}),[t,g,o,f]),md(()=>{p.forEach(({type:N})=>{t(N==="entities"?zt():En(N))})},[t,g,y,c]),md(()=>(t(Yg()),()=>{t(eT())}),[t,g,s,y]),g===!1)return(0,U.jsx)("div",{className:r.stateText,children:(0,U.jsx)("div",{children:(0,U.jsx)("p",{children:e("notSupported")})})},"supported");if(m===!1)return(0,U.jsx)("div",{className:r.loginText,children:(0,U.jsx)("div",{children:(0,U.jsx)(Qc,{isEmbedded:n,loginUrl:R})})},"login");if(!c||!f||m===null||E||w)return(0,U.jsx)("div",{className:r.stateText,children:(0,U.jsx)("div",{children:(0,U.jsx)("p",{children:e("waiting")})})},"waiting");let k=u||a||l||_;return(0,U.jsx)("div",{className:(0,TT.default)(r.root),"data-testid":"widget",children:(0,U.jsxs)(dl,{className:r.sectionList,children:[k&&(0,U.jsx)(Hn,{title:e("actions"),type:"shortcuts",children:(0,U.jsxs)("div",{className:r.shortcutList,children:[u&&(0,U.jsxs)("button",{className:r.shortcut,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0}),children:[(0,U.jsx)(pi,{}),e("linkSearch")]}),a&&(0,U.jsxs)("button",{className:r.shortcut,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,U.jsx)(CT,{}),e("linkSummary")]}),l&&(0,U.jsxs)("button",{className:r.shortcut,onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeSearch"}),children:[(0,U.jsx)(ET,{}),e("linkKnowledgeSearch")]}),_&&(0,U.jsxs)("a",{className:r.shortcut,target:"_blank",href:_,rel:"noreferrer",children:[(0,U.jsx)(yT,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,U.jsx)(Hn,{type:"custom-messages","data-testid":"custom-messages",children:(0,U.jsx)(Wt,{withDivider:!0,children:v.map(N=>(0,U.jsx)(hT,{suggestion:N},N.text))})}),o&&d.length>0&&(0,U.jsx)(Hn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,U.jsx)(Wt,{withDivider:!0,children:(0,U.jsx)(fT,{})})}),p.map(({type:N,title:te,amount:z,lines:je})=>{var on;switch(N){case"entities":return h&&h.length>0&&(0,U.jsx)(Hn,{type:N,title:te,"data-testid":`type-${N}`,children:(0,U.jsx)(mT,{entities:h})},N);default:return((on=x[N])==null?void 0:on.fetchState)==="done"&&x[N].suggestions.length>0&&(0,U.jsx)(Hn,{type:N,title:te,"data-testid":`type-${N}`,children:(0,U.jsx)(Wt,{withDivider:!0,children:(0,U.jsx)(wT,{lines:je,contentType:N,suggestions:x[N].suggestions.slice(0,z)||[]})})},N)}})]})})},bT=SL;function PT(e){let t=new Range;return t.selectNodeContents(e),t}var Aa=/[\u200B-\u200D\uFEFF]/g;function oo(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,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){var u;switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,p=c.replace(Aa,""),d=o+p.length,h=t>=o&&t<=d,v=n>=o&&n<=d;if(h){let y=s(c,t-o);y===0&&!v?r.setStartBefore(l):r.setStart(l,y)}v&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(l.tagName==="BR"&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let p=0;p<l.childNodes.length&&(a(l.childNodes[p]),!i);p++);let c=(u=l.lastChild)==null?void 0:u.tagName;l.tagName==="DIV"&&c!=="DIV"&&c!=="BR"&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function gd(e,t){if(!e.contains(t.commonAncestorContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s,a,l=0;function u(c){let p=c===n,d=c===o;switch(c.nodeType){case Node.TEXT_NODE:{let h=c.textContent;p&&(s=l+h.substring(0,r).replace(Aa,"").length),d&&(a=l+h.substring(0,i).replace(Aa,"").length),l+=h.replace(Aa,"").length;break}case Node.ELEMENT_NODE:{let{tagName:h}=c,v=c.nextSibling===null;h==="BR"&&!v&&l++;for(let y=0;y<c.childNodes.length&&(p&&y===r&&(s=l),u(c.childNodes[y]),d&&y===i-1&&(a=l),a===void 0);y++);!d&&h==="DIV"&&!v&&l++,d&&(a=l);break}default:break}}if(u(e),a===void 0)throw new Error("Could not determine start and end");return{start:s??a,end:a}}function Oa(e,t){if(!e.contains(t.commonAncestorContainer))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,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,h=p?i:void 0,v=u.textContent.replace(Aa,"");d===0&&h===void 0?a+=v:a+=v.substring(d,h);break}case Node.ELEMENT_NODE:{let{tagName:d}=u,h=u.nextSibling===null;s===0&&d==="BR"&&!h&&(a+=`
|
|
19
|
+
`),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||$P)();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(VP)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,l_.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==a_||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=Ic[l]||Ic[s];if(!this.isSafe(t)||!l.match(KP)&&(!n&&(!u||u===Jm)||l.startsWith("on")||a.replace(/(\s|\0|�([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===yr?c=!0:u===Qr?c=Number.parseFloat(String(c)):u!==Pc&&(c=String(c)),r[eg[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 sa[t]?{...n,...sa[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===a_){let d=c.nodeName.toLowerCase(),h=this.getTagConfig(d);u&&(l.push(u),u="");let v=this.applyNodeFilters(d,c);if(!v)return;let y;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;y=this.parseNode(v,h);let m=s(v,y,h);if(m===null)return;if(typeof m<"u"){l.push(Zr.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,h))){var p;this.keyIndex+=1;let g=this.extractAttributes(v),m={tagName:d};g&&(m.attributes=g),h.void&&(m.selfClose=h.void),l.push(Zr.default.createElement(Rc,{...m,key:this.keyIndex},(p=y)!==null&&p!==void 0?p:this.parseNode(v,h)))}else l=[...l,...this.parseNode(v,h.tagName?h:n)]}else if(c.nodeType===UP){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(WP);){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:p,props:d}=n[a],h;if(u)h=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));h=v.index+v[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(h)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function qP(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",p=c==="fragment"?!0:u,d;if(a)d=a;else{let h=new Lc(i??"",e).parse();h.length>0&&(d=h)}return d||(d=s),p?Zr.default.createElement(Zr.default.Fragment,null,d):Zr.default.createElement(Rc,{attributes:n,className:r,tagName:c},d)}function ii(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:p="span",noWrap:d=!1,...h}=e,v=i?[]:l,y=o?[]:a,g=c?[c]:[],m=u?[u]:[];v.forEach(C=>{C.onBeforeParse&&g.push(C.onBeforeParse.bind(C)),C.onAfterParse&&m.push(C.onAfterParse.bind(C))});let f=g.reduce((C,w)=>w(C,e),r??""),x=new Lc(f,h,v,y),_=m.reduce((C,w)=>w(C,e),x.parse());return Zr.default.createElement(qP,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:_.length===0?void 0:_,tagName:p})}var ug=S(Y());var ng={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 c_=S(Y());var si=S(O());function u_(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Ac(e){let t=(0,si.useRef)(null),[n,r]=(0,si.useState)(!1);return(0,si.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=u_((c,p)=>{let d=t.current;if(!d)return;let h=c/i,v=p/i,y=d.getBoundingClientRect(),g=h>y.x&&h<y.x+y.width&&v>y.y&&v<y.y+y.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:p})=>[c,p]),[l,u]=u_(()=>{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 bt={root:"_root_1l8n5_1",container:"_container_1l8n5_4",agentText:"_agentText_1l8n5_7",tabText:"_tabText_1l8n5_8",hint:"_hint_1l8n5_8",matchSelection:"_matchSelection_1l8n5_12",focus:"_focus_1l8n5_18",resetIndent:"_resetIndent_1l8n5_22",matchKeyword:"_matchKeyword_1l8n5_26",matchPlaceholder:"_matchPlaceholder_1l8n5_27",hover:"_hover_1l8n5_33",hintText:"_hintText_1l8n5_66",popover:"_popover_1l8n5_74",popoverRoot:"_popoverRoot_1l8n5_79",popoverContentContainer:"_popoverContentContainer_1l8n5_83",popoverContent:"_popoverContent_1l8n5_83",selectionOptions:"_selectionOptions_1l8n5_109",selectionOptionsIsHidden:"_selectionOptionsIsHidden_1l8n5_114",selectionOptionsButton:"_selectionOptionsButton_1l8n5_118",caret:"_caret_1l8n5_134",popoverSuggestionsRoot:"_popoverSuggestionsRoot_1l8n5_138",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_1l8n5_143"};var rg=S(E()),GP=({inputElement:e,children:t})=>{let n=k("TabCompletion",bt),[r,o]=Ac(e);return(0,rg.jsx)("mark",{ref:r,className:(0,c_.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},ai=class extends Bt{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,rg.jsx)(GP,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var li=S(O());function Oc(e){return e.contentEditable==="true"}function XP(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 d_(e){let{selectionStart:t,selectionEnd:n}=Oc(e)?XP(e):e;return[t,n]}function Nc(e){let[,t]=(0,li.useState)(),n=(0,li.useRef)(null);return n.current=d_(e),(0,li.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=d_(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 Mc(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(mo);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 f_=S(O());function ui(e){(0,f_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Jr(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}var p_,en=new Map,QP=["bottom","height","left","right","top","width"],YP=(e={},t={})=>QP.some(n=>e[n]!==t[n]),m_=()=>{let e=[];en.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),en.delete(n);return}let r=n.getBoundingClientRect();YP(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),en.size!==0&&(p_=window.requestAnimationFrame(m_))};function g_(e,t){return{observe(){let n=en.size===0;if(en.has(e)){let r=en.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else en.set(e,{rect:void 0,callbacks:[t]});n&&m_()},unobserve(){let n=en.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||en.delete(e),en.size||cancelAnimationFrame(p_)}}}}var h_,tn=new Map,y_=()=>{tn.forEach((e,t)=>{if(!t.isConnected){tn.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)))}),tn.size!==0&&(h_=window.requestAnimationFrame(y_))};function v_(e,t){return{observe(){let n=tn.size===0;tn.has(e)?tn.get(e).callbacks.push(t):tn.set(e,{visible:void 0,callbacks:[t]}),n&&y_()},unobserve(){let n=tn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||tn.delete(e),tn.size||cancelAnimationFrame(h_)}}}}var og=["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 ig(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function ci(e){return parseFloat(e)}function Dc(e){return Math.round(e*1e6)}function S_(e){return e/1e6}function sg(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=ci(e.width),i=ci(e.borderLeftWidth),s=ci(e.borderRightWidth),a=ci(e.paddingRight),l=S_(Dc(o)-Dc(i)-Dc(s)),u=S_(Dc(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function di(e,t={}){var l;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position="fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",Jr(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};ig(r,n,og),sg(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=v_(e,()=>{ig(r,n,og),sg(r,e,n),i(),setTimeout(i,0)}),a=g_(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(ig(r,n,og),sg(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(),p=window.getComputedStyle(t.closestScrollElement),d=ci(p.borderTopWidth),h=ci(p.borderBottomWidth),v=c.top+d-u.top,y=u.top+u.height+-(c.top+c.height-h);n.style.clipPath=`inset(${v}px 0px ${y}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 ag={};Ce(ag,{enUS:()=>ZP,nlNL:()=>JP});var ZP={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"}]},JP={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 aa=S(E()),x_=()=>(0,aa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 512 512","aria-labelledby":"circleCheckTitle",children:[(0,aa.jsx)("title",{id:"circleCheckTitle",children:"Check"}),(0,aa.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 lg=S(E()),__=()=>(0,lg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",children:(0,lg.jsx)("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"})});var w_=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(w_||{}),Sn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentHTML="";currentSelection=null;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,rawHtml:n}),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t,rawHtml:n}),this.currentHTML=n))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange()}handleFocus(){this.isFocused||this.emit("focus"),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(w_).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){let t=this.currentSelection;this.isPossibleClearInputAction=!0,t&&this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){let n=(t.clipboardData||window.clipboardData).getData("text");this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){let t=()=>{let r=document.activeElement===this.element?this.getSelection():null;pr(this.currentSelection,r)||(this.currentSelection=r,this.emit("selection",r))};document.addEventListener("selectionchange",t),this.disposeHandlers.push(()=>{window.document&&document.removeEventListener("selectionchange",t)}),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)),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let n=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});n.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{n.disconnect()})}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}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 xn=class extends Sn{getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){return this.currentSelection?this.getText().slice(this.currentSelection.start,this.currentSelection.end):""}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);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 Xe=S(E()),eI=({value:e,onUse:t,...n})=>{var c;let r=B(ag),o=K(),i=k("EditSuggestionTextInput",ng),[s,a]=(0,Tt.useState)(null),l=(0,Tt.useRef)(null),u=((c=e.match(mo))==null?void 0:c.length)||0;return(0,Tt.useEffect)(()=>{let p;return l.current&&(a(l.current),p=new xn(l.current),p.on("change",({plainText:d})=>{o(Ge.actions.userInput({text:d,selection:p.getSelection()}))}),p.on("keydown",d=>{o(Ge.actions.registerKeyDown(yc(d))),d.code==="Enter"&&d.shiftKey&&t(p.getText())}),p.on("paste",({pastedText:d,selectionText:h})=>{o(Ge.actions.registerPaste({text:d,selectionText:h}))}),p.on("cut",({selectionText:d})=>{o(Ge.actions.registerCut(d))})),()=>{o(Ge.actions.reset()),p.dispose(),p.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 p=l.current.value.length;l.current.setSelectionRange(p,p),l.current.focus()},0)},[l]),(0,Xe.jsxs)("div",{className:i.textInputWrapper,children:[(0,Xe.jsx)("textarea",{...n,ref:l,"data-testid":"edit-suggestion-dialog-textarea",className:i.textInput,defaultValue:e,onChange:()=>{}}),s&&(0,Xe.jsx)(tI,{inputElement:l.current,value:e}),(0,Xe.jsxs)("div",{className:(0,ug.default)(i.alert,u===0?i.success:i.warning),children:[(0,Xe.jsx)("div",{className:i.alertText,children:r("placeholders",{placeholderSize:u})}),u===0?(0,Xe.jsx)(x_,{}):(0,Xe.jsx)(__,{})]})]})},tI=({inputElement:e,value:t})=>{let n=k("EditSuggestionTextInput",ng),r=(0,Tt.useRef)(null),o=Nc(e);return(0,Tt.useEffect)(()=>{Mc(e,o)},[o,e]),(0,Xe.jsx)(nI,{inputElement:e,children:(0,Xe.jsxs)("div",{ref:r,className:(0,ug.default)(n.root,n.agentText),children:[(0,Xe.jsx)(ii,{tagName:"span",disableLineBreaks:!0,content:t,matchers:[new ai("placeholders")],inputElement:e,boundaryRef:r}),(0,Xe.jsx)("br",{})]})})},nI=({inputElement:e,children:t})=>{let n=(0,Tt.useRef)(null);return(0,Tt.useEffect)(()=>{if(!n.current)return()=>{};let[r,o]=di(e,{overlayContainer:n.current,mirrorOverflow:!0});return()=>{o()}},[n.current]),(0,Xe.jsx)("div",{ref:n,children:t})},E_=eI;var mi=S(O());var Qe={root:"_root_m5usm_1",list:"_list_m5usm_2",listWrapper:"_listWrapper_m5usm_6",listHorizontal:"_listHorizontal_m5usm_10",page:"_page_m5usm_19",search:"_search_m5usm_25",pageNav:"_pageNav_m5usm_33",pageTitle:"_pageTitle_m5usm_41",pageBackButton:"_pageBackButton_m5usm_48",listHeading:"_listHeading_m5usm_62",listItem:"_listItem_m5usm_70",listItemContent:"_listItemContent_m5usm_79",listItemText:"_listItemText_m5usm_97",listItemDescription:"_listItemDescription_m5usm_105",truncate:"_truncate_m5usm_112",lineClamp:"_lineClamp_m5usm_118",listItemTitle:"_listItemTitle_m5usm_125",listItemAction:"_listItemAction_m5usm_132",listItemPrimaryAction:"_listItemPrimaryAction_m5usm_146",listItemSelected:"_listItemSelected_m5usm_151",sources:"_sources_m5usm_155",sourcesTitle:"_sourcesTitle_m5usm_162",source:"_source_m5usm_155",icon:"_icon_m5usm_177",searchIcon:"_searchIcon_m5usm_194",searchInputWrapper:"_searchInputWrapper_m5usm_199",searchInput:"_searchInput_m5usm_199",select:"_select_m5usm_220",selectType:"_selectType_m5usm_237",selectWrapper:"_selectWrapper_m5usm_241",image:"_image_m5usm_271",imageSrc:"_imageSrc_m5usm_278",imageTitle:"_imageTitle_m5usm_289",actions:"_actions_m5usm_294",actionsWrapper:"_actionsWrapper_m5usm_298",actionsBar:"_actionsBar_m5usm_304",actionButton:"_actionButton_m5usm_313",actionShortcut:"_actionShortcut_m5usm_331",actionShortcutFixKerning:"_actionShortcutFixKerning_m5usm_338"};var la=S(E()),rI=({src:e,title:t})=>{let n=k("CommandPalette",Qe);return(0,la.jsxs)("div",{className:n.image,children:[(0,la.jsx)("img",{src:e,alt:t,className:n.imageSrc}),t&&(0,la.jsx)("span",{className:n.imageTitle,children:t})]})},C_=rI;var b_=S(O()),T_=S(Y());var ua=S(E());function cg({children:e,heading:t,orientation:n}){let r=k("CommandPalette",Qe);return b_.default.Children.count(e)===0?null:(0,ua.jsxs)("div",{"data-testid":"commandpalette-list",className:r.list,children:[t&&(0,ua.jsx)("h4",{className:r.listHeading,children:t}),(0,ua.jsx)("div",{className:(0,T_.default)(r.listWrapper,n==="horizontal"&&r.listHorizontal),children:e})]})}var ca=S(Y());var Fc=S(O()),I_=S(E()),k_=Fc.default.createContext(void 0);function vr(){let e=Fc.default.useContext(k_);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var P_=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Fc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,I_.jsx)(k_.Provider,{value:s,children:e})};var kt=S(E());function dg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onSourceClick:o,index:i,isExperimental:s,description:a,sources:l,styles:u,...c}){let{selected:p,onChangeOpen:d}=vr(),h=k("CommandPalette",Qe);function v(y){r(y),e&&d(!1)}return(0,kt.jsxs)("div",{className:(0,ca.default)(h.listItem,p===i&&h.listItemSelected),children:[(0,kt.jsxs)("button",{type:"button",className:(0,ca.default)("command-palette-list-item",h.listItemAction,h.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,...c,children:[(0,kt.jsxs)("div",{className:h.listItemContent,children:[typeof n=="string"?(0,kt.jsx)("p",{className:(0,ca.default)(h.listItemText,h.truncate,u==null?void 0:u.title),children:n}):n,a&&(0,kt.jsx)("p",{className:(0,ca.default)(h.listItemDescription,u==null?void 0:u.description,t?h.lineClamp:h.truncate),children:a})]}),s&&(0,kt.jsx)(ul,{})]}),l&&(0,kt.jsxs)("div",{className:h.sources,children:[(0,kt.jsx)("span",{className:h.sourcesTitle,children:"Sources"}),l.map(y=>y.url?(0,kt.jsx)("a",{className:h.source,href:y.url,target:"_blank",title:y.url,rel:"noopener noreferrer",onClick:()=>o&&o(y),children:y.name},y.url):(0,kt.jsx)("span",{className:h.source,children:y.name},y.name))]})]})}var da={};Ce(da,{enUS:()=>oI,nlNL:()=>iI});var oI={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}]},iI={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}]};var Sr=S(E());function fg({children:e,title:t,id:n,onDismiss:r,isExperimental:o}){let i=B(da),s=k("CommandPalette",Qe),{page:a}=vr();return a!==n?null:(0,Sr.jsxs)("div",{className:s.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Sr.jsxs)("div",{className:s.pageNav,children:[(0,Sr.jsxs)("button",{className:s.pageBackButton,type:"button",onClick:r,children:[(0,Sr.jsx)(Cc,{}),i("back")]}),t&&(0,Sr.jsx)("h3",{className:s.pageTitle,children:t}),o&&(0,Sr.jsx)(ul,{})]}),e]})}var xr=S(O());var jc=()=>/Mac/i.test(navigator.platform);var sI={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},H=sI;function aI(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,[aI(n)]:re(e[n])}),{}):e}function pg(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,[pg(n)]:we(e[n])}),{}):e}var lI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},pa=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)||""}},fa=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))}),mg=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}),gg=M("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),R_=e=>e.info.agentInfo,L_=j({name:"info",initialState:lI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(fa.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(fa.rejected,t=>{t.fetchState="error"}).addCase(fa.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(mg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(gg.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(J,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:A_}=L_.actions,O_=L_.reducer;var Bc={list:[],fetchState:"idle",isOpen:!1,page:"search"},N_=e=>e.search.isOpen,M_=e=>e.search.page,D_=e=>e.search.list;function F_(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var eo=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:pa(r),tags:e.tags});return i}),j_=j({name:"search",initialState:Bc,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Bc.fetchState,e.list=Bc.list}},extraReducers:e=>{e.addCase(eo.pending,t=>{t.fetchState="loading"}).addCase(eo.rejected,(t,n)=>{t.fetchState="error",H.error(n.error)}).addCase(eo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload}).addCase(J,()=>Bc)}}),{resetSearch:Hc,setIsOpen:st,setPage:ze}=j_.actions,B_=j_.reducer;var uI=/(https?:\/\/[^\s]+)/,zc=e=>e.split(" ").find(t=>uI.test(t));var hg=S(Y());var Uc=S(E()),cI=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Qe);return(0,Uc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,hg.default)(o.actionButton,r.className),children:[n,t&&t.map(i=>(0,Uc.jsx)("span",{className:(0,hg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},fi=cI;var _n=S(E()),dI=({children:e,primaryLabel:t,secondaryLabel:n,onPrimary:r,onSecondary:o,list:i})=>{let s=k("CommandPalette",Qe),a=B(da),{selected:l,setSelected:u}=vr(),c=i[l],p=c&&typeof c.text=="string"&&zc(c.text),d=(0,xr.useRef)(null);function h(x){if(!d.current)return;let _=d.current.querySelectorAll(".command-palette-list-item"),C=0,w=0;x==="down"?(_.forEach((I,P)=>{P===l&&(C=P)}),w=C===_.length-1?0:C+1):x==="up"?(_.forEach((I,P)=>{P===l&&(C=P)}),w=C?C-1:_.length-1):u(0);let b=_[w];b&&typeof w=="number"&&(u(w),b.scrollIntoView&&b.scrollIntoView({behavior:"smooth",block:w?"center":"end"}))}function v(){if(!d.current)return;let x=d.current.querySelectorAll(".command-palette-list-item"),_=0;x.forEach((w,b)=>{b===l&&(_=b)});let C=x[_];C&&C.click()}let y=()=>{p&&window.open(p,"_blank")},g=()=>{c&&r(c,l)},m=()=>{!c.type||["IMAGE","command"].includes(c.type)||o&&o(c,l)},f=(0,xr.useCallback)(x=>{if(x.key==="Enter"&&x.altKey&&p){y();return}if(x.key==="Enter"&&x.shiftKey){m();return}if(x.key==="ArrowDown"){x.preventDefault(),x.stopPropagation(),h("down");return}if(x.key==="ArrowUp"){x.preventDefault(),x.stopPropagation(),h("up");return}x.key==="Enter"&&l!==-1&&(x.preventDefault(),x.stopPropagation(),v())},[l]);return(0,xr.useEffect)(()=>(window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}),[f]),(0,_n.jsxs)("div",{className:s.actions,children:[(0,_n.jsx)("div",{className:s.actionsWrapper,ref:d,children:e}),(0,_n.jsxs)("div",{className:s.actionsBar,children:[p&&(0,_n.jsx)(fi,{onClick:y,shortKeys:[jc()?8997:"ALT",8629],children:a("visitUrl")}),c&&(0,_n.jsxs)(xr.Fragment,{children:[o&&c.type&&!["command","image"].includes(c.type.toLowerCase())&&(0,_n.jsx)(fi,{onClick:m,shortKeys:[8679,8629],children:n}),(0,_n.jsx)(fi,{onClick:g,shortKeys:[8629],children:t})]})]})]})},z_=dI;var U_=S(O());var ma=S(E()),pi=()=>(0,ma.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,ma.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,ma.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 Ht=S(E());function fI({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Qe);return(0,Ht.jsxs)("div",{className:l.search,children:[(0,Ht.jsx)("div",{className:l.searchIcon,children:(0,Ht.jsx)(pi,{})}),(0,Ht.jsxs)("div",{className:l.searchInputWrapper,children:[(0,Ht.jsx)("input",{ref:a,spellCheck:!1,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,Ht.jsx)("div",{className:l.selectWrapper,children:(0,Ht.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,Ht.jsx)("option",{children:r}),o.map(u=>(0,Ht.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var V_=(0,U_.forwardRef)(fI);var ga=S(E());function to({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:p,search:d}){let[h,v]=(0,mi.useState)(0),y=(0,mi.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var f;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(f=y.current)==null||f.focus();return}if(d.length>0){i("");return}a(!1)};return(0,mi.useEffect)(()=>{v(0)},[d,r]),(0,ga.jsx)(oi,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:m,onClose:g,children:(0,ga.jsxs)(P_,{selected:h,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,ga.jsx)(V_,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}to.Page=fg;to.List=cg;to.Image=C_;to.ListItem=dg;to.ActionsBar=z_;to.Button=fi;var te=to;var Fe=S(E()),pI=({suggestion:e,onUse:t,onDismiss:n,onTouched:r,onNext:o,onPrevious:i})=>{let s=e.text||e.url||e.message,a=k("EditSuggestionForm",n_),l=K(),u=B(qm),c=A(v=>v.overlayInput.text);(0,yg.useEffect)(()=>{e&&(l(Ge.actions.reset()),l(Ge.actions.stageSuggestion({text:s,suggestion:e,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"})),l(Ge.actions.commitSuggestion()))},[e]);let p=v=>{v.preventDefault(),d(c)},d=v=>{l(xc(v)),t(v)},h=v=>y=>{c!==s?window.confirm(u("warning"))&&v(y):v(y)};return(0,yg.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)(Bd,{labels:e.searchKeywords}),(0,Fe.jsx)(E_,{onUse:d,value:c})]}),(0,Fe.jsxs)("form",{className:a.actions,onSubmit:p,children:[(0,Fe.jsxs)("div",{children:[(0,Fe.jsx)("button",{disabled:!i,className:a.pagination,type:"button",onClick:i&&h(i),children:(0,Fe.jsx)(Cc,{})}),(0,Fe.jsx)("button",{disabled:!o,className:a.pagination,type:"button",onClick:o&&h(o),children:(0,Fe.jsx)(r_,{})})]}),(0,Fe.jsxs)("div",{className:a.primaryButtons,children:[(0,Fe.jsx)(te.Button,{onClick:h(n),shortKeys:["esc"],children:u("dismiss")}),(0,Fe.jsx)(te.Button,{shortKeys:[8679,8629],type:"submit",children:u("add")})]})]})]})},Vc=pI;var mI=["{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}"],gI=new RegExp(mI.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function K_(e,t){let n=e.split(gI),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 p=a.charAt(0),d=0;do u=p?t.indexOf(p,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 W_(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var q_={suggestions:[],fetchState:"idle",isInitialRequest:null},$_={default:q_},G_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},X_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},Q_=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")},gi=e=>e.textSuggestions,Y_=e=>t=>t.text.startsWith(e),Kc=fe("textSuggestions/refresh"),wn=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=ni(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,pa(r),e);if(e==="default"){let c=s?l.filter(Y_(a)):l;t.dispatch(gr(c.slice(0,i)))}return l}),ha=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,{...pa(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(Y_(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?K_(c.text,e):c.text}))),l=W_(l,i),t.dispatch(gr(l)),l}),Z_=j({name:"textSuggestions",initialState:$_,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(wn.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||q_;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(wn.rejected,(t,n)=>{let r=n.meta.arg;t[r].fetchState="error"}).addCase(wn.fulfilled,(t,n)=>{let r=n.meta.arg;t[r].fetchState="done",t[r].suggestions=n.payload}).addCase(ha.pending,t=>{t.default.fetchState="loading"}).addCase(ha.rejected,t=>{t.default.fetchState="error"}).addCase(ha.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(J,()=>$_)}}),{setTextSuggestions:J_,setSuggestionState:ew}=Z_.actions,tw=Z_.reducer;var nw={contentType:null,suggestion:null},rw=e=>e.activeSuggestion.suggestion,ow=e=>e.activeSuggestion.contentType,iw=j({name:"activeSuggestion",initialState:nw,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,()=>nw)}}),{setActiveSuggestion:En,resetActiveSuggestion:vg}=iw.actions,sw=iw.reducer;var Sg={};Ce(Sg,{enUS:()=>hI,nlNL:()=>yI});var hI={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"}]},yI={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 vI={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var aw=({ui:e})=>e.overlayCollapsed;var lw=j({name:"ui",initialState:vI,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:ya,setInputHasFocus:hi,setOverlayCollapsed:yi,setOpenOverlayWhenTyping:uw,setOverlayCollapsedUserOverwrite:cw}=lw.actions,dw=lw.reducer;var va=S(O()),pw=S(E()),fw=va.default.createContext(null),Sa=({broadcastEvents:e,children:t})=>{let n=va.default.useMemo(()=>e,[]);return(0,pw.jsx)(fw.Provider,{value:n,children:t})},Pt=()=>{let e=(0,va.useContext)(fw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var SI={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Cn=e=>e.auth.isLoggedIn,mw=e=>e.auth.loginFetchState,gw=e=>e.auth.verifyFetchState,hw=e=>e.auth.showLoginOverlay,_r=M("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),yw=M("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),xa=M("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),vw=j({name:"auth",initialState:SI,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(_r.pending,t=>{t.loginFetchState="loading"}),e.addCase(_r.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(_r.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(xa.pending,t=>{t.verifyFetchState="loading"}),e.addCase(xa.rejected,t=>{t.verifyFetchState="error"}),e.addCase(xa.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:vi,setShowLoginOverlay:Sw}=vw.actions,xw=vw.reducer;var xg="SetActiveSuggestion",Si="ShowLoginOverlay",_g="UserLoggedIn",xI="UserLoggedOut",bn="ApplySuggestion",wg="ApplyImageSuggestion",_I="ShowCommandPalette",wI=e=>({[xg]:t=>{e.dispatch(ew(t.state)),e.dispatch(En({contentType:t.contentType,suggestion:t.suggestion}))},[_I]:t=>{e.dispatch(st(t.isOpen)),t.page&&e.dispatch(ze(t.page))},[Si]:t=>{e.dispatch(Sw(t))},[_g]:()=>{e.dispatch(_r())},[xI]:()=>{e.dispatch(_r())},[wg]:t=>{e.dispatch(wc({suggestion:t.suggestion}))},[bn]:t=>{e.dispatch(Ft({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(hr())}}),_w=wI;var Eg=S(E()),EI=()=>{var v;let[e,t]=(0,ww.useState)(!1),n=A(rw),r=A(ow),o=A(gi),i=K(),s=Pt(),a=B(Sg),l=()=>{n!==null&&e?window.confirm(a("warning"))&&u():u()},u=()=>{i(vg()),i(hi(!0)),i(Ge.actions.reset())},c=(y,g)=>{i(vg()),i(hi(!0)),s.send(bn,{text:y,suggestion:g})};if(n===null||r===null)return null;let p=(v=o[r])==null?void 0:v.suggestions.indexOf(n),d=p===0||p===null?void 0:()=>i(En({contentType:r,suggestion:o[r].suggestions[p-1]})),h=p===o[r].suggestions.length-1||p===null?void 0:()=>i(En({contentType:r,suggestion:o[r].suggestions[p+1]}));return(0,Eg.jsx)(oi,{autoFocus:!0,isOpen:p!==null,onClose:l,onBack:l,contentAriaLabel:a("editContentLabel"),overlayAriaLabel:a("overlayLabel"),children:(0,Eg.jsx)(Vc,{onTouched:t,onDismiss:u,onUse:y=>c(y,n),suggestion:n,onNext:h,onPrevious:d})})},Ew=EI;var Wc=S(Y()),zt=S(O());var bw=S(Y());var Cw={root:"_root_1ukx5_1"};var Tw=S(E()),CI=({className:e,value:t,...n})=>{let r=k("TextInput",Cw);return(0,Tw.jsx)("input",{className:(0,bw.default)(e,r.root),type:"text",value:t,...n})},_a=CI;var Cg={};Ce(Cg,{enUS:()=>bI,nlNL:()=>TI});var bI={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"}]},TI={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 kw={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=S(E());var kI=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},PI=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=B(Cg),s=k("LoginTokenDialog",kw),a=A(gw),l=K(),u=F("productName"),[c,p]=(0,zt.useState)(e||""),[d,h]=(0,zt.useState)(0),[v,y]=(0,zt.useState)(""),g=(0,zt.useCallback)(async _=>{_.preventDefault(),l(yw({email:c})),h(1)},[n,c]),m=()=>{y(""),h(0)},f=(0,zt.useCallback)(async _=>{_.preventDefault();let C=kI(_.target.elements.token.value);if(!C){y(i("verifyCodeError",{login:x}));return}l(xa({token:C}))},[n]),x=(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"&&y(i("verifyCodeError",{login:x})),a==="done"&&r()},[a]),(0,he.jsx)(oi,{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)(_a,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:_=>p(_.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,Wc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:f,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(_a,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),v&&(0,he.jsx)("div",{className:s.errorMessage,children:v}),(0,he.jsxs)("div",{className:s.actions,children:[(0,he.jsx)("button",{type:"button",className:(0,Wc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,Wc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},Pw=PI;var Rw=S(E()),II=()=>{let e=A(hw),t=A(R_),n=F("adminUrl"),r=Pt(),o=()=>r.send(Si,!1),i=()=>{r.send(Si,!1),r.send(_g)};return(0,Rw.jsx)(Pw,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Iw=II;var n1=S(kg()),Ze=S(O());var qI={data:null,fetchState:"idle"},Nw=e=>e.contentTypes.data,wa=M("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),GI=j({name:"contentTypes",initialState:qI,reducers:{},extraReducers:e=>{e.addCase(wa.pending,t=>{t.fetchState="loading"}).addCase(wa.rejected,t=>{t.fetchState="error"}).addCase(wa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Mw=GI.reducer;function Ea(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 Dw=S(O());function Fw(e,t){(0,Dw.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 Ca=S(O());var jw={data:null,fetchState:"idle"},$c=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},Ut=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)}),XI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),QI=j({name:"entities",initialState:jw,reducers:{},extraReducers:e=>{e.addCase(Ut.pending,t=>{t.fetchState="loading"}).addCase(Ut.rejected,t=>{t.fetchState="error"}).addCase(Ut.fulfilled,(t,n)=>{t.fetchState="done",t.data=XI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(J,()=>jw)}}),Bw=QI.reducer;var Pg={};Ce(Pg,{enUS:()=>YI,nlNL:()=>ZI});var YI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},ZI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var Hw={root:"_root_17kae_1",empty:"_empty_17kae_5"};var no=S(E()),JI=({onCopy:e,onUse:t})=>{let n=(0,Ca.useRef)(null),r=k("EntitiesList",Hw),o=B(Pg),i=A($c),s=K();return(0,Ca.useEffect)(()=>{s(Ut())},[]),(0,Ca.useEffect)(()=>{n.current&&n.current.focus()},[n]),(0,no.jsxs)("div",{className:r.root,ref:n,tabIndex:-1,children:[i&&i.length>0&&(0,no.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,no.jsx)(te.List,{children:i.map((a,l)=>(0,no.jsx)(te.ListItem,{index:l,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities")}),i&&i.length===0&&(0,no.jsx)("p",{className:r.empty,children:o("noResults")})]})},zw=JI;var Vt=S(O());var Uw={data:null,fetchState:"idle"},Vw=e=>e.summary.data,Kw=e=>e.summary.fetchState==="error",Tn=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();if(s.length===0)return Promise.reject(new Error("No messages are included"));let a=await r.getSummary(s,{promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return{original:s,summary:a}}),eR=j({name:"summary",initialState:Uw,reducers:{},extraReducers:e=>{e.addCase(Tn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Tn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Tn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(J,()=>Uw)}}),Ww=eR.reducer;var Ig={};Ce(Ig,{enUS:()=>tR,nlNL:()=>nR});var tR={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."}]},nR={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 $w={root:"_root_18y7z_1",actions:"_actions_18y7z_5",main:"_main_18y7z_11",textInput:"_textInput_18y7z_15",loading:"_loading_18y7z_34",error:"_error_18y7z_38"};var kn=S(E()),rR=({onCopy:e})=>{let t=(0,Vt.useRef)(null),n=k("SummaryForm",$w),[r,o]=(0,Vt.useState)(""),i=B(Ig),s=A(Vw),a=A(Kw),l=K(),u=()=>{l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(it({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Vt.useEffect)(()=>{l(Tn())},[]),(0,Vt.useEffect)(()=>{o(s||"")},[s]),(0,Vt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Vt.useEffect)(()=>{let p=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",p),()=>{document.removeEventListener("keydown",p)}},[r]),(0,kn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,kn.jsx)("p",{className:n.error,children:i("error")}):(0,kn.jsxs)(Vt.Fragment,{children:[(0,kn.jsx)("div",{className:n.main,children:(0,kn.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:p=>o(p.target.value)})}),(0,kn.jsx)("div",{className:n.actions,children:(0,kn.jsx)(te.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},qw=rR;var Rg={};Ce(Rg,{enUS:()=>oR,nlNL:()=>iR});var oR={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"}],knowledgeSearch:[{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?"}]},iR={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:"Vat gesprek samen"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeSearch:[{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 ro=S(O());var Lg={};Ce(Lg,{enUS:()=>sR,nlNL:()=>aR});var sR={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"}]},aR={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 Gw={root:"_root_cnaw4_1",title:"_title_cnaw4_9",empty:"_empty_cnaw4_20",status:"_status_cnaw4_24",form:"_form_cnaw4_30",input:"_input_cnaw4_43",submit:"_submit_cnaw4_55",question:"_question_cnaw4_63",answer:"_answer_cnaw4_67",alignRight:"_alignRight_cnaw4_73"};var Ag={data:[],fetchState:"idle"},Xw=e=>{var t;return(t=e.answer)==null?void 0:t.data},Qw=e=>e.answer.fetchState,_i=fe("answer/resetKnowledgeSearch"),xi=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.knowledgeSearch({promptInstruction:e.promptInstruction,question:e.question},r,o);return{question:e.question,answer:i}}),lR=j({name:"answer",initialState:Ag,reducers:{},extraReducers:e=>{e.addCase(xi.pending,t=>{t.fetchState="loading"}).addCase(xi.rejected,t=>{t.fetchState="error"}).addCase(xi.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(J,()=>Ag).addCase(_i,()=>Ag)}}),Yw=lR.reducer;var ba=S(E()),Zw=()=>(0,ba.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,ba.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,ba.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 Ye=S(E()),uR=({onUse:e,onResetQuestion:t,question:n,promptInstruction:r})=>{let[o,i]=ro.default.useState(""),{setSelected:s}=vr(),a=(0,ro.useRef)(null),l=k("EntitiesList",Gw),u=B(Lg),c=K(),p=A(Xw),d=A(Qw),h=async y=>{y.preventDefault(),y.stopPropagation(),o!==""&&c(xi({question:o,promptInstruction:r}))},v=(y,g)=>{c(it({name:"knowledge assist source viewed",data:{question:g,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,ro.useEffect)(()=>{var y;n&&d==="idle"?c(xi({question:n,promptInstruction:r})):(y=a.current)==null||y.focus()},[a,d]),(0,ro.useEffect)(()=>{d==="done"&&(c(it({name:"knowledge assist question answered",data:{question:o||n,sources:p[p.length-1].answer.sources,isFollowUpQuestion:p.length>1},options:{includeConversationData:!0}})),s(0),i(""))},[d,p]),(0,Ye.jsxs)("div",{className:l.root,children:[p.length>0&&(0,Ye.jsx)("div",{className:l.alignRight,children:(0,Ye.jsx)(te.Button,{onClick:t,children:u("reset")})}),(0,Ye.jsxs)(te.ActionsBar,{list:p.map(({answer:y})=>({text:y.answer,type:"answer"})),primaryLabel:u("use"),onPrimary:y=>e(y.text),children:[p.map(({question:y,answer:g},m)=>(0,Ye.jsx)(te.List,{children:(0,Ye.jsx)(te.ListItem,{"data-testid":"knowledge-search-answer",index:m,description:g.answer,closeOnSelect:!0,onClick:()=>e(g.answer),onSourceClick:f=>v(f,y),sources:g.sources,styles:{title:l.question,description:l.answer},children:y})},`${g.answer}_${m}`)),d==="loading"&&(0,Ye.jsx)("p",{className:l.status,children:u("loading")}),d==="error"&&(0,Ye.jsx)("p",{className:l.status,children:u("error")}),(0,Ye.jsxs)("form",{className:l.form,onSubmit:h,children:[(0,Ye.jsx)("input",{ref:a,placeholder:u("anotherQuestion"),className:l.input,type:"text",value:o,onFocus:()=>{s(-1)},onChange:y=>{s(-1),i(y.target.value)}}),(0,Ye.jsx)("button",{type:"submit",className:l.submit,children:(0,Ye.jsx)(Zw,{})})]})]})]})},Jw=uR;var cR={data:null,fetchState:"idle"},wi=e=>e.profile.data,qc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ta=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)}),dR=j({name:"profile",initialState:cR,reducers:{},extraReducers:e=>{e.addCase(Ta.pending,t=>{t.fetchState="loading"}).addCase(Ta.rejected,t=>{t.fetchState="error"}).addCase(Ta.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),e1=dR.reducer;var Ee=S(E()),fR=200,pR=5,mR=4,gR=e=>e.reduce((t,n)=>[...t,...n.list.map(r=>({...r,type:n.value}))],[]),t1=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),hR=()=>{let e=K(),t=Pt(),n=B(Rg),[r,o]=(0,Ze.useState)(!1),[i,s]=(0,Ze.useState)(""),a=A(M_),l=A(wi),[u,c]=(0,Ze.useState)(null),[p,d]=(0,Ze.useState)([]),[h,v]=(0,Ze.useState)(),y=A(Cn),g=F("showSearch"),m=F("showEntitiesCommand"),f=F("showSummaryCommand"),x=F("showKnowledgeSearch"),_=F("showImageSearch"),C=F("searchTriggerKey"),w=A(Nw),b=A(D_),I=A(N_),P=R=>sn(b.filter(W=>W.type===R.toUpperCase()),R),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(R=>R.shouldShow),Q=[{label:n("entitiesClipboard"),onClick:()=>e(ze("entities")),shouldShow:m&&t1(n("entitiesClipboard"),i),experimental:!0},{label:n("summaryClipboard"),onClick:()=>e(ze("summary")),shouldShow:f&&t1(n("summaryClipboard"),i),experimental:!0},{label:i?`${n("knowledgeSearch")}: ${i}`:n("knowledgeSearch"),onClick:()=>e(ze("knowledgeSearch")),shouldShow:x,experimental:!0}].filter(R=>R.shouldShow),U=(w==null?void 0:w.map(R=>({value:R.code.toUpperCase(),label:`${R.name}s`,list:P(R.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],je=(0,Ze.useCallback)((0,n1.default)((R,W)=>{e(eo({query:R,type:W,tags:["search-overlay"]}))},fR),[]),on=gR([...U,...N]),Kt=(0,Ze.useCallback)((R,W)=>{if(!W)return;let Lt=[...N,...U].find(({value:jn})=>jn===W);Lt&&(e(ze("edit")),c(R),d(Lt.list))},[e,u,U]),ao=(0,Ze.useCallback)((R,W)=>{switch(W.type){case"IMAGE":t.send(wg,{suggestion:W});break;default:t.send(bn,{text:R,suggestion:W})}e(st(!1))},[e]),Ai=R=>{Ea(R.text),e(it({name:"entity copied",data:{entity:R,type:"copy"}})),e(st(!1))},Tr=R=>{t.send(bn,{text:R,suggestion:{source:"knowledge-assist",text:R}}),e(it({name:"answer used",data:{originalText:R},options:{includeConversationData:!0}})),s(""),e(ze("search")),e(_i()),e(st(!1))},ja=R=>{Ea(R),e(st(!1))},Ba=R=>{t.send(bn,{text:R.text,suggestion:{source:"entity",text:R.text}}),e(st(!1))},Oi=u===null||p.indexOf(u)-1<0?void 0:()=>c(p[p.indexOf(u)-1]),Ni=u===null||p.indexOf(u)===p.length-1?void 0:()=>c(p[p.indexOf(u)+1]);function sn(R,W){return R.slice(0,h?10:W.toLowerCase()==="image"?mR:pR)}function Mi(R,W,Lt){return W.reduce((jn,an)=>Lt&&h===Lt?an.length+jn:sn(an,Lt).length+jn,R)}function kr(R){return W=>{r?window.confirm(n("warning"))&&(R(W),o(!1)):R(W)}}return(0,Ze.useEffect)(()=>{i?je(i,h):e(Hc())},[i,h]),(0,Ze.useEffect)(()=>{a==="search"&&e(_i())},[a]),(0,Ze.useEffect)(()=>{y&&e(wa())},[y]),Fw(C,()=>e(st(!0))),!g||!l?null:(0,Ee.jsxs)(te,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:kr(R=>e(st(R))),onChangeType:R=>v(R),onChangePage:kr(R=>e(ze(R))),selectedType:h,search:i,page:a,isOpen:I,types:[...U,...N],children:[(0,Ee.jsx)(te.Page,{id:"search",children:(0,Ee.jsxs)(te.ActionsBar,{list:[...Q.map(R=>({text:R.label,type:"command"})),...on.map(R=>({text:R.text||R.url||R.message,type:R.type}))],primaryLabel:n("use"),secondaryLabel:n("preview"),onPrimary:({text:R},W)=>ao(R,on[W]),onSecondary:(R,W)=>{Kt(on[W-Q.length],on[W-Q.length].type)},children:[Q.length>0&&(0,Ee.jsx)(te.List,{heading:n("commands"),children:Q.map((R,W)=>(0,Ee.jsx)(te.ListItem,{index:Mi(W,[],"commands"),closeOnSelect:!1,onClick:R.onClick,isExperimental:R.experimental,children:R.label},R.label))}),[...U,...N].map(({value:R,label:W,list:Lt,lineClamp:jn,listOrientation:an},Di)=>(0,Ee.jsx)(te.List,{heading:W,orientation:an==="horizontal"?"horizontal":"vertical",children:sn(Lt,R).map((ct,dt)=>(0,Ee.jsx)(te.ListItem,{index:Mi(Q.length+dt,[...U,...N].slice(0,Di).map(({list:Pr})=>Pr),R),closeOnSelect:!1,lineClamp:jn,onClick:()=>ao(ct.text,ct),description:R!=="IMAGE"?ct.title&&ct.text:void 0,children:R==="IMAGE"?(0,Ee.jsx)(te.Image,{title:ct.title||ct.text,src:ct.image}):ct.title||ct.text},`${ct.id}-${ct.text}`))},R))]})}),(0,Ee.jsx)(te.Page,{id:"edit",onDismiss:kr(()=>{e(ze("search")),c(null)}),children:u&&(0,Ee.jsx)(Vc,{suggestion:u,onTouched:o,onDismiss:()=>{o(!1),e(ze("search")),c(null),d([])},onNext:Ni,onPrevious:Oi,onUse:R=>{e(ze("search")),ao(R,u),e(st(!1)),d([]),c(null)}})}),(0,Ee.jsx)(te.Page,{id:"entities",title:n("entitiesTitle"),isExperimental:!0,onDismiss:kr(()=>{e(ze("search"))}),children:(0,Ee.jsx)(zw,{onUse:Ba,onCopy:Ai})}),(0,Ee.jsx)(te.Page,{id:"summary",title:n("summaryTitle"),isExperimental:!0,onDismiss:kr(()=>{e(ze("search"))}),children:(0,Ee.jsx)(qw,{onCopy:ja})}),(0,Ee.jsx)(te.Page,{id:"knowledgeSearch",title:n("knowledgeSearch"),isExperimental:!0,onDismiss:kr(()=>{e(_i()),e(ze("search"))}),children:(0,Ee.jsx)(Jw,{promptInstruction:l.knowledgeSearchPromptInstruction,question:i,onUse:Tr,onResetQuestion:()=>{e(_i()),s("")}})})]})},r1=hR;var Ei=S(E()),yR=()=>{let e=F("showSearch"),t=F("isEmbedded");return(0,Ei.jsxs)(o1.Fragment,{children:[e&&(0,Ei.jsx)(r1,{}),(0,Ei.jsx)(Ew,{}),t&&(0,Ei.jsx)(Iw,{})]})},i1=yR;var ka=S(E()),vR=({children:e})=>{let n=F("locale").replace("-","");return(0,ka.jsx)(Md.Provider,{value:n,children:e})},SR=({store:e,customStyles:t={},children:n})=>(0,ka.jsx)(Dm,{store:e,children:(0,ka.jsx)(vR,{children:(0,ka.jsx)(ji.Provider,{value:t,children:n})})}),Pa=SR;var Qc=S(Y()),Ti=S(O());var s1=S(O());function a1(e,t){let[n,r]=(0,s1.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return H.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){H.error(s)}}]}function Gc(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 u1=S(Y()),Pn=S(O());var Og={};Ce(Og,{enUS:()=>xR,nlNL:()=>_R});var xR={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"}]}]},_R={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 l1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var wr=S(E()),Ng=(e,t,n)=>r=>(0,wr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),wR=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r})=>{let o=B(Og),i=Pt(),s=k("Login",l1),a=F("productName"),l=(0,Pn.useCallback)(y=>{y.preventDefault(),r&&r(parseInt(y.target.value,10))},[]),u=(0,Pn.useCallback)(y=>{y.preventDefault(),i.send(Si,!0)},[t]),c=(0,Pn.useMemo)(()=>y=>(0,wr.jsx)("a",{href:t,className:s.anchor,target:"_blank",rel:"noreferrer",children:y},"login"),[t]),p=(0,Pn.useCallback)(y=>(0,wr.jsx)("button",{type:"button",className:s.anchorButton,onClick:u,children:y},"prompt"),[u]),{min:d,hour:h,day:v}=(0,Pn.useMemo)(()=>({min:Ng(s,60*10,l),hour:Ng(s,60*60,l),day:Ng(s,60*60*12,l)}),[]);return(0,wr.jsxs)("div",{className:(0,u1.default)(e,s.root),children:[o("loginPlease",{login:n?p:c,productName:a}),r&&(0,wr.jsxs)(Pn.Fragment,{children:[(0,wr.jsx)("br",{}),o("snooze",{min:d,hour:h,day:v})]})]})},Xc=wR;var c1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var Ia=S(E()),ER=({title:e})=>{let t=k("SearchTrigger",c1),n=K();return(0,Ia.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(st(!0)),children:[(0,Ia.jsx)(pi,{}),(0,Ia.jsx)("span",{className:t.text,children:e})]})},d1=ER;var v1=S(O());var bi=S(O());var f1=S(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 CR=/[.*+?^${}()|[\]\\]/g,bR=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function TR(e){return e.replace(CR,"\\$&")}function kR(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function Mg(e){return e.search(bR)}function m1(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${TR(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function g1(e){return e.replace(mo,'<mark data-type="placeholder">$1</mark>')}function Ci(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function PR(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 Dg(e,t,n={}){if(t){let r=kR(t.toLowerCase(),e.toLowerCase()),o=Ci(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=Mg(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(vy).length>3||t.length>30?PR(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Ci(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var h1={badge:"_badge_8rv7b_1",formattedText:"_formattedText_8rv7b_5"};var Fg=S(E()),RR=["search","personal-collection-search","studio-search"];function LR(e,t,n,r={}){let o="";return RR.includes(t)?o=m1(Dg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=Dg(e,n,r),r.placeholders===!0&&(o=g1(o)),o}var AR=()=>{},OR=({index:e,selected:t,suggestion:n})=>{let r=F("inlineSuggestions"),o=A(ni),i=K(),s=k("TextSuggestion",h1),a=(0,bi.useRef)(null);(0,bi.useEffect)(()=>{let u=setTimeout(()=>{i(Gx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(u)}},[n]),p1(a,"click",()=>{i(Ec(e)),i(Ft({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let l=(0,bi.useMemo)(()=>LR(n.text,n.source,o,{stripAgentPart:r,placeholders:!0,searchKeywords:n.searchKeywords}),[r,n.text,n.source,o,n.searchKeywords]);return n.source==="gpt"?null:(0,Fg.jsx)(oe,{ref:a,as:"button",selected:t,onClick:AR,children:(0,Fg.jsx)(ii,{containerTagName:"div",noWrap:!1,tagName:"span",className:s.formattedText,content:l})})},y1=OR;var jg=S(E()),NR=({suggestions:e,selectedIndex:t})=>(0,jg.jsx)(v1.Fragment,{children:e.slice().map((n,r)=>(0,jg.jsx)(y1,{index:r,selected:r===t,suggestion:n},`${n.text}-${n.source}`)).reverse()}),S1=NR;var Bg={};Ce(Bg,{enUS:()=>MR,nlNL:()=>DR});var MR={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"}]},DR={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 x1={root:"_root_4kcme_1",isInline:"_isInline_4kcme_14",toggleButton:"_toggleButton_4kcme_18",toggleButtonWrapper:"_toggleButtonWrapper_4kcme_22",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_4kcme_29",isCollapsed:"_isCollapsed_4kcme_33",collapsible:"_collapsible_4kcme_33",hints:"_hints_4kcme_41",hintsHidden:"_hintsHidden_4kcme_48",triggers:"_triggers_4kcme_53",triggersRight:"_triggersRight_4kcme_68"};var ue=S(E()),FR=({inline:e=!1,textSuggestions:t,selectedIndex:n})=>{let r=k("SuggestionsOverlay",x1),o=B(Bg),i=F("inlineSuggestions"),s=A(Gc),a=Vx(),l=K(),u=(0,Ti.useRef)(null),c=F("searchTriggerKey"),p=F("productName"),d=A(aw),h=A(Cn),v=A(dc),[y,g]=(0,Ti.useState)(null),m=F("showSearch"),f=F("showTextSuggestions"),x=F("adminUrl"),_=F("isEmbedded"),[C,w]=a1("dd-snooze-until-ms",0),b=d||C>Date.now(),I=t.filter(Q=>Q.source!=="gpt").length,P=()=>{b&&w(0),l(cw(!b))},N=Q=>{let U=Date.now()+Q*1e3;w(U),H.info(`Snooze until: ${new Date(U)}`),l(yi({collapse:!0}))};return(0,Ti.useEffect)(()=>{I===0&&g(null)},[t,I]),ui(()=>{l(yi({collapse:!0,skipWhenInputFocus:!0}))}),i!==e||h===null||v===!1?null:h===!1?(0,ue.jsxs)("div",{ref:u,className:(0,Qc.default)(r.root,{[r.isCollapsed]:b,[r.isInline]:e}),"data-inline":e,children:[!b&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1}}),(0,ue.jsx)("div",{className:r.triggersRight,children:(0,ue.jsx)(Ar,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Ar,{className:r.toggleButton,title:o("open",{productName:p}),onClick:P,isCollapsed:!0})}),(0,ue.jsx)("div",{className:r.collapsible,children:(0,ue.jsx)(Xc,{loginUrl:x,isEmbedded:_,onSnooze:N})})]}):!a||!s?null:(0,ue.jsxs)("div",{ref:u,className:(0,Qc.default)(r.root,{[r.isCollapsed]:b,[r.isInline]:e}),"data-inline":e,children:[!b&&(0,ue.jsxs)("div",{className:r.triggers,children:[(0,ue.jsx)("div",{style:{flex:1},children:m&&(0,ue.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>g(o(jc()?"searchHintMac":"searchHintWindows",{searchTriggerKey:c.toUpperCase()})),onMouseLeave:()=>g(null),children:(0,ue.jsx)(d1,{title:o("search")})})}),(0,ue.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ue.jsx)("div",{className:(0,Qc.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,ue.jsx)(Ar,{className:r.toggleButton,title:o("collapse"),onClick:P,isCollapsed:!1})]})]}),(0,ue.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ue.jsx)(Ar,{className:r.toggleButton,title:o("open",{productName:p}),onClick:P,isCollapsed:!0})}),I>0&&f&&(0,ue.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ue.jsx)(Wt,{children:(0,ue.jsx)(S1,{suggestions:t,selectedIndex:n})})})]})},jR=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Yc=Xr(jR)(FR);var cd=S(Y());var An=S(O());var _1=S(O()),BR=["div","span","mark","strong","b","i","u","em"];function Hg(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(BR.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,_1.cloneElement)(r,{children:Hg(s,t,n+1)})]}return[...e,...t]}function In(e){return e.tagName.toLowerCase()==="textarea"}var w1={root:"_root_1l8n5_1",container:"_container_1l8n5_4",agentText:"_agentText_1l8n5_7",tabText:"_tabText_1l8n5_8",hint:"_hint_1l8n5_8",matchSelection:"_matchSelection_1l8n5_12",focus:"_focus_1l8n5_18",resetIndent:"_resetIndent_1l8n5_22",matchKeyword:"_matchKeyword_1l8n5_26",matchPlaceholder:"_matchPlaceholder_1l8n5_27",hover:"_hover_1l8n5_33",hintText:"_hintText_1l8n5_66",popover:"_popover_1l8n5_74",popoverRoot:"_popoverRoot_1l8n5_79",popoverContentContainer:"_popoverContentContainer_1l8n5_83",popoverContent:"_popoverContent_1l8n5_83",selectionOptions:"_selectionOptions_1l8n5_109",selectionOptionsIsHidden:"_selectionOptionsIsHidden_1l8n5_114",selectionOptionsButton:"_selectionOptionsButton_1l8n5_118",caret:"_caret_1l8n5_134",popoverSuggestionsRoot:"_popoverSuggestionsRoot_1l8n5_138",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_1l8n5_143"};var td=S(O());var Ug=S(Y()),It=S(O());var Zc=S(O()),HR=["bottom","height","left","right","top","width"],zR=(e={},t={})=>HR.some(n=>e[n]!==t[n]),Rn=new Map,E1,C1=()=>{let e=[],t=[];Rn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();zR(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Rn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),E1=window.requestAnimationFrame(C1)};function UR(e,t){return{observe(){let n=Rn.size===0;if(Rn.has(e)){let r=Rn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Rn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&C1()},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(E1)}}}}function zg(e){let[t,n]=(0,Zc.useState)(null);return(0,Zc.useLayoutEffect)(()=>{if(!e.current)return;let r=UR(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var ki=S(O()),T1=S(Tu());var b1={root:"_root_1jq08_1"};var k1=({children:e})=>{let[t,n]=(0,ki.useState)(null),r=(0,ki.useContext)(ji);return(0,ki.useLayoutEffect)(()=>{let o=document.createElement("div");return Jr(o),o.classList.add(b1.root),r!=null&&r.rootNode&&o.classList.add(r==null?void 0:r.rootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,T1.createPortal)(e,t):null};var nn={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 Jc=S(E()),Pi=(e=!1)=>{let[t,n]=(0,It.useState)(e),r=(0,It.useCallback)(()=>n(!0),[]),o=(0,It.useCallback)(()=>n(!1),[]),i=(0,It.useCallback)(()=>n(a=>!a),[]),s=(0,It.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Vg(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 Ii=({className:e,triggerRef:t,boundaryRef:n=(0,It.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Vg,...a})=>{let l=zg(t),u=zg(n),c=(0,It.useMemo)(()=>s(l,u,0),[l,u]);return(0,Jc.jsx)(k1,{children:(0,Jc.jsx)("div",{className:(0,Ug.default)(nn.ref,{[nn.positionAbove]:r==="above",[nn.positionBelow]:r==="below",[nn.positionLeft]:r==="left",[nn.positionRight]:r==="right",[nn.alignStart]:o==="start",[nn.alignCenter]:o==="center",[nn.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,Jc.jsx)("div",{className:(0,Ug.default)(e,nn.root),children:i})})})};var Er=S(E()),VR=({inputStyle:e,inputElement:t})=>{let n=k("TabCompletion",bt),r=Pi(document.activeElement===t);return ui(()=>r.close()),(0,td.useEffect)(()=>{let o=()=>r.open();return t.addEventListener("focus",o),()=>{t.removeEventListener("focus",o)}},[]),(0,Er.jsxs)(td.Fragment,{children:[(0,Er.jsx)("mark",{className:bt.caret,ref:r.triggerRef}),r.opened&&(0,Er.jsx)(Ii,{className:n.popoverSuggestionsRoot,triggerRef:r.triggerRef,position:"above",align:"start",children:(0,Er.jsx)("div",{style:e,className:n.suggestionsOverlayInputStyles,children:(0,Er.jsx)(Yc,{inline:!0})})})]})},ed=class extends Bt{charCounter=0;charLength=0;found=!1;onlyAtEnd=!1;props;onBeforeParse(t,n){var r;return this.props=n,this.charCounter=0,this.onlyAtEnd=n.inlineSuggestionsOnlyAtEnd??!1,this.charLength=(In(n.inputElement)?n.inputElement.value.length:(r=n.inputElement.textContent)==null?void 0:r.length)??0,this.found=!1,t}match(t){if(this.found||!this.props||this.props.selection===null)return null;let[n,r]=this.props.selection;if(n!==r||this.onlyAtEnd&&n!==this.charLength)return null;let o=n,s=o>=this.charCounter&&o<=this.charCounter+t.length?{index:Mg(t.slice(0,o))+1-this.charCounter,length:0,match:"",valid:!0}:null;return s&&(this.found=!0),this.charCounter+=t.length,s??null}replaceWith(t,n){return(0,Er.jsx)(VR,{inputStyle:n.inputStyle,inputElement:n.inputElement},"caret")}asTag(){return"mark"}};var L1=S(Y());var sd=S(O());function P1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function nd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function I1(e){return e!=null}var R1=S(Y()),rd=S(O());var Kg=S(E()),od=(0,rd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,rd.useRef)(null),i=k("TabCompletion",bt);return(0,Kg.jsx)("div",{ref:nd([o,r]),className:(0,R1.default)(e,i.popoverContentContainer),...n,children:(0,Kg.jsx)("div",{className:i.popoverContent,children:t})})});var Cr=S(E()),KR=e=>t=>{let n=Vg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},WR=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",bt),s=Pi(),a=(0,sd.useMemo)(()=>KR(e.getBoundingClientRect()),[e]),[l,u]=Ac(e);return(0,sd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,Cr.jsxs)("span",{children:[(0,Cr.jsx)("mark",{ref:nd([l,s.triggerRef]),className:(0,L1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,Cr.jsx)(Ii,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,Cr.jsx)(od,{style:n,children:(0,Cr.jsx)("div",{className:i.hintText,children:o})})})]})},id=class extends Bt{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${P1(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(I1);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,Cr.jsx)(WR,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ld=S(Y());var Ve=S(O());var Wg=S(E()),A1=()=>(0,Wg.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,Wg.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 br=S(O());var N1=S(kg());var O1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function ad(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 $g(e){return e.replace("https://www.","").replace("https://","")}var Rt=S(E()),$R=3,qR=e=>({image:e.image||"",text:`https://${e.text}`,id:e.id,title:e.title}),GR=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=$R})=>{let i=k("LinkSearch",O1),[s,a]=(0,br.useState)(""),l=K(),u=A(G_("url")),c=A(F_("URL",qR)),[p,d]=(0,br.useState)(c.length-1),h=F("fallbackImage"),v=f=>{let x=f.target;a(x.value)},y=(f,x)=>{f.stopPropagation(),f.preventDefault(),window.open(x,"_blank")},g=f=>{var C;let x=p-1<0?c.length-1:p-1,_=p+1===c.length?0:p+1;f.code==="Escape"&&(a(""),t()),f.code==="ArrowUp"&&d(x),f.code==="ArrowDown"&&d(_),f.code==="Enter"&&e(((C=c[p])==null?void 0:C.text)||s)},m=(0,br.useCallback)((0,N1.default)(f=>{l(eo({query:f,type:"URL",tags:["link-search"]}))},300),[]);return(0,br.useEffect)(()=>{s&&m(s)},[s]),(0,br.useEffect)(()=>()=>{l(Hc())},[]),(0,Rt.jsxs)("div",{className:i.root,children:[(0,Rt.jsx)(Wt,{withDivider:!0,children:(s?c:u).slice(0,o).map((f,x)=>(0,Rt.jsx)(oe,{selected:p===x,onClick:()=>e(f.text),"data-testid":"linksearch-suggestion",children:(0,Rt.jsxs)(me,{children:[(0,Rt.jsx)(me.Image,{src:ad(f,"small",h||void 0),title:f.title||f.text}),(0,Rt.jsxs)(me.Content,{className:i.content,cropText:!0,children:[(0,Rt.jsx)(me.Title,{children:f.title||$g(f.text)}),f.title&&$g(f.text)]}),(0,Rt.jsx)(oe.Actions,{children:(0,Rt.jsx)(oe.ActionButton,{label:r,onClick:_=>y(_,f.text)})})]})},f.text))}),(0,Rt.jsx)(_a,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:g})]})},M1=GR;var qg={};Ce(qg,{enUS:()=>XR,nlNL:()=>QR});var XR={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},QR={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var Ue=S(E()),YR=(0,Ve.forwardRef)((e,t)=>{let n=k("TabCompletion",bt);return(0,Ue.jsx)("mark",{ref:t,className:(0,ld.default)(n.matchSelection)},"selection-start")}),ZR=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=B(qg),s=k("TabCompletion",bt),a=(0,Ve.useRef)(null),l=(0,Ve.useRef)(null),[u,c]=(0,Ve.useState)(null),p=K(),d=Pi(document.activeElement===r),[h]=(0,Ve.useState)(()=>document.createRange());d.triggerRef.current=h,(0,Ve.useEffect)(()=>()=>h.detach(),[]),(0,Ve.useEffect)(()=>{let y=e.current,g=a.current;!y||!g||(h.setStart(y,0),h.setEnd(g,0))},[e.current,a.current]),ui(()=>{d.close()});let v=(0,Ve.useCallback)(y=>{let g=h.toString(),m=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(vc({text:`[${g}](${m})`}))},[]);return(0,Ue.jsxs)("span",{children:[(0,Ue.jsx)("mark",{ref:a,className:(0,ld.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,Ue.jsx)(Ii,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,Ue.jsxs)(od,{style:n,ref:l,children:[(0,Ue.jsx)("div",{className:(0,ld.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,Ue.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,Ue.jsx)(A1,{}),(0,Ue.jsx)("span",{children:"\xA0"}),(0,Ue.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,Ue.jsx)(M1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},ud=class extends Bt{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,Ve.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,Ue.jsx)(YR,{ref:this.startRef}):(0,Ue.jsx)(ZR,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Ln=S(E()),JR=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",w1),c=F("insertLink"),p=F("showMidSentenceSuggestions"),d=F("inlineSuggestions"),h=Nc(a),v=(0,An.useRef)(null);(0,An.useEffect)(()=>{In(a)&&h&&Mc(a,h)},[h]);let y=(0,An.useCallback)(f=>{if(!o||!n)return f;let x=[(0,Ln.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Ln.jsx)("span",{className:(0,cd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,Ln.jsx)("span",{className:(0,cd.default)(u.hint,u.resetIndent),children:(0,Ln.jsx)(cl,{keyCode:"tab"},"tabHint")})),Hg(f,x)},[o,n,r]),g=(0,An.useMemo)(()=>{let f=[];return d&&f.push(new ed("inline")),c&&f.push(new ud("selection")),f.push(new ai("placeholders")),i&&f.push(new id("keywords")),f},[d,c,i]),m=(0,An.useMemo)(()=>{let f=window.getComputedStyle(a);return{"--dd-color":f.color,"--dd-font-size":f.fontSize,"--dd-font-family":f.fontFamily,"--dd-font-variant":f.fontVariant}},[]);return e?(0,Ln.jsxs)("div",{ref:f=>{f!=null&&f.parentElement&&(v.current=f==null?void 0:f.parentElement)},className:u.root,style:m,children:[(0,Ln.jsx)(ii,{tagName:"span",containerTagName:"div",className:(0,cd.default)(u.container,u.agentText),disableLineBreaks:In(a),content:t||"\u200B",onAfterParse:y,matchers:g,selection:h,keywordMatches:s,inputElement:a,inputStyle:m,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,Ln.jsx)("br",{})]}):null},eL=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var y;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Ci(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:h,showStyleSuggestions:v}=n;return{showTabHint:c,showStyleSuggestions:v,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((y=r.list)==null?void 0:y.keywordMatches)??[],enabled:h&&p!==!1}},D1=Xr(eL)(JR);var CE=S(Y()),bE=S(O());var F1={list:[],fetchState:"idle",isInitialRequest:null},B1=e=>e.autoflows.list||[],j1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},On=M("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Gg=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(On(e.platformSessionId))}),Xg=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(On(e.platformSessionId))}),tL=j({name:"autoflows",initialState:F1,reducers:{},extraReducers:e=>{e.addCase(Gg.pending,(t,n)=>{let r=j1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Xg.pending,(t,n)=>{let r=j1(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(On.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(On.rejected,t=>{t.fetchState="error"}),e.addCase(On.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(J,()=>F1)}}),H1=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(On(e))}),o.on("sessionCompleted",()=>{n(On(e))})}),z1=M("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),U1=tL.reducer;var V1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},K1=e=>e.customMessages.list,W1=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),$1=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),q1=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),Ra=M("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),dd=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)}),fd=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)}),G1=j({name:"customMessages",initialState:V1,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(Ra.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ra.rejected,t=>{t.fetchState="error"}).addCase(Ra.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(dd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(dd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(fd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(fd.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,()=>V1)}}),X1=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(G1.actions.onCustomMessage(i))})}),Q1=M("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),Y1=G1.reducer;var nL={jwt:null,accountUrl:null,interval:null},Z1=e=>t=>{let{exchangeToken:{jwt:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/jwt/?jwt=${n}&redirect=${e}`:null},Qg=M("exchangeToken/getTemporaryExchangeToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.getTemporaryExchangeToken();return{accountUrl:n.client.baseUrl,jwt:r}}),Yg=M("exchangeToken/pollExchangeToken",(e={},t)=>{let{interval:n=1e3*60*30}=e,{dispatch:r}=t;return r(Qg()),setInterval(()=>r(Qg()),n)}),J1=j({name:"exchangeToken",initialState:nL,reducers:{stopPollExchangeToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Qg.fulfilled,(t,n)=>{t.jwt=n.payload.jwt,t.accountUrl=n.payload.accountUrl}),e.addCase(Yg.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollExchangeToken:eE}=J1.actions,tE=J1.reducer;function nE(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var dE=S(O());var lE=S(Y()),uE=S(O());var oE=S(Y());var rE={root:"_root_838fd_1"};var sE=S(E()),rL=({className:e,children:t})=>{let n=k("Unicode",rE);return(0,sE.jsx)("span",{className:(0,oE.default)(e,n.root),children:t})},iE=rL;var aE={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 Zg={};Ce(Zg,{enUS:()=>oL,nlNL:()=>iL});var oL={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"}]},iL={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 at=S(E()),aL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",aE),a=B(Zg),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,at.jsxs)(oe,{className:(0,lE.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,at.jsx)(me,{children:(0,at.jsxs)(me.Content,{children:[(0,at.jsxs)(me.Title,{children:[t&&(0,at.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,at.jsx)("span",{children:r})]})}),(0,at.jsx)(oe.Actions,{fixed:t==="Started",children:(0,at.jsx)(oe.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,at.jsxs)(uE.Fragment,{children:[(0,at.jsx)(iE,{children:u})," ",(0,at.jsx)("span",{children:a(l)})]})})})]})},cE=aL;var Jg=S(E()),lL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},uL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Jg.jsx)(dE.Fragment,{children:e.map(o=>(0,Jg.jsx)(cE,{displayName:o.displayName,description:o.description,disabled:o.isBusy||lL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),cL=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},dL={onStartAutoflow:Gg,onStopAutoflow:Xg},fE=Xr(cL,dL)(uL);var pd=S(O());var nh=S(Y());var eh=S(E()),th=()=>(0,eh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,eh.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 pE={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 rn=S(E()),fL=({entities:e})=>{let t=k("EntitiesWidgetList",pE),[n,r]=(0,pd.useState)(void 0),o=K(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Ea(a.text),o(it({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,pd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,rn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,rn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,rn.jsx)("span",{className:t.entityText,children:a.text}),(0,rn.jsxs)("span",{className:t.iconWrapper,children:[(0,rn.jsx)("span",{className:(0,nh.default)(t.icon),children:(0,rn.jsx)(th,{})}),(0,rn.jsx)("span",{className:(0,nh.default)(t.icon,n===l&&t.iconClicked),children:(0,rn.jsx)(th,{})})]})]},a.text))})},mE=fL;var gE=S(Y()),rh=S(O());var La={};Ce(La,{enUS:()=>pL,nlNL:()=>mL});var pL={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"}]},mL={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 Nn={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 Je=S(E()),gL=({suggestion:e})=>{let t=B(La),n=K(),r=A(W1(e.text)),o=A($1(e.text)),i=A(q1(e.text)),s=A(uc),{replyOptions:a}=e,l=(0,rh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(dd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,rh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(fd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Je.jsxs)(oe,{onClick:l,className:(0,gE.default)(Nn.root,{[Nn.isUsed]:r,[Nn.hasError]:i}),children:[(0,Je.jsx)(me,{children:(0,Je.jsxs)(me.Content,{children:[(0,Je.jsxs)(me.Title,{className:Nn.title,children:[e.text," ",(0,Je.jsx)(dl,{className:Nn.label,children:"analyse tool"})," ",i&&(0,Je.jsx)("span",{className:Nn.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,Je.jsx)("ul",{className:Nn.quickReplies,children:a.map(c=>(0,Je.jsx)("li",{className:Nn.quickReply,children:c.title},c.title))})]})}),(0,Je.jsxs)(oe.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Je.jsx)(oe.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,Je.jsx)(oe.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,Je.jsx)(oe.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},hE=gL;var oh=S(E()),yE=()=>(0,oh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,oh.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 vE=S(O());var lt=S(E()),hL=({suggestion:e,lines:t,onEdit:n,onUse:r})=>{var d;let o=e.text||e.url||e.message,i=zc(o),s=B(La),a=F("showImages"),l=F("fallbackImage"),u=h=>{h.preventDefault(),h.stopPropagation(),r(o)},c=h=>{h.preventDefault(),h.stopPropagation(),n(e)},p=(0,vE.useCallback)(h=>{window.open(i,"_blank"),h.stopPropagation(),h.preventDefault()},[i]);return(0,lt.jsxs)(oe,{onClick:u,"data-testid":"edit-suggestion",children:[(0,lt.jsxs)(me,{children:[a&&e.image&&(0,lt.jsx)(me.Image,{src:ad(e,"small",l||void 0),title:e.title}),(0,lt.jsxs)(me.Content,{children:[e.title&&(0,lt.jsx)(me.Title,{children:e.title}),e.searchKeywords&&((d=e.searchKeywords)==null?void 0:d.length)>0&&(0,lt.jsx)(oe.Labels,{labels:e.searchKeywords}),(0,lt.jsx)(me.Content,{cropText:t==="single",lineClamp:t==="multiple",children:o})]})]}),(0,lt.jsxs)(oe.Actions,{children:[i&&(0,lt.jsx)(oe.ActionButton,{onClick:p,label:s("visitUrl")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:c,label:s("preview")}),(0,lt.jsx)(oe.ActionButton,{primary:!0,onClick:u,label:s("useSuggestion")})]})]})},SE=hL;var Aa=S(E()),yL=({contentType:e,lines:t,suggestions:n})=>{let r=Pt(),o=A(gi),i=a=>{r.send(xg,{state:o,suggestion:a,contentType:e})},s=(a,l)=>{r.send(bn,{text:a,suggestion:{...l,source:l.source,sourceText:l.text}})};return(0,Aa.jsx)(Aa.Fragment,{children:n.map(a=>(0,Aa.jsx)(SE,{suggestion:a,lines:t,onEdit:l=>i(l),onUse:l=>s(l,a)},a.text||a.url||a.message))})},xE=yL;var ih={};Ce(ih,{enUS:()=>vL,nlNL:()=>SL});var vL={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"}]},SL={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:"Vat gesprek samen"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var _E={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 sh=S(E()),wE=()=>(0,sh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,sh.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 ah=S(E()),EE=()=>(0,ah.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,ah.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=S(E()),md=(e,t)=>{let n=A(Cn);(0,bE.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},xL=()=>{let e=B(ih),t=K(),n=F("isEmbedded"),r=k("Widget",_E),o=F("showAutoflows"),i=F("showCustomMessages"),s=F("showPersonalCollectionLink"),a=F("showSummaryCommand"),l=F("showKnowledgeSearch"),u=F("showSearch"),c=A(wi),p=A(qc),d=A(B1),h=A($c),v=A(K1),y=A(cc),g=A(dc),m=A(Cn),f=A(uc),x=A(nE),_=A(gi),C=Pt(),w=A(Q_),b=A(Z1("/admin/personal-collection")),I=F("adminUrl");if(md(()=>(t(Ra(f)),t(X1(f)),()=>{t(Q1(f))}),[t,g,i,f]),md(()=>(t(On(f)),t(H1(f)),()=>{t(z1(f))}),[t,g,o,f]),md(()=>{p.forEach(({type:N})=>{t(N==="entities"?Ut():wn(N))})},[t,g,y,c]),md(()=>(t(Yg()),()=>{t(eE())}),[t,g,s,y]),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)(Xc,{isEmbedded:n,loginUrl:I})})},"login");if(!c||!f||m===null||w||x)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,CE.default)(r.root),"data-testid":"widget",children:(0,z.jsxs)(fl,{className:r.sectionList,children:[P&&(0,z.jsx)(Bn,{title:e("actions"),type:"shortcuts",children:(0,z.jsxs)("div",{className:r.shortcutList,children:[u&&(0,z.jsxs)("button",{className:r.shortcut,onClick:()=>C.send("ShowCommandPalette",{isOpen:!0}),children:[(0,z.jsx)(pi,{}),e("linkSearch")]}),a&&(0,z.jsxs)("button",{className:r.shortcut,onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,z.jsx)(EE,{}),e("linkSummary")]}),l&&(0,z.jsxs)("button",{className:r.shortcut,onClick:()=>C.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeSearch"}),children:[(0,z.jsx)(wE,{}),e("linkKnowledgeSearch")]}),b&&(0,z.jsxs)("a",{className:r.shortcut,target:"_blank",href:b,rel:"noreferrer",children:[(0,z.jsx)(yE,{}),e("linkPersonalcollection")]})]})}),i&&v.length>0&&(0,z.jsx)(Bn,{type:"custom-messages","data-testid":"custom-messages",children:(0,z.jsx)(Wt,{withDivider:!0,children:v.map(N=>(0,z.jsx)(hE,{suggestion:N},N.text))})}),o&&d.length>0&&(0,z.jsx)(Bn,{type:"autoflows",title:e("titleAutoflows"),"data-testid":"autoflows",children:(0,z.jsx)(Wt,{withDivider:!0,children:(0,z.jsx)(fE,{})})}),p.map(({type:N,title:Q,amount:U,lines:je})=>{var on;switch(N){case"entities":return h&&h.length>0&&(0,z.jsx)(Bn,{type:N,title:Q,"data-testid":`type-${N}`,children:(0,z.jsx)(mE,{entities:h})},N);default:return((on=_[N])==null?void 0:on.fetchState)==="done"&&_[N].suggestions.length>0&&(0,z.jsx)(Bn,{type:N,title:Q,"data-testid":`type-${N}`,children:(0,z.jsx)(Wt,{withDivider:!0,children:(0,z.jsx)(xE,{lines:je,contentType:N,suggestions:_[N].suggestions.slice(0,U)||[]})})},N)}})]})})},TE=xL;function kE(e){let t=new Range;return t.selectNodeContents(e),t}var Oa=/[\u200B-\u200D\uFEFF]/g;function oo(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,p=/[\u200B-\u200D\uFEFF]/;if(!p.test(l))return u;for(let d=0;d<=l.length;d++)if(p.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){var u;switch(l.nodeType){case Node.TEXT_NODE:{let c=l.textContent,p=c.replace(Oa,""),d=o+p.length,h=t>=o&&t<=d,v=n>=o&&n<=d;if(h){let y=s(c,t-o);y===0&&!v?r.setStartBefore(l):r.setStart(l,y)}v&&(r.setEnd(l,s(c,n-o)),i=!0),o=d;break}case Node.ELEMENT_NODE:{if(l.tagName==="BR"&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let p=0;p<l.childNodes.length&&(a(l.childNodes[p]),!i);p++);let c=(u=l.lastChild)==null?void 0:u.tagName;l.tagName==="DIV"&&c!=="DIV"&&c!=="BR"&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function gd(e,t){if(!e.contains(t.commonAncestorContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s,a,l=0;function u(c){let p=c===n,d=c===o;switch(c.nodeType){case Node.TEXT_NODE:{let h=c.textContent;p&&(s=l+h.substring(0,r).replace(Oa,"").length),d&&(a=l+h.substring(0,i).replace(Oa,"").length),l+=h.replace(Oa,"").length;break}case Node.ELEMENT_NODE:{let{tagName:h}=c,v=c.nextSibling===null;h==="BR"&&!v&&l++;for(let y=0;y<c.childNodes.length&&(p&&y===r&&(s=l),u(c.childNodes[y]),d&&y===i-1&&(a=l),a===void 0);y++);!d&&h==="DIV"&&!v&&l++,d&&(a=l);break}default:break}}if(u(e),a===void 0)throw new Error("Could not determine start and end");return{start:s??a,end:a}}function Na(e,t){if(!e.contains(t.commonAncestorContainer))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,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,h=p?i:void 0,v=u.textContent.replace(Oa,"");d===0&&h===void 0?a+=v:a+=v.substring(d,h);break}case Node.ELEMENT_NODE:{let{tagName:d}=u,h=u.nextSibling===null;s===0&&d==="BR"&&!h&&(a+=`
|
|
20
20
|
`);for(let v=c?r:0;v<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[v]),s!==1);v++);!p&&s===0&&d==="DIV"&&!h&&(a+=`
|
|
21
|
-
`);break}default:break}p&&s++}return l(e),a}var io=class extends Sn{observer;getText(){let t=new Range;return t.selectNodeContents(this.element),Oa(this.element,t)}getHTML(){return this.element.innerHTML||""}getSelection(){if(document.activeElement!==this.element)return null;let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);return!n||!this.element.contains(n.commonAncestorContainer)?null:gd(this.element,n)}getSelectedText(){if(!this.currentSelection)return"";let{start:t,end:n}=this.currentSelection;return Oa(this.element,oo(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);(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 lh=class{constructor(t){this.name=t;B.warn("BroadcastChannel is not supported")}postMessage(){}addEventListener(){}removeEventListener(){}close(){}},uh=class{constructor(t,n){this.name=t;this.options=n;this.broadcastChannel=new this.options.broadcastChannelConstructor(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()}},ch=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()}},dh=class{sessionId;deepdeskUrl;channel;broadcastChannelConstructor;eventMap;isIntegration;constructor(t){this.deepdeskUrl=t.deepdeskUrl,this.broadcastChannelConstructor=t.broadcastChannelConstructor||window.BroadcastChannel||lh,this.isIntegration=t.deepdeskUrl!==(t.origin||window.location.origin),this.eventMap=t.eventMap,this.setSessionId("deepdesk-general")}setSessionId(t){if(this.sessionId===t)return;this.cleanup(),B.info("Set sessionId",t),this.sessionId=t,this.channel=this.isIntegration?new ch(t,this.deepdeskUrl,{debug:!0}):new uh(t,{broadcastChannelConstructor:this.broadcastChannelConstructor});let n=r=>{var o,i;r.origin===this.deepdeskUrl&&r.data.type==="event"&&(B.info("Received broadcast event",this.sessionId,r),(i=(o=this.eventMap)[r.data.name])==null||i.call(o,r.data.payload))};this.channel.onMessage(n)}send(t,n){var o,i,s;if(!this.sessionId)return;B.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)}cleanup(){var t;(t=this.channel)==null||t.close(),delete this.channel}},kT=dh;var ki=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var fh=e=>new Promise(t=>{setTimeout(t,e)});var Ri=class extends ki{name="ClientError"},ph=class extends ki{name="ServerError"},Mn=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}async request(t,n={}){let r={isStale:!1},o=`${this.baseUrl}${t}`,i=this.fetch,{abortLatest:s=!1,attempts:a=1,retryDelay:l=500,refreshTokenOn401:u=!0,retryOnError:c=x=>x instanceof TypeError,retryOnResponse:p=x=>x.status>=500,version:d="v1",...h}=n,v={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(v.headers={...v.headers,"X-CSRFToken":this.csrfToken}),typeof d=="string"&&(v.headers={...v.headers,"X-Deepdesk-API-Version":d});let y=a,g=!1;if(!i)throw new Error("fetch is not set");this.latestRequestByUrl[o]&&s&&(this.latestRequestByUrl[o].isStale=!0),this.latestRequestByUrl[o]=r;let m=async()=>(y--,i(o,v).then(async x=>p(x)&&!r.isStale&&y>0?(await fh(l),m()):x.status===401&&u===!0&&g===!1?(g=!0,await this.refreshToken(),m()):x).catch(async x=>{if(c(x)&&!r.isStale&&y>0)return await fh(l),m();throw x})),f=await m(),w=await f.json().catch(()=>null);if(r.isStale)throw new Error("Aborted");if(f.status>=500)throw new ph("Server Error",w);if(f.status===401)throw new Ri("Unauthorized",w);if(f.status===403)throw new Ri("Forbidden",w);if(f.status===404)throw new Ri("Not Found",w);if(f.status>=400)throw new Ri("Bad Request",w);return delete this.latestRequestByUrl[o],w}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 wL;(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||={})})(wL||={});function hd(e){return{...re(e),tags:e.tags}}var Dn=class e{constructor(t,n={}){this.options=n;this.client=new Mn(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(),B.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Ee(t),tags:t.tags},{version:"v2"});return hd(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(),B.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 hd(i)}async isConversationSupported(t,n={}){B.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=Ee(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return hd(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Ee(o),tags:o.tags})),{version:"v2"})).map(o=>hd(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",Ee({...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:Ee({...n,...r})})}async getEntities(t){return(await this.client.post("/api/entities",{messages:t.filter(r=>r.text)})).entities}async getSummary(t){return(await this.client.post("/api/summary",{conversation:{messages:t.filter(r=>r.text&&r.source)}})).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 B.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.client.post("/apis/admin/session/api-key/",Ee(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}`,Ee(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`,Ee(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",Ee(t),{abortLatest:!0});return re(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Ee(t),{version:"v2"});return re(n)}async knowledgeSearch(t,n,r){let o=await this.client.post("/api/knowledge-search/search",Ee({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(Sy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&B.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Na=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(pg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{B.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 xL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(xL||={});var Ma=class{constructor(t,n={}){this.apiUrl=t;this.client=new Mn(t,n)}client;streams={};logger=B;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`,Ee(n));return re(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Ee(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",Ee(t));return re(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new Na(`${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 RT={startTime:null,stopTime:null},IT=j({name:"handlingTime",initialState:RT,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(Z,()=>RT)}}),{handlingTimeStart:LT,handlingTimeStop:yd,handlingTimeReset:AT}=IT.actions,OT=IT.reducer;var NT=(e={})=>{let t={onAuthError:Kc(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var mh={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var so=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 mh.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),EL=j({name:"styleSuggestions",initialState:mh,reducers:{},extraReducers:e=>{e.addCase(so.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(so.rejected,t=>{t.fetchState="error"}).addCase(so.fulfilled,(t,n)=>{t.fetchState="done",pr(t.list,n.payload)||(t.list=n.payload)}).addCase(Z,()=>mh)}}),MT=EL.reducer;var DT=(e={})=>{let t,n=!0,r={getStyleSuggestions:so,debounce:500,...e};return o=>i=>s=>{var h;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(!((h=u.conversation.current)==null?void 0:h.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 CL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var FT=(e={})=>{let t={getTextSuggestions:En,getAutocompleteSuggestions:ma,debounce:200,check:Gc,...e},n,r=!0;return o=>i=>s=>{var g;let{input:{userCommitted:a}}=o.getState(),l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{recommendTextSuggestions:c,showTabCompletion:p}=u.settings,d=(g=u.conversation.current)==null?void 0:g.id,h=s.type===Vc.toString();if(!d||!c&&!p)return l;let{input:{userCommitted:v}}=u;return CL(v,a)&&!r&&!h||(clearTimeout(n),!t.check(u))||(n=setTimeout(()=>{r=!1;let m=ni(u);m===""?o.dispatch(t.getTextSuggestions("default")):o.dispatch(t.getAutocompleteSuggestions(m))},h?0:t.debounce)),l}};var jT=so.fulfilled.toString();function TL(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 HT=e=>t=>n=>r=>{var c;if(r.type!==jT){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(c=i.conversation)==null?void 0:c.current,{agentInfo:l}=i.info;if(o===s)return;let u=TL(o,s);r.type===jT&&u.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,agentId:l.agentId??(a==null?void 0:a.agentId),agentName:l.agentName??(a==null?void 0:a.agentName),agentEmail:l.agentEmail??(a==null?void 0:a.agentEmail),data:{keywordMatches:u}})};var _L=Au({activeSuggestion:sE,answer:YE,auth:wE,autoflows:zC,conversation:U0,contentTypes:ME,customMessages:YC,exchangeToken:tT,entities:HE,handlingTime:OT,info:Ox,input:Km.reducer,overlayInput:Ge.reducer,settings:A0,profile:eC,search:Hx,summary:WE,styleSuggestions:MT,ui:dE,textSuggestions:tE});function BT(e){return jw({reducer:_L,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),NT(),FT({debounce:200}),DT({debounce:500}),HT(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var bL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},PL=e=>t=>n=>r=>{var a;let o=t.getState(),i=jm("inlineSuggestions")(o);switch(r.type){case Cn.toString():{let l=Qx(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 Ft.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:bL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case yc.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 Zs.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case xc.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 zt.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case bn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{inputText:JSON.stringify(r.payload.original),summary:r.payload.summary}});break;case ot.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 vc.toString():e.handleKeyDown(r.payload);break;case Ys.toString():e.logSendMessage(r.payload);break;case Sc.toString():e.logSendEditSuggestionMessage(r.payload);break;case wc.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Ys.toString():e.handleAfterSendMessage(r.payload);break;case ga.toString():e.onUpdateShowTabHint(r.payload);break;case yd.toString():e.logHandlingTime();break;case Ft.toString():{i&&(t.dispatch(gr([])),t.dispatch(hr()));break}default:break}return s},UT=PL;function gh(e){return e.toISOString().replace("T"," ").replace("Z","")}function zT(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:gh(n),timeStop:gh(r)}}function hh(e,t,n){var T,E,_;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,pastes:c,cuts:p,deletions:d,textSuggestions:h,offeredTextSuggestions:v}}=t[e],y=r.length,m=h.reduce((R,{text:k,searchTerm:N})=>R+k.length-(N?N.length:0),0),f=u??Date.now(),w=(Date.now()-f)/1e3,x=o/w;return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:c,cuts:p,deletions:d,lenTextTyped:o,lenTextTotal:y,lenTextAssisted:m,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:w,charsPerSecond:x,numPastes:l,textSuggestionsV2:h,suggestionsCounters:[{source:"gpt",countOffered:v.filter(R=>R.source==="gpt").length}],agentId:(T=t.info.agentInfo)==null?void 0:T.agentId,agentName:(E=t.info.agentInfo)==null?void 0:E.agentName,agentEmail:(_=t.info.agentInfo)==null?void 0:_.agentEmail}}function VT(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?VT(r,t):null}function KT(e,t){return VT(e,t)}function WT(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function vd(e){return e instanceof HTMLElement&&(Rn(e)||Ac(e))}var $T=(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{B.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function kL(e){return e.offsetParent!==null}function qT(e){if(!kL(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 Sd(e,t,n=100){let r=qT(e);t({isVisible:r});let o=setInterval(()=>{let i=qT(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var ut=S(C()),GT=$T("showTabHint",!0),Da=class e{static version="10.1.2";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}){let l=t.replace(/\/api$/,"");this.deepdeskApi=new Dn(l,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let u={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[UT({emit:(c,p,d)=>this.emit(c,p,d),handleAfterSendMessage:c=>this.handleAfterSendMessage(c),handleInputChanged:c=>this.handleInputChanged(c),handleKeyDown:c=>this.handleKeyDown(c),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:c=>this.logSendMessage(c),logSendEditSuggestionMessage:c=>this.logSendEditMessage(c),onUpdateShowTabHint:c=>GT.update(c),sendEvent:(c,p)=>this.deepdeskApi.sendEvent(c,p)})]};n&&Object.assign(u,{deepdeskBrokerAPI:new Ma(n)}),this.store=BT(u),this.broadcastEvents=new kT({debug:!0,deepdeskUrl:l,eventMap:xE(this.store)}),this.store.dispatch(Qs),this.store.dispatch(ga(GT.value())),this.store.dispatch(Qs({locale:o,adminUrl:l,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?(B.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(B.warn("Profile has not been loaded (yet)"),!0):(B.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(Kc(null)),this.store.dispatch(to()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Tn(r)&&mE(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){B.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(zm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(dc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(fc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Vm(t))).payload}async postMessages(t){return(await this.store.dispatch(mc(t))).payload}async updateConversation(t){return(await this.store.dispatch(pc(t))).payload}resetConversation(){this.store.dispatch(Z()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(bn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Qs(t))}setVisitorInfo(t){this.store.dispatch(Ax(t))}async setAgentInfo(t){await this.store.dispatch(ca(t))}async setAgentSettings(t){await this.store.dispatch(mg(t))}async getAgentSettings(){return(await this.store.dispatch(gg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();let t=[];return this.store.dispatch(Vc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(wc(t))}syncInputHtml(t){this.store.dispatch(ex(t))}notifyKeyDown(t){this.store.dispatch(vc(t))}notifyPaste(t,n){this.store.dispatch(Z0({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(X0(t))}notifyExternalSuggestion(t){this.store.dispatch(Ft(t)),this.store.dispatch(hr())}notifyEditSuggestion(t){this.store.dispatch(Jx(t.contentType,t.suggestions)),this.store.dispatch(Cn({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(yi({collapse:!1})),this.inputMediator&&this.store.dispatch(K0({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(gr([])))}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(Y0(hc(t))),!(t.key!=="Tab"&&!this.settings.showTextSuggestions))switch(t.key){case"Up":case"ArrowUp":if(n||!a||!i||t.shiftKey)return;this.store.dispatch(q0()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return;case"Down":case"ArrowDown":{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Q0());let{selectedSuggestionIndex:u}=this.state.input;u===-1?this.store.dispatch(Zs()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return}case"Esc":case"Escape":{l?(this.store.dispatch(Ec(-1)),this.store.dispatch(Zs()),t.preventDefault()):n||(this.store.dispatch(yi({collapse:!0})),this.store.dispatch(uE(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:u}=this.state.input,c=u.text.substring(0,u.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(ga(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&p&&p.text.startsWith(c)&&(this.store.dispatch(Ft({text:p.text,suggestion:p,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(J0()),this.store.dispatch(gr([]))}handlingTimeStart(){this.state.handlingTime.startTime||(B.info("Start handling time"),this.store.dispatch(LT()))}handlingTimeStop(){this.state.handlingTime.startTime&&(B.info("Stop handling time"),this.store.dispatch(yd()))}logSendMessage(t){let n=hh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=hh("overlayInput",this.state,{version:"v2"});t&&Object.assign(n,{text:t}),this.store.dispatch($0(this.state.overlayInput.metrics)),this.deepdeskApi.sendEvent("suggestion edited",{data:n})}logHandlingTime(){let t=zT(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(AT())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(hr()),this.store.dispatch(Ys(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ft({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){B.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),B.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]=di(r,o);return i.dataset.testid=t,n!=null&&n.rootNode&&i.classList.add(n.rootNode),this.unmountHandlers.push(()=>{(0,Fn.unmountComponentAtNode)(i),s(),i.remove()}),i}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return Zr(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,n.appendChild(o),this.unmountHandlers.push(()=>{(0,Fn.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(!vd(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:p,detectSubmit:d,insertLink:h,inputMediator:v,closestScrollSelector:y,appendOverlayTo:g,inlineSuggestions:m}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:h,isEmbedded:p,inlineSuggestions:m});let f=y&&KT(t,y)||void 0,w=this.overlayContainerFactory("deepdesk-tab-completion",r,t,{appendTo:g,closestScrollElement:f,mirrorOverflow:!0,onRemove:()=>this.unmount()}),x=this.overlayContainerFactory("deepdesk-suggestions-overlay",r,f||t,{appendTo:g});n.automaticHandlingTime&&this.setupHandlingTime(t),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(DC,{inputElement:t})})}),w),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(Yc,{})})}),x),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(iC,{})})}),this.createContainer("deepdesk-overlays")),Zr(t),this.inputMediator=v||(Rn(t)?new wn(t):new io(t)),this.inputMediator.on("change",({plainText:E})=>{this.notifyInputChanged(E)}),this.inputMediator.on("updated",({rawHtml:E})=>{E!=null&&this.syncInputHtml(E)}),this.inputMediator.on("keydown",E=>{this.notifyKeyDown(E)}),this.inputMediator.on("paste",({pastedText:E,selectionText:_})=>{this.notifyPaste(E,_)}),this.inputMediator.on("cut",({selectionText:E})=>{this.notifyCut(E)});let T;this.inputMediator.on("selection",E=>{clearTimeout(T),E===null?T=setTimeout(()=>{E!==null&&this.store.dispatch(Wm(E))},500):this.store.dispatch(Wm(E))}),this.inputMediator.on("disabled",()=>{var E;(E=this.inputMediator)==null||E.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(hi(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(hi(!0))),this.store.dispatch(W0({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var E;this.broadcastEvents.setSessionId((E=this.state.conversation.current)==null?void 0:E.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&&B.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,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(ya,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(bT,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Fn.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Sd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){WT(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(_a());let t=wi(this.state);t&&this.store.dispatch(Qs({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeSearch,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(B.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;B.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=qc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(zt()):this.store.dispatch(En(r))})}catch(r){this.handleError(r)}}};async function QT(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 XT(e,t,n={}){let r=n.replace?oo(e,n.replace.start,n.replace.end):PT(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),t.split(`
|
|
22
|
-
`).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}),r.commonAncestorContainer===e&&r.surroundContents(document.createElement("div"))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?oo(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()}})}function
|
|
21
|
+
`);break}default:break}p&&s++}return l(e),a}var io=class extends Sn{observer;getText(){let t=new Range;return t.selectNodeContents(this.element),Na(this.element,t)}getHTML(){return this.element.innerHTML||""}getSelection(){if(document.activeElement!==this.element)return null;let t=window.getSelection();if(!t||t.rangeCount===0)return null;let n=t.getRangeAt(0);return!n||!this.element.contains(n.commonAncestorContainer)?null:gd(this.element,n)}getSelectedText(){if(!this.currentSelection)return"";let{start:t,end:n}=this.currentSelection;return Na(this.element,oo(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);(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 lh=class{constructor(t){this.name=t;H.warn("BroadcastChannel is not supported")}postMessage(){}addEventListener(){}removeEventListener(){}close(){}},uh=class{constructor(t,n){this.name=t;this.options=n;this.broadcastChannel=new this.options.broadcastChannelConstructor(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()}},ch=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()}},dh=class{sessionId;deepdeskUrl;channel;defaultChannel;broadcastChannelConstructor;eventMap;isIntegration;constructor(t){this.deepdeskUrl=t.deepdeskUrl,this.broadcastChannelConstructor=t.broadcastChannelConstructor||window.BroadcastChannel||lh,this.isIntegration=t.deepdeskUrl!==(t.origin||window.location.origin),this.eventMap=t.eventMap,this.defaultChannel=this.createChannel("deepdesk-general")}setSessionId(t){this.sessionId!==t&&(this.cleanup(),H.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.isIntegration?new ch(t,this.deepdeskUrl,{debug:!0}):new uh(t,{broadcastChannelConstructor:this.broadcastChannelConstructor}),r=o=>{var i,s;o.origin===this.deepdeskUrl&&o.data.type==="event"&&(H.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;H.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)}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)}},PE=dh;var Ri=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var fh=e=>new Promise(t=>{setTimeout(t,e)});var Li=class extends Ri{name="ClientError"},ph=class extends Ri{name="ServerError"},Mn=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}async request(t,n={}){let r={isStale:!1},o=`${this.baseUrl}${t}`,i=this.fetch,{abortLatest:s=!1,attempts:a=1,retryDelay:l=500,refreshTokenOn401:u=!0,retryOnError:c=_=>_ instanceof TypeError,retryOnResponse:p=_=>_.status>=500,version:d="v1",...h}=n,v={credentials:"include",...h,headers:{"Content-Type":"application/json",...h.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(v.headers={...v.headers,"X-CSRFToken":this.csrfToken}),typeof d=="string"&&(v.headers={...v.headers,"X-Deepdesk-API-Version":d});let y=a,g=!1;if(!i)throw new Error("fetch is not set");this.latestRequestByUrl[o]&&s&&(this.latestRequestByUrl[o].isStale=!0),this.latestRequestByUrl[o]=r;let m=async()=>(y--,i(o,v).then(async _=>p(_)&&!r.isStale&&y>0?(await fh(l),m()):_.status===401&&u===!0&&g===!1?(g=!0,await this.refreshToken(),m()):_).catch(async _=>{if(c(_)&&!r.isStale&&y>0)return await fh(l),m();throw _})),f=await m(),x=await f.json().catch(()=>null);if(r.isStale)throw new Error("Aborted");if(f.status>=500)throw new ph("Server Error",x);if(f.status===401)throw new Li("Unauthorized",x);if(f.status===403)throw new Li("Forbidden",x);if(f.status===404)throw new Li("Not Found",x);if(f.status>=400)throw new Li("Bad Request",x);return delete this.latestRequestByUrl[o],x}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 _L;(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||={})})(_L||={});function hd(e){return{...re(e),tags:e.tags}}var Dn=class e{constructor(t,n={}){this.options=n;this.client=new Mn(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(),H.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 hd(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(),H.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 hd(i)}async isConversationSupported(t,n={}){H.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 hd(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=>hd(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 H.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 knowledgeSearch(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(Sy);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&H.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var Ma=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(pg(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,re(o))}catch{H.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 wL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(wL||={});var Da=class{constructor(t,n={}){this.apiUrl=t;this.client=new Mn(t,n)}client;streams={};logger=H;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 Ma(`${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 IE={startTime:null,stopTime:null},RE=j({name:"handlingTime",initialState:IE,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,()=>IE)}}),{handlingTimeStart:LE,handlingTimeStop:yd,handlingTimeReset:AE}=RE.actions,OE=RE.reducer;var NE=(e={})=>{let t={onAuthError:vi(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var mh={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var so=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 mh.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),EL=j({name:"styleSuggestions",initialState:mh,reducers:{},extraReducers:e=>{e.addCase(so.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(so.rejected,t=>{t.fetchState="error"}).addCase(so.fulfilled,(t,n)=>{t.fetchState="done",pr(t.list,n.payload)||(t.list=n.payload)}).addCase(J,()=>mh)}}),ME=EL.reducer;var DE=(e={})=>{let t,n=!0,r={getStyleSuggestions:so,debounce:500,...e};return o=>i=>s=>{var h;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(!((h=u.conversation.current)==null?void 0:h.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 CL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var FE=(e={})=>{let t={getTextSuggestions:wn,getAutocompleteSuggestions:ha,debounce:200,check:Gc,...e},n;return r=>o=>i=>{var y;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,p=(y=l.conversation.current)==null?void 0:y.id,d=i.type===Kc.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:h}}=l;return CL(h,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=ni(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var jE=so.fulfilled.toString();function bL(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 BE=e=>t=>n=>r=>{var c;if(r.type!==jE){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(c=i.conversation)==null?void 0:c.current,{agentInfo:l}=i.info;if(o===s)return;let u=bL(o,s);r.type===jE&&u.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,agentId:l.agentId??(a==null?void 0:a.agentId),agentName:l.agentName??(a==null?void 0:a.agentName),agentEmail:l.agentEmail??(a==null?void 0:a.agentEmail),data:{keywordMatches:u}})};var TL=Ou({activeSuggestion:sw,answer:Yw,auth:xw,autoflows:U1,conversation:zx,contentTypes:Mw,customMessages:Y1,exchangeToken:tE,entities:Bw,handlingTime:OE,info:O_,input:Km.reducer,overlayInput:Ge.reducer,settings:Ax,profile:e1,search:B_,summary:Ww,styleSuggestions:ME,ui:dw,textSuggestions:tw});function HE(e){return j0({reducer:TL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),NE(),FE({debounce:200}),DE({debounce:500}),BE(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var kL=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},PL=e=>t=>n=>r=>{var a;let o=t.getState(),i=jm("inlineSuggestions")(o);switch(r.type){case En.toString():{let l=X_(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 vi.toString():{!r.payload&&e.emit("logout",void 0);break}case Ft.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:kL(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0});break}case vc.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 ea.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case wc.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 Ut.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Tn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{inputText:JSON.stringify(r.payload.original),summary:r.payload.summary}});break;case it.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 Sc.toString():e.handleKeyDown(r.payload);break;case Js.toString():e.logSendMessage(r.payload);break;case xc.toString():e.logSendEditSuggestionMessage(r.payload);break;case _c.toString():e.handleInputChanged(r.payload);break;default:break}let s=n(r);switch(r.type){case Js.toString():e.handleAfterSendMessage(r.payload);break;case ya.toString():e.onUpdateShowTabHint(r.payload);break;case yd.toString():e.logHandlingTime();break;case Ft.toString():{i&&(t.dispatch(gr([])),t.dispatch(hr()));break}default:break}return s},zE=PL;function gh(e){return e.toISOString().replace("T"," ").replace("Z","")}function UE(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:gh(n),timeStop:gh(r)}}function hh(e,t,n){var C,w,b;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,pastes:c,cuts:p,deletions:d,textSuggestions:h,offeredTextSuggestions:v}}=t[e],y=r.length,m=h.reduce((I,{text:P,searchTerm:N})=>I+P.length-(N?N.length:0),0),f=u??Date.now(),x=(Date.now()-f)/1e3,_=o/x;return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:c,cuts:p,deletions:d,lenTextTyped:o,lenTextTotal:y,lenTextAssisted:m,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:x,charsPerSecond:_,numPastes:l,textSuggestionsV2:h,suggestionsCounters:[{source:"gpt",countOffered:v.filter(I=>I.source==="gpt").length}],agentId:(C=t.info.agentInfo)==null?void 0:C.agentId,agentName:(w=t.info.agentInfo)==null?void 0:w.agentName,agentEmail:(b=t.info.agentInfo)==null?void 0:b.agentEmail}}function VE(e,t){let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;return r instanceof HTMLElement?VE(r,t):null}function KE(e,t){return VE(e,t)}function WE(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function vd(e){return e instanceof HTMLElement&&(In(e)||Oc(e))}var $E=(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{H.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function IL(e){return e.offsetParent!==null}function qE(e){if(!IL(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 Sd(e,t,n=100){let r=qE(e);t({isVisible:r});let o=setInterval(()=>{let i=qE(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var ut=S(E()),GE=$E("showTabHint",!0),Fa=class e{static version="10.1.4";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}){let l=t.replace(/\/api$/,"");this.deepdeskApi=new Dn(l,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let u={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[zE({emit:(c,p,d)=>this.emit(c,p,d),handleAfterSendMessage:c=>this.handleAfterSendMessage(c),handleInputChanged:c=>this.handleInputChanged(c),handleKeyDown:c=>this.handleKeyDown(c),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:c=>this.logSendMessage(c),logSendEditSuggestionMessage:c=>this.logSendEditMessage(c),onUpdateShowTabHint:c=>GE.update(c),sendEvent:(c,p)=>this.deepdeskApi.sendEvent(c,p)})]};n&&Object.assign(u,{deepdeskBrokerAPI:new Da(n)}),this.store=HE(u),this.broadcastEvents=new PE({debug:!0,deepdeskUrl:l,eventMap:_w(this.store)}),this.store.dispatch(Ys),this.store.dispatch(ya(GE.value())),this.store.dispatch(Ys({locale:o,adminUrl:l,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?(H.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(H.warn("Profile has not been loaded (yet)"),!0):(H.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(vi(null)),this.store.dispatch(_r()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Cn(r)&&mw(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){H.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Um({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(fc(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(pc({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Vm(t))).payload}async postMessages(t){return(await this.store.dispatch(gc(t))).payload}async updateConversation(t){return(await this.store.dispatch(mc(t))).payload}resetConversation(){this.store.dispatch(J()),this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Tn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Ys(t))}setVisitorInfo(t){this.store.dispatch(A_(t))}async setAgentInfo(t){await this.store.dispatch(fa(t))}async setAgentSettings(t){await this.store.dispatch(mg(t))}async getAgentSettings(){return(await this.store.dispatch(gg())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();let t=[];return this.store.dispatch(Kc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(_c(t))}syncInputHtml(t){this.store.dispatch(e_(t))}notifyKeyDown(t){this.store.dispatch(Sc(t))}notifyPaste(t,n){this.store.dispatch(Zx({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(Qx(t))}notifyExternalSuggestion(t){this.store.dispatch(Ft(t)),this.store.dispatch(hr())}notifyEditSuggestion(t){this.store.dispatch(J_(t.contentType,t.suggestions)),this.store.dispatch(En({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(yi({collapse:!1})),this.inputMediator&&this.store.dispatch(Kx({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(gr([])))}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(Yx(yc(t))),!(t.key!=="Tab"&&!this.settings.showTextSuggestions))switch(t.key){case"Up":case"ArrowUp":if(n||!a||!i||t.shiftKey)return;this.store.dispatch(qx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return;case"Down":case"ArrowDown":{if(n||!a||!i||t.shiftKey)return;this.store.dispatch(Xx());let{selectedSuggestionIndex:u}=this.state.input;u===-1?this.store.dispatch(ea()):s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault();return}case"Esc":case"Escape":{l?(this.store.dispatch(Ec(-1)),this.store.dispatch(ea()),t.preventDefault()):n||(this.store.dispatch(yi({collapse:!0})),this.store.dispatch(uw(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:u}=this.state.input,c=u.text.substring(0,u.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(ya(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):this.settings.showTabCompletion&&p&&p.text.startsWith(c)&&(this.store.dispatch(Ft({text:p.text,suggestion:p,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(Jx()),this.store.dispatch(gr([]))}handlingTimeStart(){this.state.handlingTime.startTime||(H.info("Start handling time"),this.store.dispatch(LE()))}handlingTimeStop(){this.state.handlingTime.startTime&&(H.info("Stop handling time"),this.store.dispatch(yd()))}logSendMessage(t){let n=hh("input",this.state,{version:this.version});t&&Object.assign(n,{text:t}),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logSendEditMessage(t){let n=hh("overlayInput",this.state,{version:"v2"});t&&Object.assign(n,{text:t}),this.store.dispatch($x(this.state.overlayInput.metrics)),this.deepdeskApi.sendEvent("suggestion edited",{data:n})}logHandlingTime(){let t=UE(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(AE())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(hr()),this.store.dispatch(Js(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ft({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){H.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),H.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]=di(r,o);return i.dataset.testid=t,n!=null&&n.rootNode&&i.classList.add(n.rootNode),this.unmountHandlers.push(()=>{(0,Fn.unmountComponentAtNode)(i),s(),i.remove()}),i}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return Jr(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,n.appendChild(o),this.unmountHandlers.push(()=>{(0,Fn.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(!vd(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:p,detectSubmit:d,insertLink:h,inputMediator:v,closestScrollSelector:y,appendOverlayTo:g,inlineSuggestions:m}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:h,isEmbedded:p,inlineSuggestions:m});let f=y&&KE(t,y)||void 0,x=this.overlayContainerFactory("deepdesk-tab-completion",r,t,{appendTo:g,closestScrollElement:f,mirrorOverflow:!0,onRemove:()=>this.unmount()}),_=this.overlayContainerFactory("deepdesk-suggestions-overlay",r,f||t,{appendTo:g});n.automaticHandlingTime&&this.setupHandlingTime(t),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(Sa,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(D1,{inputElement:t})})}),x),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(Sa,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(Yc,{})})}),_),(0,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(Sa,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(i1,{})})}),this.createContainer("deepdesk-overlays")),Jr(t),this.inputMediator=v||(In(t)?new xn(t):new io(t)),this.inputMediator.on("change",({plainText:w})=>{this.notifyInputChanged(w)}),this.inputMediator.on("updated",({rawHtml:w})=>{w!=null&&this.syncInputHtml(w)}),this.inputMediator.on("keydown",w=>{this.notifyKeyDown(w)}),this.inputMediator.on("paste",({pastedText:w,selectionText:b})=>{this.notifyPaste(w,b)}),this.inputMediator.on("cut",({selectionText:w})=>{this.notifyCut(w)});let C;this.inputMediator.on("selection",w=>{clearTimeout(C),w===null?C=setTimeout(()=>{w!==null&&this.store.dispatch(Wm(w))},500):this.store.dispatch(Wm(w))}),this.inputMediator.on("disabled",()=>{var w;(w=this.inputMediator)==null||w.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(hi(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(hi(!0))),this.store.dispatch(Wx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.whenConversationLoaded(()=>{var w;this.refresh(),this.broadcastEvents.setSessionId((w=this.state.conversation.current)==null?void 0:w.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&&H.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,Fn.render)((0,ut.jsx)(Pa,{store:this.store,customStyles:r,children:(0,ut.jsx)(Sa,{broadcastEvents:this.broadcastEvents,children:(0,ut.jsx)(TE,{})})}),t),this.whenConversationLoaded(()=>{var a;this.broadcastEvents.setSessionId((a=this.state.conversation.current)==null?void 0:a.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Fn.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=Sd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){WE(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ta());let t=wi(this.state);t&&this.store.dispatch(Ys({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:t.knowledgeSearch,recommendTextSuggestions:t.recommendTextSuggestions}))}),this.loadProfileConfigPromise)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(H.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;H.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=qc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Ut()):this.store.dispatch(wn(r))})}catch(r){this.handleError(r)}}};async function XE(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 QE(e,t,n={}){let r=n.replace?oo(e,n.replace.start,n.replace.end):kE(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),t.split(`
|
|
22
|
+
`).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}),r.commonAncestorContainer===e&&r.surroundContents(document.createElement("div"))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?oo(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()}})}function YE(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function ZE(e,t,n){await new Dn(e).authenticateWithKey(t,n)}async function JE(e){let n=await new Mn(e).get("/platform/config/",{version:null});return re(n)}async function RL(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 eC(e,t){let n=await RL(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 sC(LL);})();
|
|
23
23
|
/*! Bundled license information:
|
|
24
24
|
|
|
25
25
|
classnames/index.js:
|