@deepdesk/deepdesk-sdk 11.0.0 → 11.0.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +1,31 @@
1
- "use strict";var Deepdesk=(()=>{var ub=Object.create;var Aa=Object.defineProperty;var cb=Object.getOwnPropertyDescriptor;var db=Object.getOwnPropertyNames;var pb=Object.getPrototypeOf,fb=Object.prototype.hasOwnProperty;var me=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ze=(e,t)=>{for(var n in t)Aa(e,n,{get:t[n],enumerable:!0})},uh=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of db(t))!fb.call(e,o)&&o!==n&&Aa(e,o,{get:()=>t[o],enumerable:!(r=cb(t,o))||r.enumerable});return e};var x=(e,t,n)=>(n=e!=null?ub(pb(e)):{},uh(t||!e||!e.__esModule?Aa(n,"default",{value:e,enumerable:!0}):n,e)),mb=e=>uh(Aa({},"__esModule",{value:!0}),e);var W=me((nA,Oa)=>{"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 Oa<"u"&&Oa.exports?(n.default=n,Oa.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var Na=me((rA,dh)=>{"use strict";var ch=Object.getOwnPropertySymbols,gb=Object.prototype.hasOwnProperty,hb=Object.prototype.propertyIsEnumerable;function yb(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function vb(){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}}dh.exports=vb()?Object.assign:function(e,t){for(var n,r=yb(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)gb.call(n,s)&&(r[s]=n[s]);if(ch){o=ch(n);for(var a=0;a<o.length;a++)hb.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var kh=me(V=>{"use strict";var wd=Na(),lo=60103,mh=60106;V.Fragment=60107;V.StrictMode=60108;V.Profiler=60114;var gh=60109,hh=60110,yh=60112;V.Suspense=60113;var vh=60115,Sh=60116;typeof Symbol=="function"&&Symbol.for&&(dt=Symbol.for,lo=dt("react.element"),mh=dt("react.portal"),V.Fragment=dt("react.fragment"),V.StrictMode=dt("react.strict_mode"),V.Profiler=dt("react.profiler"),gh=dt("react.provider"),hh=dt("react.context"),yh=dt("react.forward_ref"),V.Suspense=dt("react.suspense"),vh=dt("react.memo"),Sh=dt("react.lazy"));var dt,ph=typeof Symbol=="function"&&Symbol.iterator;function Sb(e){return e===null||typeof e!="object"?null:(e=ph&&e[ph]||e["@@iterator"],typeof e=="function"?e:null)}function Ri(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 xh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},wh={};function uo(e,t,n){this.props=e,this.context=t,this.refs=wh,this.updater=n||xh}uo.prototype.isReactComponent={};uo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(Ri(85));this.updater.enqueueSetState(this,e,t,"setState")};uo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _h(){}_h.prototype=uo.prototype;function _d(e,t,n){this.props=e,this.context=t,this.refs=wh,this.updater=n||xh}var Cd=_d.prototype=new _h;Cd.constructor=_d;wd(Cd,uo.prototype);Cd.isPureReactComponent=!0;var bd={current:null},Ch=Object.prototype.hasOwnProperty,bh={key:!0,ref:!0,__self:!0,__source:!0};function Eh(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)Ch.call(t,r)&&!bh.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:bd.current}}function xb(e,t){return{$$typeof:lo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ed(e){return typeof e=="object"&&e!==null&&e.$$typeof===lo}function wb(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var fh=/\/+/g;function xd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?wb(""+e.key):t.toString(36)}function Da(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 mh: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(fh,"$&/")+"/"),Da(o,t,n,"",function(u){return u})):o!=null&&(Ed(o)&&(o=xb(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(fh,"$&/")+"/")+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+=Da(i,t,n,l,o)}else if(l=Sb(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+xd(i,a++),s+=Da(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(Ri(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Ma(e,t,n){if(e==null)return e;var r=[],o=0;return Da(e,r,"","",function(i){return t.call(n,i,o++)}),r}function _b(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 Th={current:null};function sn(){var e=Th.current;if(e===null)throw Error(Ri(321));return e}var Cb={ReactCurrentDispatcher:Th,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:bd,IsSomeRendererActing:{current:!1},assign:wd};V.Children={map:Ma,forEach:function(e,t,n){Ma(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ma(e,function(){t++}),t},toArray:function(e){return Ma(e,function(t){return t})||[]},only:function(e){if(!Ed(e))throw Error(Ri(143));return e}};V.Component=uo;V.PureComponent=_d;V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cb;V.cloneElement=function(e,t,n){if(e==null)throw Error(Ri(267,e));var r=wd({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=bd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Ch.call(t,l)&&!bh.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:hh,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:gh,_context:e},e.Consumer=e};V.createElement=Eh;V.createFactory=function(e){var t=Eh.bind(null,e);return t.type=e,t};V.createRef=function(){return{current:null}};V.forwardRef=function(e){return{$$typeof:yh,render:e}};V.isValidElement=Ed;V.lazy=function(e){return{$$typeof:Sh,_payload:{_status:-1,_result:e},_init:_b}};V.memo=function(e,t){return{$$typeof:vh,type:e,compare:t===void 0?null:t}};V.useCallback=function(e,t){return sn().useCallback(e,t)};V.useContext=function(e,t){return sn().useContext(e,t)};V.useDebugValue=function(){};V.useEffect=function(e,t){return sn().useEffect(e,t)};V.useImperativeHandle=function(e,t,n){return sn().useImperativeHandle(e,t,n)};V.useLayoutEffect=function(e,t){return sn().useLayoutEffect(e,t)};V.useMemo=function(e,t){return sn().useMemo(e,t)};V.useReducer=function(e,t,n){return sn().useReducer(e,t,n)};V.useRef=function(e){return sn().useRef(e)};V.useState=function(e){return sn().useState(e)};V.version="17.0.2"});var A=me((iA,Ph)=>{"use strict";Ph.exports=kh()});var Ah=me(Li=>{"use strict";Na();var bb=A(),Ih=60103;Li.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Td=Symbol.for,Ih=Td("react.element"),Li.Fragment=Td("react.fragment"));var Td,Eb=bb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Tb=Object.prototype.hasOwnProperty,kb={key:!0,ref:!0,__self:!0,__source:!0};function Lh(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)Tb.call(t,r)&&!kb.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:Ih,type:e,key:i,ref:s,props:o,_owner:Eb.current}}Li.jsx=Lh;Li.jsxs=Lh});var _=me((lA,Oh)=>{"use strict";Oh.exports=Ah()});var iy=me(q=>{"use strict";var go,ji,Ga,Md;typeof performance=="object"&&typeof performance.now=="function"?(ey=performance,q.unstable_now=function(){return ey.now()}):(Rd=Date,ty=Rd.now(),q.unstable_now=function(){return Rd.now()-ty});var ey,Rd,ty;typeof window>"u"||typeof MessageChannel!="function"?(mo=null,Id=null,Ld=function(){if(mo!==null)try{var e=q.unstable_now();mo(!0,e),mo=null}catch(t){throw setTimeout(Ld,0),t}},go=function(e){mo!==null?setTimeout(go,0,e):(mo=e,setTimeout(Ld,0))},ji=function(e,t){Id=setTimeout(e,t)},Ga=function(){clearTimeout(Id)},q.unstable_shouldYield=function(){return!1},Md=q.unstable_forceFrameRate=function(){}):(ny=window.setTimeout,ry=window.clearTimeout,typeof console<"u"&&(oy=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 oy!="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")),Di=!1,Fi=null,$a=-1,Ad=5,Od=0,q.unstable_shouldYield=function(){return q.unstable_now()>=Od},Md=function(){},q.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"):Ad=0<e?Math.floor(1e3/e):5},Nd=new MessageChannel,Wa=Nd.port2,Nd.port1.onmessage=function(){if(Fi!==null){var e=q.unstable_now();Od=e+Ad;try{Fi(!0,e)?Wa.postMessage(null):(Di=!1,Fi=null)}catch(t){throw Wa.postMessage(null),t}}else Di=!1},go=function(e){Fi=e,Di||(Di=!0,Wa.postMessage(null))},ji=function(e,t){$a=ny(function(){e(q.unstable_now())},t)},Ga=function(){ry($a),$a=-1});var mo,Id,Ld,ny,ry,oy,Di,Fi,$a,Ad,Od,Nd,Wa;function Dd(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<qa(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Rt(e){return e=e[0],e===void 0?null:e}function Xa(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>qa(s,n))l!==void 0&&0>qa(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>qa(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function qa(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var Vt=[],jn=[],Vb=1,mt=null,Ae=3,Qa=!1,Tr=!1,Hi=!1;function Fd(e){for(var t=Rt(jn);t!==null;){if(t.callback===null)Xa(jn);else if(t.startTime<=e)Xa(jn),t.sortIndex=t.expirationTime,Dd(Vt,t);else break;t=Rt(jn)}}function jd(e){if(Hi=!1,Fd(e),!Tr)if(Rt(Vt)!==null)Tr=!0,go(Hd);else{var t=Rt(jn);t!==null&&ji(jd,t.startTime-e)}}function Hd(e,t){Tr=!1,Hi&&(Hi=!1,Ga()),Qa=!0;var n=Ae;try{for(Fd(t),mt=Rt(Vt);mt!==null&&(!(mt.expirationTime>t)||e&&!q.unstable_shouldYield());){var r=mt.callback;if(typeof r=="function"){mt.callback=null,Ae=mt.priorityLevel;var o=r(mt.expirationTime<=t);t=q.unstable_now(),typeof o=="function"?mt.callback=o:mt===Rt(Vt)&&Xa(Vt),Fd(t)}else Xa(Vt);mt=Rt(Vt)}if(mt!==null)var i=!0;else{var s=Rt(jn);s!==null&&ji(jd,s.startTime-t),i=!1}return i}finally{mt=null,Ae=n,Qa=!1}}var $b=Md;q.unstable_IdlePriority=5;q.unstable_ImmediatePriority=1;q.unstable_LowPriority=4;q.unstable_NormalPriority=3;q.unstable_Profiling=null;q.unstable_UserBlockingPriority=2;q.unstable_cancelCallback=function(e){e.callback=null};q.unstable_continueExecution=function(){Tr||Qa||(Tr=!0,go(Hd))};q.unstable_getCurrentPriorityLevel=function(){return Ae};q.unstable_getFirstCallbackNode=function(){return Rt(Vt)};q.unstable_next=function(e){switch(Ae){case 1:case 2:case 3:var t=3;break;default:t=Ae}var n=Ae;Ae=t;try{return e()}finally{Ae=n}};q.unstable_pauseExecution=function(){};q.unstable_requestPaint=$b;q.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ae;Ae=e;try{return t()}finally{Ae=n}};q.unstable_scheduleCallback=function(e,t,n){var r=q.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:Vb++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Dd(jn,e),Rt(Vt)===null&&e===Rt(jn)&&(Hi?Ga():Hi=!0,ji(jd,n-r))):(e.sortIndex=o,Dd(Vt,e),Tr||Qa||(Tr=!0,go(Hd))),e};q.unstable_wrapCallback=function(e){var t=Ae;return function(){var n=Ae;Ae=t;try{return e.apply(this,arguments)}finally{Ae=n}}}});var ay=me((RO,sy)=>{"use strict";sy.exports=iy()});var qS=me(xt=>{"use strict";var Kl=A(),le=Na(),Ee=ay();function T(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!Kl)throw Error(T(227));var xv=new Set,gs={};function Fr(e,t){Do(e,t),Do(e+"Capture",t)}function Do(e,t){for(gs[e]=t,e=0;e<t.length;e++)xv.add(t[e])}var gn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wb=/^[: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]*$/,ly=Object.prototype.hasOwnProperty,uy={},cy={};function qb(e){return ly.call(cy,e)?!0:ly.call(uy,e)?!1:Wb.test(e)?cy[e]=!0:(uy[e]=!0,!1)}function Gb(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 Xb(e,t,n,r){if(t===null||typeof t>"u"||Gb(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 Ke(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 Re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Re[e]=new Ke(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Re[t]=new Ke(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Re[e]=new Ke(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Re[e]=new Ke(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){Re[e]=new Ke(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Re[e]=new Ke(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Re[e]=new Ke(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Re[e]=new Ke(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Re[e]=new Ke(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gp=/[\-:]([a-z])/g;function Xp(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(Gp,Xp);Re[t]=new Ke(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(Gp,Xp);Re[t]=new Ke(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(Gp,Xp);Re[t]=new Ke(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Re[e]=new Ke(e,1,!1,e.toLowerCase(),null,!1,!1)});Re.xlinkHref=new Ke("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Re[e]=new Ke(e,1,!1,e.toLowerCase(),null,!0,!0)});function Qp(e,t,n,r){var o=Re.hasOwnProperty(t)?Re[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||(Xb(t,n,o,r)&&(n=null),r||o===null?qb(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var jr=Kl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Zi=60103,Pr=60106,Bn=60107,Yp=60108,rs=60114,Zp=60109,Jp=60110,Vl=60112,os=60113,xl=60120,$l=60115,ef=60116,tf=60121,nf=60128,wv=60129,rf=60130,lp=60131;typeof Symbol=="function"&&Symbol.for&&(Se=Symbol.for,Zi=Se("react.element"),Pr=Se("react.portal"),Bn=Se("react.fragment"),Yp=Se("react.strict_mode"),rs=Se("react.profiler"),Zp=Se("react.provider"),Jp=Se("react.context"),Vl=Se("react.forward_ref"),os=Se("react.suspense"),xl=Se("react.suspense_list"),$l=Se("react.memo"),ef=Se("react.lazy"),tf=Se("react.block"),Se("react.scope"),nf=Se("react.opaque.id"),wv=Se("react.debug_trace_mode"),rf=Se("react.offscreen"),lp=Se("react.legacy_hidden"));var Se,dy=typeof Symbol=="function"&&Symbol.iterator;function Bi(e){return e===null||typeof e!="object"?null:(e=dy&&e[dy]||e["@@iterator"],typeof e=="function"?e:null)}var Bd;function Ji(e){if(Bd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bd=t&&t[1]||""}return`
2
- `+Bd+e}var zd=!1;function Ya(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(`
1
+ "use strict";var Deepdesk=(()=>{var nk=Object.create;var bl=Object.defineProperty;var rk=Object.getOwnPropertyDescriptor;var ok=Object.getOwnPropertyNames;var ik=Object.getPrototypeOf,sk=Object.prototype.hasOwnProperty;var be=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Je=(e,t)=>{for(var n in t)bl(e,n,{get:t[n],enumerable:!0})},Ny=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ok(t))!sk.call(e,o)&&o!==n&&bl(e,o,{get:()=>t[o],enumerable:!(r=rk(t,o))||r.enumerable});return e};var w=(e,t,n)=>(n=e!=null?nk(ik(e)):{},Ny(t||!e||!e.__esModule?bl(n,"default",{value:e,enumerable:!0}):n,e)),ak=e=>Ny(bl({},"__esModule",{value:!0}),e);var ee=be((GM,Tl)=>{"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 Tl<"u"&&Tl.exports?(n.default=n,Tl.exports=n):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return n}):window.classNames=n})()});var kl=be((YM,_y)=>{"use strict";var My=Object.getOwnPropertySymbols,lk=Object.prototype.hasOwnProperty,uk=Object.prototype.propertyIsEnumerable;function ck(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function dk(){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}}_y.exports=dk()?Object.assign:function(e,t){for(var n,r=ck(e),o,i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var s in n)lk.call(n,s)&&(r[s]=n[s]);if(My){o=My(n);for(var a=0;a<o.length;a++)uk.call(n,o[a])&&(r[o[a]]=n[o[a]])}}return r}});var Qy=be(Q=>{"use strict";var wf=kl(),Xo=60103,Hy=60106;Q.Fragment=60107;Q.StrictMode=60108;Q.Profiler=60114;var Uy=60109,jy=60110,zy=60112;Q.Suspense=60113;var By=60115,Vy=60116;typeof Symbol=="function"&&Symbol.for&&(Lt=Symbol.for,Xo=Lt("react.element"),Hy=Lt("react.portal"),Q.Fragment=Lt("react.fragment"),Q.StrictMode=Lt("react.strict_mode"),Q.Profiler=Lt("react.profiler"),Uy=Lt("react.provider"),jy=Lt("react.context"),zy=Lt("react.forward_ref"),Q.Suspense=Lt("react.suspense"),By=Lt("react.memo"),Vy=Lt("react.lazy"));var Lt,Dy=typeof Symbol=="function"&&Symbol.iterator;function fk(e){return e===null||typeof e!="object"?null:(e=Dy&&e[Dy]||e["@@iterator"],typeof e=="function"?e:null)}function ms(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 Ky={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$y={};function Qo(e,t,n){this.props=e,this.context=t,this.refs=$y,this.updater=n||Ky}Qo.prototype.isReactComponent={};Qo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error(ms(85));this.updater.enqueueSetState(this,e,t,"setState")};Qo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wy(){}Wy.prototype=Qo.prototype;function xf(e,t,n){this.props=e,this.context=t,this.refs=$y,this.updater=n||Ky}var Ef=xf.prototype=new Wy;Ef.constructor=xf;wf(Ef,Qo.prototype);Ef.isPureReactComponent=!0;var Cf={current:null},qy=Object.prototype.hasOwnProperty,Gy={key:!0,ref:!0,__self:!0,__source:!0};function Yy(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)qy.call(t,r)&&!Gy.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:Xo,type:e,key:i,ref:s,props:o,_owner:Cf.current}}function pk(e,t){return{$$typeof:Xo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function bf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xo}function mk(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fy=/\/+/g;function Sf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?mk(""+e.key):t.toString(36)}function Rl(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 Xo:case Hy:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+Sf(s,0):r,Array.isArray(o)?(n="",e!=null&&(n=e.replace(Fy,"$&/")+"/"),Rl(o,t,n,"",function(u){return u})):o!=null&&(bf(o)&&(o=pk(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Fy,"$&/")+"/")+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+Sf(i,a);s+=Rl(i,t,n,l,o)}else if(l=fk(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Sf(i,a++),s+=Rl(i,t,n,l,o);else if(i==="object")throw t=""+e,Error(ms(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t));return s}function Pl(e,t,n){if(e==null)return e;var r=[],o=0;return Rl(e,r,"","",function(i){return t.call(n,i,o++)}),r}function gk(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 Xy={current:null};function In(){var e=Xy.current;if(e===null)throw Error(ms(321));return e}var hk={ReactCurrentDispatcher:Xy,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:Cf,IsSomeRendererActing:{current:!1},assign:wf};Q.Children={map:Pl,forEach:function(e,t,n){Pl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Pl(e,function(){t++}),t},toArray:function(e){return Pl(e,function(t){return t})||[]},only:function(e){if(!bf(e))throw Error(ms(143));return e}};Q.Component=Qo;Q.PureComponent=xf;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hk;Q.cloneElement=function(e,t,n){if(e==null)throw Error(ms(267,e));var r=wf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Cf.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)qy.call(t,l)&&!Gy.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:Xo,type:e.type,key:o,ref:i,props:r,_owner:s}};Q.createContext=function(e,t){return t===void 0&&(t=null),e={$$typeof:jy,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider={$$typeof:Uy,_context:e},e.Consumer=e};Q.createElement=Yy;Q.createFactory=function(e){var t=Yy.bind(null,e);return t.type=e,t};Q.createRef=function(){return{current:null}};Q.forwardRef=function(e){return{$$typeof:zy,render:e}};Q.isValidElement=bf;Q.lazy=function(e){return{$$typeof:Vy,_payload:{_status:-1,_result:e},_init:gk}};Q.memo=function(e,t){return{$$typeof:By,type:e,compare:t===void 0?null:t}};Q.useCallback=function(e,t){return In().useCallback(e,t)};Q.useContext=function(e,t){return In().useContext(e,t)};Q.useDebugValue=function(){};Q.useEffect=function(e,t){return In().useEffect(e,t)};Q.useImperativeHandle=function(e,t,n){return In().useImperativeHandle(e,t,n)};Q.useLayoutEffect=function(e,t){return In().useLayoutEffect(e,t)};Q.useMemo=function(e,t){return In().useMemo(e,t)};Q.useReducer=function(e,t,n){return In().useReducer(e,t,n)};Q.useRef=function(e){return In().useRef(e)};Q.useState=function(e){return In().useState(e)};Q.version="17.0.2"});var F=be((QM,Zy)=>{"use strict";Zy.exports=Qy()});var rv=be(hs=>{"use strict";kl();var vk=F(),tv=60103;hs.Fragment=60107;typeof Symbol=="function"&&Symbol.for&&(Tf=Symbol.for,tv=Tf("react.element"),hs.Fragment=Tf("react.fragment"));var Tf,Sk=vk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,wk=Object.prototype.hasOwnProperty,xk={key:!0,ref:!0,__self:!0,__source:!0};function nv(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)wk.call(t,r)&&!xk.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:tv,type:e,key:i,ref:s,props:o,_owner:Sk.current}}hs.jsx=nv;hs.jsxs=nv});var b=be((t_,ov)=>{"use strict";ov.exports=rv()});var Av=be(te=>{"use strict";var ti,ws,zl,_f;typeof performance=="object"&&typeof performance.now=="function"?(bv=performance,te.unstable_now=function(){return bv.now()}):(Af=Date,Tv=Af.now(),te.unstable_now=function(){return Af.now()-Tv});var bv,Af,Tv;typeof window>"u"||typeof MessageChannel!="function"?(ei=null,If=null,Lf=function(){if(ei!==null)try{var e=te.unstable_now();ei(!0,e),ei=null}catch(t){throw setTimeout(Lf,0),t}},ti=function(e){ei!==null?setTimeout(ti,0,e):(ei=e,setTimeout(Lf,0))},ws=function(e,t){If=setTimeout(e,t)},zl=function(){clearTimeout(If)},te.unstable_shouldYield=function(){return!1},_f=te.unstable_forceFrameRate=function(){}):(kv=window.setTimeout,Pv=window.clearTimeout,typeof console<"u"&&(Rv=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 Rv!="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")),vs=!1,Ss=null,Hl=-1,Of=5,Nf=0,te.unstable_shouldYield=function(){return te.unstable_now()>=Nf},_f=function(){},te.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Of=0<e?Math.floor(1e3/e):5},Mf=new MessageChannel,Ul=Mf.port2,Mf.port1.onmessage=function(){if(Ss!==null){var e=te.unstable_now();Nf=e+Of;try{Ss(!0,e)?Ul.postMessage(null):(vs=!1,Ss=null)}catch(t){throw Ul.postMessage(null),t}}else vs=!1},ti=function(e){Ss=e,vs||(vs=!0,Ul.postMessage(null))},ws=function(e,t){Hl=kv(function(){e(te.unstable_now())},t)},zl=function(){Pv(Hl),Hl=-1});var ei,If,Lf,kv,Pv,Rv,vs,Ss,Hl,Of,Nf,Mf,Ul;function Df(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(o!==void 0&&0<jl(o,t))e[r]=t,e[n]=o,n=r;else break e}}function Yt(e){return e=e[0],e===void 0?null:e}function Bl(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>jl(s,n))l!==void 0&&0>jl(l,s)?(e[r]=l,e[a]=n,r=a):(e[r]=s,e[i]=n,r=i);else if(l!==void 0&&0>jl(l,n))e[r]=l,e[a]=n,r=a;else break e}}return t}return null}function jl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var mn=[],cr=[],Wk=1,Nt=null,Ke=3,Vl=!1,so=!1,xs=!1;function Ff(e){for(var t=Yt(cr);t!==null;){if(t.callback===null)Bl(cr);else if(t.startTime<=e)Bl(cr),t.sortIndex=t.expirationTime,Df(mn,t);else break;t=Yt(cr)}}function Hf(e){if(xs=!1,Ff(e),!so)if(Yt(mn)!==null)so=!0,ti(Uf);else{var t=Yt(cr);t!==null&&ws(Hf,t.startTime-e)}}function Uf(e,t){so=!1,xs&&(xs=!1,zl()),Vl=!0;var n=Ke;try{for(Ff(t),Nt=Yt(mn);Nt!==null&&(!(Nt.expirationTime>t)||e&&!te.unstable_shouldYield());){var r=Nt.callback;if(typeof r=="function"){Nt.callback=null,Ke=Nt.priorityLevel;var o=r(Nt.expirationTime<=t);t=te.unstable_now(),typeof o=="function"?Nt.callback=o:Nt===Yt(mn)&&Bl(mn),Ff(t)}else Bl(mn);Nt=Yt(mn)}if(Nt!==null)var i=!0;else{var s=Yt(cr);s!==null&&ws(Hf,s.startTime-t),i=!1}return i}finally{Nt=null,Ke=n,Vl=!1}}var qk=_f;te.unstable_IdlePriority=5;te.unstable_ImmediatePriority=1;te.unstable_LowPriority=4;te.unstable_NormalPriority=3;te.unstable_Profiling=null;te.unstable_UserBlockingPriority=2;te.unstable_cancelCallback=function(e){e.callback=null};te.unstable_continueExecution=function(){so||Vl||(so=!0,ti(Uf))};te.unstable_getCurrentPriorityLevel=function(){return Ke};te.unstable_getFirstCallbackNode=function(){return Yt(mn)};te.unstable_next=function(e){switch(Ke){case 1:case 2:case 3:var t=3;break;default:t=Ke}var n=Ke;Ke=t;try{return e()}finally{Ke=n}};te.unstable_pauseExecution=function(){};te.unstable_requestPaint=qk;te.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ke;Ke=e;try{return t()}finally{Ke=n}};te.unstable_scheduleCallback=function(e,t,n){var r=te.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:Wk++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,Df(cr,e),Yt(mn)===null&&e===Yt(cr)&&(xs?zl():xs=!0,ws(Hf,n-r))):(e.sortIndex=o,Df(mn,e),so||Vl||(so=!0,ti(Uf))),e};te.unstable_wrapCallback=function(e){var t=Ke;return function(){var n=Ke;Ke=t;try{return e.apply(this,arguments)}finally{Ke=n}}}});var Lv=be((G_,Iv)=>{"use strict";Iv.exports=Av()});var yw=be(Ut=>{"use strict";var Du=F(),ve=kl(),Me=Lv();function P(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(P(227));var KS=new Set,Qs={};function vo(e,t){Ei(e,t),Ei(e+"Capture",t)}function Ei(e,t){for(Qs[e]=t,e=0;e<t.length;e++)KS.add(t[e])}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gk=/^[: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]*$/,Ov=Object.prototype.hasOwnProperty,Nv={},Mv={};function Yk(e){return Ov.call(Mv,e)?!0:Ov.call(Nv,e)?!1:Gk.test(e)?Mv[e]=!0:(Nv[e]=!0,!1)}function Xk(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 Qk(e,t,n,r){if(t===null||typeof t>"u"||Xk(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 tt(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 He={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){He[e]=new tt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];He[t]=new tt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){He[e]=new tt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){He[e]=new tt(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){He[e]=new tt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){He[e]=new tt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){He[e]=new tt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){He[e]=new tt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){He[e]=new tt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Gp=/[\-:]([a-z])/g;function Yp(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(Gp,Yp);He[t]=new tt(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(Gp,Yp);He[t]=new tt(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(Gp,Yp);He[t]=new tt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){He[e]=new tt(e,1,!1,e.toLowerCase(),null,!1,!1)});He.xlinkHref=new tt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){He[e]=new tt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xp(e,t,n,r){var o=He.hasOwnProperty(t)?He[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||(Qk(t,n,o,r)&&(n=null),r||o===null?Yk(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 So=Du.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ms=60103,lo=60106,fr=60107,Qp=60108,Us=60114,Zp=60109,Jp=60110,Fu=60112,js=60113,pu=60120,Hu=60115,em=60116,tm=60121,nm=60128,$S=60129,rm=60130,lp=60131;typeof Symbol=="function"&&Symbol.for&&(Pe=Symbol.for,Ms=Pe("react.element"),lo=Pe("react.portal"),fr=Pe("react.fragment"),Qp=Pe("react.strict_mode"),Us=Pe("react.profiler"),Zp=Pe("react.provider"),Jp=Pe("react.context"),Fu=Pe("react.forward_ref"),js=Pe("react.suspense"),pu=Pe("react.suspense_list"),Hu=Pe("react.memo"),em=Pe("react.lazy"),tm=Pe("react.block"),Pe("react.scope"),nm=Pe("react.opaque.id"),$S=Pe("react.debug_trace_mode"),rm=Pe("react.offscreen"),lp=Pe("react.legacy_hidden"));var Pe,_v=typeof Symbol=="function"&&Symbol.iterator;function Es(e){return e===null||typeof e!="object"?null:(e=_v&&e[_v]||e["@@iterator"],typeof e=="function"?e:null)}var jf;function _s(e){if(jf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);jf=t&&t[1]||""}return`
2
+ `+jf+e}var zf=!1;function Kl(e,t){if(!e||zf)return"";zf=!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:"")?Ji(e):""}function Qb(e){switch(e.tag){case 5:return Ji(e.type);case 16:return Ji("Lazy");case 13:return Ji("Suspense");case 19:return Ji("SuspenseList");case 0:case 2:case 15:return e=Ya(e.type,!1),e;case 11:return e=Ya(e.type.render,!1),e;case 22:return e=Ya(e.type._render,!1),e;case 1:return e=Ya(e.type,!0),e;default:return""}}function To(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 Bn:return"Fragment";case Pr:return"Portal";case rs:return"Profiler";case Yp:return"StrictMode";case os:return"Suspense";case xl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jp:return(e.displayName||"Context")+".Consumer";case Zp:return(e._context.displayName||"Context")+".Provider";case Vl:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case $l:return To(e.type);case tf:return To(e._render);case ef:t=e._payload,e=e._init;try{return To(e(t))}catch{}}return null}function Zn(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function _v(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yb(e){var t=_v(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 Za(e){e._valueTracker||(e._valueTracker=Yb(e))}function Cv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=_v(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function wl(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 up(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function py(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Zn(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 bv(e,t){t=t.checked,t!=null&&Qp(e,"checked",t,!1)}function cp(e,t){bv(e,t);var n=Zn(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")?dp(e,t.type,n):t.hasOwnProperty("defaultValue")&&dp(e,t.type,Zn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fy(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 dp(e,t,n){(t!=="number"||wl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Zb(e){var t="";return Kl.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function pp(e,t){return e=le({children:void 0},t),(t=Zb(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=""+Zn(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 fp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function my(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:Zn(n)}}function Ev(e,t){var n=Zn(t.value),r=Zn(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 gy(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var mp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Tv(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 gp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Tv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ja,kv=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!==mp.svg||"innerHTML"in e)e.innerHTML=t;else{for(Ja=Ja||document.createElement("div"),Ja.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ja.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var is={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},Jb=["Webkit","ms","Moz","O"];Object.keys(is).forEach(function(e){Jb.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),is[t]=is[e]})});function Pv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||is.hasOwnProperty(e)&&is[e]?(""+t).trim():t+"px"}function Rv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Pv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var eE=le({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 hp(e,t){if(t){if(eE[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 yp(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 of(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vp=null,Po=null,Ro=null;function hy(e){if(e=Is(e)){if(typeof vp!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Yl(t),vp(e.stateNode,e.type,t))}}function Iv(e){Po?Ro?Ro.push(e):Ro=[e]:Po=e}function Lv(){if(Po){var e=Po,t=Ro;if(Ro=Po=null,hy(e),t)for(e=0;e<t.length;e++)hy(t[e])}}function sf(e,t){return e(t)}function Av(e,t,n,r,o){return e(t,n,r,o)}function af(){}var Ov=sf,Rr=!1,Ud=!1;function lf(){(Po!==null||Ro!==null)&&(af(),Lv())}function tE(e,t,n){if(Ud)return e(t,n);Ud=!0;try{return Ov(e,t,n)}finally{Ud=!1,lf()}}function ys(e,t){var n=e.stateNode;if(n===null)return null;var r=Yl(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 Sp=!1;if(gn)try{ho={},Object.defineProperty(ho,"passive",{get:function(){Sp=!0}}),window.addEventListener("test",ho,ho),window.removeEventListener("test",ho,ho)}catch{Sp=!1}var ho;function nE(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 ss=!1,_l=null,Cl=!1,xp=null,rE={onError:function(e){ss=!0,_l=e}};function oE(e,t,n,r,o,i,s,a,l){ss=!1,_l=null,nE.apply(rE,arguments)}function iE(e,t,n,r,o,i,s,a,l){if(oE.apply(this,arguments),ss){if(ss){var u=_l;ss=!1,_l=null}else throw Error(T(198));Cl||(Cl=!0,xp=u)}}function Hr(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 Nv(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 yy(e){if(Hr(e)!==e)throw Error(T(188))}function sE(e){var t=e.alternate;if(!t){if(t=Hr(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 yy(o),e;if(i===r)return yy(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 Mv(e){if(e=sE(e),!e)return null;for(var t=e;;){if(t.tag===5||t.tag===6)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function vy(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var Dv,uf,Fv,jv,wp=!1,$t=[],Vn=null,$n=null,Wn=null,vs=new Map,Ss=new Map,zi=[],Sy="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 _p(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function xy(e,t){switch(e){case"focusin":case"focusout":Vn=null;break;case"dragenter":case"dragleave":$n=null;break;case"mouseover":case"mouseout":Wn=null;break;case"pointerover":case"pointerout":vs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ss.delete(t.pointerId)}}function Ui(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=_p(t,n,r,o,i),t!==null&&(t=Is(t),t!==null&&uf(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function aE(e,t,n,r,o){switch(t){case"focusin":return Vn=Ui(Vn,e,t,n,r,o),!0;case"dragenter":return $n=Ui($n,e,t,n,r,o),!0;case"mouseover":return Wn=Ui(Wn,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return vs.set(i,Ui(vs.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ss.set(i,Ui(Ss.get(i)||null,e,t,n,r,o)),!0}return!1}function lE(e){var t=Ir(e.target);if(t!==null){var n=Hr(t);if(n!==null){if(t=n.tag,t===13){if(t=Nv(n),t!==null){e.blockedOn=t,jv(e.lanePriority,function(){Ee.unstable_runWithPriority(e.priority,function(){Fv(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ff(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=Is(n),t!==null&&uf(t),e.blockedOn=n,!1;t.shift()}return!0}function wy(e,t,n){cl(e)&&n.delete(t)}function uE(){for(wp=!1;0<$t.length;){var e=$t[0];if(e.blockedOn!==null){e=Is(e.blockedOn),e!==null&&Dv(e);break}for(var t=e.targetContainers;0<t.length;){var n=ff(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&$t.shift()}Vn!==null&&cl(Vn)&&(Vn=null),$n!==null&&cl($n)&&($n=null),Wn!==null&&cl(Wn)&&(Wn=null),vs.forEach(wy),Ss.forEach(wy)}function Ki(e,t){e.blockedOn===t&&(e.blockedOn=null,wp||(wp=!0,Ee.unstable_scheduleCallback(Ee.unstable_NormalPriority,uE)))}function Hv(e){function t(o){return Ki(o,e)}if(0<$t.length){Ki($t[0],e);for(var n=1;n<$t.length;n++){var r=$t[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Vn!==null&&Ki(Vn,e),$n!==null&&Ki($n,e),Wn!==null&&Ki(Wn,e),vs.forEach(t),Ss.forEach(t),n=0;n<zi.length;n++)r=zi[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<zi.length&&(n=zi[0],n.blockedOn===null);)lE(n),n.blockedOn===null&&zi.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")},Kd={},Bv={};gn&&(Bv=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 Wl(e){if(Kd[e])return Kd[e];if(!xo[e])return e;var t=xo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Bv)return Kd[e]=t[n];return e}var zv=Wl("animationend"),Uv=Wl("animationiteration"),Kv=Wl("animationstart"),Vv=Wl("transitionend"),$v=new Map,cf=new Map,cE=["abort","abort",zv,"animationEnd",Uv,"animationIteration",Kv,"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",Vv,"transitionEnd","waiting","waiting"];function df(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)),cf.set(r,t),$v.set(r,o),Fr(o,[r])}}var dE=Ee.unstable_now;dE();var oe=8;function vo(e){if(1&e)return oe=15,1;if(2&e)return oe=14,2;if(4&e)return oe=13,4;var t=24&e;return t!==0?(oe=12,t):e&32?(oe=11,32):(t=192&e,t!==0?(oe=10,t):e&256?(oe=9,256):(t=3584&e,t!==0?(oe=8,t):e&4096?(oe=7,4096):(t=4186112&e,t!==0?(oe=6,t):(t=62914560&e,t!==0?(oe=5,t):e&67108864?(oe=4,67108864):e&134217728?(oe=3,134217728):(t=805306368&e,t!==0?(oe=2,t):1073741824&e?(oe=1,1073741824):(oe=8,e))))))}function pE(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 fE(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 xs(e,t){var n=e.pendingLanes;if(n===0)return oe=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=oe=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=vo(l),o=oe):(a&=i,a!==0&&(r=vo(a),o=oe))}else i=n&~s,i!==0?(r=vo(i),o=oe):a!==0&&(r=vo(a),o=oe);if(r===0)return 0;if(r=31-Jn(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(vo(t),o<=oe)return t;oe=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Jn(t),o=1<<n,r|=e[n],t&=~o;return r}function Wv(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bl(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=So(24&~t),e===0?bl(10,t):e;case 10:return e=So(192&~t),e===0?bl(8,t):e;case 8:return e=So(3584&~t),e===0&&(e=So(4186112&~t),e===0&&(e=512)),e;case 2:return t=So(805306368&~t),t===0&&(t=268435456),t}throw Error(T(358,e))}function So(e){return e&-e}function Vd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ql(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-Jn(t),e[t]=n}var Jn=Math.clz32?Math.clz32:hE,mE=Math.log,gE=Math.LN2;function hE(e){return e===0?32:31-(mE(e)/gE|0)|0}var yE=Ee.unstable_UserBlockingPriority,vE=Ee.unstable_runWithPriority,dl=!0;function SE(e,t,n,r){Rr||af();var o=pf,i=Rr;Rr=!0;try{Av(o,e,t,n,r)}finally{(Rr=i)||lf()}}function xE(e,t,n,r){vE(yE,pf.bind(null,e,t,n,r))}function pf(e,t,n,r){if(dl){var o;if((o=(t&4)===0)&&0<$t.length&&-1<Sy.indexOf(e))e=_p(null,e,t,n,r),$t.push(e);else{var i=ff(e,t,n,r);if(i===null)o&&xy(e,r);else{if(o){if(-1<Sy.indexOf(e)){e=_p(i,e,t,n,r),$t.push(e);return}if(aE(i,e,t,n,r))return;xy(e,r)}iS(e,t,r,null,n)}}}}function ff(e,t,n,r){var o=of(r);if(o=Ir(o),o!==null){var i=Hr(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=Nv(i),o!==null)return o;o=null}else if(s===3){if(i.stateNode.hydrate)return i.tag===3?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return iS(e,t,r,o,n),null}var zn=null,mf=null,pl=null;function qv(){if(pl)return pl;var e,t=mf,n=t.length,r,o="value"in zn?zn.value:zn.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 pl=o.slice(e,1<r?1-r:void 0)}function fl(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 tl(){return!0}function _y(){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)?tl:_y,this.isPropagationStopped=_y,this}return le(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=tl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=tl)},persist:function(){},isPersistent:tl}),t}var Bo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gf=nt(Bo),Rs=le({},Bo,{view:0,detail:0}),wE=nt(Rs),$d,Wd,Vi,Gl=le({},Rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hf,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!==Vi&&(Vi&&e.type==="mousemove"?($d=e.screenX-Vi.screenX,Wd=e.screenY-Vi.screenY):Wd=$d=0,Vi=e),$d)},movementY:function(e){return"movementY"in e?e.movementY:Wd}}),Cy=nt(Gl),_E=le({},Gl,{dataTransfer:0}),CE=nt(_E),bE=le({},Rs,{relatedTarget:0}),qd=nt(bE),EE=le({},Bo,{animationName:0,elapsedTime:0,pseudoElement:0}),TE=nt(EE),kE=le({},Bo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),PE=nt(kE),RE=le({},Bo,{data:0}),by=nt(RE),IE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},LE={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"},AE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function OE(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=AE[e])?!!t[e]:!1}function hf(){return OE}var NE=le({},Rs,{key:function(e){if(e.key){var t=IE[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?LE[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hf,charCode:function(e){return e.type==="keypress"?fl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ME=nt(NE),DE=le({},Gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ey=nt(DE),FE=le({},Rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hf}),jE=nt(FE),HE=le({},Bo,{propertyName:0,elapsedTime:0,pseudoElement:0}),BE=nt(HE),zE=le({},Gl,{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}),UE=nt(zE),KE=[9,13,27,32],yf=gn&&"CompositionEvent"in window,as=null;gn&&"documentMode"in document&&(as=document.documentMode);var VE=gn&&"TextEvent"in window&&!as,Gv=gn&&(!yf||as&&8<as&&11>=as),Ty=String.fromCharCode(32),ky=!1;function Xv(e,t){switch(e){case"keyup":return KE.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wo=!1;function $E(e,t){switch(e){case"compositionend":return Qv(t);case"keypress":return t.which!==32?null:(ky=!0,Ty);case"textInput":return e=t.data,e===Ty&&ky?null:e;default:return null}}function WE(e,t){if(wo)return e==="compositionend"||!yf&&Xv(e,t)?(e=qv(),pl=mf=zn=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 Gv&&t.locale!=="ko"?null:t.data;default:return null}}var qE={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 Py(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!qE[e.type]:t==="textarea"}function Yv(e,t,n,r){Iv(r),t=El(t,"onChange"),0<t.length&&(n=new gf("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ls=null,ws=null;function GE(e){nS(e,0)}function Xl(e){var t=Co(e);if(Cv(t))return e}function XE(e,t){if(e==="change")return t}var Zv=!1;gn&&(gn?(rl="oninput"in document,rl||(Gd=document.createElement("div"),Gd.setAttribute("oninput","return;"),rl=typeof Gd.oninput=="function"),nl=rl):nl=!1,Zv=nl&&(!document.documentMode||9<document.documentMode));var nl,rl,Gd;function Ry(){ls&&(ls.detachEvent("onpropertychange",Jv),ws=ls=null)}function Jv(e){if(e.propertyName==="value"&&Xl(ws)){var t=[];if(Yv(t,ws,e,of(e)),e=GE,Rr)e(t);else{Rr=!0;try{sf(e,t)}finally{Rr=!1,lf()}}}}function QE(e,t,n){e==="focusin"?(Ry(),ls=t,ws=n,ls.attachEvent("onpropertychange",Jv)):e==="focusout"&&Ry()}function YE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xl(ws)}function ZE(e,t){if(e==="click")return Xl(t)}function JE(e,t){if(e==="input"||e==="change")return Xl(t)}function eT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:eT,tT=Object.prototype.hasOwnProperty;function _s(e,t){if(gt(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(!tT.call(t,n[r])||!gt(e[n[r]],t[n[r]]))return!1;return!0}function Iy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ly(e,t){var n=Iy(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=Iy(n)}}function eS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?eS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ay(){for(var e=window,t=wl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=wl(e.document)}return t}function Cp(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 nT=gn&&"documentMode"in document&&11>=document.documentMode,_o=null,bp=null,us=null,Ep=!1;function Oy(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ep||_o==null||_o!==wl(r)||(r=_o,"selectionStart"in r&&Cp(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}),us&&_s(us,r)||(us=r,r=El(bp,"onSelect"),0<r.length&&(t=new gf("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_o)))}df("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);df("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);df(cE,2);for(Xd="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),ol=0;ol<Xd.length;ol++)cf.set(Xd[ol],0);var Xd,ol;Do("onMouseEnter",["mouseout","mouseover"]);Do("onMouseLeave",["mouseout","mouseover"]);Do("onPointerEnter",["pointerout","pointerover"]);Do("onPointerLeave",["pointerout","pointerover"]);Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var es="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),tS=new Set("cancel close invalid load scroll toggle".split(" ").concat(es));function Ny(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,iE(r,t,void 0,e),e.currentTarget=null}function nS(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;Ny(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;Ny(o,a,u),i=l}}}if(Cl)throw e=xp,Cl=!1,xp=null,e}function ie(e,t){var n=aS(t),r=e+"__bubble";n.has(r)||(oS(t,e,2,!1),n.add(r))}var My="_reactListening"+Math.random().toString(36).slice(2);function rS(e){e[My]||(e[My]=!0,xv.forEach(function(t){tS.has(t)||Dy(t,!1,e,null),Dy(t,!0,e,null)}))}function Dy(e,t,n,r){var o=4<arguments.length&&arguments[4]!==void 0?arguments[4]:0,i=n;if(e==="selectionchange"&&n.nodeType!==9&&(i=n.ownerDocument),r!==null&&!t&&tS.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=aS(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),oS(i,e,o,t),s.add(a))}function oS(e,t,n,r){var o=cf.get(t);switch(o===void 0?2:o){case 0:o=SE;break;case 1:o=xE;break;default:o=pf}n=o.bind(null,t,n,e),o=void 0,!Sp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function iS(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Ir(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}tE(function(){var u=i,c=of(n),p=[];e:{var d=$v.get(e);if(d!==void 0){var f=gf,v=e;switch(e){case"keypress":if(fl(n)===0)break e;case"keydown":case"keyup":f=ME;break;case"focusin":v="focus",f=qd;break;case"focusout":v="blur",f=qd;break;case"beforeblur":case"afterblur":f=qd;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":f=Cy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=CE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=jE;break;case zv:case Uv:case Kv:f=TE;break;case Vv:f=BE;break;case"scroll":f=wE;break;case"wheel":f=UE;break;case"copy":case"cut":case"paste":f=PE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Ey}var y=(t&4)!==0,g=!y&&e==="scroll",m=y?d!==null?d+"Capture":null:d;y=[];for(var h=u,S;h!==null;){S=h;var w=S.stateNode;if(S.tag===5&&w!==null&&(S=w,m!==null&&(w=ys(h,m),w!=null&&y.push(Cs(h,w,S)))),g)break;h=h.return}0<y.length&&(d=new f(d,v,null,n,c),p.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(v=n.relatedTarget||n.fromElement)&&(Ir(v)||v[zo]))break e;if((f||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,f?(v=n.relatedTarget||n.toElement,f=u,v=v?Ir(v):null,v!==null&&(g=Hr(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(f=null,v=u),f!==v)){if(y=Cy,w="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(y=Ey,w="onPointerLeave",m="onPointerEnter",h="pointer"),g=f==null?d:Co(f),S=v==null?d:Co(v),d=new y(w,h+"leave",f,n,c),d.target=g,d.relatedTarget=S,w=null,Ir(c)===u&&(y=new y(m,h+"enter",v,n,c),y.target=S,y.relatedTarget=g,w=y),g=w,f&&v)t:{for(y=f,m=v,h=0,S=y;S;S=yo(S))h++;for(S=0,w=m;w;w=yo(w))S++;for(;0<h-S;)y=yo(y),h--;for(;0<S-h;)m=yo(m),S--;for(;h--;){if(y===m||m!==null&&y===m.alternate)break t;y=yo(y),m=yo(m)}y=null}else y=null;f!==null&&Fy(p,d,f,y,!1),v!==null&&g!==null&&Fy(p,g,v,y,!0)}}e:{if(d=u?Co(u):window,f=d.nodeName&&d.nodeName.toLowerCase(),f==="select"||f==="input"&&d.type==="file")var C=XE;else if(Py(d))if(Zv)C=JE;else{C=YE;var b=QE}else(f=d.nodeName)&&f.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=ZE);if(C&&(C=C(e,u))){Yv(p,C,n,c);break e}b&&b(e,d,u),e==="focusout"&&(b=d._wrapperState)&&b.controlled&&d.type==="number"&&dp(d,"number",d.value)}switch(b=u?Co(u):window,e){case"focusin":(Py(b)||b.contentEditable==="true")&&(_o=b,bp=u,us=null);break;case"focusout":us=bp=_o=null;break;case"mousedown":Ep=!0;break;case"contextmenu":case"mouseup":case"dragend":Ep=!1,Oy(p,n,c);break;case"selectionchange":if(nT)break;case"keydown":case"keyup":Oy(p,n,c)}var E;if(yf)e:{switch(e){case"compositionstart":var P="onCompositionStart";break e;case"compositionend":P="onCompositionEnd";break e;case"compositionupdate":P="onCompositionUpdate";break e}P=void 0}else wo?Xv(e,n)&&(P="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(P="onCompositionStart");P&&(Gv&&n.locale!=="ko"&&(wo||P!=="onCompositionStart"?P==="onCompositionEnd"&&wo&&(E=qv()):(zn=c,mf="value"in zn?zn.value:zn.textContent,wo=!0)),b=El(u,P),0<b.length&&(P=new by(P,e,null,n,c),p.push({event:P,listeners:b}),E?P.data=E:(E=Qv(n),E!==null&&(P.data=E)))),(E=VE?$E(e,n):WE(e,n))&&(u=El(u,"onBeforeInput"),0<u.length&&(c=new by("onBeforeInput","beforeinput",null,n,c),p.push({event:c,listeners:u}),c.data=E))}nS(p,t)})}function Cs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function El(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=ys(e,n),i!=null&&r.unshift(Cs(e,i,o)),i=ys(e,t),i!=null&&r.push(Cs(e,i,o))),e=e.return}return r}function yo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Fy(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=ys(n,i),l!=null&&s.unshift(Cs(n,l,a))):o||(l=ys(n,i),l!=null&&s.push(Cs(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Tl(){}var Qd=null,Yd=null;function sS(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Tp(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 jy=typeof setTimeout=="function"?setTimeout:void 0,rT=typeof clearTimeout=="function"?clearTimeout:void 0;function vf(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function Io(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function Hy(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 Zd=0;function oT(e){return{$$typeof:nf,toString:e,valueOf:e}}var Ql=Math.random().toString(36).slice(2),Un="__reactFiber$"+Ql,kl="__reactProps$"+Ql,zo="__reactContainer$"+Ql,By="__reactEvents$"+Ql;function Ir(e){var t=e[Un];if(t)return t;for(var n=e.parentNode;n;){if(t=n[zo]||n[Un]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hy(e);e!==null;){if(n=e[Un])return n;e=Hy(e)}return t}e=n,n=e.parentNode}return null}function Is(e){return e=e[Un]||e[zo],!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 Yl(e){return e[kl]||null}function aS(e){var t=e[By];return t===void 0&&(t=e[By]=new Set),t}var kp=[],bo=-1;function rr(e){return{current:e}}function se(e){0>bo||(e.current=kp[bo],kp[bo]=null,bo--)}function fe(e,t){bo++,kp[bo]=e.current,e.current=t}var er={},De=rr(er),Xe=rr(!1),Nr=er;function Fo(e,t){var n=e.type.contextTypes;if(!n)return er;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 Pl(){se(Xe),se(De)}function zy(e,t,n){if(De.current!==er)throw Error(T(168));fe(De,t),fe(Xe,n)}function lS(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,To(t)||"Unknown",o));return le({},n,r)}function ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||er,Nr=De.current,fe(De,e),fe(Xe,Xe.current),!0}function Uy(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=lS(e,t,Nr),r.__reactInternalMemoizedMergedChildContext=e,se(Xe),se(De),fe(De,e)):se(Xe),fe(Xe,n)}var Sf=null,Or=null,iT=Ee.unstable_runWithPriority,xf=Ee.unstable_scheduleCallback,Pp=Ee.unstable_cancelCallback,sT=Ee.unstable_shouldYield,Ky=Ee.unstable_requestPaint,Rp=Ee.unstable_now,aT=Ee.unstable_getCurrentPriorityLevel,Zl=Ee.unstable_ImmediatePriority,uS=Ee.unstable_UserBlockingPriority,cS=Ee.unstable_NormalPriority,dS=Ee.unstable_LowPriority,pS=Ee.unstable_IdlePriority,Jd={},lT=Ky!==void 0?Ky:function(){},cn=null,gl=null,ep=!1,Vy=Rp(),Ne=1e4>Vy?Rp:function(){return Rp()-Vy};function jo(){switch(aT()){case Zl:return 99;case uS:return 98;case cS:return 97;case dS:return 96;case pS:return 95;default:throw Error(T(332))}}function fS(e){switch(e){case 99:return Zl;case 98:return uS;case 97:return cS;case 96:return dS;case 95:return pS;default:throw Error(T(332))}}function Mr(e,t){return e=fS(e),iT(e,t)}function bs(e,t,n){return e=fS(e),xf(e,t,n)}function Qt(){if(gl!==null){var e=gl;gl=null,Pp(e)}mS()}function mS(){if(!ep&&cn!==null){ep=!0;var e=0;try{var t=cn;Mr(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),cn=null}catch(n){throw cn!==null&&(cn=cn.slice(e+1)),xf(Zl,Qt),n}finally{ep=!1}}}var uT=jr.ReactCurrentBatchConfig;function It(e,t){if(e&&e.defaultProps){t=le({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Rl=rr(null),Il=null,Eo=null,Ll=null;function wf(){Ll=Eo=Il=null}function _f(e){var t=Rl.current;se(Rl),e.type._context._currentValue=t}function gS(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 Lo(e,t){Il=e,Ll=Eo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Lt=!0),e.firstContext=null)}function vt(e,t){if(Ll!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(Ll=e,t=1073741823),t={context:e,observedBits:t,next:null},Eo===null){if(Il===null)throw Error(T(308));Eo=t,Il.dependencies={lanes:0,firstContext:t,responders:null}}else Eo=Eo.next=t;return e._currentValue}var Hn=!1;function Cf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function hS(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 qn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Gn(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 $y(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 Es(e,t,n,r){var o=e.updateQueue;Hn=!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 f=e,v=i;switch(a=t,d=n,v.tag){case 1:if(f=v.payload,typeof f=="function"){p=f.call(d,p,a);break e}p=f;break e;case 3:f.flags=f.flags&-4097|64;case 0:if(f=v.payload,a=typeof f=="function"?f.call(d,p,a):f,a==null)break e;p=le({},p,a);break e;case 2:Hn=!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,As|=s,e.lanes=s,e.memoizedState=p}}function Wy(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 yS=new Kl.Component().refs;function Al(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Jl={isMounted:function(e){return(e=e._reactInternals)?Hr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Xn(e),i=qn(r,o);i.payload=t,n!=null&&(i.callback=n),Gn(e,i),Qn(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tt(),o=Xn(e),i=qn(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),Gn(e,i),Qn(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tt(),r=Xn(e),o=qn(n,r);o.tag=2,t!=null&&(o.callback=t),Gn(e,o),Qn(e,r,n)}};function qy(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?!_s(n,r)||!_s(o,i):!0}function vS(e,t,n){var r=!1,o=er,i=t.contextType;return typeof i=="object"&&i!==null?i=vt(i):(o=Qe(t)?Nr:De.current,r=t.contextTypes,i=(r=r!=null)?Fo(e,o):er),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Jl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Gy(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&&Jl.enqueueReplaceState(t,t.state,null)}function Ip(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=yS,Cf(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=vt(i):(i=Qe(t)?Nr:De.current,o.context=Fo(e,i)),Es(e,n,o,r),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Al(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&&Jl.enqueueReplaceState(o,o.state,null),Es(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var il=Array.isArray;function $i(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===yS&&(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 sl(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 SS(e){function t(g,m){if(e){var h=g.lastEffect;h!==null?(h.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=nr(g,m),g.index=0,g.sibling=null,g}function i(g,m,h){return g.index=h,e?(h=g.alternate,h!==null?(h=h.index,h<m?(g.flags=2,m):h):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,h,S){return m===null||m.tag!==6?(m=ip(h,g.mode,S),m.return=g,m):(m=o(m,h),m.return=g,m)}function l(g,m,h,S){return m!==null&&m.elementType===h.type?(S=o(m,h.props),S.ref=$i(g,m,h),S.return=g,S):(S=Sl(h.type,h.key,h.props,null,g.mode,S),S.ref=$i(g,m,h),S.return=g,S)}function u(g,m,h,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=sp(h,g.mode,S),m.return=g,m):(m=o(m,h.children||[]),m.return=g,m)}function c(g,m,h,S,w){return m===null||m.tag!==7?(m=Mo(h,g.mode,S,w),m.return=g,m):(m=o(m,h),m.return=g,m)}function p(g,m,h){if(typeof m=="string"||typeof m=="number")return m=ip(""+m,g.mode,h),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Zi:return h=Sl(m.type,m.key,m.props,null,g.mode,h),h.ref=$i(g,null,m),h.return=g,h;case Pr:return m=sp(m,g.mode,h),m.return=g,m}if(il(m)||Bi(m))return m=Mo(m,g.mode,h,null),m.return=g,m;sl(g,m)}return null}function d(g,m,h,S){var w=m!==null?m.key:null;if(typeof h=="string"||typeof h=="number")return w!==null?null:a(g,m,""+h,S);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Zi:return h.key===w?h.type===Bn?c(g,m,h.props.children,S,w):l(g,m,h,S):null;case Pr:return h.key===w?u(g,m,h,S):null}if(il(h)||Bi(h))return w!==null?null:c(g,m,h,S,null);sl(g,h)}return null}function f(g,m,h,S,w){if(typeof S=="string"||typeof S=="number")return g=g.get(h)||null,a(m,g,""+S,w);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Zi:return g=g.get(S.key===null?h:S.key)||null,S.type===Bn?c(m,g,S.props.children,w,S.key):l(m,g,S,w);case Pr:return g=g.get(S.key===null?h:S.key)||null,u(m,g,S,w)}if(il(S)||Bi(S))return g=g.get(h)||null,c(m,g,S,w,null);sl(m,S)}return null}function v(g,m,h,S){for(var w=null,C=null,b=m,E=m=0,P=null;b!==null&&E<h.length;E++){b.index>E?(P=b,b=null):P=b.sibling;var R=d(g,b,h[E],S);if(R===null){b===null&&(b=P);break}e&&b&&R.alternate===null&&t(g,b),m=i(R,m,E),C===null?w=R:C.sibling=R,C=R,b=P}if(E===h.length)return n(g,b),w;if(b===null){for(;E<h.length;E++)b=p(g,h[E],S),b!==null&&(m=i(b,m,E),C===null?w=b:C.sibling=b,C=b);return w}for(b=r(g,b);E<h.length;E++)P=f(b,g,E,h[E],S),P!==null&&(e&&P.alternate!==null&&b.delete(P.key===null?E:P.key),m=i(P,m,E),C===null?w=P:C.sibling=P,C=P);return e&&b.forEach(function(N){return t(g,N)}),w}function y(g,m,h,S){var w=Bi(h);if(typeof w!="function")throw Error(T(150));if(h=w.call(h),h==null)throw Error(T(151));for(var C=w=null,b=m,E=m=0,P=null,R=h.next();b!==null&&!R.done;E++,R=h.next()){b.index>E?(P=b,b=null):P=b.sibling;var N=d(g,b,R.value,S);if(N===null){b===null&&(b=P);break}e&&b&&N.alternate===null&&t(g,b),m=i(N,m,E),C===null?w=N:C.sibling=N,C=N,b=P}if(R.done)return n(g,b),w;if(b===null){for(;!R.done;E++,R=h.next())R=p(g,R.value,S),R!==null&&(m=i(R,m,E),C===null?w=R:C.sibling=R,C=R);return w}for(b=r(g,b);!R.done;E++,R=h.next())R=f(b,g,E,R.value,S),R!==null&&(e&&R.alternate!==null&&b.delete(R.key===null?E:R.key),m=i(R,m,E),C===null?w=R:C.sibling=R,C=R);return e&&b.forEach(function(B){return t(g,B)}),w}return function(g,m,h,S){var w=typeof h=="object"&&h!==null&&h.type===Bn&&h.key===null;w&&(h=h.props.children);var C=typeof h=="object"&&h!==null;if(C)switch(h.$$typeof){case Zi:e:{for(C=h.key,w=m;w!==null;){if(w.key===C){switch(w.tag){case 7:if(h.type===Bn){n(g,w.sibling),m=o(w,h.props.children),m.return=g,g=m;break e}break;default:if(w.elementType===h.type){n(g,w.sibling),m=o(w,h.props),m.ref=$i(g,w,h),m.return=g,g=m;break e}}n(g,w);break}else t(g,w);w=w.sibling}h.type===Bn?(m=Mo(h.props.children,g.mode,S,h.key),m.return=g,g=m):(S=Sl(h.type,h.key,h.props,null,g.mode,S),S.ref=$i(g,m,h),S.return=g,g=S)}return s(g);case Pr:e:{for(w=h.key;m!==null;){if(m.key===w)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(g,m.sibling),m=o(m,h.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=sp(h,g.mode,S),m.return=g,g=m}return s(g)}if(typeof h=="string"||typeof h=="number")return h=""+h,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,h),m.return=g,g=m):(n(g,m),m=ip(h,g.mode,S),m.return=g,g=m),s(g);if(il(h))return v(g,m,h,S);if(Bi(h))return y(g,m,h,S);if(C&&sl(g,h),typeof h>"u"&&!w)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(T(152,To(g.type)||"Component"))}return n(g,m)}}var Ol=SS(!0),xS=SS(!1),Ls={},Gt=rr(Ls),Ts=rr(Ls),ks=rr(Ls);function Lr(e){if(e===Ls)throw Error(T(174));return e}function Lp(e,t){switch(fe(ks,t),fe(Ts,e),fe(Gt,Ls),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gp(t,e)}se(Gt),fe(Gt,t)}function Ho(){se(Gt),se(Ts),se(ks)}function Xy(e){Lr(ks.current);var t=Lr(Gt.current),n=gp(t,e.type);t!==n&&(fe(Ts,e),fe(Gt,n))}function bf(e){Ts.current===e&&(se(Gt),se(Ts))}var pe=rr(0);function Nl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&64)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pn=null,Kn=null,Xt=!1;function wS(e,t){var n=ht(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 Qy(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 Ap(e){if(Xt){var t=Kn;if(t){var n=t;if(!Qy(e,t)){if(t=Io(n.nextSibling),!t||!Qy(e,t)){e.flags=e.flags&-1025|2,Xt=!1,pn=e;return}wS(pn,n)}pn=e,Kn=Io(t.firstChild)}else e.flags=e.flags&-1025|2,Xt=!1,pn=e}}function Yy(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pn=e}function al(e){if(e!==pn)return!1;if(!Xt)return Yy(e),Xt=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!Tp(t,e.memoizedProps))for(t=Kn;t;)wS(e,t),t=Io(t.nextSibling);if(Yy(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){Kn=Io(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Kn=null}}else Kn=pn?Io(e.stateNode.nextSibling):null;return!0}function tp(){Kn=pn=null,Xt=!1}var Ao=[];function Ef(){for(var e=0;e<Ao.length;e++)Ao[e]._workInProgressVersionPrimary=null;Ao.length=0}var cs=jr.ReactCurrentDispatcher,yt=jr.ReactCurrentBatchConfig,Ps=0,ge=null,Oe=null,ke=null,Ml=!1,ds=!1;function qe(){throw Error(T(321))}function Tf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!gt(e[n],t[n]))return!1;return!0}function kf(e,t,n,r,o,i){if(Ps=i,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,cs.current=e===null||e.memoizedState===null?dT:pT,e=n(r,o),ds){i=0;do{if(ds=!1,!(25>i))throw Error(T(301));i+=1,ke=Oe=null,t.updateQueue=null,cs.current=fT,e=n(r,o)}while(ds)}if(cs.current=Hl,t=Oe!==null&&Oe.next!==null,Ps=0,ke=Oe=ge=null,Ml=!1,t)throw Error(T(300));return e}function Ar(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ke===null?ge.memoizedState=ke=e:ke=ke.next=e,ke}function Br(){if(Oe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=Oe.next;var t=ke===null?ge.memoizedState:ke.next;if(t!==null)ke=t,Oe=e;else{if(e===null)throw Error(T(310));Oe=e,e={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},ke===null?ge.memoizedState=ke=e:ke=ke.next=e}return ke}function Wt(e,t){return typeof t=="function"?t(e):t}function Wi(e){var t=Br(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=Oe,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((Ps&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,As|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,gt(r,t.memoizedState)||(Lt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function qi(e){var t=Br(),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);gt(i,t.memoizedState)||(Lt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Zy(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=(Ps&e)===e)&&(t._workInProgressVersionPrimary=r,Ao.push(t))),e)return n(t._source);throw Ao.push(t),Error(T(350))}function _S(e,t,n,r){var o=Ue;if(o===null)throw Error(T(349));var i=t._getVersion,s=i(t._source),a=cs.current,l=a.useState(function(){return Zy(o,t,n)}),u=l[1],c=l[0];l=ke;var p=e.memoizedState,d=p.refs,f=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(!gt(s,g)){g=n(t._source),gt(c,g)||(u(g),g=Xn(y),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,h=g;0<h;){var S=31-Jn(h),w=1<<S;m[S]|=g,h&=~w}}},[n,t,r]),a.useEffect(function(){return r(t._source,function(){var g=d.getSnapshot,m=d.setSnapshot;try{m(g(t._source));var h=Xn(y);o.mutableReadLanes|=h&o.pendingLanes}catch(S){m(function(){throw S})}})},[t,r]),gt(f,n)&&gt(v,t)&&gt(p,r)||(e={pending:null,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:c},e.dispatch=u=If.bind(null,ge,e),l.queue=e,l.baseQueue=null,c=Zy(o,t,n),l.memoizedState=l.baseState=c),c}function CS(e,t,n){var r=Br();return _S(r,e,t,n)}function Gi(e){var t=Ar();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Wt,lastRenderedState:e},e=e.dispatch=If.bind(null,ge,e),[t.memoizedState,e]}function Dl(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 Jy(e){var t=Ar();return e={current:e},t.memoizedState=e}function Fl(){return Br().memoizedState}function Op(e,t,n,r){var o=Ar();ge.flags|=e,o.memoizedState=Dl(1|t,n,void 0,r===void 0?null:r)}function Pf(e,t,n,r){var o=Br();r=r===void 0?null:r;var i=void 0;if(Oe!==null){var s=Oe.memoizedState;if(i=s.destroy,r!==null&&Tf(r,s.deps)){Dl(t,n,i,r);return}}ge.flags|=e,o.memoizedState=Dl(1|t,n,i,r)}function ev(e,t){return Op(516,4,e,t)}function jl(e,t){return Pf(516,4,e,t)}function bS(e,t){return Pf(4,2,e,t)}function ES(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 TS(e,t,n){return n=n!=null?n.concat([e]):null,Pf(4,2,ES.bind(null,t,e),n)}function Rf(){}function kS(e,t){var n=Br();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function PS(e,t){var n=Br();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cT(e,t){var n=jo();Mr(98>n?98:n,function(){e(!0)}),Mr(97<n?97:n,function(){var r=yt.transition;yt.transition=1;try{e(!1),t()}finally{yt.transition=r}})}function If(e,t,n){var r=tt(),o=Xn(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)ds=Ml=!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,gt(l,a))return}catch{}finally{}Qn(e,o,r)}}var Hl={readContext:vt,useCallback:qe,useContext:qe,useEffect:qe,useImperativeHandle:qe,useLayoutEffect:qe,useMemo:qe,useReducer:qe,useRef:qe,useState:qe,useDebugValue:qe,useDeferredValue:qe,useTransition:qe,useMutableSource:qe,useOpaqueIdentifier:qe,unstable_isNewReconciler:!1},dT={readContext:vt,useCallback:function(e,t){return Ar().memoizedState=[e,t===void 0?null:t],e},useContext:vt,useEffect:ev,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Op(4,2,ES.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Op(4,2,e,t)},useMemo:function(e,t){var n=Ar();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ar();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=If.bind(null,ge,e),[r.memoizedState,e]},useRef:Jy,useState:Gi,useDebugValue:Rf,useDeferredValue:function(e){var t=Gi(e),n=t[0],r=t[1];return ev(function(){var o=yt.transition;yt.transition=1;try{r(e)}finally{yt.transition=o}},[e]),n},useTransition:function(){var e=Gi(!1),t=e[0];return e=cT.bind(null,e[1]),Jy(e),[e,t]},useMutableSource:function(e,t,n){var r=Ar();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},_S(r,e,t,n)},useOpaqueIdentifier:function(){if(Xt){var e=!1,t=oT(function(){throw e||(e=!0,n("r:"+(Zd++).toString(36))),Error(T(355))}),n=Gi(t)[1];return!(ge.mode&2)&&(ge.flags|=516,Dl(5,function(){n("r:"+(Zd++).toString(36))},void 0,null)),t}return t="r:"+(Zd++).toString(36),Gi(t),t},unstable_isNewReconciler:!1},pT={readContext:vt,useCallback:kS,useContext:vt,useEffect:jl,useImperativeHandle:TS,useLayoutEffect:bS,useMemo:PS,useReducer:Wi,useRef:Fl,useState:function(){return Wi(Wt)},useDebugValue:Rf,useDeferredValue:function(e){var t=Wi(Wt),n=t[0],r=t[1];return jl(function(){var o=yt.transition;yt.transition=1;try{r(e)}finally{yt.transition=o}},[e]),n},useTransition:function(){var e=Wi(Wt)[0];return[Fl().current,e]},useMutableSource:CS,useOpaqueIdentifier:function(){return Wi(Wt)[0]},unstable_isNewReconciler:!1},fT={readContext:vt,useCallback:kS,useContext:vt,useEffect:jl,useImperativeHandle:TS,useLayoutEffect:bS,useMemo:PS,useReducer:qi,useRef:Fl,useState:function(){return qi(Wt)},useDebugValue:Rf,useDeferredValue:function(e){var t=qi(Wt),n=t[0],r=t[1];return jl(function(){var o=yt.transition;yt.transition=1;try{r(e)}finally{yt.transition=o}},[e]),n},useTransition:function(){var e=qi(Wt)[0];return[Fl().current,e]},useMutableSource:CS,useOpaqueIdentifier:function(){return qi(Wt)[0]},unstable_isNewReconciler:!1},mT=jr.ReactCurrentOwner,Lt=!1;function Ge(e,t,n,r){t.child=e===null?xS(t,null,n,r):Ol(t,e.child,n,r)}function tv(e,t,n,r,o){n=n.render;var i=t.ref;return Lo(t,o),r=kf(e,t,n,r,i,o),e!==null&&!Lt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,fn(e,t,o)):(t.flags|=1,Ge(e,t,r,o),t.child)}function nv(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!Df(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,RS(e,t,s,r,o,i)):(e=Sl(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:_s,n(o,r)&&e.ref===t.ref)?fn(e,t,i):(t.flags|=1,e=nr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function RS(e,t,n,r,o,i){if(e!==null&&_s(e.memoizedProps,r)&&e.ref===t.ref)if(Lt=!1,(i&o)!==0)e.flags&16384&&(Lt=!0);else return t.lanes=e.lanes,fn(e,t,i);return Np(e,t,n,r,i)}function np(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},ul(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},ul(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},ul(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ul(t,r);return Ge(e,t,o,n),t.child}function IS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Np(e,t,n,r,o){var i=Qe(n)?Nr:De.current;return i=Fo(t,i),Lo(t,o),n=kf(e,t,n,r,i,o),e!==null&&!Lt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,fn(e,t,o)):(t.flags|=1,Ge(e,t,n,o),t.child)}function rv(e,t,n,r,o){if(Qe(n)){var i=!0;ml(t)}else i=!1;if(Lo(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),vS(t,n,r),Ip(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=vt(u):(u=Qe(n)?Nr:De.current,u=Fo(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)&&Gy(t,s,r,u),Hn=!1;var d=t.memoizedState;s.state=d,Es(t,r,s,o),l=t.memoizedState,a!==r||d!==l||Xe.current||Hn?(typeof c=="function"&&(Al(t,n,c,r),l=t.memoizedState),(a=Hn||qy(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,hS(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:It(t.type,a),s.props=u,p=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=vt(l):(l=Qe(n)?Nr:De.current,l=Fo(t,l));var f=n.getDerivedStateFromProps;(c=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==p||d!==l)&&Gy(t,s,r,l),Hn=!1,d=t.memoizedState,s.state=d,Es(t,r,s,o);var v=t.memoizedState;a!==p||d!==v||Xe.current||Hn?(typeof f=="function"&&(Al(t,n,f,r),v=t.memoizedState),(u=Hn||qy(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 Mp(e,t,n,r,i,o)}function Mp(e,t,n,r,o,i){IS(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&Uy(t,n,!1),fn(e,t,i);r=t.stateNode,mT.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ol(t,e.child,null,i),t.child=Ol(t,null,a,i)):Ge(e,t,a,i),t.memoizedState=r.state,o&&Uy(t,n,!0),t.child}function ov(e){var t=e.stateNode;t.pendingContext?zy(e,t.pendingContext,t.pendingContext!==t.context):t.context&&zy(e,t.context,!1),Lp(e,t.containerInfo)}var ll={dehydrated:null,retryLane:0};function iv(e,t,n){var r=t.pendingProps,o=pe.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),fe(pe,o&1),e===null?(r.fallback!==void 0&&Ap(t),e=r.children,o=r.fallback,i?(e=sv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=ll,e):typeof r.unstable_expectedLoadTime=="number"?(e=sv(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=ll,t.lanes=33554432,e):(n=Ff({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=lv(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=av(e,t,r.children,n),t.memoizedState=null,n):i?(r=lv(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=av(e,t,r.children,n),t.memoizedState=null,n)}function sv(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=Ff(t,o,0,null),n=Mo(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function av(e,t,n,r){var o=e.child;return e=o.sibling,n=nr(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 lv(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=nr(s,a),e!==null?r=nr(e,r):(r=Mo(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function uv(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),gS(e.return,t)}function rp(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 cv(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ge(e,t,r.children,n),r=pe.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&&uv(e,n);else if(e.tag===19)uv(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(fe(pe,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&&Nl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rp(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&&Nl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rp(t,!0,n,null,i,t.lastEffect);break;case"together":rp(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),As|=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=nr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=nr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var LS,Dp,AS,OS;LS=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}};Dp=function(){};AS=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Lr(Gt.current);var i=null;switch(n){case"input":o=up(e,o),r=up(e,r),i=[];break;case"option":o=pp(e,o),r=pp(e,r),i=[];break;case"select":o=le({},o,{value:void 0}),r=le({},r,{value:void 0}),i=[];break;case"textarea":o=fp(e,o),r=fp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Tl)}hp(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"&&(gs.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"&&(gs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ie("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===nf?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};OS=function(e,t,n,r){n!==r&&(t.flags|=4)};function Xi(e,t){if(!Xt)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 gT(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)&&Pl(),null;case 3:return Ho(),se(Xe),se(De),Ef(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(al(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Dp(t),null;case 5:bf(t);var o=Lr(ks.current);if(n=t.type,e!==null&&t.stateNode!=null)AS(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=Lr(Gt.current),al(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Un]=t,r[kl]=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<es.length;e++)ie(es[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":py(r,i),ie("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ie("invalid",r);break;case"textarea":my(r,i),ie("invalid",r)}hp(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]):gs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&ie("scroll",r));switch(n){case"input":Za(r),fy(r,i,!0);break;case"textarea":Za(r),gy(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Tl)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===mp.html&&(e=Tv(n)),e===mp.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[Un]=t,e[kl]=r,LS(e,t,!1,!1),t.stateNode=e,s=yp(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<es.length;o++)ie(es[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":py(e,r),o=up(e,r),ie("invalid",e);break;case"option":o=pp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=le({},r,{value:void 0}),ie("invalid",e);break;case"textarea":my(e,r),o=fp(e,r),ie("invalid",e);break;default:o=r}hp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?Rv(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&kv(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&hs(e,l):typeof l=="number"&&hs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(gs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ie("scroll",e):l!=null&&Qp(e,i,l,s))}switch(n){case"input":Za(e),fy(e,r,!1);break;case"textarea":Za(e),gy(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Zn(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=Tl)}sS(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)OS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));n=Lr(ks.current),Lr(Gt.current),al(t)?(r=t.stateNode,n=t.memoizedProps,r[Un]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Un]=t,t.stateNode=r)}return null;case 13:return se(pe),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&al(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||pe.current&1?Pe===0&&(Pe=3):((Pe===0||Pe===3)&&(Pe=4),Ue===null||!(As&134217727)&&!(Ko&134217727)||Oo(Ue,Me))),(r||n)&&(t.flags|=4),null);case 4:return Ho(),Dp(t),e===null&&rS(t.stateNode.containerInfo),null;case 10:return _f(t),null;case 17:return Qe(t.type)&&Pl(),null;case 19:if(se(pe),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Xi(r,!1);else{if(Pe!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Nl(e),s!==null){for(t.flags|=64,Xi(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 fe(pe,pe.current&1|2),t.child}e=e.sibling}r.tail!==null&&Ne()>Up&&(t.flags|=64,i=!0,Xi(r,!1),t.lanes=33554432)}else{if(!i)if(e=Nl(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xi(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Xt)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*Ne()-r.renderingStartTime>Up&&n!==1073741824&&(t.flags|=64,i=!0,Xi(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=Ne(),n.sibling=null,t=pe.current,fe(pe,i?t&1|2:t&1),n):null;case 23:case 24:return Mf(),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 hT(e){switch(e.tag){case 1:Qe(e.type)&&Pl();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Ho(),se(Xe),se(De),Ef(),t=e.flags,t&64)throw Error(T(285));return e.flags=t&-4097|64,e;case 5:return bf(e),null;case 13:return se(pe),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return se(pe),null;case 4:return Ho(),null;case 10:return _f(e),null;case 23:case 24:return Mf(),null;default:return null}}function Lf(e,t){try{var n="",r=t;do n+=Qb(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{zf=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_s(e):""}function Zk(e){switch(e.tag){case 5:return _s(e.type);case 16:return _s("Lazy");case 13:return _s("Suspense");case 19:return _s("SuspenseList");case 0:case 2:case 15:return e=Kl(e.type,!1),e;case 11:return e=Kl(e.type.render,!1),e;case 22:return e=Kl(e.type._render,!1),e;case 1:return e=Kl(e.type,!0),e;default:return""}}function fi(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 fr:return"Fragment";case lo:return"Portal";case Us:return"Profiler";case Qp:return"StrictMode";case js:return"Suspense";case pu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jp:return(e.displayName||"Context")+".Consumer";case Zp: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 Hu:return fi(e.type);case tm:return fi(e._render);case em:t=e._payload,e=e._init;try{return fi(e(t))}catch{}}return null}function br(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function WS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Jk(e){var t=WS(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=Jk(e))}function qS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=WS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function mu(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 up(e,t){var n=t.checked;return ve({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Dv(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=br(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GS(e,t){t=t.checked,t!=null&&Xp(e,"checked",t,!1)}function cp(e,t){GS(e,t);var n=br(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")?dp(e,t.type,n):t.hasOwnProperty("defaultValue")&&dp(e,t.type,br(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fv(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 dp(e,t,n){(t!=="number"||mu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function eP(e){var t="";return Du.Children.forEach(e,function(n){n!=null&&(t+=n)}),t}function fp(e,t){return e=ve({children:void 0},t),(t=eP(t.children))&&(e.children=t),e}function pi(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=""+br(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 pp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(P(91));return ve({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Hv(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(P(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(P(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:br(n)}}function YS(e,t){var n=br(t.value),r=br(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 Uv(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}var mp={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function XS(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 gp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?XS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wl,QS=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!==mp.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 Zs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zs={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},tP=["Webkit","ms","Moz","O"];Object.keys(zs).forEach(function(e){tP.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),zs[t]=zs[e]})});function ZS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||zs.hasOwnProperty(e)&&zs[e]?(""+t).trim():t+"px"}function JS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=ZS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var nP=ve({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function hp(e,t){if(t){if(nP[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(P(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(P(60));if(!(typeof t.dangerouslySetInnerHTML=="object"&&"__html"in t.dangerouslySetInnerHTML))throw Error(P(61))}if(t.style!=null&&typeof t.style!="object")throw Error(P(62))}}function yp(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 om(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vp=null,mi=null,gi=null;function jv(e){if(e=fa(e)){if(typeof vp!="function")throw Error(P(280));var t=e.stateNode;t&&(t=Ku(t),vp(e.stateNode,e.type,t))}}function e0(e){mi?gi?gi.push(e):gi=[e]:mi=e}function t0(){if(mi){var e=mi,t=gi;if(gi=mi=null,jv(e),t)for(e=0;e<t.length;e++)jv(t[e])}}function im(e,t){return e(t)}function n0(e,t,n,r,o){return e(t,n,r,o)}function sm(){}var r0=im,uo=!1,Bf=!1;function am(){(mi!==null||gi!==null)&&(sm(),t0())}function rP(e,t,n){if(Bf)return e(t,n);Bf=!0;try{return r0(e,t,n)}finally{Bf=!1,am()}}function Js(e,t){var n=e.stateNode;if(n===null)return null;var r=Ku(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(P(231,t,typeof n));return n}var Sp=!1;if(Hn)try{ni={},Object.defineProperty(ni,"passive",{get:function(){Sp=!0}}),window.addEventListener("test",ni,ni),window.removeEventListener("test",ni,ni)}catch{Sp=!1}var ni;function oP(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 Bs=!1,gu=null,hu=!1,wp=null,iP={onError:function(e){Bs=!0,gu=e}};function sP(e,t,n,r,o,i,s,a,l){Bs=!1,gu=null,oP.apply(iP,arguments)}function aP(e,t,n,r,o,i,s,a,l){if(sP.apply(this,arguments),Bs){if(Bs){var u=gu;Bs=!1,gu=null}else throw Error(P(198));hu||(hu=!0,wp=u)}}function wo(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 o0(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 zv(e){if(wo(e)!==e)throw Error(P(188))}function lP(e){var t=e.alternate;if(!t){if(t=wo(e),t===null)throw Error(P(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 zv(o),e;if(i===r)return zv(o),t;i=i.sibling}throw Error(P(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(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function i0(e){if(e=lP(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 Bv(e,t){for(var n=e.alternate;t!==null;){if(t===e||t===n)return!0;t=t.return}return!1}var s0,lm,a0,l0,xp=!1,gn=[],hr=null,yr=null,vr=null,ea=new Map,ta=new Map,Cs=[],Vv="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 Ep(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:n|16,nativeEvent:o,targetContainers:[r]}}function Kv(e,t){switch(e){case"focusin":case"focusout":hr=null;break;case"dragenter":case"dragleave":yr=null;break;case"mouseover":case"mouseout":vr=null;break;case"pointerover":case"pointerout":ea.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ta.delete(t.pointerId)}}function bs(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e=Ep(t,n,r,o,i),t!==null&&(t=fa(t),t!==null&&lm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function uP(e,t,n,r,o){switch(t){case"focusin":return hr=bs(hr,e,t,n,r,o),!0;case"dragenter":return yr=bs(yr,e,t,n,r,o),!0;case"mouseover":return vr=bs(vr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ea.set(i,bs(ea.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ta.set(i,bs(ta.get(i)||null,e,t,n,r,o)),!0}return!1}function cP(e){var t=co(e.target);if(t!==null){var n=wo(t);if(n!==null){if(t=n.tag,t===13){if(t=o0(n),t!==null){e.blockedOn=t,l0(e.lanePriority,function(){Me.unstable_runWithPriority(e.priority,function(){a0(n)})});return}}else if(t===3&&n.stateNode.hydrate){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ru(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null)return t=fa(n),t!==null&&lm(t),e.blockedOn=n,!1;t.shift()}return!0}function $v(e,t,n){ru(e)&&n.delete(t)}function dP(){for(xp=!1;0<gn.length;){var e=gn[0];if(e.blockedOn!==null){e=fa(e.blockedOn),e!==null&&s0(e);break}for(var t=e.targetContainers;0<t.length;){var n=fm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n!==null){e.blockedOn=n;break}t.shift()}e.blockedOn===null&&gn.shift()}hr!==null&&ru(hr)&&(hr=null),yr!==null&&ru(yr)&&(yr=null),vr!==null&&ru(vr)&&(vr=null),ea.forEach($v),ta.forEach($v)}function Ts(e,t){e.blockedOn===t&&(e.blockedOn=null,xp||(xp=!0,Me.unstable_scheduleCallback(Me.unstable_NormalPriority,dP)))}function u0(e){function t(o){return Ts(o,e)}if(0<gn.length){Ts(gn[0],e);for(var n=1;n<gn.length;n++){var r=gn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(hr!==null&&Ts(hr,e),yr!==null&&Ts(yr,e),vr!==null&&Ts(vr,e),ea.forEach(t),ta.forEach(t),n=0;n<Cs.length;n++)r=Cs[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Cs.length&&(n=Cs[0],n.blockedOn===null);)cP(n),n.blockedOn===null&&Cs.shift()}function ql(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var si={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionend:ql("Transition","TransitionEnd")},Vf={},c0={};Hn&&(c0=document.createElement("div").style,"AnimationEvent"in window||(delete si.animationend.animation,delete si.animationiteration.animation,delete si.animationstart.animation),"TransitionEvent"in window||delete si.transitionend.transition);function Uu(e){if(Vf[e])return Vf[e];if(!si[e])return e;var t=si[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in c0)return Vf[e]=t[n];return e}var d0=Uu("animationend"),f0=Uu("animationiteration"),p0=Uu("animationstart"),m0=Uu("transitionend"),g0=new Map,um=new Map,fP=["abort","abort",d0,"animationEnd",f0,"animationIteration",p0,"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",m0,"transitionEnd","waiting","waiting"];function cm(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)),um.set(r,t),g0.set(r,o),vo(o,[r])}}var pP=Me.unstable_now;pP();var fe=8;function oi(e){if(1&e)return fe=15,1;if(2&e)return fe=14,2;if(4&e)return fe=13,4;var t=24&e;return t!==0?(fe=12,t):e&32?(fe=11,32):(t=192&e,t!==0?(fe=10,t):e&256?(fe=9,256):(t=3584&e,t!==0?(fe=8,t):e&4096?(fe=7,4096):(t=4186112&e,t!==0?(fe=6,t):(t=62914560&e,t!==0?(fe=5,t):e&67108864?(fe=4,67108864):e&134217728?(fe=3,134217728):(t=805306368&e,t!==0?(fe=2,t):1073741824&e?(fe=1,1073741824):(fe=8,e))))))}function mP(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 gP(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(P(358,e))}}function na(e,t){var n=e.pendingLanes;if(n===0)return fe=0;var r=0,o=0,i=e.expiredLanes,s=e.suspendedLanes,a=e.pingedLanes;if(i!==0)r=i,o=fe=15;else if(i=n&134217727,i!==0){var l=i&~s;l!==0?(r=oi(l),o=fe):(a&=i,a!==0&&(r=oi(a),o=fe))}else i=n&~s,i!==0?(r=oi(i),o=fe):a!==0&&(r=oi(a),o=fe);if(r===0)return 0;if(r=31-Tr(r),r=n&((0>r?0:1<<r)<<1)-1,t!==0&&t!==r&&!(t&s)){if(oi(t),o<=fe)return t;fe=o}if(t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Tr(t),o=1<<n,r|=e[n],t&=~o;return r}function h0(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yu(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return e=ii(24&~t),e===0?yu(10,t):e;case 10:return e=ii(192&~t),e===0?yu(8,t):e;case 8:return e=ii(3584&~t),e===0&&(e=ii(4186112&~t),e===0&&(e=512)),e;case 2:return t=ii(805306368&~t),t===0&&(t=268435456),t}throw Error(P(358,e))}function ii(e){return e&-e}function Kf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ju(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-Tr(t),e[t]=n}var Tr=Math.clz32?Math.clz32:vP,hP=Math.log,yP=Math.LN2;function vP(e){return e===0?32:31-(hP(e)/yP|0)|0}var SP=Me.unstable_UserBlockingPriority,wP=Me.unstable_runWithPriority,ou=!0;function xP(e,t,n,r){uo||sm();var o=dm,i=uo;uo=!0;try{n0(o,e,t,n,r)}finally{(uo=i)||am()}}function EP(e,t,n,r){wP(SP,dm.bind(null,e,t,n,r))}function dm(e,t,n,r){if(ou){var o;if((o=(t&4)===0)&&0<gn.length&&-1<Vv.indexOf(e))e=Ep(null,e,t,n,r),gn.push(e);else{var i=fm(e,t,n,r);if(i===null)o&&Kv(e,r);else{if(o){if(-1<Vv.indexOf(e)){e=Ep(i,e,t,n,r),gn.push(e);return}if(uP(i,e,t,n,r))return;Kv(e,r)}A0(e,t,r,null,n)}}}}function fm(e,t,n,r){var o=om(r);if(o=co(o),o!==null){var i=wo(o);if(i===null)o=null;else{var s=i.tag;if(s===13){if(o=o0(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 A0(e,t,r,o,n),null}var pr=null,pm=null,iu=null;function y0(){if(iu)return iu;var e,t=pm,n=t.length,r,o="value"in pr?pr.value:pr.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 iu=o.slice(e,1<r?1-r:void 0)}function su(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 Gl(){return!0}function Wv(){return!1}function wt(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)?Gl:Wv,this.isPropagationStopped=Wv,this}return ve(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Gl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Gl)},persist:function(){},isPersistent:Gl}),t}var ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mm=wt(ki),da=ve({},ki,{view:0,detail:0}),CP=wt(da),$f,Wf,ks,zu=ve({},da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gm,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!==ks&&(ks&&e.type==="mousemove"?($f=e.screenX-ks.screenX,Wf=e.screenY-ks.screenY):Wf=$f=0,ks=e),$f)},movementY:function(e){return"movementY"in e?e.movementY:Wf}}),qv=wt(zu),bP=ve({},zu,{dataTransfer:0}),TP=wt(bP),kP=ve({},da,{relatedTarget:0}),qf=wt(kP),PP=ve({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),RP=wt(PP),AP=ve({},ki,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),IP=wt(AP),LP=ve({},ki,{data:0}),Gv=wt(LP),OP={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NP={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"},MP={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _P(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=MP[e])?!!t[e]:!1}function gm(){return _P}var DP=ve({},da,{key:function(e){if(e.key){var t=OP[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=su(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?NP[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gm,charCode:function(e){return e.type==="keypress"?su(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?su(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),FP=wt(DP),HP=ve({},zu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yv=wt(HP),UP=ve({},da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gm}),jP=wt(UP),zP=ve({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),BP=wt(zP),VP=ve({},zu,{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}),KP=wt(VP),$P=[9,13,27,32],hm=Hn&&"CompositionEvent"in window,Vs=null;Hn&&"documentMode"in document&&(Vs=document.documentMode);var WP=Hn&&"TextEvent"in window&&!Vs,v0=Hn&&(!hm||Vs&&8<Vs&&11>=Vs),Xv=String.fromCharCode(32),Qv=!1;function S0(e,t){switch(e){case"keyup":return $P.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function w0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ai=!1;function qP(e,t){switch(e){case"compositionend":return w0(t);case"keypress":return t.which!==32?null:(Qv=!0,Xv);case"textInput":return e=t.data,e===Xv&&Qv?null:e;default:return null}}function GP(e,t){if(ai)return e==="compositionend"||!hm&&S0(e,t)?(e=y0(),iu=pm=pr=null,ai=!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 v0&&t.locale!=="ko"?null:t.data;default:return null}}var YP={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 Zv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!YP[e.type]:t==="textarea"}function x0(e,t,n,r){e0(r),t=vu(t,"onChange"),0<t.length&&(n=new mm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ks=null,ra=null;function XP(e){k0(e,0)}function Bu(e){var t=ui(e);if(qS(t))return e}function QP(e,t){if(e==="change")return t}var E0=!1;Hn&&(Hn?(Xl="oninput"in document,Xl||(Gf=document.createElement("div"),Gf.setAttribute("oninput","return;"),Xl=typeof Gf.oninput=="function"),Yl=Xl):Yl=!1,E0=Yl&&(!document.documentMode||9<document.documentMode));var Yl,Xl,Gf;function Jv(){Ks&&(Ks.detachEvent("onpropertychange",C0),ra=Ks=null)}function C0(e){if(e.propertyName==="value"&&Bu(ra)){var t=[];if(x0(t,ra,e,om(e)),e=XP,uo)e(t);else{uo=!0;try{im(e,t)}finally{uo=!1,am()}}}}function ZP(e,t,n){e==="focusin"?(Jv(),Ks=t,ra=n,Ks.attachEvent("onpropertychange",C0)):e==="focusout"&&Jv()}function JP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bu(ra)}function eR(e,t){if(e==="click")return Bu(t)}function tR(e,t){if(e==="input"||e==="change")return Bu(t)}function nR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Mt=typeof Object.is=="function"?Object.is:nR,rR=Object.prototype.hasOwnProperty;function oa(e,t){if(Mt(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(!rR.call(t,n[r])||!Mt(e[n[r]],t[n[r]]))return!1;return!0}function eS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tS(e,t){var n=eS(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=eS(n)}}function b0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?b0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nS(){for(var e=window,t=mu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=mu(e.document)}return t}function Cp(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 oR=Hn&&"documentMode"in document&&11>=document.documentMode,li=null,bp=null,$s=null,Tp=!1;function rS(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Tp||li==null||li!==mu(r)||(r=li,"selectionStart"in r&&Cp(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}),$s&&oa($s,r)||($s=r,r=vu(bp,"onSelect"),0<r.length&&(t=new mm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=li)))}cm("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);cm("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);cm(fP,2);for(Yf="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ql=0;Ql<Yf.length;Ql++)um.set(Yf[Ql],0);var Yf,Ql;Ei("onMouseEnter",["mouseout","mouseover"]);Ei("onMouseLeave",["mouseout","mouseover"]);Ei("onPointerEnter",["pointerout","pointerover"]);Ei("onPointerLeave",["pointerout","pointerover"]);vo("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vo("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vo("onBeforeInput",["compositionend","keypress","textInput","paste"]);vo("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vo("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vo("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ds="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),T0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ds));function oS(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,aP(r,t,void 0,e),e.currentTarget=null}function k0(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;oS(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;oS(o,a,u),i=l}}}if(hu)throw e=wp,hu=!1,wp=null,e}function me(e,t){var n=L0(t),r=e+"__bubble";n.has(r)||(R0(t,e,2,!1),n.add(r))}var iS="_reactListening"+Math.random().toString(36).slice(2);function P0(e){e[iS]||(e[iS]=!0,KS.forEach(function(t){T0.has(t)||sS(t,!1,e,null),sS(t,!0,e,null)}))}function sS(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&&T0.has(e)){if(e!=="scroll")return;o|=2,i=r}var s=L0(i),a=e+"__"+(t?"capture":"bubble");s.has(a)||(t&&(o|=4),R0(i,e,o,t),s.add(a))}function R0(e,t,n,r){var o=um.get(t);switch(o===void 0?2:o){case 0:o=xP;break;case 1:o=EP;break;default:o=dm}n=o.bind(null,t,n,e),o=void 0,!Sp||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 A0(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=co(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}rP(function(){var u=i,c=om(n),f=[];e:{var d=g0.get(e);if(d!==void 0){var p=mm,y=e;switch(e){case"keypress":if(su(n)===0)break e;case"keydown":case"keyup":p=FP;break;case"focusin":y="focus",p=qf;break;case"focusout":y="blur",p=qf;break;case"beforeblur":case"afterblur":p=qf;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=qv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=TP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=jP;break;case d0:case f0:case p0:p=RP;break;case m0:p=BP;break;case"scroll":p=CP;break;case"wheel":p=KP;break;case"copy":case"cut":case"paste":p=IP;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=Yv}var v=(t&4)!==0,g=!v&&e==="scroll",m=v?d!==null?d+"Capture":null:d;v=[];for(var h=u,S;h!==null;){S=h;var x=S.stateNode;if(S.tag===5&&x!==null&&(S=x,m!==null&&(x=Js(h,m),x!=null&&v.push(ia(h,x,S)))),g)break;h=h.return}0<v.length&&(d=new p(d,y,null,n,c),f.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",d&&!(t&16)&&(y=n.relatedTarget||n.fromElement)&&(co(y)||y[Pi]))break e;if((p||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=u,y=y?co(y):null,y!==null&&(g=wo(y),y!==g||y.tag!==5&&y.tag!==6)&&(y=null)):(p=null,y=u),p!==y)){if(v=qv,x="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(v=Yv,x="onPointerLeave",m="onPointerEnter",h="pointer"),g=p==null?d:ui(p),S=y==null?d:ui(y),d=new v(x,h+"leave",p,n,c),d.target=g,d.relatedTarget=S,x=null,co(c)===u&&(v=new v(m,h+"enter",y,n,c),v.target=S,v.relatedTarget=g,x=v),g=x,p&&y)t:{for(v=p,m=y,h=0,S=v;S;S=ri(S))h++;for(S=0,x=m;x;x=ri(x))S++;for(;0<h-S;)v=ri(v),h--;for(;0<S-h;)m=ri(m),S--;for(;h--;){if(v===m||m!==null&&v===m.alternate)break t;v=ri(v),m=ri(m)}v=null}else v=null;p!==null&&aS(f,d,p,v,!1),y!==null&&g!==null&&aS(f,g,y,v,!0)}}e:{if(d=u?ui(u):window,p=d.nodeName&&d.nodeName.toLowerCase(),p==="select"||p==="input"&&d.type==="file")var C=QP;else if(Zv(d))if(E0)C=tR;else{C=JP;var T=ZP}else(p=d.nodeName)&&p.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(C=eR);if(C&&(C=C(e,u))){x0(f,C,n,c);break e}T&&T(e,d,u),e==="focusout"&&(T=d._wrapperState)&&T.controlled&&d.type==="number"&&dp(d,"number",d.value)}switch(T=u?ui(u):window,e){case"focusin":(Zv(T)||T.contentEditable==="true")&&(li=T,bp=u,$s=null);break;case"focusout":$s=bp=li=null;break;case"mousedown":Tp=!0;break;case"contextmenu":case"mouseup":case"dragend":Tp=!1,rS(f,n,c);break;case"selectionchange":if(oR)break;case"keydown":case"keyup":rS(f,n,c)}var k;if(hm)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 ai?S0(e,n)&&(I="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(I="onCompositionStart");I&&(v0&&n.locale!=="ko"&&(ai||I!=="onCompositionStart"?I==="onCompositionEnd"&&ai&&(k=y0()):(pr=c,pm="value"in pr?pr.value:pr.textContent,ai=!0)),T=vu(u,I),0<T.length&&(I=new Gv(I,e,null,n,c),f.push({event:I,listeners:T}),k?I.data=k:(k=w0(n),k!==null&&(I.data=k)))),(k=WP?qP(e,n):GP(e,n))&&(u=vu(u,"onBeforeInput"),0<u.length&&(c=new Gv("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=k))}k0(f,t)})}function ia(e,t,n){return{instance:e,listener:t,currentTarget:n}}function vu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Js(e,n),i!=null&&r.unshift(ia(e,i,o)),i=Js(e,t),i!=null&&r.push(ia(e,i,o))),e=e.return}return r}function ri(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function aS(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=Js(n,i),l!=null&&s.unshift(ia(n,l,a))):o||(l=Js(n,i),l!=null&&s.push(ia(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}function Su(){}var Xf=null,Qf=null;function I0(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function kp(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 lS=typeof setTimeout=="function"?setTimeout:void 0,iR=typeof clearTimeout=="function"?clearTimeout:void 0;function ym(e){e.nodeType===1?e.textContent="":e.nodeType===9&&(e=e.body,e!=null&&(e.textContent=""))}function hi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break}return e}function uS(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 Zf=0;function sR(e){return{$$typeof:nm,toString:e,valueOf:e}}var Vu=Math.random().toString(36).slice(2),mr="__reactFiber$"+Vu,wu="__reactProps$"+Vu,Pi="__reactContainer$"+Vu,cS="__reactEvents$"+Vu;function co(e){var t=e[mr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pi]||n[mr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=uS(e);e!==null;){if(n=e[mr])return n;e=uS(e)}return t}e=n,n=e.parentNode}return null}function fa(e){return e=e[mr]||e[Pi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(P(33))}function Ku(e){return e[wu]||null}function L0(e){var t=e[cS];return t===void 0&&(t=e[cS]=new Set),t}var Pp=[],ci=-1;function Ar(e){return{current:e}}function ge(e){0>ci||(e.current=Pp[ci],Pp[ci]=null,ci--)}function Ce(e,t){ci++,Pp[ci]=e.current,e.current=t}var kr={},Ge=Ar(kr),pt=Ar(!1),go=kr;function Ci(e,t){var n=e.type.contextTypes;if(!n)return kr;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 mt(e){return e=e.childContextTypes,e!=null}function xu(){ge(pt),ge(Ge)}function dS(e,t,n){if(Ge.current!==kr)throw Error(P(168));Ce(Ge,t),Ce(pt,n)}function O0(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(P(108,fi(t)||"Unknown",o));return ve({},n,r)}function au(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kr,go=Ge.current,Ce(Ge,e),Ce(pt,pt.current),!0}function fS(e,t,n){var r=e.stateNode;if(!r)throw Error(P(169));n?(e=O0(e,t,go),r.__reactInternalMemoizedMergedChildContext=e,ge(pt),ge(Ge),Ce(Ge,e)):ge(pt),Ce(pt,n)}var vm=null,mo=null,aR=Me.unstable_runWithPriority,Sm=Me.unstable_scheduleCallback,Rp=Me.unstable_cancelCallback,lR=Me.unstable_shouldYield,pS=Me.unstable_requestPaint,Ap=Me.unstable_now,uR=Me.unstable_getCurrentPriorityLevel,$u=Me.unstable_ImmediatePriority,N0=Me.unstable_UserBlockingPriority,M0=Me.unstable_NormalPriority,_0=Me.unstable_LowPriority,D0=Me.unstable_IdlePriority,Jf={},cR=pS!==void 0?pS:function(){},Nn=null,lu=null,ep=!1,mS=Ap(),We=1e4>mS?Ap:function(){return Ap()-mS};function bi(){switch(uR()){case $u:return 99;case N0:return 98;case M0:return 97;case _0:return 96;case D0:return 95;default:throw Error(P(332))}}function F0(e){switch(e){case 99:return $u;case 98:return N0;case 97:return M0;case 96:return _0;case 95:return D0;default:throw Error(P(332))}}function ho(e,t){return e=F0(e),aR(e,t)}function sa(e,t,n){return e=F0(e),Sm(e,t,n)}function wn(){if(lu!==null){var e=lu;lu=null,Rp(e)}H0()}function H0(){if(!ep&&Nn!==null){ep=!0;var e=0;try{var t=Nn;ho(99,function(){for(;e<t.length;e++){var n=t[e];do n=n(!0);while(n!==null)}}),Nn=null}catch(n){throw Nn!==null&&(Nn=Nn.slice(e+1)),Sm($u,wn),n}finally{ep=!1}}}var dR=So.ReactCurrentBatchConfig;function Xt(e,t){if(e&&e.defaultProps){t=ve({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Eu=Ar(null),Cu=null,di=null,bu=null;function wm(){bu=di=Cu=null}function xm(e){var t=Eu.current;ge(Eu),e.type._context._currentValue=t}function U0(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 yi(e,t){Cu=e,bu=di=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qt=!0),e.firstContext=null)}function Ft(e,t){if(bu!==e&&t!==!1&&t!==0)if((typeof t!="number"||t===1073741823)&&(bu=e,t=1073741823),t={context:e,observedBits:t,next:null},di===null){if(Cu===null)throw Error(P(308));di=t,Cu.dependencies={lanes:0,firstContext:t,responders:null}}else di=di.next=t;return e._currentValue}var dr=!1;function Em(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function j0(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 Sr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wr(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 gS(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 aa(e,t,n,r){var o=e.updateQueue;dr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;if(c!==null){c=c.updateQueue;var f=c.lastBaseUpdate;f!==s&&(f===null?c.firstBaseUpdate=u:f.next=u,c.lastBaseUpdate=l)}}if(i!==null){f=o.baseState,s=0,c=u=l=null;do{a=i.lane;var d=i.eventTime;if((r&a)===a){c!==null&&(c=c.next={eventTime:d,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var p=e,y=i;switch(a=t,d=n,y.tag){case 1:if(p=y.payload,typeof p=="function"){f=p.call(d,f,a);break e}f=p;break e;case 3:p.flags=p.flags&-4097|64;case 0:if(p=y.payload,a=typeof p=="function"?p.call(d,f,a):p,a==null)break e;f=ve({},f,a);break e;case 2:dr=!0}}i.callback!==null&&(e.flags|=32,a=o.effects,a===null?o.effects=[i]:a.push(i))}else d={eventTime:d,lane:a,tag:i.tag,payload:i.payload,callback:i.callback,next:null},c===null?(u=c=d,l=f):c=c.next=d,s|=a;if(i=i.next,i===null){if(a=o.shared.pending,a===null)break;i=a.next,a.next=null,o.lastBaseUpdate=a,o.shared.pending=null}}while(1);c===null&&(l=f),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,ma|=s,e.lanes=s,e.memoizedState=f}}function hS(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(P(191,o));o.call(r)}}}var z0=new Du.Component().refs;function Tu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ve({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wu={isMounted:function(e){return(e=e._reactInternals)?wo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=St(),o=xr(e),i=Sr(r,o);i.payload=t,n!=null&&(i.callback=n),wr(e,i),Er(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=St(),o=xr(e),i=Sr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),wr(e,i),Er(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=St(),r=xr(e),o=Sr(n,r);o.tag=2,t!=null&&(o.callback=t),wr(e,o),Er(e,r,n)}};function yS(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?!oa(n,r)||!oa(o,i):!0}function B0(e,t,n){var r=!1,o=kr,i=t.contextType;return typeof i=="object"&&i!==null?i=Ft(i):(o=mt(t)?go:Ge.current,r=t.contextTypes,i=(r=r!=null)?Ci(e,o):kr),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 vS(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 Ip(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=z0,Em(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Ft(i):(i=mt(t)?go:Ge.current,o.context=Ci(e,i)),aa(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),aa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4)}var Zl=Array.isArray;function Ps(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(P(309));var r=n.stateNode}if(!r)throw Error(P(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===z0&&(s=r.refs={}),i===null?delete s[o]:s[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(P(284));if(!n._owner)throw Error(P(290,e))}return e}function Jl(e,t){if(e.type!=="textarea")throw Error(P(31,Object.prototype.toString.call(t)==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function V0(e){function t(g,m){if(e){var h=g.lastEffect;h!==null?(h.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=Rr(g,m),g.index=0,g.sibling=null,g}function i(g,m,h){return g.index=h,e?(h=g.alternate,h!==null?(h=h.index,h<m?(g.flags=2,m):h):(g.flags=2,m)):m}function s(g){return e&&g.alternate===null&&(g.flags=2),g}function a(g,m,h,S){return m===null||m.tag!==6?(m=ip(h,g.mode,S),m.return=g,m):(m=o(m,h),m.return=g,m)}function l(g,m,h,S){return m!==null&&m.elementType===h.type?(S=o(m,h.props),S.ref=Ps(g,m,h),S.return=g,S):(S=fu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ps(g,m,h),S.return=g,S)}function u(g,m,h,S){return m===null||m.tag!==4||m.stateNode.containerInfo!==h.containerInfo||m.stateNode.implementation!==h.implementation?(m=sp(h,g.mode,S),m.return=g,m):(m=o(m,h.children||[]),m.return=g,m)}function c(g,m,h,S,x){return m===null||m.tag!==7?(m=xi(h,g.mode,S,x),m.return=g,m):(m=o(m,h),m.return=g,m)}function f(g,m,h){if(typeof m=="string"||typeof m=="number")return m=ip(""+m,g.mode,h),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ms:return h=fu(m.type,m.key,m.props,null,g.mode,h),h.ref=Ps(g,null,m),h.return=g,h;case lo:return m=sp(m,g.mode,h),m.return=g,m}if(Zl(m)||Es(m))return m=xi(m,g.mode,h,null),m.return=g,m;Jl(g,m)}return null}function d(g,m,h,S){var x=m!==null?m.key:null;if(typeof h=="string"||typeof h=="number")return x!==null?null:a(g,m,""+h,S);if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Ms:return h.key===x?h.type===fr?c(g,m,h.props.children,S,x):l(g,m,h,S):null;case lo:return h.key===x?u(g,m,h,S):null}if(Zl(h)||Es(h))return x!==null?null:c(g,m,h,S,null);Jl(g,h)}return null}function p(g,m,h,S,x){if(typeof S=="string"||typeof S=="number")return g=g.get(h)||null,a(m,g,""+S,x);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ms:return g=g.get(S.key===null?h:S.key)||null,S.type===fr?c(m,g,S.props.children,x,S.key):l(m,g,S,x);case lo:return g=g.get(S.key===null?h:S.key)||null,u(m,g,S,x)}if(Zl(S)||Es(S))return g=g.get(h)||null,c(m,g,S,x,null);Jl(m,S)}return null}function y(g,m,h,S){for(var x=null,C=null,T=m,k=m=0,I=null;T!==null&&k<h.length;k++){T.index>k?(I=T,T=null):I=T.sibling;var L=d(g,T,h[k],S);if(L===null){T===null&&(T=I);break}e&&T&&L.alternate===null&&t(g,T),m=i(L,m,k),C===null?x=L:C.sibling=L,C=L,T=I}if(k===h.length)return n(g,T),x;if(T===null){for(;k<h.length;k++)T=f(g,h[k],S),T!==null&&(m=i(T,m,k),C===null?x=T:C.sibling=T,C=T);return x}for(T=r(g,T);k<h.length;k++)I=p(T,g,k,h[k],S),I!==null&&(e&&I.alternate!==null&&T.delete(I.key===null?k:I.key),m=i(I,m,k),C===null?x=I:C.sibling=I,C=I);return e&&T.forEach(function(N){return t(g,N)}),x}function v(g,m,h,S){var x=Es(h);if(typeof x!="function")throw Error(P(150));if(h=x.call(h),h==null)throw Error(P(151));for(var C=x=null,T=m,k=m=0,I=null,L=h.next();T!==null&&!L.done;k++,L=h.next()){T.index>k?(I=T,T=null):I=T.sibling;var N=d(g,T,L.value,S);if(N===null){T===null&&(T=I);break}e&&T&&N.alternate===null&&t(g,T),m=i(N,m,k),C===null?x=N:C.sibling=N,C=N,T=I}if(L.done)return n(g,T),x;if(T===null){for(;!L.done;k++,L=h.next())L=f(g,L.value,S),L!==null&&(m=i(L,m,k),C===null?x=L:C.sibling=L,C=L);return x}for(T=r(g,T);!L.done;k++,L=h.next())L=p(T,g,k,L.value,S),L!==null&&(e&&L.alternate!==null&&T.delete(L.key===null?k:L.key),m=i(L,m,k),C===null?x=L:C.sibling=L,C=L);return e&&T.forEach(function(z){return t(g,z)}),x}return function(g,m,h,S){var x=typeof h=="object"&&h!==null&&h.type===fr&&h.key===null;x&&(h=h.props.children);var C=typeof h=="object"&&h!==null;if(C)switch(h.$$typeof){case Ms:e:{for(C=h.key,x=m;x!==null;){if(x.key===C){switch(x.tag){case 7:if(h.type===fr){n(g,x.sibling),m=o(x,h.props.children),m.return=g,g=m;break e}break;default:if(x.elementType===h.type){n(g,x.sibling),m=o(x,h.props),m.ref=Ps(g,x,h),m.return=g,g=m;break e}}n(g,x);break}else t(g,x);x=x.sibling}h.type===fr?(m=xi(h.props.children,g.mode,S,h.key),m.return=g,g=m):(S=fu(h.type,h.key,h.props,null,g.mode,S),S.ref=Ps(g,m,h),S.return=g,g=S)}return s(g);case lo:e:{for(x=h.key;m!==null;){if(m.key===x)if(m.tag===4&&m.stateNode.containerInfo===h.containerInfo&&m.stateNode.implementation===h.implementation){n(g,m.sibling),m=o(m,h.children||[]),m.return=g,g=m;break e}else{n(g,m);break}else t(g,m);m=m.sibling}m=sp(h,g.mode,S),m.return=g,g=m}return s(g)}if(typeof h=="string"||typeof h=="number")return h=""+h,m!==null&&m.tag===6?(n(g,m.sibling),m=o(m,h),m.return=g,g=m):(n(g,m),m=ip(h,g.mode,S),m.return=g,g=m),s(g);if(Zl(h))return y(g,m,h,S);if(Es(h))return v(g,m,h,S);if(C&&Jl(g,h),typeof h>"u"&&!x)switch(g.tag){case 1:case 22:case 0:case 11:case 15:throw Error(P(152,fi(g.type)||"Component"))}return n(g,m)}}var ku=V0(!0),K0=V0(!1),pa={},vn=Ar(pa),la=Ar(pa),ua=Ar(pa);function fo(e){if(e===pa)throw Error(P(174));return e}function Lp(e,t){switch(Ce(ua,t),Ce(la,e),Ce(vn,pa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:gp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=gp(t,e)}ge(vn),Ce(vn,t)}function Ti(){ge(vn),ge(la),ge(ua)}function SS(e){fo(ua.current);var t=fo(vn.current),n=gp(t,e.type);t!==n&&(Ce(la,e),Ce(vn,n))}function Cm(e){la.current===e&&(ge(vn),ge(la))}var Ee=Ar(0);function Pu(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 _n=null,gr=null,Sn=!1;function $0(e,t){var n=_t(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 wS(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 Op(e){if(Sn){var t=gr;if(t){var n=t;if(!wS(e,t)){if(t=hi(n.nextSibling),!t||!wS(e,t)){e.flags=e.flags&-1025|2,Sn=!1,_n=e;return}$0(_n,n)}_n=e,gr=hi(t.firstChild)}else e.flags=e.flags&-1025|2,Sn=!1,_n=e}}function xS(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_n=e}function eu(e){if(e!==_n)return!1;if(!Sn)return xS(e),Sn=!0,!1;var t=e.type;if(e.tag!==5||t!=="head"&&t!=="body"&&!kp(t,e.memoizedProps))for(t=gr;t;)$0(e,t),t=hi(t.nextSibling);if(xS(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){gr=hi(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}gr=null}}else gr=_n?hi(e.stateNode.nextSibling):null;return!0}function tp(){gr=_n=null,Sn=!1}var vi=[];function bm(){for(var e=0;e<vi.length;e++)vi[e]._workInProgressVersionPrimary=null;vi.length=0}var Ws=So.ReactCurrentDispatcher,Dt=So.ReactCurrentBatchConfig,ca=0,Te=null,$e=null,De=null,Ru=!1,qs=!1;function dt(){throw Error(P(321))}function Tm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Mt(e[n],t[n]))return!1;return!0}function km(e,t,n,r,o,i){if(ca=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ws.current=e===null||e.memoizedState===null?pR:mR,e=n(r,o),qs){i=0;do{if(qs=!1,!(25>i))throw Error(P(301));i+=1,De=$e=null,t.updateQueue=null,Ws.current=gR,e=n(r,o)}while(qs)}if(Ws.current=Ou,t=$e!==null&&$e.next!==null,ca=0,De=$e=Te=null,Ru=!1,t)throw Error(P(300));return e}function po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?Te.memoizedState=De=e:De=De.next=e,De}function xo(){if($e===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=De===null?Te.memoizedState:De.next;if(t!==null)De=t,$e=e;else{if(e===null)throw Error(P(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},De===null?Te.memoizedState=De=e:De=De.next=e}return De}function hn(e,t){return typeof t=="function"?t(e):t}function Rs(e){var t=xo(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=$e,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((ca&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,Te.lanes|=u,ma|=u}l=l.next}while(l!==null&&l!==o);a===null?i=r:a.next=s,Mt(r,t.memoizedState)||(Qt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=a,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function As(e){var t=xo(),n=t.queue;if(n===null)throw Error(P(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);Mt(i,t.memoizedState)||(Qt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ES(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=(ca&e)===e)&&(t._workInProgressVersionPrimary=r,vi.push(t))),e)return n(t._source);throw vi.push(t),Error(P(350))}function W0(e,t,n,r){var o=et;if(o===null)throw Error(P(349));var i=t._getVersion,s=i(t._source),a=Ws.current,l=a.useState(function(){return ES(o,t,n)}),u=l[1],c=l[0];l=De;var f=e.memoizedState,d=f.refs,p=d.getSnapshot,y=f.source;f=f.subscribe;var v=Te;return e.memoizedState={refs:d,source:t,subscribe:r},a.useEffect(function(){d.getSnapshot=n,d.setSnapshot=u;var g=i(t._source);if(!Mt(s,g)){g=n(t._source),Mt(c,g)||(u(g),g=xr(v),o.mutableReadLanes|=g&o.pendingLanes),g=o.mutableReadLanes,o.entangledLanes|=g;for(var m=o.entanglements,h=g;0<h;){var S=31-Tr(h),x=1<<S;m[S]|=g,h&=~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 h=xr(v);o.mutableReadLanes|=h&o.pendingLanes}catch(S){m(function(){throw S})}})},[t,r]),Mt(p,n)&&Mt(y,t)&&Mt(f,r)||(e={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:c},e.dispatch=u=Am.bind(null,Te,e),l.queue=e,l.baseQueue=null,c=ES(o,t,n),l.memoizedState=l.baseState=c),c}function q0(e,t,n){var r=xo();return W0(r,e,t,n)}function Is(e){var t=po();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e=t.queue={pending:null,dispatch:null,lastRenderedReducer:hn,lastRenderedState:e},e=e.dispatch=Am.bind(null,Te,e),[t.memoizedState,e]}function Au(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Te.updateQueue,t===null?(t={lastEffect:null},Te.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 CS(e){var t=po();return e={current:e},t.memoizedState=e}function Iu(){return xo().memoizedState}function Np(e,t,n,r){var o=po();Te.flags|=e,o.memoizedState=Au(1|t,n,void 0,r===void 0?null:r)}function Pm(e,t,n,r){var o=xo();r=r===void 0?null:r;var i=void 0;if($e!==null){var s=$e.memoizedState;if(i=s.destroy,r!==null&&Tm(r,s.deps)){Au(t,n,i,r);return}}Te.flags|=e,o.memoizedState=Au(1|t,n,i,r)}function bS(e,t){return Np(516,4,e,t)}function Lu(e,t){return Pm(516,4,e,t)}function G0(e,t){return Pm(4,2,e,t)}function Y0(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 X0(e,t,n){return n=n!=null?n.concat([e]):null,Pm(4,2,Y0.bind(null,t,e),n)}function Rm(){}function Q0(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Z0(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function fR(e,t){var n=bi();ho(98>n?98:n,function(){e(!0)}),ho(97<n?97:n,function(){var r=Dt.transition;Dt.transition=1;try{e(!1),t()}finally{Dt.transition=r}})}function Am(e,t,n){var r=St(),o=xr(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===Te||s!==null&&s===Te)qs=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,Mt(l,a))return}catch{}finally{}Er(e,o,r)}}var Ou={readContext:Ft,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useOpaqueIdentifier:dt,unstable_isNewReconciler:!1},pR={readContext:Ft,useCallback:function(e,t){return po().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:bS,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Np(4,2,Y0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Np(4,2,e,t)},useMemo:function(e,t){var n=po();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=po();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=Am.bind(null,Te,e),[r.memoizedState,e]},useRef:CS,useState:Is,useDebugValue:Rm,useDeferredValue:function(e){var t=Is(e),n=t[0],r=t[1];return bS(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Is(!1),t=e[0];return e=fR.bind(null,e[1]),CS(e),[e,t]},useMutableSource:function(e,t,n){var r=po();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},W0(r,e,t,n)},useOpaqueIdentifier:function(){if(Sn){var e=!1,t=sR(function(){throw e||(e=!0,n("r:"+(Zf++).toString(36))),Error(P(355))}),n=Is(t)[1];return!(Te.mode&2)&&(Te.flags|=516,Au(5,function(){n("r:"+(Zf++).toString(36))},void 0,null)),t}return t="r:"+(Zf++).toString(36),Is(t),t},unstable_isNewReconciler:!1},mR={readContext:Ft,useCallback:Q0,useContext:Ft,useEffect:Lu,useImperativeHandle:X0,useLayoutEffect:G0,useMemo:Z0,useReducer:Rs,useRef:Iu,useState:function(){return Rs(hn)},useDebugValue:Rm,useDeferredValue:function(e){var t=Rs(hn),n=t[0],r=t[1];return Lu(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=Rs(hn)[0];return[Iu().current,e]},useMutableSource:q0,useOpaqueIdentifier:function(){return Rs(hn)[0]},unstable_isNewReconciler:!1},gR={readContext:Ft,useCallback:Q0,useContext:Ft,useEffect:Lu,useImperativeHandle:X0,useLayoutEffect:G0,useMemo:Z0,useReducer:As,useRef:Iu,useState:function(){return As(hn)},useDebugValue:Rm,useDeferredValue:function(e){var t=As(hn),n=t[0],r=t[1];return Lu(function(){var o=Dt.transition;Dt.transition=1;try{r(e)}finally{Dt.transition=o}},[e]),n},useTransition:function(){var e=As(hn)[0];return[Iu().current,e]},useMutableSource:q0,useOpaqueIdentifier:function(){return As(hn)[0]},unstable_isNewReconciler:!1},hR=So.ReactCurrentOwner,Qt=!1;function ft(e,t,n,r){t.child=e===null?K0(t,null,n,r):ku(t,e.child,n,r)}function TS(e,t,n,r,o){n=n.render;var i=t.ref;return yi(t,o),r=km(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Dn(e,t,o)):(t.flags|=1,ft(e,t,r,o),t.child)}function kS(e,t,n,r,o,i){if(e===null){var s=n.type;return typeof s=="function"&&!_m(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,J0(e,t,s,r,o,i)):(e=fu(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:oa,n(o,r)&&e.ref===t.ref)?Dn(e,t,i):(t.flags|=1,e=Rr(s,r),e.ref=t.ref,e.return=t,t.child=e)}function J0(e,t,n,r,o,i){if(e!==null&&oa(e.memoizedProps,r)&&e.ref===t.ref)if(Qt=!1,(i&o)!==0)e.flags&16384&&(Qt=!0);else return t.lanes=e.lanes,Dn(e,t,i);return Mp(e,t,n,r,i)}function np(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},nu(t,n);else if(n&1073741824)t.memoizedState={baseLanes:0},nu(t,i!==null?i.baseLanes:n);else return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},nu(t,e),null;else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,nu(t,r);return ft(e,t,o,n),t.child}function ew(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=128)}function Mp(e,t,n,r,o){var i=mt(n)?go:Ge.current;return i=Ci(t,i),yi(t,o),n=km(e,t,n,r,i,o),e!==null&&!Qt?(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,Dn(e,t,o)):(t.flags|=1,ft(e,t,n,o),t.child)}function PS(e,t,n,r,o){if(mt(n)){var i=!0;au(t)}else i=!1;if(yi(t,o),t.stateNode===null)e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),B0(t,n,r),Ip(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=Ft(u):(u=mt(n)?go:Ge.current,u=Ci(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&vS(t,s,r,u),dr=!1;var d=t.memoizedState;s.state=d,aa(t,r,s,o),l=t.memoizedState,a!==r||d!==l||pt.current||dr?(typeof c=="function"&&(Tu(t,n,c,r),l=t.memoizedState),(a=dr||yS(t,n,a,r,d,l,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4)):(typeof s.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4),r=!1)}else{s=t.stateNode,j0(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Xt(t.type,a),s.props=u,f=t.pendingProps,d=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ft(l):(l=mt(n)?go:Ge.current,l=Ci(t,l));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&vS(t,s,r,l),dr=!1,d=t.memoizedState,s.state=d,aa(t,r,s,o);var y=t.memoizedState;a!==f||d!==y||pt.current||dr?(typeof p=="function"&&(Tu(t,n,p,r),y=t.memoizedState),(u=dr||yS(t,n,u,r,d,y,l))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,y,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,y,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=256)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=y),s.props=r,s.state=y,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return _p(e,t,n,r,i,o)}function _p(e,t,n,r,o,i){ew(e,t);var s=(t.flags&64)!==0;if(!r&&!s)return o&&fS(t,n,!1),Dn(e,t,i);r=t.stateNode,hR.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=ku(t,e.child,null,i),t.child=ku(t,null,a,i)):ft(e,t,a,i),t.memoizedState=r.state,o&&fS(t,n,!0),t.child}function RS(e){var t=e.stateNode;t.pendingContext?dS(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dS(e,t.context,!1),Lp(e,t.containerInfo)}var tu={dehydrated:null,retryLane:0};function AS(e,t,n){var r=t.pendingProps,o=Ee.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),Ce(Ee,o&1),e===null?(r.fallback!==void 0&&Op(t),e=r.children,o=r.fallback,i?(e=IS(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=tu,e):typeof r.unstable_expectedLoadTime=="number"?(e=IS(t,e,o,n),t.child.memoizedState={baseLanes:n},t.memoizedState=tu,t.lanes=33554432,e):(n=Dm({mode:"visible",children:e},t.mode,n,null),n.return=t,t.child=n)):e.memoizedState!==null?i?(r=OS(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=tu,r):(n=LS(e,t,r.children,n),t.memoizedState=null,n):i?(r=OS(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=tu,r):(n=LS(e,t,r.children,n),t.memoizedState=null,n)}function IS(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=Dm(t,o,0,null),n=xi(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function LS(e,t,n,r){var o=e.child;return e=o.sibling,n=Rr(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 OS(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=Rr(s,a),e!==null?r=Rr(e,r):(r=xi(r,i,o,null),r.flags|=2),r.return=t,n.return=t,n.sibling=r,t.child=n,r}function NS(e,t){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),U0(e.return,t)}function rp(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 MS(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ft(e,t,r.children,n),r=Ee.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&&NS(e,n);else if(e.tag===19)NS(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(Ce(Ee,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&&Pu(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rp(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&&Pu(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rp(t,!0,n,null,i,t.lastEffect);break;case"together":rp(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Dn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ma|=t.lanes,n&t.childLanes){if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=Rr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Rr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}return null}var tw,Dp,nw,rw;tw=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}};Dp=function(){};nw=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,fo(vn.current);var i=null;switch(n){case"input":o=up(e,o),r=up(e,r),i=[];break;case"option":o=fp(e,o),r=fp(e,r),i=[];break;case"select":o=ve({},o,{value:void 0}),r=ve({},r,{value:void 0}),i=[];break;case"textarea":o=pp(e,o),r=pp(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Su)}hp(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"&&(Qs.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"&&(Qs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",e),i||a===l||(i=[])):typeof l=="object"&&l!==null&&l.$$typeof===nm?l.toString():(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};rw=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ls(e,t){if(!Sn)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 yR(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 mt(t.type)&&xu(),null;case 3:return Ti(),ge(pt),ge(Ge),bm(),r=t.stateNode,r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(eu(t)?t.flags|=4:r.hydrate||(t.flags|=256)),Dp(t),null;case 5:Cm(t);var o=fo(ua.current);if(n=t.type,e!==null&&t.stateNode!=null)nw(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(t.stateNode===null)throw Error(P(166));return null}if(e=fo(vn.current),eu(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[mr]=t,r[wu]=i,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(e=0;e<Ds.length;e++)me(Ds[e],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":Dv(r,i),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},me("invalid",r);break;case"textarea":Hv(r,i),me("invalid",r)}hp(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]):Qs.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&me("scroll",r));switch(n){case"input":$l(r),Fv(r,i,!0);break;case"textarea":$l(r),Uv(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Su)}r=e,t.updateQueue=r,r!==null&&(t.flags|=4)}else{switch(s=o.nodeType===9?o:o.ownerDocument,e===mp.html&&(e=XS(n)),e===mp.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[mr]=t,e[wu]=r,tw(e,t,!1,!1),t.stateNode=e,s=yp(n,r),n){case"dialog":me("cancel",e),me("close",e),o=r;break;case"iframe":case"object":case"embed":me("load",e),o=r;break;case"video":case"audio":for(o=0;o<Ds.length;o++)me(Ds[o],e);o=r;break;case"source":me("error",e),o=r;break;case"img":case"image":case"link":me("error",e),me("load",e),o=r;break;case"details":me("toggle",e),o=r;break;case"input":Dv(e,r),o=up(e,r),me("invalid",e);break;case"option":o=fp(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ve({},r,{value:void 0}),me("invalid",e);break;case"textarea":Hv(e,r),o=pp(e,r),me("invalid",e);break;default:o=r}hp(n,o);var a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?JS(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&QS(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Zs(e,l):typeof l=="number"&&Zs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Qs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&me("scroll",e):l!=null&&Xp(e,i,l,s))}switch(n){case"input":$l(e),Fv(e,r,!1);break;case"textarea":$l(e),Uv(e);break;case"option":r.value!=null&&e.setAttribute("value",""+br(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?pi(e,!!r.multiple,i,!1):r.defaultValue!=null&&pi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Su)}I0(n,r)&&(t.flags|=4)}t.ref!==null&&(t.flags|=128)}return null;case 6:if(e&&t.stateNode!=null)rw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));n=fo(ua.current),fo(vn.current),eu(t)?(r=t.stateNode,n=t.memoizedProps,r[mr]=t,r.nodeValue!==n&&(t.flags|=4)):(r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[mr]=t,t.stateNode=r)}return null;case 13:return ge(Ee),r=t.memoizedState,t.flags&64?(t.lanes=n,t):(r=r!==null,n=!1,e===null?t.memoizedProps.fallback!==void 0&&eu(t):n=e.memoizedState!==null,r&&!n&&t.mode&2&&(e===null&&t.memoizedProps.unstable_avoidThisFallback!==!0||Ee.current&1?Fe===0&&(Fe=3):((Fe===0||Fe===3)&&(Fe=4),et===null||!(ma&134217727)&&!(Ai&134217727)||Si(et,qe))),(r||n)&&(t.flags|=4),null);case 4:return Ti(),Dp(t),e===null&&P0(t.stateNode.containerInfo),null;case 10:return xm(t),null;case 17:return mt(t.type)&&xu(),null;case 19:if(ge(Ee),r=t.memoizedState,r===null)return null;if(i=(t.flags&64)!==0,s=r.rendering,s===null)if(i)Ls(r,!1);else{if(Fe!==0||e!==null&&e.flags&64)for(e=t.child;e!==null;){if(s=Pu(e),s!==null){for(t.flags|=64,Ls(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 Ce(Ee,Ee.current&1|2),t.child}e=e.sibling}r.tail!==null&&We()>Bp&&(t.flags|=64,i=!0,Ls(r,!1),t.lanes=33554432)}else{if(!i)if(e=Pu(s),e!==null){if(t.flags|=64,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ls(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Sn)return t=t.lastEffect=r.lastEffect,t!==null&&(t.nextEffect=null),null}else 2*We()-r.renderingStartTime>Bp&&n!==1073741824&&(t.flags|=64,i=!0,Ls(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=We(),n.sibling=null,t=Ee.current,Ce(Ee,i?t&1|2:t&1),n):null;case 23:case 24:return Mm(),e!==null&&e.memoizedState!==null!=(t.memoizedState!==null)&&r.mode!=="unstable-defer-without-hiding"&&(t.flags|=4),null}throw Error(P(156,t.tag))}function vR(e){switch(e.tag){case 1:mt(e.type)&&xu();var t=e.flags;return t&4096?(e.flags=t&-4097|64,e):null;case 3:if(Ti(),ge(pt),ge(Ge),bm(),t=e.flags,t&64)throw Error(P(285));return e.flags=t&-4097|64,e;case 5:return Cm(e),null;case 13:return ge(Ee),t=e.flags,t&4096?(e.flags=t&-4097|64,e):null;case 19:return ge(Ee),null;case 4:return Ti(),null;case 10:return xm(e),null;case 23:case 24:return Mm(),null;default:return null}}function Im(e,t){try{var n="",r=t;do n+=Zk(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 Fp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var yT=typeof WeakMap=="function"?WeakMap:Map;function NS(e,t,n){n=qn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zl||(zl=!0,Kp=r),Fp(e,t)},n}function MS(e,t,n){n=qn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Fp(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),Fp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var vT=typeof WeakSet=="function"?WeakSet:Set;function dv(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Yn(e,n)}else t.current=null}function ST(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:It(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&vf(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(T(163))}function xT(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&&(VS(n,e),PT(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:It(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&Wy(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}Wy(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&sS(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&&Hv(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(T(163))}function pv(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=Pv("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 fv(e,t){if(Or&&typeof Or.onCommitFiberUnmount=="function")try{Or.onCommitFiberUnmount(Sf,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)VS(t,n);else{r=t;try{o()}catch(i){Yn(r,i)}}n=n.next}while(n!==e)}break;case 1:if(dv(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Yn(t,i)}break;case 5:dv(t);break;case 4:DS(e,t)}}function mv(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 gv(e){return e.tag===5||e.tag===3||e.tag===4}function hv(e){e:{for(var t=e.return;t!==null;){if(gv(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&&(hs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||gv(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?jp(e,n,t):Hp(e,n,t)}function jp(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=Tl));else if(r!==4&&(e=e.child,e!==null))for(jp(e,t,n),e=e.sibling;e!==null;)jp(e,t,n),e=e.sibling}function Hp(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(Hp(e,t,n),e=e.sibling;e!==null;)Hp(e,t,n),e=e.sibling}function DS(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(fv(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(fv(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 op(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[kl]=r,e==="input"&&r.type==="radio"&&r.name!=null&&bv(n,r),yp(e,o),t=yp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?Rv(n,a):s==="dangerouslySetInnerHTML"?kv(n,a):s==="children"?hs(n,a):Qp(n,s,a,t)}switch(e){case"input":cp(n,r);break;case"textarea":Ev(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(T(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,Hv(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Nf=Ne(),pv(t.child,!0)),yv(t);return;case 19:yv(t);return;case 17:return;case 23:case 24:pv(t,t.memoizedState!==null);return}throw Error(T(163))}function yv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new vT),t.forEach(function(r){var o=LT.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function wT(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var _T=Math.ceil,Bl=jr.ReactCurrentDispatcher,Af=jr.ReactCurrentOwner,j=0,Ue=null,xe=null,Me=0,Dr=0,Bp=rr(0),Pe=0,eu=null,Uo=0,As=0,Ko=0,Of=0,zp=null,Nf=0,Up=1/0;function Vo(){Up=Ne()+500}var L=null,zl=!1,Kp=null,qt=null,tr=!1,ps=null,ts=90,Vp=[],$p=[],mn=null,fs=0,Wp=null,hl=-1,dn=0,yl=0,ms=null,vl=!1;function tt(){return j&48?Ne():hl!==-1?hl:hl=Ne()}function Xn(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return jo()===99?1:2;if(dn===0&&(dn=Uo),uT.transition!==0){yl!==0&&(yl=zp!==null?zp.pendingLanes:0),e=dn;var t=4186112&~yl;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=jo(),j&4&&e===98?e=bl(12,dn):(e=pE(e),e=bl(e,dn)),e}function Qn(e,t,n){if(50<fs)throw fs=0,Wp=null,Error(T(185));if(e=tu(e,t),e===null)return null;ql(e,t,n),e===Ue&&(Ko|=t,Pe===4&&Oo(e,Me));var r=jo();t===1?j&8&&!(j&48)?qp(e):(St(e,n),j===0&&(Vo(),Qt())):(!(j&4)||r!==98&&r!==99||(mn===null?mn=new Set([e]):mn.add(e)),St(e,n)),zp=e}function tu(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 St(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Jn(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,vo(l);var c=oe;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=xs(e,e===Ue?Me:0),t=oe,r===0)n!==null&&(n!==Jd&&Pp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==Jd&&Pp(n)}t===15?(n=qp.bind(null,e),cn===null?(cn=[n],gl=xf(Zl,mS)):cn.push(n),n=Jd):t===14?n=bs(99,qp.bind(null,e)):(n=fE(t),n=bs(n,FS.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function FS(e){if(hl=-1,yl=dn=0,j&48)throw Error(T(327));var t=e.callbackNode;if(or()&&e.callbackNode!==t)return null;var n=xs(e,e===Ue?Me:0);if(n===0)return null;var r=n,o=j;j|=16;var i=zS();(Ue!==e||Me!==r)&&(Vo(),No(e,r));do try{ET();break}catch(a){BS(e,a)}while(1);if(wf(),Bl.current=i,j=o,xe!==null?r=0:(Ue=null,Me=0,r=Pe),Uo&Ko)No(e,0);else if(r!==0){if(r===2&&(j|=64,e.hydrate&&(e.hydrate=!1,vf(e.containerInfo)),n=Wv(e),n!==0&&(r=ns(e,n))),r===1)throw t=eu,No(e,0),Oo(e,n),St(e,Ne()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(T(345));case 2:kr(e);break;case 3:if(Oo(e,n),(n&62914560)===n&&(r=Nf+500-Ne(),10<r)){if(xs(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){tt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=jy(kr.bind(null,e),r);break}kr(e);break;case 4:if(Oo(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Jn(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=Ne()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*_T(n/1960))-n,10<n){e.timeoutHandle=jy(kr.bind(null,e),n);break}kr(e);break;case 5:kr(e);break;default:throw Error(T(329))}}return St(e,Ne()),e.callbackNode===t?FS.bind(null,e):null}function Oo(e,t){for(t&=~Of,t&=~Ko,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Jn(t),r=1<<n;e[n]=-1,t&=~r}}function qp(e){if(j&48)throw Error(T(327));if(or(),e===Ue&&e.expiredLanes&Me){var t=Me,n=ns(e,t);Uo&Ko&&(t=xs(e,t),n=ns(e,t))}else t=xs(e,0),n=ns(e,t);if(e.tag!==0&&n===2&&(j|=64,e.hydrate&&(e.hydrate=!1,vf(e.containerInfo)),t=Wv(e),t!==0&&(n=ns(e,t))),n===1)throw n=eu,No(e,0),Oo(e,t),St(e,Ne()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,kr(e),St(e,Ne()),null}function CT(){if(mn!==null){var e=mn;mn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,St(t,Ne())})}Qt()}function jS(e,t){var n=j;j|=1;try{return e(t)}finally{j=n,j===0&&(Vo(),Qt())}}function HS(e,t){var n=j;j&=-2,j|=8;try{return e(t)}finally{j=n,j===0&&(Vo(),Qt())}}function ul(e,t){fe(Bp,Dr),Dr|=t,Uo|=t}function Mf(){Dr=Bp.current,se(Bp)}function No(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,rT(n)),xe!==null)for(n=xe.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pl();break;case 3:Ho(),se(Xe),se(De),Ef();break;case 5:bf(r);break;case 4:Ho();break;case 13:se(pe);break;case 19:se(pe);break;case 10:_f(r);break;case 23:case 24:Mf()}n=n.return}Ue=e,xe=nr(e.current,null),Me=Dr=Uo=t,Pe=0,eu=null,Of=Ko=As=0}function BS(e,t){do{var n=xe;try{if(wf(),cs.current=Hl,Ml){for(var r=ge.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ml=!1}if(Ps=0,ke=Oe=ge=null,ds=!1,Af.current=null,n===null||n.return===null){Pe=1,eu=t,xe=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Me,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=(pe.current&1)!==0,d=s;do{var f;if(f=d.tag===13){var v=d.memoizedState;if(v!==null)f=v.dehydrated!==null;else{var y=d.memoizedProps;f=y.fallback===void 0?!1:y.unstable_avoidThisFallback!==!0?!0:!p}}if(f){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 h=qn(-1,1);h.tag=2,Gn(a,h)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new yT,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var w=IT.bind(null,i,u,a);u.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(d!==null);l=Error((To(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 Fp(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var SR=typeof WeakMap=="function"?WeakMap:Map;function ow(e,t,n){n=Sr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Mu||(Mu=!0,Vp=r),Fp(e,t)},n}function iw(e,t,n){n=Sr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return Fp(e,t),r(o)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){typeof r!="function"&&(yn===null?yn=new Set([this]):yn.add(this),Fp(e,t));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}var wR=typeof WeakSet=="function"?WeakSet:Set;function _S(e){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(n){Cr(e,n)}else t.current=null}function xR(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:Xt(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:t.flags&256&&ym(t.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(P(163))}function ER(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&&(mw(n,e),IR(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:Xt(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),t=n.updateQueue,t!==null&&hS(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}hS(n,t,e)}return;case 5:e=n.stateNode,t===null&&n.flags&4&&I0(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&&u0(n))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(P(163))}function DS(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=ZS("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 FS(e,t){if(mo&&typeof mo.onCommitFiberUnmount=="function")try{mo.onCommitFiberUnmount(vm,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)mw(t,n);else{r=t;try{o()}catch(i){Cr(r,i)}}n=n.next}while(n!==e)}break;case 1:if(_S(t),e=t.stateNode,typeof e.componentWillUnmount=="function")try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(i){Cr(t,i)}break;case 5:_S(t);break;case 4:sw(e,t)}}function HS(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 US(e){return e.tag===5||e.tag===3||e.tag===4}function jS(e){e:{for(var t=e.return;t!==null;){if(US(t))break e;t=t.return}throw Error(P(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(P(161))}n.flags&16&&(Zs(t,""),n.flags&=-17);e:t:for(n=e;;){for(;n.sibling===null;){if(n.return===null||US(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?Hp(e,n,t):Up(e,n,t)}function Hp(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=Su));else if(r!==4&&(e=e.child,e!==null))for(Hp(e,t,n),e=e.sibling;e!==null;)Hp(e,t,n),e=e.sibling}function Up(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(Up(e,t,n),e=e.sibling;e!==null;)Up(e,t,n),e=e.sibling}function sw(e,t){for(var n=t,r=!1,o,i;;){if(!r){r=n.return;e:for(;;){if(r===null)throw Error(P(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(FS(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(FS(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 op(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[wu]=r,e==="input"&&r.type==="radio"&&r.name!=null&&GS(n,r),yp(e,o),t=yp(e,r),o=0;o<i.length;o+=2){var s=i[o],a=i[o+1];s==="style"?JS(n,a):s==="dangerouslySetInnerHTML"?QS(n,a):s==="children"?Zs(n,a):Xp(n,s,a,t)}switch(e){case"input":cp(n,r);break;case"textarea":YS(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,i=r.value,i!=null?pi(n,!!r.multiple,i,!1):e!==!!r.multiple&&(r.defaultValue!=null?pi(n,!!r.multiple,r.defaultValue,!0):pi(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(t.stateNode===null)throw Error(P(162));t.stateNode.nodeValue=t.memoizedProps;return;case 3:n=t.stateNode,n.hydrate&&(n.hydrate=!1,u0(n.containerInfo));return;case 12:return;case 13:t.memoizedState!==null&&(Nm=We(),DS(t.child,!0)),zS(t);return;case 19:zS(t);return;case 17:return;case 23:case 24:DS(t,t.memoizedState!==null);return}throw Error(P(163))}function zS(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new wR),t.forEach(function(r){var o=NR.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function CR(e,t){return e!==null&&(e=e.memoizedState,e===null||e.dehydrated!==null)?(t=t.memoizedState,t!==null&&t.dehydrated===null):!1}var bR=Math.ceil,Nu=So.ReactCurrentDispatcher,Lm=So.ReactCurrentOwner,B=0,et=null,Re=null,qe=0,yo=0,jp=Ar(0),Fe=0,qu=null,Ri=0,ma=0,Ai=0,Om=0,zp=null,Nm=0,Bp=1/0;function Ii(){Bp=We()+500}var M=null,Mu=!1,Vp=null,yn=null,Pr=!1,Gs=null,Fs=90,Kp=[],$p=[],Fn=null,Ys=0,Wp=null,uu=-1,Mn=0,cu=0,Xs=null,du=!1;function St(){return B&48?We():uu!==-1?uu:uu=We()}function xr(e){if(e=e.mode,!(e&2))return 1;if(!(e&4))return bi()===99?1:2;if(Mn===0&&(Mn=Ri),dR.transition!==0){cu!==0&&(cu=zp!==null?zp.pendingLanes:0),e=Mn;var t=4186112&~cu;return t&=-t,t===0&&(e=4186112&~e,t=e&-e,t===0&&(t=8192)),t}return e=bi(),B&4&&e===98?e=yu(12,Mn):(e=mP(e),e=yu(e,Mn)),e}function Er(e,t,n){if(50<Ys)throw Ys=0,Wp=null,Error(P(185));if(e=Gu(e,t),e===null)return null;ju(e,t,n),e===et&&(Ai|=t,Fe===4&&Si(e,qe));var r=bi();t===1?B&8&&!(B&48)?qp(e):(Ht(e,n),B===0&&(Ii(),wn())):(!(B&4)||r!==98&&r!==99||(Fn===null?Fn=new Set([e]):Fn.add(e)),Ht(e,n)),zp=e}function Gu(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 Ht(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-Tr(s),l=1<<a,u=i[a];if(u===-1){if(!(l&r)||l&o){u=t,oi(l);var c=fe;i[a]=10<=c?u+250:6<=c?u+5e3:-1}}else u<=t&&(e.expiredLanes|=l);s&=~l}if(r=na(e,e===et?qe:0),t=fe,r===0)n!==null&&(n!==Jf&&Rp(n),e.callbackNode=null,e.callbackPriority=0);else{if(n!==null){if(e.callbackPriority===t)return;n!==Jf&&Rp(n)}t===15?(n=qp.bind(null,e),Nn===null?(Nn=[n],lu=Sm($u,H0)):Nn.push(n),n=Jf):t===14?n=sa(99,qp.bind(null,e)):(n=gP(t),n=sa(n,aw.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function aw(e){if(uu=-1,cu=Mn=0,B&48)throw Error(P(327));var t=e.callbackNode;if(Ir()&&e.callbackNode!==t)return null;var n=na(e,e===et?qe:0);if(n===0)return null;var r=n,o=B;B|=16;var i=dw();(et!==e||qe!==r)&&(Ii(),wi(e,r));do try{PR();break}catch(a){cw(e,a)}while(1);if(wm(),Nu.current=i,B=o,Re!==null?r=0:(et=null,qe=0,r=Fe),Ri&Ai)wi(e,0);else if(r!==0){if(r===2&&(B|=64,e.hydrate&&(e.hydrate=!1,ym(e.containerInfo)),n=h0(e),n!==0&&(r=Hs(e,n))),r===1)throw t=qu,wi(e,0),Si(e,n),Ht(e,We()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(P(345));case 2:ao(e);break;case 3:if(Si(e,n),(n&62914560)===n&&(r=Nm+500-We(),10<r)){if(na(e,0)!==0)break;if(o=e.suspendedLanes,(o&n)!==n){St(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=lS(ao.bind(null,e),r);break}ao(e);break;case 4:if(Si(e,n),(n&4186112)===n)break;for(r=e.eventTimes,o=-1;0<n;){var s=31-Tr(n);i=1<<s,s=r[s],s>o&&(o=s),n&=~i}if(n=o,n=We()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*bR(n/1960))-n,10<n){e.timeoutHandle=lS(ao.bind(null,e),n);break}ao(e);break;case 5:ao(e);break;default:throw Error(P(329))}}return Ht(e,We()),e.callbackNode===t?aw.bind(null,e):null}function Si(e,t){for(t&=~Om,t&=~Ai,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Tr(t),r=1<<n;e[n]=-1,t&=~r}}function qp(e){if(B&48)throw Error(P(327));if(Ir(),e===et&&e.expiredLanes&qe){var t=qe,n=Hs(e,t);Ri&Ai&&(t=na(e,t),n=Hs(e,t))}else t=na(e,0),n=Hs(e,t);if(e.tag!==0&&n===2&&(B|=64,e.hydrate&&(e.hydrate=!1,ym(e.containerInfo)),t=h0(e),t!==0&&(n=Hs(e,t))),n===1)throw n=qu,wi(e,0),Si(e,t),Ht(e,We()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,ao(e),Ht(e,We()),null}function TR(){if(Fn!==null){var e=Fn;Fn=null,e.forEach(function(t){t.expiredLanes|=24&t.pendingLanes,Ht(t,We())})}wn()}function lw(e,t){var n=B;B|=1;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}}function uw(e,t){var n=B;B&=-2,B|=8;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}}function nu(e,t){Ce(jp,yo),yo|=t,Ri|=t}function Mm(){yo=jp.current,ge(jp)}function wi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,iR(n)),Re!==null)for(n=Re.return;n!==null;){var r=n;switch(r.tag){case 1:r=r.type.childContextTypes,r!=null&&xu();break;case 3:Ti(),ge(pt),ge(Ge),bm();break;case 5:Cm(r);break;case 4:Ti();break;case 13:ge(Ee);break;case 19:ge(Ee);break;case 10:xm(r);break;case 23:case 24:Mm()}n=n.return}et=e,Re=Rr(e.current,null),qe=yo=Ri=t,Fe=0,qu=null,Om=Ai=ma=0}function cw(e,t){do{var n=Re;try{if(wm(),Ws.current=Ou,Ru){for(var r=Te.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ru=!1}if(ca=0,De=$e=Te=null,qs=!1,Lm.current=null,n===null||n.return===null){Fe=1,qu=t,Re=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=qe,a.flags|=2048,a.firstEffect=a.lastEffect=null,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l;if(!(a.mode&2)){var c=a.alternate;c?(a.updateQueue=c.updateQueue,a.memoizedState=c.memoizedState,a.lanes=c.lanes):(a.updateQueue=null,a.memoizedState=null)}var f=(Ee.current&1)!==0,d=s;do{var p;if(p=d.tag===13){var y=d.memoizedState;if(y!==null)p=y.dehydrated!==null;else{var v=d.memoizedProps;p=v.fallback===void 0?!1:v.unstable_avoidThisFallback!==!0?!0:!f}}if(p){var g=d.updateQueue;if(g===null){var m=new Set;m.add(u),d.updateQueue=m}else g.add(u);if(!(d.mode&2)){if(d.flags|=64,a.flags|=16384,a.flags&=-2981,a.tag===1)if(a.alternate===null)a.tag=17;else{var h=Sr(-1,1);h.tag=2,wr(a,h)}a.lanes|=1;break e}l=void 0,a=t;var S=i.pingCache;if(S===null?(S=i.pingCache=new SR,l=new Set,S.set(u,l)):(l=S.get(u),l===void 0&&(l=new Set,S.set(u,l))),!l.has(a)){l.add(a);var x=OR.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((fi(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.`)}Pe!==5&&(Pe=2),l=Lf(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=NS(d,i,t);$y(d,C);break e;case 1:i=l;var b=d.type,E=d.stateNode;if(!(d.flags&64)&&(typeof b.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(qt===null||!qt.has(E)))){d.flags|=4096,t&=-t,d.lanes|=t;var P=MS(d,i,t);$y(d,P);break e}}d=d.return}while(d!==null)}KS(n)}catch(R){t=R,xe===n&&n!==null&&(xe=n=n.return);continue}break}while(1)}function zS(){var e=Bl.current;return Bl.current=Hl,e===null?Hl:e}function ns(e,t){var n=j;j|=16;var r=zS();Ue===e&&Me===t||No(e,t);do try{bT();break}catch(o){BS(e,o)}while(1);if(wf(),j=n,Bl.current=r,xe!==null)throw Error(T(261));return Ue=null,Me=0,Pe}function bT(){for(;xe!==null;)US(xe)}function ET(){for(;xe!==null&&!sT();)US(xe)}function US(e){var t=$S(e.alternate,e,Dr);e.memoizedProps=e.pendingProps,t===null?KS(e):xe=t,Af.current=null}function KS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=hT(t),n!==null){n.flags&=2047,xe=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=gT(n,t,Dr),n!==null){xe=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||Dr&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){xe=t;return}xe=t=e}while(t!==null);Pe===0&&(Pe=5)}function kr(e){var t=jo();return Mr(99,TT.bind(null,e,t)),null}function TT(e,t){do or();while(ps!==null);if(j&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-Jn(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(mn!==null&&!(r&24)&&mn.has(e)&&mn.delete(e),e===Ue&&(xe=Ue=null,Me=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=j,j|=32,Af.current=null,Qd=dl,s=Ay(),Cp(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,f=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&&++f===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;Yd={focusedElem:s,selectionRange:a},dl=!1,ms=null,vl=!1,L=r;do try{kT()}catch(R){if(L===null)throw Error(T(330));Yn(L,R),L=L.nextEffect}while(L!==null);ms=null,L=r;do try{for(s=e;L!==null;){var h=L.flags;if(h&16&&hs(L.stateNode,""),h&128){var S=L.alternate;if(S!==null){var w=S.ref;w!==null&&(typeof w=="function"?w(null):w.current=null)}}switch(h&1038){case 2:hv(L),L.flags&=-3;break;case 6:hv(L),L.flags&=-3,op(L.alternate,L);break;case 1024:L.flags&=-1025;break;case 1028:L.flags&=-1025,op(L.alternate,L);break;case 4:op(L.alternate,L);break;case 8:a=L,DS(s,a);var C=a.alternate;mv(a),C!==null&&mv(C)}L=L.nextEffect}}catch(R){if(L===null)throw Error(T(330));Yn(L,R),L=L.nextEffect}while(L!==null);if(w=Yd,S=Ay(),h=w.focusedElem,s=w.selectionRange,S!==h&&h&&h.ownerDocument&&eS(h.ownerDocument.documentElement,h)){for(s!==null&&Cp(h)&&(S=s.start,w=s.end,w===void 0&&(w=S),"selectionStart"in h?(h.selectionStart=S,h.selectionEnd=Math.min(w,h.value.length)):(w=(S=h.ownerDocument||document)&&S.defaultView||window,w.getSelection&&(w=w.getSelection(),a=h.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!w.extend&&C>s&&(a=s,s=C,C=a),a=Ly(h,C),i=Ly(h,s),a&&i&&(w.rangeCount!==1||w.anchorNode!==a.node||w.anchorOffset!==a.offset||w.focusNode!==i.node||w.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),w.removeAllRanges(),C>s?(w.addRange(S),w.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),w.addRange(S)))))),S=[],w=h;w=w.parentNode;)w.nodeType===1&&S.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<S.length;h++)w=S[h],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}dl=!!Qd,Yd=Qd=null,e.current=n,L=r;do try{for(h=e;L!==null;){var b=L.flags;if(b&36&&xT(h,L.alternate,L),b&128){S=void 0;var E=L.ref;if(E!==null){var P=L.stateNode;switch(L.tag){case 5:S=P;break;default:S=P}typeof E=="function"?E(S):E.current=S}}L=L.nextEffect}}catch(R){if(L===null)throw Error(T(330));Yn(L,R),L=L.nextEffect}while(L!==null);L=null,lT(),j=o}else e.current=n;if(tr)tr=!1,ps=e,ts=t;else for(L=r;L!==null;)t=L.nextEffect,L.nextEffect=null,L.flags&8&&(b=L,b.sibling=null,b.stateNode=null),L=t;if(r=e.pendingLanes,r===0&&(qt=null),r===1?e===Wp?fs++:(fs=0,Wp=e):fs=0,n=n.stateNode,Or&&typeof Or.onCommitFiberRoot=="function")try{Or.onCommitFiberRoot(Sf,n,void 0,(n.current.flags&64)===64)}catch{}if(St(e,Ne()),zl)throw zl=!1,e=Kp,Kp=null,e;return j&8||Qt(),null}function kT(){for(;L!==null;){var e=L.alternate;vl||ms===null||(L.flags&8?vy(L,ms)&&(vl=!0):L.tag===13&&wT(e,L)&&vy(L,ms)&&(vl=!0));var t=L.flags;t&256&&ST(e,L),!(t&512)||tr||(tr=!0,bs(97,function(){return or(),null})),L=L.nextEffect}}function or(){if(ts!==90){var e=97<ts?97:ts;return ts=90,Mr(e,RT)}return!1}function PT(e,t){Vp.push(t,e),tr||(tr=!0,bs(97,function(){return or(),null}))}function VS(e,t){$p.push(t,e),tr||(tr=!0,bs(97,function(){return or(),null}))}function RT(){if(ps===null)return!1;var e=ps;if(ps=null,j&48)throw Error(T(331));var t=j;j|=32;var n=$p;$p=[];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));Yn(i,l)}}for(n=Vp,Vp=[],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));Yn(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 j=t,Qt(),!0}function vv(e,t,n){t=Lf(n,t),t=NS(e,t,1),Gn(e,t),t=tt(),e=tu(e,1),e!==null&&(ql(e,1,t),St(e,t))}function Yn(e,t){if(e.tag===3)vv(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){vv(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(qt===null||!qt.has(r))){e=Lf(t,e);var o=MS(n,e,1);if(Gn(n,o),o=tt(),n=tu(n,1),n!==null)ql(n,1,o),St(n,o);else if(typeof r.componentDidCatch=="function"&&(qt===null||!qt.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function IT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tt(),e.pingedLanes|=e.suspendedLanes&n,Ue===e&&(Me&n)===n&&(Pe===4||Pe===3&&(Me&62914560)===Me&&500>Ne()-Nf?No(e,0):Of|=n),St(e,t)}function LT(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(dn===0&&(dn=Uo),t=So(62914560&~dn),t===0&&(t=4194304)):t=jo()===99?1:2:t=1),n=tt(),e=tu(e,t),e!==null&&(ql(e,t,n),St(e,n))}var $S;$S=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)Lt=!0;else if(n&r)Lt=!!(e.flags&16384);else{switch(Lt=!1,t.tag){case 3:ov(t),tp();break;case 5:Xy(t);break;case 1:Qe(t.type)&&ml(t);break;case 4:Lp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;fe(Rl,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?iv(e,t,n):(fe(pe,pe.current&1),t=fn(e,t,n),t!==null?t.sibling:null);fe(pe,pe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return cv(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),fe(pe,pe.current),r)break;return null;case 23:case 24:return t.lanes=0,np(e,t,n)}return fn(e,t,n)}else Lt=!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=Fo(t,De.current),Lo(t,n),o=kf(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;ml(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Cf(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Al(t,r,s,e),o.updater=Jl,t.stateNode=o,o._reactInternals=t,Ip(t,r,e,n),t=Mp(null,t,r,!0,i,n)}else t.tag=0,Ge(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=OT(o),e=It(o,e),i){case 0:t=Np(null,t,o,e,n);break e;case 1:t=rv(null,t,o,e,n);break e;case 11:t=tv(null,t,o,e,n);break e;case 14:t=nv(null,t,o,It(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:It(r,o),Np(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),rv(e,t,r,o,n);case 3:if(ov(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,hS(e,t),Es(t,r,null,n),r=t.memoizedState.element,r===o)tp(),t=fn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(Kn=Io(t.stateNode.containerInfo.firstChild),pn=t,i=Xt=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],Ao.push(i);for(n=xS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else Ge(e,t,r,n),tp();t=t.child}return t;case 5:return Xy(t),e===null&&Ap(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,Tp(r,o)?s=null:i!==null&&Tp(r,i)&&(t.flags|=16),IS(e,t),Ge(e,t,s,n),t.child;case 6:return e===null&&Ap(t),null;case 13:return iv(e,t,n);case 4:return Lp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ol(t,null,r,n):Ge(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),tv(e,t,r,o,n);case 7:return Ge(e,t,t.pendingProps,n),t.child;case 8:return Ge(e,t,t.pendingProps.children,n),t.child;case 12:return Ge(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(fe(Rl,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=gt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!Xe.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=qn(-1,n&-n),u.tag=2,Gn(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),gS(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}Ge(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,Lo(t,n),o=vt(o,i.unstable_observedBits),r=r(o),t.flags|=1,Ge(e,t,r,n),t.child;case 14:return o=t.type,i=It(o,t.pendingProps),i=It(o.type,i),nv(e,t,o,i,r,n);case 15:return RS(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Qe(r)?(e=!0,ml(t)):e=!1,Lo(t,n),vS(t,r,o),Ip(t,r,o,n),Mp(null,t,r,!0,e,n);case 19:return cv(e,t,n);case 23:return np(e,t,n);case 24:return np(e,t,n)}throw Error(T(156,t.tag))};function AT(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 ht(e,t,n,r){return new AT(e,t,n,r)}function Df(e){return e=e.prototype,!(!e||!e.isReactComponent)}function OT(e){if(typeof e=="function")return Df(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vl)return 11;if(e===$l)return 14}return 2}function nr(e,t){var n=e.alternate;return n===null?(n=ht(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 Sl(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Df(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Bn:return Mo(n.children,o,i,t);case wv:s=8,o|=16;break;case Yp:s=8,o|=1;break;case rs:return e=ht(12,n,t,o|8),e.elementType=rs,e.type=rs,e.lanes=i,e;case os:return e=ht(13,n,t,o),e.type=os,e.elementType=os,e.lanes=i,e;case xl:return e=ht(19,n,t,o),e.elementType=xl,e.lanes=i,e;case rf:return Ff(n,o,i,t);case lp:return e=ht(24,n,t,o),e.elementType=lp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zp:s=10;break e;case Jp:s=9;break e;case Vl:s=11;break e;case $l:s=14;break e;case ef:s=16,r=null;break e;case tf:s=22;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=ht(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Mo(e,t,n,r){return e=ht(7,e,r,t),e.lanes=n,e}function Ff(e,t,n,r){return e=ht(23,e,r,t),e.elementType=rf,e.lanes=n,e}function ip(e,t,n){return e=ht(6,e,null,t),e.lanes=n,e}function sp(e,t,n){return t=ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function NT(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=Vd(0),this.expirationTimes=Vd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vd(0),this.mutableSourceEagerHydrationData=null}function MT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Pr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ul(e,t,n,r){var o=t.current,i=tt(),s=Xn(o);e:if(n){n=n._reactInternals;t:{if(Hr(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=lS(n,l,a);break e}}n=a}else n=er;return t.context===null?t.context=n:t.pendingContext=n,t=qn(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),Gn(o,t),Qn(o,s,i),s}function ap(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 Sv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function jf(e,t){Sv(e,t),(e=e.alternate)&&Sv(e,t)}function DT(){return null}function Hf(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new NT(e,t,n!=null&&n.hydrate===!0),t=ht(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Cf(t),e[zo]=n.current,rS(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}Hf.prototype.render=function(e){Ul(e,this._internalRoot,null,null)};Hf.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Ul(null,e,null,function(){t[zo]=null})};function Os(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function FT(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 Hf(e,0,t?{hydrate:!0}:void 0)}function nu(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=ap(s);a.call(u)}}Ul(t,s,e,o)}else{if(i=n._reactRootContainer=FT(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=ap(s);l.call(u)}}HS(function(){Ul(t,s,e,o)})}return ap(s)}Dv=function(e){if(e.tag===13){var t=tt();Qn(e,4,t),jf(e,4)}};uf=function(e){if(e.tag===13){var t=tt();Qn(e,67108864,t),jf(e,67108864)}};Fv=function(e){if(e.tag===13){var t=tt(),n=Xn(e);Qn(e,n,t),jf(e,n)}};jv=function(e,t){return t()};vp=function(e,t,n){switch(t){case"input":if(cp(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=Yl(r);if(!o)throw Error(T(90));Cv(r),cp(r,o)}}}break;case"textarea":Ev(e,n);break;case"select":t=n.value,t!=null&&ko(e,!!n.multiple,t,!1)}};sf=jS;Av=function(e,t,n,r,o){var i=j;j|=4;try{return Mr(98,e.bind(null,t,n,r,o))}finally{j=i,j===0&&(Vo(),Qt())}};af=function(){!(j&49)&&(CT(),or())};Ov=function(e,t){var n=j;j|=2;try{return e(t)}finally{j=n,j===0&&(Vo(),Qt())}};function WS(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Os(t))throw Error(T(200));return MT(e,t,null,n)}var jT={Events:[Is,Co,Yl,Iv,Lv,or,{current:!1}]},Qi={findFiberByHostInstance:Ir,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},HT={bundleType:Qi.bundleType,version:Qi.version,rendererPackageName:Qi.rendererPackageName,rendererConfig:Qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:jr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Mv(e),e===null?null:e.stateNode},findFiberByHostInstance:Qi.findFiberByHostInstance||DT,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Yi=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Yi.isDisabled&&Yi.supportsFiber))try{Sf=Yi.inject(HT),Or=Yi}catch{}var Yi;xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jT;xt.createPortal=WS;xt.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=Mv(t),e=e===null?null:e.stateNode,e};xt.flushSync=function(e,t){var n=j;if(n&48)return e(t);j|=1;try{if(e)return Mr(99,e.bind(null,t))}finally{j=n,Qt()}};xt.hydrate=function(e,t,n){if(!Os(t))throw Error(T(200));return nu(null,e,t,!0,n)};xt.render=function(e,t,n){if(!Os(t))throw Error(T(200));return nu(null,e,t,!1,n)};xt.unmountComponentAtNode=function(e){if(!Os(e))throw Error(T(40));return e._reactRootContainer?(HS(function(){nu(null,null,e,!1,function(){e._reactRootContainer=null,e[zo]=null})}),!0):!1};xt.unstable_batchedUpdates=jS;xt.unstable_createPortal=function(e,t){return WS(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};xt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Os(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return nu(e,t,n,!1,r)};xt.version="17.0.2"});var ru=me((LO,XS)=>{"use strict";function GS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(GS)}catch(e){console.error(e)}}GS(),XS.exports=qS()});var C0=me(_0=>{"use strict";var Qo=A();function Ck(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bk=typeof Object.is=="function"?Object.is:Ck,Ek=Qo.useState,Tk=Qo.useEffect,kk=Qo.useLayoutEffect,Pk=Qo.useDebugValue;function Rk(e,t){var n=t(),r=Ek({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return kk(function(){o.value=n,o.getSnapshot=t,pm(o)&&i({inst:o})},[e,n,t]),Tk(function(){return pm(o)&&i({inst:o}),e(function(){pm(o)&&i({inst:o})})},[e]),Pk(n),n}function pm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bk(e,n)}catch{return!0}}function Ik(e,t){return t()}var Lk=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ik:Rk;_0.useSyncExternalStore=Qo.useSyncExternalStore!==void 0?Qo.useSyncExternalStore:Lk});var fm=me((vN,b0)=>{"use strict";b0.exports=C0()});var T0=me(E0=>{"use strict";var du=A(),Ak=fm();function Ok(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nk=typeof Object.is=="function"?Object.is:Ok,Mk=Ak.useSyncExternalStore,Dk=du.useRef,Fk=du.useEffect,jk=du.useMemo,Hk=du.useDebugValue;E0.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=Dk(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=jk(function(){function l(f){if(!u){if(u=!0,c=f,f=r(f),o!==void 0&&s.hasValue){var v=s.value;if(o(v,f))return p=v}return p=f}if(v=p,Nk(c,f))return v;var y=r(f);return o!==void 0&&o(v,y)?v:(c=f,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=Mk(e,i[0],i[1]);return Fk(function(){s.hasValue=!0,s.value=a},[a]),Hk(a),a}});var P0=me((xN,k0)=>{"use strict";k0.exports=T0()});var H0=me(Q=>{"use strict";var Te=typeof Symbol=="function"&&Symbol.for,gm=Te?Symbol.for("react.element"):60103,hm=Te?Symbol.for("react.portal"):60106,gu=Te?Symbol.for("react.fragment"):60107,hu=Te?Symbol.for("react.strict_mode"):60108,yu=Te?Symbol.for("react.profiler"):60114,vu=Te?Symbol.for("react.provider"):60109,Su=Te?Symbol.for("react.context"):60110,ym=Te?Symbol.for("react.async_mode"):60111,xu=Te?Symbol.for("react.concurrent_mode"):60111,wu=Te?Symbol.for("react.forward_ref"):60112,_u=Te?Symbol.for("react.suspense"):60113,Kk=Te?Symbol.for("react.suspense_list"):60120,Cu=Te?Symbol.for("react.memo"):60115,bu=Te?Symbol.for("react.lazy"):60116,Vk=Te?Symbol.for("react.block"):60121,$k=Te?Symbol.for("react.fundamental"):60117,Wk=Te?Symbol.for("react.responder"):60118,qk=Te?Symbol.for("react.scope"):60119;function ot(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case gm:switch(e=e.type,e){case ym:case xu:case gu:case yu:case hu:case _u:return e;default:switch(e=e&&e.$$typeof,e){case Su:case wu:case bu:case Cu:case vu:return e;default:return t}}case hm:return t}}}function j0(e){return ot(e)===xu}Q.AsyncMode=ym;Q.ConcurrentMode=xu;Q.ContextConsumer=Su;Q.ContextProvider=vu;Q.Element=gm;Q.ForwardRef=wu;Q.Fragment=gu;Q.Lazy=bu;Q.Memo=Cu;Q.Portal=hm;Q.Profiler=yu;Q.StrictMode=hu;Q.Suspense=_u;Q.isAsyncMode=function(e){return j0(e)||ot(e)===ym};Q.isConcurrentMode=j0;Q.isContextConsumer=function(e){return ot(e)===Su};Q.isContextProvider=function(e){return ot(e)===vu};Q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===gm};Q.isForwardRef=function(e){return ot(e)===wu};Q.isFragment=function(e){return ot(e)===gu};Q.isLazy=function(e){return ot(e)===bu};Q.isMemo=function(e){return ot(e)===Cu};Q.isPortal=function(e){return ot(e)===hm};Q.isProfiler=function(e){return ot(e)===yu};Q.isStrictMode=function(e){return ot(e)===hu};Q.isSuspense=function(e){return ot(e)===_u};Q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gu||e===xu||e===yu||e===hu||e===_u||e===Kk||typeof e=="object"&&e!==null&&(e.$$typeof===bu||e.$$typeof===Cu||e.$$typeof===vu||e.$$typeof===Su||e.$$typeof===wu||e.$$typeof===$k||e.$$typeof===Wk||e.$$typeof===qk||e.$$typeof===Vk)};Q.typeOf=ot});var z0=me((NN,B0)=>{"use strict";B0.exports=H0()});var G0=me((MN,q0)=>{"use strict";var vm=z0(),Gk={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Xk={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Qk={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},$0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Sm={};Sm[vm.ForwardRef]=Qk;Sm[vm.Memo]=$0;function U0(e){return vm.isMemo(e)?$0:Sm[e.$$typeof]||Gk}var Yk=Object.defineProperty,Zk=Object.getOwnPropertyNames,K0=Object.getOwnPropertySymbols,Jk=Object.getOwnPropertyDescriptor,eP=Object.getPrototypeOf,V0=Object.prototype;function W0(e,t,n){if(typeof t!="string"){if(V0){var r=eP(t);r&&r!==V0&&W0(e,r,n)}var o=Zk(t);K0&&(o=o.concat(K0(t)));for(var i=U0(e),s=U0(t),a=0;a<o.length;++a){var l=o[a];if(!Xk[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=Jk(t,l);try{Yk(e,l,u)}catch{}}}}return e}q0.exports=W0});var Q0=me(Y=>{"use strict";var xm=Symbol.for("react.element"),wm=Symbol.for("react.portal"),Eu=Symbol.for("react.fragment"),Tu=Symbol.for("react.strict_mode"),ku=Symbol.for("react.profiler"),Pu=Symbol.for("react.provider"),Ru=Symbol.for("react.context"),tP=Symbol.for("react.server_context"),Iu=Symbol.for("react.forward_ref"),Lu=Symbol.for("react.suspense"),Au=Symbol.for("react.suspense_list"),Ou=Symbol.for("react.memo"),Nu=Symbol.for("react.lazy"),nP=Symbol.for("react.offscreen"),X0;X0=Symbol.for("react.module.reference");function _t(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xm:switch(e=e.type,e){case Eu:case ku:case Tu:case Lu:case Au:return e;default:switch(e=e&&e.$$typeof,e){case tP:case Ru:case Iu:case Nu:case Ou:case Pu:return e;default:return t}}case wm:return t}}}Y.ContextConsumer=Ru;Y.ContextProvider=Pu;Y.Element=xm;Y.ForwardRef=Iu;Y.Fragment=Eu;Y.Lazy=Nu;Y.Memo=Ou;Y.Portal=wm;Y.Profiler=ku;Y.StrictMode=Tu;Y.Suspense=Lu;Y.SuspenseList=Au;Y.isAsyncMode=function(){return!1};Y.isConcurrentMode=function(){return!1};Y.isContextConsumer=function(e){return _t(e)===Ru};Y.isContextProvider=function(e){return _t(e)===Pu};Y.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xm};Y.isForwardRef=function(e){return _t(e)===Iu};Y.isFragment=function(e){return _t(e)===Eu};Y.isLazy=function(e){return _t(e)===Nu};Y.isMemo=function(e){return _t(e)===Ou};Y.isPortal=function(e){return _t(e)===wm};Y.isProfiler=function(e){return _t(e)===ku};Y.isStrictMode=function(e){return _t(e)===Tu};Y.isSuspense=function(e){return _t(e)===Lu};Y.isSuspenseList=function(e){return _t(e)===Au};Y.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Eu||e===ku||e===Tu||e===Lu||e===Au||e===nP||typeof e=="object"&&e!==null&&(e.$$typeof===Nu||e.$$typeof===Ou||e.$$typeof===Pu||e.$$typeof===Ru||e.$$typeof===Iu||e.$$typeof===X0||e.getModuleId!==void 0)};Y.typeOf=_t});var Z0=me((FN,Y0)=>{"use strict";Y0.exports=Q0()});var Zm=me((h4,kw)=>{"use strict";var iR="Expected a function",Ew=NaN,sR="[object Symbol]",aR=/^\s+|\s+$/g,lR=/^[-+]0x[0-9a-f]+$/i,uR=/^0b[01]+$/i,cR=/^0o[0-7]+$/i,dR=parseInt,pR=typeof global=="object"&&global&&global.Object===Object&&global,fR=typeof self=="object"&&self&&self.Object===Object&&self,mR=pR||fR||Function("return this")(),gR=Object.prototype,hR=gR.toString,yR=Math.max,vR=Math.min,Qm=function(){return mR.Date.now()};function SR(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(iR);t=Tw(t)||0,Ym(n)&&(c=!!n.leading,p="maxWait"in n,i=p?yR(Tw(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function f(b){var E=r,P=o;return r=o=void 0,u=b,s=e.apply(P,E),s}function v(b){return u=b,a=setTimeout(m,t),c?f(b):s}function y(b){var E=b-l,P=b-u,R=t-E;return p?vR(R,i-P):R}function g(b){var E=b-l,P=b-u;return l===void 0||E>=t||E<0||p&&P>=i}function m(){var b=Qm();if(g(b))return h(b);a=setTimeout(m,y(b))}function h(b){return a=void 0,d&&r?f(b):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function w(){return a===void 0?s:h(Qm())}function C(){var b=Qm(),E=g(b);if(r=arguments,o=this,l=b,E){if(a===void 0)return v(l);if(p)return a=setTimeout(m,t),f(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=S,C.flush=w,C}function Ym(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function xR(e){return!!e&&typeof e=="object"}function wR(e){return typeof e=="symbol"||xR(e)&&hR.call(e)==sR}function Tw(e){if(typeof e=="number")return e;if(wR(e))return Ew;if(Ym(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ym(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(aR,"");var n=uR.test(e);return n||cR.test(e)?dR(e.slice(2),n?2:8):lR.test(e)?Ew:+e}kw.exports=SR});var Dw=me((j4,Mw)=>{"use strict";var kR=/["'&<>]/;Mw.exports=PR;function PR(e){var t=""+e,n=kR.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var ZL={};ze(ZL,{Card:()=>re,ContentEditableInput:()=>io,DeepdeskAPI:()=>Fn,DeepdeskSDK:()=>Ia,HTTPClient:()=>Ut,InputMediator:()=>Dn,InputType:()=>Er,KeyboardHint:()=>Ba,Label:()=>za,Locale:()=>zs,Section:()=>ln,SectionList:()=>Ua,Sources:()=>un,Suggestion:()=>J,SuggestionList:()=>et,TextAreaInput:()=>so,ToggleButton:()=>br,attachFile:()=>ab,authenticateWithKey:()=>ib,createFullRange:()=>xi,createOverlayContainer:()=>Ra,createRangeFromOffsets:()=>_r,escapeHTML:()=>ai,fetchPlatformConfig:()=>sb,formatTextMarkup:()=>ob,getRangeOffsets:()=>Ea,getRangeText:()=>Ta,insertCKEditor:()=>rb,isHTML:()=>Ec,isSupportedInputElement:()=>fd,updateContentEditable:()=>tb,updateTextArea:()=>eb,useStyles:()=>k,waitForElementVisibilityChange:()=>hd});var Ha=x(W()),Je=x(A());var Fa=x(A()),Rh=x(W()),Ii=Fa.default.createContext({});function k(e,t){let{debug:n,...r}=(0,Fa.useContext)(Ii),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Rh.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var Ai=x(_()),Nh=({className:e})=>(0,Ai.jsxs)("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,Ai.jsx)("line",{x1:"1",y1:"11",x2:"11",y2:"1",stroke:"black",strokeWidth:"2"}),(0,Ai.jsx)("line",{x1:"1",y1:"1",x2:"11",y2:"11",stroke:"black",strokeWidth:"2"})]});var Mh={root:"_root_vr71j_1"};var Cr=x(_()),ja=()=>(0,Cr.jsxs)("svg",{className:Mh.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,Cr.jsx)("defs",{children:(0,Cr.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,Cr.jsx)("title",{children:"Failed loading image"}),(0,Cr.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_15d2a_1",imageWrapper:"_imageWrapper_15d2a_7",image:"_image_15d2a_7",content:"_content_15d2a_24",title:"_title_15d2a_35",contentIsCropped:"_contentIsCropped_15d2a_45",lineClamp:"_lineClamp_15d2a_51",closeIcon:"_closeIcon_15d2a_58"};var an=x(_()),Oi=(0,Je.createContext)(kd),Pb=({title:e,src:t})=>{let n=(0,Je.useContext)(Oi),[r,o]=(0,Je.useState)(!1);return(0,Je.useEffect)(()=>{o(!1)},[t]),(0,an.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,an.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,an.jsx)(ja,{})})},Rb=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Je.useContext)(Oi);return(0,an.jsx)("div",{className:(0,Ha.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},Ib=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,Je.useContext)(Oi);return Je.default.createElement(e,{className:(0,Ha.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Lb=({className:e,title:t,...n})=>{let r=(0,Je.useContext)(Oi);return(0,an.jsx)("div",{className:(0,Ha.default)(r.closeIcon,e),title:t,role:"button","aria-label":t,...n,children:(0,an.jsx)(Nh,{})})},Ni=({children:e})=>{let t=k("Card",kd);return(0,an.jsx)("div",{className:t.root,children:(0,an.jsx)(Oi.Provider,{value:t,children:e})})};Ni.Image=Pb;Ni.Content=Rb;Ni.Title=Ib;Ni.CloseIcon=Lb;var re=Ni;var Fh=x(W());var Dh={root:"_root_cq1yq_1"};var jh=x(_());var Ab={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},Ob=({className:e,keyCode:t,...n})=>{let r=k("KeyboardHint",Dh);return(0,jh.jsx)("span",{"data-key":Ab[t],className:(0,Fh.default)(e,r.root),...n})},Ba=Ob;var Bh=x(W());var Hh={root:"_root_4a08n_1"};var zh=x(_()),Nb=({className:e,children:t,...n})=>{let r=k("Label",Hh);return(0,zh.jsx)("span",{...n,className:(0,Bh.default)(e,r.root),children:t})},za=Nb;var Uh={root:"_root_jlggj_1",subTitleContainer:"_subTitleContainer_jlggj_5",subtitle:"_subtitle_jlggj_9",suggestions:"_suggestions_jlggj_17"};var co=x(_()),Mb=({title:e,children:t,type:n,...r})=>{let o=k("Section",Uh);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})]})},ln=Mb;var Vh=x(W()),$h=x(A());var Kh={root:"_root_19wxp_1"};var Wh=x(_()),Db=$h.default.forwardRef(({className:e,children:t},n)=>{let r=k("SectionList",Kh);return(0,Wh.jsx)("div",{ref:n,className:(0,Vh.default)(r.root,e),children:t})}),Ua=Db;var Mi=x(W()),ft=x(A());var Pd={root:"_root_ipo0b_11",fadein:"_fadein_ipo0b_1",isClickable:"_isClickable_ipo0b_46",isSelected:"_isSelected_ipo0b_51",actions:"_actions_ipo0b_75",actionsIsFixed:"_actionsIsFixed_ipo0b_97",actionButton:"_actionButton_ipo0b_105",dropdownList:"_dropdownList_ipo0b_126",dropdownButton:"_dropdownButton_ipo0b_141",dropdownItem:"_dropdownItem_ipo0b_151",dropdownItemButton:"_dropdownItemButton_ipo0b_160",actionButtonIsPrimary:"_actionButtonIsPrimary_ipo0b_174",actionButtonIsDisabled:"_actionButtonIsDisabled_ipo0b_178",labels:"_labels_ipo0b_186",label:"_label_ipo0b_186"};var pt=x(_()),po=(0,ft.createContext)(Pd),Fb=({fixed:e,children:t,...n})=>{let r=(0,ft.useContext)(po);return(0,pt.jsx)("div",{...n,className:(0,Mi.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},jb=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,ft.useContext)(po);return(0,pt.jsxs)("div",{className:(0,Mi.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,pt.jsx)("ul",{className:i.dropdownList,children:o})]})},Hb=({index:e,label:t,onClick:n})=>{let r=(0,ft.useContext)(po);return(0,pt.jsx)("li",{className:r.dropdownItem,children:(0,pt.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},Bb=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,ft.useContext)(po);return(0,pt.jsx)("button",{type:"button",className:(0,Mi.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},zb=({labels:e})=>{let t=(0,ft.useContext)(po);return(0,pt.jsx)("div",{className:t.labels,children:e.map(n=>(0,pt.jsx)("span",{className:t.label,children:n},n))})},fo=ft.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=k("Suggestion",Pd),l=(0,ft.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,pt.jsx)(o,{...i,ref:s,className:(0,Mi.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,pt.jsx)(po.Provider,{value:a,children:r})})});fo.Labels=zb;fo.Actions=Fb;fo.ActionButton=Bb;fo.DropdownButton=jb;fo.DropdownItem=Hb;var J=fo;var Gh=x(W());var qh={root:"_root_fp74r_1",isWithDivider:"_isWithDivider_fp74r_9"};var Xh=x(_()),Ub=({withDivider:e,children:t})=>{let n=k("SuggestionList",qh);return(0,Xh.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,Gh.default)(n.root,{[n.isWithDivider]:e}),children:t})},et=Ub;var Yh=x(W());var Qh={root:"_root_1wpmq_1",isCollapsed:"_isCollapsed_1wpmq_17"};var Ka=x(_()),Kb=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=k("ToggleButton",Qh);return(0,Ka.jsx)("button",{type:"button",className:(0,Yh.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Ka.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Ka.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},br=Kb;var Zh=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Va=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Jh=/x-deepdesk-(([a-z0-9\-_])+-version)/,un=(y=>(y.SEARCH="search",y.TEMPLATE="template",y.ELASTIC_SEARCH="search-autocomplete",y.GPT="gpt",y.TRIE="trie",y.TRIE_WITH_TYPOS="trie-with-typos",y.SEMANTIC="semantic",y.TEXT_RECOMMENDATION="text_recommendation",y.URL_RECOMMENDATION="url_recommendation",y.LINK_RECOMMENDATION="link_recommendation",y.PERSONAL_COLLECTION="personal-collection",y.PERSONAL_COLLECTION_SEARCH="personal-collection-search",y.SEARCH_OVERLAY="search-overlay",y.SEARCH_PREVIEW="search-preview",y.SEARCH_URL="search-url",y))(un||{}),Er=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(Er||{});var kt=x(ru());var N_=x(A());function wt(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 hn(e){return!!e&&!!e[ue]}function At(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)===qT}(e)||Array.isArray(e)||!!e[n0]||!!(!((t=e.constructor)===null||t===void 0)&&t[n0])||Gf(e)||Xf(e))}function zr(e,t,n){n===void 0&&(n=!1),qo(e)===0?(n?Object.keys:Wo)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function qo(e){var t=e[ue];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:Gf(e)?2:Xf(e)?3:0}function $o(e,t){return qo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function BT(e,t){return qo(e)===2?e.get(t):e[t]}function r0(e,t,n){var r=qo(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function o0(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Gf(e){return $T&&e instanceof Map}function Xf(e){return WT&&e instanceof Set}function ir(e){return e.o||e.t}function Qf(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=a0(e);delete t[ue];for(var n=Wo(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 Yf(e,t){return t===void 0&&(t=!1),Zf(e)||hn(e)||!At(e)||(qo(e)>1&&(e.set=e.add=e.clear=e.delete=zT),Object.freeze(e),t&&zr(e,function(n,r){return Yf(r,!0)},!0)),e}function zT(){wt(2)}function Zf(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Yt(e){var t=qf[e];return t||wt(18,e),t}function UT(e,t){qf[e]||(qf[e]=t)}function Vf(){return Ms}function Bf(e,t){t&&(Yt("Patches"),e.u=[],e.s=[],e.v=t)}function ou(e){$f(e),e.p.forEach(KT),e.p=null}function $f(e){e===Ms&&(Ms=e.l)}function QS(e){return Ms={p:[],l:Ms,h:e,m:!0,_:0}}function KT(e){var t=e[ue];t.i===0||t.i===1?t.j():t.g=!0}function zf(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||Yt("ES5").S(t,e,r),r?(n[ue].P&&(ou(t),wt(4)),At(e)&&(e=iu(t,e),t.l||su(t,e)),t.u&&Yt("Patches").M(n[ue].t,e,t.u,t.s)):e=iu(t,n,[]),ou(t),t.u&&t.v(t.u,t.s),e!==s0?e:void 0}function iu(e,t,n){if(Zf(t))return t;var r=t[ue];if(!r)return zr(t,function(a,l){return YS(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return su(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=Qf(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),zr(i,function(a,l){return YS(e,r,o,a,l,n,s)}),su(e,o,!1),n&&e.u&&Yt("Patches").N(r,n,e.u,e.s)}return r.o}function YS(e,t,n,r,o,i,s){if(hn(o)){var a=iu(e,o,i&&t&&t.i!==3&&!$o(t.R,r)?i.concat(r):void 0);if(r0(n,r,a),!hn(a))return;e.m=!1}else s&&n.add(o);if(At(o)&&!Zf(o)){if(!e.h.D&&e._<1)return;iu(e,o),t&&t.A.l||su(e,o)}}function su(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Yf(t,n)}function Uf(e,t){var n=e[ue];return(n?ir(n):e)[t]}function ZS(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 sr(e){e.P||(e.P=!0,e.l&&sr(e.l))}function Kf(e){e.o||(e.o=Qf(e.t))}function Wf(e,t,n){var r=Gf(t)?Yt("MapSet").F(t,n):Xf(t)?Yt("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Vf(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=Ds;s&&(l=[a],u=Ns);var c=Proxy.revocable(l,u),p=c.revoke,d=c.proxy;return a.k=d,a.j=p,d}(t,n):Yt("ES5").J(t,n);return(n?n.A:Vf()).p.push(r),r}function VT(e){return hn(e)||wt(22,e),function t(n){if(!At(n))return n;var r,o=n[ue],i=qo(n);if(o){if(!o.P&&(o.i<4||!Yt("ES5").K(o)))return o.t;o.I=!0,r=JS(n,i),o.I=!1}else r=JS(n,i);return zr(r,function(s,a){o&&BT(o.t,s)===a||r0(r,s,t(a))}),i===3?new Set(r):r}(e)}function JS(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Qf(e)}function i0(){function e(s,a){var l=i[s];return l?l.enumerable=a:i[s]=l={configurable:!0,enumerable:a,get:function(){var u=this[ue];return Ds.get(u,s)},set:function(u){var c=this[ue];Ds.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][ue];if(!l.P)switch(l.i){case 5:r(l)&&sr(l);break;case 4:n(l)&&sr(l)}}}function n(s){for(var a=s.t,l=s.k,u=Wo(l),c=u.length-1;c>=0;c--){var p=u[c];if(p!==ue){var d=a[p];if(d===void 0&&!$o(a,p))return!0;var f=l[p],v=f&&f[ue];if(v?v.t!==d:!o0(f,d))return!0}}var y=!!a[ue];return u.length!==Wo(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&&wt(3,JSON.stringify(ir(s)))}var i={};UT("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(p,d){if(p){for(var f=Array(d.length),v=0;v<d.length;v++)Object.defineProperty(f,""+v,e(v,!0));return f}var y=a0(d);delete y[ue];for(var g=Wo(y),m=0;m<g.length;m++){var h=g[m];y[h]=e(h,p||!!y[h].enumerable)}return Object.create(Object.getPrototypeOf(d),y)}(l,s),c={i:l?5:4,A:a?a.A:Vf(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,ue,{value:c,writable:!0}),u},S:function(s,a,l){l?hn(a)&&a[ue].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var p=c[ue];if(p){var d=p.t,f=p.k,v=p.R,y=p.i;if(y===4)zr(f,function(w){w!==ue&&(d[w]!==void 0||$o(d,w)?v[w]||u(f[w]):(v[w]=!0,sr(p)))}),zr(d,function(w){f[w]!==void 0||$o(f,w)||(v[w]=!1,sr(p))});else if(y===5){if(r(p)&&(sr(p),v.length=!0),f.length<d.length)for(var g=f.length;g<d.length;g++)v[g]=!1;else for(var m=d.length;m<f.length;m++)v[m]=!0;for(var h=Math.min(f.length,d.length),S=0;S<h;S++)f.hasOwnProperty(S)||(v[S]=!0),v[S]===void 0&&u(f[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var e0,Ms,Jf=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",$T=typeof Map<"u",WT=typeof Set<"u",t0=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",s0=Jf?Symbol.for("immer-nothing"):((e0={})["immer-nothing"]=!0,e0),n0=Jf?Symbol.for("immer-draftable"):"__$immer_draftable",ue=Jf?Symbol.for("immer-state"):"__$immer_state";var qT=""+Object.prototype.constructor,Wo=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,a0=Object.getOwnPropertyDescriptors||function(e){var t={};return Wo(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},qf={},Ds={get:function(e,t){if(t===ue)return e;var n=ir(e);if(!$o(n,t))return function(o,i,s){var a,l=ZS(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||!At(r)?r:r===Uf(e.t,t)?(Kf(e),e.o[t]=Wf(e.A.h,r,e)):r},has:function(e,t){return t in ir(e)},ownKeys:function(e){return Reflect.ownKeys(ir(e))},set:function(e,t,n){var r=ZS(ir(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Uf(ir(e),t),i=o==null?void 0:o[ue];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(o0(n,o)&&(n!==void 0||$o(e.t,t)))return!0;Kf(e),sr(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 Uf(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Kf(e),sr(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=ir(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){wt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){wt(12)}},Ns={};zr(Ds,function(e,t){Ns[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ns.deleteProperty=function(e,t){return Ns.set.call(this,e,t,void 0)},Ns.set=function(e,t,n){return Ds.set.call(this,e[0],t,n,e[0])};var GT=function(){function e(n){var r=this;this.O=t0,this.D=!0,this.produce=function(o,i,s){if(typeof o=="function"&&typeof i!="function"){var a=i;i=o;var l=r;return function(y){var g=this;y===void 0&&(y=a);for(var m=arguments.length,h=Array(m>1?m-1:0),S=1;S<m;S++)h[S-1]=arguments[S];return l.produce(y,function(w){var C;return(C=i).call.apply(C,[g,w].concat(h))})}}var u;if(typeof i!="function"&&wt(6),s!==void 0&&typeof s!="function"&&wt(7),At(o)){var c=QS(r),p=Wf(r,o,void 0),d=!0;try{u=i(p),d=!1}finally{d?ou(c):$f(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(y){return Bf(c,s),zf(y,c)},function(y){throw ou(c),y}):(Bf(c,s),zf(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===s0&&(u=void 0),r.D&&Yf(u,!0),s){var f=[],v=[];Yt("Patches").M(o,u,f,v),s(f,v)}return u}wt(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(f){return o.apply(void 0,[f].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){At(n)||wt(8),hn(n)&&(n=VT(n));var r=QS(this),o=Wf(this,n,void 0);return o[ue].C=!0,$f(r),o},t.finishDraft=function(n,r){var o=n&&n[ue],i=o.A;return Bf(i,r),zf(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!t0&&wt(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=Yt("Patches").$;return hn(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),rt=new GT,XT=rt.produce,AO=rt.produceWithPatches.bind(rt),OO=rt.setAutoFreeze.bind(rt),NO=rt.setUseProxies.bind(rt),MO=rt.applyPatches.bind(rt),DO=rt.createDraft.bind(rt),FO=rt.finishDraft.bind(rt),au=XT;function ar(e){"@babel/helpers - typeof";return ar=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},ar(e)}function em(e,t){if(ar(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ar(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tm(e){var t=em(e,"string");return ar(t)==="symbol"?t:String(t)}function nm(e,t,n){return t=tm(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l0(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?l0(Object(n),!0).forEach(function(r){nm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fe(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 u0=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),rm=function(){return Math.random().toString(36).substring(7).split("").join(".")},uu={INIT:"@@redux/INIT"+rm(),REPLACE:"@@redux/REPLACE"+rm(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+rm()}};function QT(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 om(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Fe(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Fe(1));return n(om)(e,t)}if(typeof e!="function")throw new Error(Fe(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(Fe(3));return i}function p(y){if(typeof y!="function")throw new Error(Fe(4));if(l)throw new Error(Fe(5));var g=!0;return u(),a.push(y),function(){if(g){if(l)throw new Error(Fe(6));g=!1,u();var h=a.indexOf(y);a.splice(h,1),s=null}}}function d(y){if(!QT(y))throw new Error(Fe(7));if(typeof y.type>"u")throw new Error(Fe(8));if(l)throw new Error(Fe(9));try{l=!0,i=o(i,y)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var h=g[m];h()}return y}function f(y){if(typeof y!="function")throw new Error(Fe(10));o=y,d({type:uu.REPLACE})}function v(){var y,g=p;return y={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(Fe(11));function S(){h.next&&h.next(c())}S();var w=g(S);return{unsubscribe:w}}},y[u0]=function(){return this},y}return d({type:uu.INIT}),r={dispatch:d,subscribe:p,getState:c,replaceReducer:f},r[u0]=v,r}function YT(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:uu.INIT});if(typeof r>"u")throw new Error(Fe(12));if(typeof n(void 0,{type:uu.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Fe(13))})}function cu(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{YT(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,f={},v=0;v<i.length;v++){var y=i[v],g=n[y],m=u[y],h=g(m,c);if(typeof h>"u"){var S=c&&c.type;throw new Error(Fe(14))}f[y]=h,d=d||h!==m}return d=d||i.length!==Object.keys(u).length,d?f:u}}function Go(){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 c0(){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(Fe(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Go.apply(void 0,a)(o.dispatch),lu(lu({},o),{},{dispatch:i})}}}function d0(e){var t=function(r){var o=r.dispatch,i=r.getState;return function(s){return function(a){return typeof a=="function"?a(o,i,e):s(a)}}};return t}var p0=d0();p0.withExtraArgument=d0;var im=p0;var y0=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)}}(),ZT=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},JT=Object.defineProperty,ek=Object.defineProperties,tk=Object.getOwnPropertyDescriptors,f0=Object.getOwnPropertySymbols,nk=Object.prototype.hasOwnProperty,rk=Object.prototype.propertyIsEnumerable,m0=function(e,t,n){return t in e?JT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},lr=function(e,t){for(var n in t||(t={}))nk.call(t,n)&&m0(e,n,t[n]);if(f0)for(var r=0,o=f0(t);r<o.length;r++){var n=o[r];rk.call(t,n)&&m0(e,n,t[n])}return e},sm=function(e,t){return ek(e,tk(t))},ok=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 ik=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Go:Go.apply(null,arguments)},tN=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function sk(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 ak=function(e){y0(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),lk=function(e){y0(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 um(e){return At(e)?au(e,function(){}):e}function uk(e){return typeof e=="boolean"}function ck(){return function(t){return dk(t)}}function dk(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 ak;if(n&&(uk(n)?a.push(im):a.push(im.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var am=!0;function v0(e){var t=ck(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,p=n.enhancers,d=p===void 0?void 0:p,f;if(typeof o=="function")f=o;else if(sk(o))f=cu(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),!am&&!Array.isArray(v)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!am&&v.some(function(w){return typeof w!="function"}))throw new Error("each middleware provided to configureStore must be a function");var y=c0.apply(void 0,v),g=Go;l&&(g=ik(lr({trace:!am},typeof l=="object"&&l)));var m=new lk(y),h=m;Array.isArray(d)?h=Xo([y],d):typeof d=="function"&&(h=d(m));var S=g.apply(void 0,h);return om(f,c,S)}function de(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 lr(lr({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 S0(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 pk(e){return typeof e=="function"}function fk(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?S0(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(pk(e))l=function(){return um(e())};else{var u=um(e);l=function(){return u}}function c(p,d){p===void 0&&(p=l());var f=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 f.filter(function(v){return!!v}).length===0&&(f=[a]),f.reduce(function(v,y){if(y)if(hn(v)){var g=v,m=y(g,d);return m===void 0?v:m}else{if(At(v))return au(v,function(h){return y(h,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 mk(e,t){return e+"/"+t}function z(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:um(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var p=r[c],d=mk(t,c),f,v;"reducer"in p?(f=p.reducer,v=p.prepare):f=p,i[c]=f,s[d]=f,a[c]=v?de(d,v):de(d)});function l(){var c=typeof e.extraReducers=="function"?S0(e.extraReducers):[e.extraReducers],p=c[0],d=p===void 0?{}:p,f=c[1],v=f===void 0?[]:f,y=c[2],g=y===void 0?void 0:y,m=lr(lr({},d),s);return fk(n,function(h){for(var S in m)h.addCase(S,m[S]);for(var w=0,C=v;w<C.length;w++){var b=C[w];h.addMatcher(b.matcher,b.reducer)}g&&h.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 gk="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",hk=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=gk[Math.random()*64|0];return t},yk=["name","message","stack","code"],lm=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),g0=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),vk=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=yk;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},F=function(){function e(t,n,r){var o=de(t+"/fulfilled",function(c,p,d,f){return{payload:c,meta:sm(lr({},f||{}),{arg:d,requestId:p,requestStatus:"fulfilled"})}}),i=de(t+"/pending",function(c,p,d){return{payload:void 0,meta:sm(lr({},d||{}),{arg:p,requestId:c,requestStatus:"pending"})}}),s=de(t+"/rejected",function(c,p,d,f,v){return{payload:f,error:(r&&r.serializeError||vk)(c||"Rejected"),meta:sm(lr({},v||{}),{arg:d,requestId:p,rejectedWithValue:!!f,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,f){var v=r!=null&&r.idGenerator?r.idGenerator(c):hk(),y=new l,g,m=!1;function h(w){g=w,y.abort()}var S=function(){return ok(this,null,function(){var w,C,b,E,P,R,N;return ZT(this,function(B){switch(B.label){case 0:return B.trys.push([0,4,,5]),E=(w=r==null?void 0:r.condition)==null?void 0:w.call(r,c,{getState:d,extra:f}),xk(E)?[4,E]:[3,2];case 1:E=B.sent(),B.label=2;case 2:if(E===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,P=new Promise(function(O,Z){return y.signal.addEventListener("abort",function(){return Z({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:f}))),[4,Promise.race([P,Promise.resolve(n(c,{dispatch:p,getState:d,extra:f,requestId:v,signal:y.signal,abort:h,rejectWithValue:function(O,Z){return new lm(O,Z)},fulfillWithValue:function(O,Z){return new g0(O,Z)}})).then(function(O){if(O instanceof lm)throw O;return O instanceof g0?o(O.payload,v,c,O.meta):o(O,v,c)})])];case 3:return b=B.sent(),[3,5];case 4:return R=B.sent(),b=R instanceof lm?s(null,v,c,R.payload,R.meta):s(R,v,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(b)&&b.meta.condition,N||p(b),[2,b]}})})}();return Object.assign(S,{abort:h,requestId:v,arg:c,unwrap:function(){return S.then(Sk)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function Sk(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function xk(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var wk="task",x0="listener",w0="completed",cm="cancelled",iN="task-"+cm,sN="task-"+w0,aN=x0+"-"+cm,lN=x0+"-"+w0,uN=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=wk+" "+cm+" (reason: "+t+")"}return e}();var dm="listenerMiddleware";var cN=de(dm+"/add"),dN=de(dm+"/removeAll"),pN=de(dm+"/remove");var h0,fN=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(h0||(h0=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},_k=function(e){return function(t){setTimeout(t,e)}},mN=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:_k(10);i0();var ux=x(fm()),cx=x(P0());var mm=x(ru());function Bk(e){e()}var R0=Bk,I0=e=>R0=e,L0=()=>R0;var Yo=x(A());var N0=x(A());var pu=x(A()),A0=Symbol.for(`react-redux-context-${pu.version}`),O0=globalThis;function zk(){let e=O0[A0];return e||(e=(0,pu.createContext)(null),O0[A0]=e),e}var je=new Proxy({},new Proxy({},{get(e,t){let n=zk();return(r,...o)=>Reflect[t](n,...o)}}));function Fs(e=je){return function(){return(0,N0.useContext)(e)}}var fu=Fs();var mu=()=>{throw new Error("uSES not initialized!")};var M0=mu,D0=e=>{M0=e},Uk=(e,t)=>e===t;function F0(e=je){let t=e===je?fu:Fs(e);return function(r,o={}){let{equalityFn:i=Uk,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(),f=(0,Yo.useRef)(!0),v=(0,Yo.useCallback)({[r.name](g){return r(g)}}[r.name],[r,p,s]),y=M0(u.addNestedSub,l.getState,c||l.getState,v,i);return(0,Yo.useDebugValue)(y),y}}var I=F0();function yn(){return yn=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},yn.apply(this,arguments)}function js(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var bm=x(G0()),ee=x(A()),ix=x(Z0());var oP=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function iP(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,p,d;function f(h,S){return l=h,u=S,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 h=e(l,u),S=!s(h,c);return c=h,S&&(d=n(c,p,u)),d}function m(h,S){let w=!i(S,u),C=!o(h,l,S,u);return l=h,u=S,w&&C?v():w?y():C?g():d}return function(S,w){return a?m(S,w):f(S,w)}}function _m(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=js(t,oP),s=n(e,i),a=r(e,i),l=o(e,i);return iP(s,a,l,e,i)}function Cm(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 Hs(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function J0(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Mu(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=J0(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=J0(u),u=i(a,l)),u},i}}function Zo(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function ex(e){return e&&typeof e=="object"?Hs(t=>Cm(e,t)):e?typeof e=="function"?Mu(e,"mapDispatchToProps"):Zo(e,"mapDispatchToProps"):Hs(t=>({dispatch:t}))}function tx(e){return e?typeof e=="function"?Mu(e,"mapStateToProps"):Zo(e,"mapStateToProps"):Hs(()=>({}))}function sP(e,t,n){return yn({},n,e,t)}function aP(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 nx(e){return e?typeof e=="function"?aP(e):Zo(e,"mergeProps"):()=>sP}function lP(){let e=L0(),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 rx={notify(){},get:()=>[]};function Du(e,t){let n,r=rx;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=lP())}function u(){n&&(n(),n=void 0,r.clear(),r=rx)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Fu=x(A()),uP=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Jo=uP?Fu.useLayoutEffect:Fu.useEffect;function ox(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ei(e,t){if(ox(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])||!ox(e[n[o]],t[n[o]]))return!1;return!0}var cP=["reactReduxForwardedRef"],sx=mu,ax=e=>{sx=e};var dP=[null,null];function pP(e,t,n){Jo(()=>e(...t),n)}function fP(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function mP(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let p=!1,d=null,f=()=>{if(p||!a.current)return;let y=t.getState(),g,m;try{g=r(y,o.current)}catch(h){m=h,d=h}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function gP(e,t){return e===t}function hP(e,t,n,{pure:r,areStatesEqual:o=gP,areOwnPropsEqual:i=ei,areStatePropsEqual:s=ei,areMergedPropsEqual:a=ei,forwardRef:l=!1,context:u=je}={}){let c=u,p=tx(e),d=ex(t),f=nx(n),v=!!e;return g=>{let m=g.displayName||g.name||"Component",h=`Connect(${m})`,S={shouldHandleStateChanges:v,displayName:h,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:p,initMapDispatchToProps:d,initMergeProps:f,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function w(E){let[P,R,N]=(0,ee.useMemo)(()=>{let{reactReduxForwardedRef:Kt}=E,Pi=js(E,cP);return[E.context,Kt,Pi]},[E]),B=(0,ee.useMemo)(()=>P&&P.Consumer&&(0,ix.isContextConsumer)(ee.default.createElement(P.Consumer,null))?P:c,[P,c]),O=(0,ee.useContext)(B),Z=!!E.store&&!!E.store.getState&&!!E.store.dispatch,bi=!!O&&!!O.store,ct=Z?E.store:O.store,on=bi?O.getServerState:ct.getState,Pt=(0,ee.useMemo)(()=>_m(ct.dispatch,S),[ct]),[M,ye]=(0,ee.useMemo)(()=>{if(!v)return dP;let Kt=Du(ct,Z?void 0:O.subscription),Pi=Kt.notifyNestedSubs.bind(Kt);return[Kt,Pi]},[ct,Z,O]),Ei=(0,ee.useMemo)(()=>Z?O:yn({},O,{subscription:M}),[Z,O,M]),Ti=(0,ee.useRef)(),ki=(0,ee.useRef)(N),ve=(0,ee.useRef)(),ah=(0,ee.useRef)(!1),JL=(0,ee.useRef)(!1),yd=(0,ee.useRef)(!1),vd=(0,ee.useRef)();Jo(()=>(yd.current=!0,()=>{yd.current=!1}),[]);let lh=(0,ee.useMemo)(()=>()=>ve.current&&N===ki.current?ve.current:Pt(ct.getState(),N),[ct,N]),lb=(0,ee.useMemo)(()=>Pi=>M?mP(v,ct,M,Pt,ki,Ti,ah,yd,ve,ye,Pi):()=>{},[M]);pP(fP,[ki,Ti,ah,N,ve,ye]);let La;try{La=sx(lb,lh,on?()=>Pt(on(),N):lh)}catch(Kt){throw vd.current&&(Kt.message+=`
9
+ Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}Fe!==5&&(Fe=2),l=Im(l,a),d=s;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t;var C=ow(d,i,t);gS(d,C);break e;case 1:i=l;var T=d.type,k=d.stateNode;if(!(d.flags&64)&&(typeof T.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(yn===null||!yn.has(k)))){d.flags|=4096,t&=-t,d.lanes|=t;var I=iw(d,i,t);gS(d,I);break e}}d=d.return}while(d!==null)}pw(n)}catch(L){t=L,Re===n&&n!==null&&(Re=n=n.return);continue}break}while(1)}function dw(){var e=Nu.current;return Nu.current=Ou,e===null?Ou:e}function Hs(e,t){var n=B;B|=16;var r=dw();et===e&&qe===t||wi(e,t);do try{kR();break}catch(o){cw(e,o)}while(1);if(wm(),B=n,Nu.current=r,Re!==null)throw Error(P(261));return et=null,qe=0,Fe}function kR(){for(;Re!==null;)fw(Re)}function PR(){for(;Re!==null&&!lR();)fw(Re)}function fw(e){var t=gw(e.alternate,e,yo);e.memoizedProps=e.pendingProps,t===null?pw(e):Re=t,Lm.current=null}function pw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&2048){if(n=vR(t),n!==null){n.flags&=2047,Re=n;return}e!==null&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}else{if(n=yR(n,t,yo),n!==null){Re=n;return}if(n=t,n.tag!==24&&n.tag!==23||n.memoizedState===null||yo&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){Re=t;return}Re=t=e}while(t!==null);Fe===0&&(Fe=5)}function ao(e){var t=bi();return ho(99,RR.bind(null,e,t)),null}function RR(e,t){do Ir();while(Gs!==null);if(B&48)throw Error(P(327));var n=e.finishedWork;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(P(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-Tr(i),u=1<<l;o[l]=0,s[l]=-1,a[l]=-1,i&=~u}if(Fn!==null&&!(r&24)&&Fn.has(e)&&Fn.delete(e),e===et&&(Re=et=null,qe=0),1<n.flags?n.lastEffect!==null?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,r!==null){if(o=B,B|=32,Lm.current=null,Xf=ou,s=nS(),Cp(s)){if("selectionStart"in s)a={start:s.selectionStart,end:s.selectionEnd};else e:if(a=(a=s.ownerDocument)&&a.defaultView||window,(u=a.getSelection&&a.getSelection())&&u.rangeCount!==0){a=u.anchorNode,i=u.anchorOffset,l=u.focusNode,u=u.focusOffset;try{a.nodeType,l.nodeType}catch{a=null;break e}var c=0,f=-1,d=-1,p=0,y=0,v=s,g=null;t:for(;;){for(var m;v!==a||i!==0&&v.nodeType!==3||(f=c+i),v!==l||u!==0&&v.nodeType!==3||(d=c+u),v.nodeType===3&&(c+=v.nodeValue.length),(m=v.firstChild)!==null;)g=v,v=m;for(;;){if(v===s)break t;if(g===a&&++p===i&&(f=c),g===l&&++y===u&&(d=c),(m=v.nextSibling)!==null)break;v=g,g=v.parentNode}v=m}a=f===-1||d===-1?null:{start:f,end:d}}else a=null;a=a||{start:0,end:0}}else a=null;Qf={focusedElem:s,selectionRange:a},ou=!1,Xs=null,du=!1,M=r;do try{AR()}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);Xs=null,M=r;do try{for(s=e;M!==null;){var h=M.flags;if(h&16&&Zs(M.stateNode,""),h&128){var S=M.alternate;if(S!==null){var x=S.ref;x!==null&&(typeof x=="function"?x(null):x.current=null)}}switch(h&1038){case 2:jS(M),M.flags&=-3;break;case 6:jS(M),M.flags&=-3,op(M.alternate,M);break;case 1024:M.flags&=-1025;break;case 1028:M.flags&=-1025,op(M.alternate,M);break;case 4:op(M.alternate,M);break;case 8:a=M,sw(s,a);var C=a.alternate;HS(a),C!==null&&HS(C)}M=M.nextEffect}}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);if(x=Qf,S=nS(),h=x.focusedElem,s=x.selectionRange,S!==h&&h&&h.ownerDocument&&b0(h.ownerDocument.documentElement,h)){for(s!==null&&Cp(h)&&(S=s.start,x=s.end,x===void 0&&(x=S),"selectionStart"in h?(h.selectionStart=S,h.selectionEnd=Math.min(x,h.value.length)):(x=(S=h.ownerDocument||document)&&S.defaultView||window,x.getSelection&&(x=x.getSelection(),a=h.textContent.length,C=Math.min(s.start,a),s=s.end===void 0?C:Math.min(s.end,a),!x.extend&&C>s&&(a=s,s=C,C=a),a=tS(h,C),i=tS(h,s),a&&i&&(x.rangeCount!==1||x.anchorNode!==a.node||x.anchorOffset!==a.offset||x.focusNode!==i.node||x.focusOffset!==i.offset)&&(S=S.createRange(),S.setStart(a.node,a.offset),x.removeAllRanges(),C>s?(x.addRange(S),x.extend(i.node,i.offset)):(S.setEnd(i.node,i.offset),x.addRange(S)))))),S=[],x=h;x=x.parentNode;)x.nodeType===1&&S.push({element:x,left:x.scrollLeft,top:x.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<S.length;h++)x=S[h],x.element.scrollLeft=x.left,x.element.scrollTop=x.top}ou=!!Xf,Qf=Xf=null,e.current=n,M=r;do try{for(h=e;M!==null;){var T=M.flags;if(T&36&&ER(h,M.alternate,M),T&128){S=void 0;var k=M.ref;if(k!==null){var I=M.stateNode;switch(M.tag){case 5:S=I;break;default:S=I}typeof k=="function"?k(S):k.current=S}}M=M.nextEffect}}catch(L){if(M===null)throw Error(P(330));Cr(M,L),M=M.nextEffect}while(M!==null);M=null,cR(),B=o}else e.current=n;if(Pr)Pr=!1,Gs=e,Fs=t;else for(M=r;M!==null;)t=M.nextEffect,M.nextEffect=null,M.flags&8&&(T=M,T.sibling=null,T.stateNode=null),M=t;if(r=e.pendingLanes,r===0&&(yn=null),r===1?e===Wp?Ys++:(Ys=0,Wp=e):Ys=0,n=n.stateNode,mo&&typeof mo.onCommitFiberRoot=="function")try{mo.onCommitFiberRoot(vm,n,void 0,(n.current.flags&64)===64)}catch{}if(Ht(e,We()),Mu)throw Mu=!1,e=Vp,Vp=null,e;return B&8||wn(),null}function AR(){for(;M!==null;){var e=M.alternate;du||Xs===null||(M.flags&8?Bv(M,Xs)&&(du=!0):M.tag===13&&CR(e,M)&&Bv(M,Xs)&&(du=!0));var t=M.flags;t&256&&xR(e,M),!(t&512)||Pr||(Pr=!0,sa(97,function(){return Ir(),null})),M=M.nextEffect}}function Ir(){if(Fs!==90){var e=97<Fs?97:Fs;return Fs=90,ho(e,LR)}return!1}function IR(e,t){Kp.push(t,e),Pr||(Pr=!0,sa(97,function(){return Ir(),null}))}function mw(e,t){$p.push(t,e),Pr||(Pr=!0,sa(97,function(){return Ir(),null}))}function LR(){if(Gs===null)return!1;var e=Gs;if(Gs=null,B&48)throw Error(P(331));var t=B;B|=32;var n=$p;$p=[];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(P(330));Cr(i,l)}}for(n=Kp,Kp=[],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(P(330));Cr(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 B=t,wn(),!0}function BS(e,t,n){t=Im(n,t),t=ow(e,t,1),wr(e,t),t=St(),e=Gu(e,1),e!==null&&(ju(e,1,t),Ht(e,t))}function Cr(e,t){if(e.tag===3)BS(e,e,t);else for(var n=e.return;n!==null;){if(n.tag===3){BS(n,e,t);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r))){e=Im(t,e);var o=iw(n,e,1);if(wr(n,o),o=St(),n=Gu(n,1),n!==null)ju(n,1,o),Ht(n,o);else if(typeof r.componentDidCatch=="function"&&(yn===null||!yn.has(r)))try{r.componentDidCatch(t,e)}catch{}break}}n=n.return}}function OR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=St(),e.pingedLanes|=e.suspendedLanes&n,et===e&&(qe&n)===n&&(Fe===4||Fe===3&&(qe&62914560)===qe&&500>We()-Nm?wi(e,0):Om|=n),Ht(e,t)}function NR(e,t){var n=e.stateNode;n!==null&&n.delete(t),t=0,t===0&&(t=e.mode,t&2?t&4?(Mn===0&&(Mn=Ri),t=ii(62914560&~Mn),t===0&&(t=4194304)):t=bi()===99?1:2:t=1),n=St(),e=Gu(e,t),e!==null&&(ju(e,t,n),Ht(e,n))}var gw;gw=function(e,t,n){var r=t.lanes;if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)Qt=!0;else if(n&r)Qt=!!(e.flags&16384);else{switch(Qt=!1,t.tag){case 3:RS(t),tp();break;case 5:SS(t);break;case 1:mt(t.type)&&au(t);break;case 4:Lp(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;Ce(Eu,o._currentValue),o._currentValue=r;break;case 13:if(t.memoizedState!==null)return n&t.child.childLanes?AS(e,t,n):(Ce(Ee,Ee.current&1),t=Dn(e,t,n),t!==null?t.sibling:null);Ce(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&64){if(r)return MS(e,t,n);t.flags|=64}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ce(Ee,Ee.current),r)break;return null;case 23:case 24:return t.lanes=0,np(e,t,n)}return Dn(e,t,n)}else Qt=!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=Ci(t,Ge.current),yi(t,n),o=km(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,mt(r)){var i=!0;au(t)}else i=!1;t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Em(t);var s=r.getDerivedStateFromProps;typeof s=="function"&&Tu(t,r,s,e),o.updater=Wu,t.stateNode=o,o._reactInternals=t,Ip(t,r,e,n),t=_p(null,t,r,!0,i,n)}else t.tag=0,ft(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=_R(o),e=Xt(o,e),i){case 0:t=Mp(null,t,o,e,n);break e;case 1:t=PS(null,t,o,e,n);break e;case 11:t=TS(null,t,o,e,n);break e;case 14:t=kS(null,t,o,Xt(o.type,e),r,n);break e}throw Error(P(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),Mp(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),PS(e,t,r,o,n);case 3:if(RS(t),r=t.updateQueue,e===null||r===null)throw Error(P(282));if(r=t.pendingProps,o=t.memoizedState,o=o!==null?o.element:null,j0(e,t),aa(t,r,null,n),r=t.memoizedState.element,r===o)tp(),t=Dn(e,t,n);else{if(o=t.stateNode,(i=o.hydrate)&&(gr=hi(t.stateNode.containerInfo.firstChild),_n=t,i=Sn=!0),i){if(e=o.mutableSourceEagerHydrationData,e!=null)for(o=0;o<e.length;o+=2)i=e[o],i._workInProgressVersionPrimary=e[o+1],vi.push(i);for(n=K0(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|1024,n=n.sibling}else ft(e,t,r,n),tp();t=t.child}return t;case 5:return SS(t),e===null&&Op(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,kp(r,o)?s=null:i!==null&&kp(r,i)&&(t.flags|=16),ew(e,t),ft(e,t,s,n),t.child;case 6:return e===null&&Op(t),null;case 13:return AS(e,t,n);case 4:return Lp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ku(t,null,r,n):ft(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),TS(e,t,r,o,n);case 7:return ft(e,t,t.pendingProps,n),t.child;case 8:return ft(e,t,t.pendingProps.children,n),t.child;case 12:return ft(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(Ce(Eu,a._currentValue),a._currentValue=i,s!==null)if(a=s.value,i=Mt(a,i)?0:(typeof r._calculateChangedBits=="function"?r._calculateChangedBits(a,i):1073741823)|0,i===0){if(s.children===o.children&&!pt.current){t=Dn(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=Sr(-1,n&-n),u.tag=2,wr(a,u)),a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),U0(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}ft(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,i=t.pendingProps,r=i.children,yi(t,n),o=Ft(o,i.unstable_observedBits),r=r(o),t.flags|=1,ft(e,t,r,n),t.child;case 14:return o=t.type,i=Xt(o,t.pendingProps),i=Xt(o.type,i),kS(e,t,o,i,r,n);case 15:return J0(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Xt(r,o),e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,mt(r)?(e=!0,au(t)):e=!1,yi(t,n),B0(t,r,o),Ip(t,r,o,n),_p(null,t,r,!0,e,n);case 19:return MS(e,t,n);case 23:return np(e,t,n);case 24:return np(e,t,n)}throw Error(P(156,t.tag))};function MR(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 _t(e,t,n,r){return new MR(e,t,n,r)}function _m(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _R(e){if(typeof e=="function")return _m(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fu)return 11;if(e===Hu)return 14}return 2}function Rr(e,t){var n=e.alternate;return n===null?(n=_t(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 fu(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")_m(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case fr:return xi(n.children,o,i,t);case $S:s=8,o|=16;break;case Qp:s=8,o|=1;break;case Us:return e=_t(12,n,t,o|8),e.elementType=Us,e.type=Us,e.lanes=i,e;case js:return e=_t(13,n,t,o),e.type=js,e.elementType=js,e.lanes=i,e;case pu:return e=_t(19,n,t,o),e.elementType=pu,e.lanes=i,e;case rm:return Dm(n,o,i,t);case lp:return e=_t(24,n,t,o),e.elementType=lp,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zp:s=10;break e;case Jp:s=9;break e;case Fu:s=11;break e;case Hu:s=14;break e;case em:s=16,r=null;break e;case tm:s=22;break e}throw Error(P(130,e==null?e:typeof e,""))}return t=_t(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function xi(e,t,n,r){return e=_t(7,e,r,t),e.lanes=n,e}function Dm(e,t,n,r){return e=_t(23,e,r,t),e.elementType=rm,e.lanes=n,e}function ip(e,t,n){return e=_t(6,e,null,t),e.lanes=n,e}function sp(e,t,n){return t=_t(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function DR(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=Kf(0),this.expirationTimes=Kf(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kf(0),this.mutableSourceEagerHydrationData=null}function FR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lo,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function _u(e,t,n,r){var o=t.current,i=St(),s=xr(o);e:if(n){n=n._reactInternals;t:{if(wo(n)!==n||n.tag!==1)throw Error(P(170));var a=n;do{switch(a.tag){case 3:a=a.stateNode.context;break t;case 1:if(mt(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break t}}a=a.return}while(a!==null);throw Error(P(171))}if(n.tag===1){var l=n.type;if(mt(l)){n=O0(n,l,a);break e}}n=a}else n=kr;return t.context===null?t.context=n:t.pendingContext=n,t=Sr(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),wr(o,t),Er(o,s,i),s}function ap(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 VS(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Fm(e,t){VS(e,t),(e=e.alternate)&&VS(e,t)}function HR(){return null}function Hm(e,t,n){var r=n!=null&&n.hydrationOptions!=null&&n.hydrationOptions.mutableSources||null;if(n=new DR(e,t,n!=null&&n.hydrate===!0),t=_t(3,null,null,t===2?7:t===1?3:0),n.current=t,t.stateNode=n,Em(t),e[Pi]=n.current,P0(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}Hm.prototype.render=function(e){_u(e,this._internalRoot,null,null)};Hm.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;_u(null,e,null,function(){t[Pi]=null})};function ga(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function UR(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 Hm(e,0,t?{hydrate:!0}:void 0)}function Yu(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=ap(s);a.call(u)}}_u(t,s,e,o)}else{if(i=n._reactRootContainer=UR(n,r),s=i._internalRoot,typeof o=="function"){var l=o;o=function(){var u=ap(s);l.call(u)}}uw(function(){_u(t,s,e,o)})}return ap(s)}s0=function(e){if(e.tag===13){var t=St();Er(e,4,t),Fm(e,4)}};lm=function(e){if(e.tag===13){var t=St();Er(e,67108864,t),Fm(e,67108864)}};a0=function(e){if(e.tag===13){var t=St(),n=xr(e);Er(e,n,t),Fm(e,n)}};l0=function(e,t){return t()};vp=function(e,t,n){switch(t){case"input":if(cp(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=Ku(r);if(!o)throw Error(P(90));qS(r),cp(r,o)}}}break;case"textarea":YS(e,n);break;case"select":t=n.value,t!=null&&pi(e,!!n.multiple,t,!1)}};im=lw;n0=function(e,t,n,r,o){var i=B;B|=4;try{return ho(98,e.bind(null,t,n,r,o))}finally{B=i,B===0&&(Ii(),wn())}};sm=function(){!(B&49)&&(TR(),Ir())};r0=function(e,t){var n=B;B|=2;try{return e(t)}finally{B=n,B===0&&(Ii(),wn())}};function hw(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ga(t))throw Error(P(200));return FR(e,t,null,n)}var jR={Events:[fa,ui,Ku,e0,t0,Ir,{current:!1}]},Os={findFiberByHostInstance:co,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},zR={bundleType:Os.bundleType,version:Os.version,rendererPackageName:Os.rendererPackageName,rendererConfig:Os.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:So.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=i0(e),e===null?null:e.stateNode},findFiberByHostInstance:Os.findFiberByHostInstance||HR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Ns=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ns.isDisabled&&Ns.supportsFiber))try{vm=Ns.inject(zR),mo=Ns}catch{}var Ns;Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jR;Ut.createPortal=hw;Ut.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(P(188)):Error(P(268,Object.keys(e)));return e=i0(t),e=e===null?null:e.stateNode,e};Ut.flushSync=function(e,t){var n=B;if(n&48)return e(t);B|=1;try{if(e)return ho(99,e.bind(null,t))}finally{B=n,wn()}};Ut.hydrate=function(e,t,n){if(!ga(t))throw Error(P(200));return Yu(null,e,t,!0,n)};Ut.render=function(e,t,n){if(!ga(t))throw Error(P(200));return Yu(null,e,t,!1,n)};Ut.unmountComponentAtNode=function(e){if(!ga(e))throw Error(P(40));return e._reactRootContainer?(uw(function(){Yu(null,null,e,!1,function(){e._reactRootContainer=null,e[Pi]=null})}),!0):!1};Ut.unstable_batchedUpdates=lw;Ut.unstable_createPortal=function(e,t){return hw(e,t,2<arguments.length&&arguments[2]!==void 0?arguments[2]:null)};Ut.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ga(n))throw Error(P(200));if(e==null||e._reactInternals===void 0)throw Error(P(38));return Yu(e,t,n,!1,r)};Ut.version="17.0.2"});var Xu=be((X_,Sw)=>{"use strict";function vw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(vw)}catch(e){console.error(e)}}vw(),Sw.exports=yw()});var qw=be(Ww=>{"use strict";var Di=F();function TA(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kA=typeof Object.is=="function"?Object.is:TA,PA=Di.useState,RA=Di.useEffect,AA=Di.useLayoutEffect,IA=Di.useDebugValue;function LA(e,t){var n=t(),r=PA({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return AA(function(){o.value=n,o.getSnapshot=t,dg(o)&&i({inst:o})},[e,n,t]),RA(function(){return dg(o)&&i({inst:o}),e(function(){dg(o)&&i({inst:o})})},[e]),IA(n),n}function dg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!kA(e,n)}catch{return!0}}function OA(e,t){return t()}var NA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?OA:LA;Ww.useSyncExternalStore=Di.useSyncExternalStore!==void 0?Di.useSyncExternalStore:NA});var fg=be((F2,Gw)=>{"use strict";Gw.exports=qw()});var Xw=be(Yw=>{"use strict";var oc=F(),MA=fg();function _A(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var DA=typeof Object.is=="function"?Object.is:_A,FA=MA.useSyncExternalStore,HA=oc.useRef,UA=oc.useEffect,jA=oc.useMemo,zA=oc.useDebugValue;Yw.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=HA(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=jA(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),o!==void 0&&s.hasValue){var y=s.value;if(o(y,p))return f=y}return f=p}if(y=f,DA(c,p))return y;var v=r(p);return o!==void 0&&o(y,v)?y:(c=p,f=v)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,o]);var a=FA(e,i[0],i[1]);return UA(function(){s.hasValue=!0,s.value=a},[a]),zA(a),a}});var Zw=be((U2,Qw)=>{"use strict";Qw.exports=Xw()});var ux=be(ie=>{"use strict";var _e=typeof Symbol=="function"&&Symbol.for,mg=_e?Symbol.for("react.element"):60103,gg=_e?Symbol.for("react.portal"):60106,lc=_e?Symbol.for("react.fragment"):60107,uc=_e?Symbol.for("react.strict_mode"):60108,cc=_e?Symbol.for("react.profiler"):60114,dc=_e?Symbol.for("react.provider"):60109,fc=_e?Symbol.for("react.context"):60110,hg=_e?Symbol.for("react.async_mode"):60111,pc=_e?Symbol.for("react.concurrent_mode"):60111,mc=_e?Symbol.for("react.forward_ref"):60112,gc=_e?Symbol.for("react.suspense"):60113,$A=_e?Symbol.for("react.suspense_list"):60120,hc=_e?Symbol.for("react.memo"):60115,yc=_e?Symbol.for("react.lazy"):60116,WA=_e?Symbol.for("react.block"):60121,qA=_e?Symbol.for("react.fundamental"):60117,GA=_e?Symbol.for("react.responder"):60118,YA=_e?Symbol.for("react.scope"):60119;function Et(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case mg:switch(e=e.type,e){case hg:case pc:case lc:case cc:case uc:case gc:return e;default:switch(e=e&&e.$$typeof,e){case fc:case mc:case yc:case hc:case dc:return e;default:return t}}case gg:return t}}}function lx(e){return Et(e)===pc}ie.AsyncMode=hg;ie.ConcurrentMode=pc;ie.ContextConsumer=fc;ie.ContextProvider=dc;ie.Element=mg;ie.ForwardRef=mc;ie.Fragment=lc;ie.Lazy=yc;ie.Memo=hc;ie.Portal=gg;ie.Profiler=cc;ie.StrictMode=uc;ie.Suspense=gc;ie.isAsyncMode=function(e){return lx(e)||Et(e)===hg};ie.isConcurrentMode=lx;ie.isContextConsumer=function(e){return Et(e)===fc};ie.isContextProvider=function(e){return Et(e)===dc};ie.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===mg};ie.isForwardRef=function(e){return Et(e)===mc};ie.isFragment=function(e){return Et(e)===lc};ie.isLazy=function(e){return Et(e)===yc};ie.isMemo=function(e){return Et(e)===hc};ie.isPortal=function(e){return Et(e)===gg};ie.isProfiler=function(e){return Et(e)===cc};ie.isStrictMode=function(e){return Et(e)===uc};ie.isSuspense=function(e){return Et(e)===gc};ie.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===lc||e===pc||e===cc||e===uc||e===gc||e===$A||typeof e=="object"&&e!==null&&(e.$$typeof===yc||e.$$typeof===hc||e.$$typeof===dc||e.$$typeof===fc||e.$$typeof===mc||e.$$typeof===qA||e.$$typeof===GA||e.$$typeof===YA||e.$$typeof===WA)};ie.typeOf=Et});var dx=be((J2,cx)=>{"use strict";cx.exports=ux()});var vx=be((eD,yx)=>{"use strict";var yg=dx(),XA={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},QA={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ZA={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},gx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},vg={};vg[yg.ForwardRef]=ZA;vg[yg.Memo]=gx;function fx(e){return yg.isMemo(e)?gx:vg[e.$$typeof]||XA}var JA=Object.defineProperty,eI=Object.getOwnPropertyNames,px=Object.getOwnPropertySymbols,tI=Object.getOwnPropertyDescriptor,nI=Object.getPrototypeOf,mx=Object.prototype;function hx(e,t,n){if(typeof t!="string"){if(mx){var r=nI(t);r&&r!==mx&&hx(e,r,n)}var o=eI(t);px&&(o=o.concat(px(t)));for(var i=fx(e),s=fx(t),a=0;a<o.length;++a){var l=o[a];if(!QA[l]&&!(n&&n[l])&&!(s&&s[l])&&!(i&&i[l])){var u=tI(t,l);try{JA(e,l,u)}catch{}}}}return e}yx.exports=hx});var wx=be(se=>{"use strict";var Sg=Symbol.for("react.element"),wg=Symbol.for("react.portal"),vc=Symbol.for("react.fragment"),Sc=Symbol.for("react.strict_mode"),wc=Symbol.for("react.profiler"),xc=Symbol.for("react.provider"),Ec=Symbol.for("react.context"),rI=Symbol.for("react.server_context"),Cc=Symbol.for("react.forward_ref"),bc=Symbol.for("react.suspense"),Tc=Symbol.for("react.suspense_list"),kc=Symbol.for("react.memo"),Pc=Symbol.for("react.lazy"),oI=Symbol.for("react.offscreen"),Sx;Sx=Symbol.for("react.module.reference");function zt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Sg:switch(e=e.type,e){case vc:case wc:case Sc:case bc:case Tc:return e;default:switch(e=e&&e.$$typeof,e){case rI:case Ec:case Cc:case Pc:case kc:case xc:return e;default:return t}}case wg:return t}}}se.ContextConsumer=Ec;se.ContextProvider=xc;se.Element=Sg;se.ForwardRef=Cc;se.Fragment=vc;se.Lazy=Pc;se.Memo=kc;se.Portal=wg;se.Profiler=wc;se.StrictMode=Sc;se.Suspense=bc;se.SuspenseList=Tc;se.isAsyncMode=function(){return!1};se.isConcurrentMode=function(){return!1};se.isContextConsumer=function(e){return zt(e)===Ec};se.isContextProvider=function(e){return zt(e)===xc};se.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Sg};se.isForwardRef=function(e){return zt(e)===Cc};se.isFragment=function(e){return zt(e)===vc};se.isLazy=function(e){return zt(e)===Pc};se.isMemo=function(e){return zt(e)===kc};se.isPortal=function(e){return zt(e)===wg};se.isProfiler=function(e){return zt(e)===wc};se.isStrictMode=function(e){return zt(e)===Sc};se.isSuspense=function(e){return zt(e)===bc};se.isSuspenseList=function(e){return zt(e)===Tc};se.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===vc||e===wc||e===Sc||e===bc||e===Tc||e===oI||typeof e=="object"&&e!==null&&(e.$$typeof===Pc||e.$$typeof===kc||e.$$typeof===xc||e.$$typeof===Ec||e.$$typeof===Cc||e.$$typeof===Sx||e.getModuleId!==void 0)};se.typeOf=zt});var Ex=be((nD,xx)=>{"use strict";xx.exports=wx()});var Qg=be((k4,QE)=>{"use strict";var cL="Expected a function",YE=NaN,dL="[object Symbol]",fL=/^\s+|\s+$/g,pL=/^[-+]0x[0-9a-f]+$/i,mL=/^0b[01]+$/i,gL=/^0o[0-7]+$/i,hL=parseInt,yL=typeof global=="object"&&global&&global.Object===Object&&global,vL=typeof self=="object"&&self&&self.Object===Object&&self,SL=yL||vL||Function("return this")(),wL=Object.prototype,xL=wL.toString,EL=Math.max,CL=Math.min,Yg=function(){return SL.Date.now()};function bL(e,t,n){var r,o,i,s,a,l,u=0,c=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(cL);t=XE(t)||0,Xg(n)&&(c=!!n.leading,f="maxWait"in n,i=f?EL(XE(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d);function p(T){var k=r,I=o;return r=o=void 0,u=T,s=e.apply(I,k),s}function y(T){return u=T,a=setTimeout(m,t),c?p(T):s}function v(T){var k=T-l,I=T-u,L=t-k;return f?CL(L,i-I):L}function g(T){var k=T-l,I=T-u;return l===void 0||k>=t||k<0||f&&I>=i}function m(){var T=Yg();if(g(T))return h(T);a=setTimeout(m,v(T))}function h(T){return a=void 0,d&&r?p(T):(r=o=void 0,s)}function S(){a!==void 0&&clearTimeout(a),u=0,r=l=o=a=void 0}function x(){return a===void 0?s:h(Yg())}function C(){var T=Yg(),k=g(T);if(r=arguments,o=this,l=T,k){if(a===void 0)return y(l);if(f)return a=setTimeout(m,t),p(l)}return a===void 0&&(a=setTimeout(m,t)),s}return C.cancel=S,C.flush=x,C}function Xg(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function TL(e){return!!e&&typeof e=="object"}function kL(e){return typeof e=="symbol"||TL(e)&&xL.call(e)==dL}function XE(e){if(typeof e=="number")return e;if(kL(e))return YE;if(Xg(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xg(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(fL,"");var n=mL.test(e);return n||gL.test(e)?hL(e.slice(2),n?2:8):pL.test(e)?YE:+e}QE.exports=bL});var sC=be(($4,iC)=>{"use strict";var NL=/["'&<>]/;iC.exports=ML;function ML(e){var t=""+e,n=NL.exec(t);if(!n)return t;var r,o="",i=0,s=0;for(i=n.index;i<t.length;i++){switch(t.charCodeAt(i)){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&#39;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;default:continue}s!==i&&(o+=t.substring(s,i)),s=i+1,o+=r}return s!==i?o+t.substring(s,i):o}});var WM={};Je(WM,{Card:()=>pe,ContentEditableInput:()=>Bo,DeepdeskAPI:()=>sr,DeepdeskSDK:()=>hl,HTTPClient:()=>fn,InputMediator:()=>ir,InputType:()=>io,KeyboardHint:()=>Nl,Label:()=>Ml,Locale:()=>Ca,Section:()=>Ln,SectionList:()=>_l,Sources:()=>On,Suggestion:()=>ae,SuggestionList:()=>vt,TextAreaInput:()=>Vo,ToggleButton:()=>oo,attachFile:()=>W1,authenticateWithKey:()=>K1,createFullRange:()=>ss,createOverlayContainer:()=>gl,createRangeFromOffsets:()=>Xr,escapeHTML:()=>Wi,fetchPlatformConfig:()=>$1,formatTextMarkup:()=>V1,getRangeOffsets:()=>dl,getRangeText:()=>fl,insertCKEditor:()=>B1,isHTML:()=>vd,isSupportedInputElement:()=>uf,updateContentEditable:()=>j1,updateTextArea:()=>U1,useStyles:()=>A,waitForElementVisibilityChange:()=>ff});var Pf=w(ee()),Ot=w(F());var Al=w(F()),Jy=w(ee()),gs=Al.default.createContext({});function A(e,t){let{debug:n,...r}=(0,Al.useContext)(gs),o=r[e];return o?Object.entries(t).reduce((i,[s,a])=>{let l=o[s];return{...i,[s]:(0,Jy.default)(a,l,n?`${e}__${s}`:!1)}},{}):t}var ev={root:"uo"};var eo=w(b()),Il=()=>(0,eo.jsxs)("svg",{className:ev.root,width:"185",height:"170",viewBox:"0 0 185 170",xmlns:"http://www.w3.org/2000/svg",children:[(0,eo.jsx)("defs",{children:(0,eo.jsx)("style",{children:".cls-1 { fill: #b3b3b3; }"})}),(0,eo.jsx)("title",{children:"Failed loading image"}),(0,eo.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 kf={root:"yo",imageWrapper:"G",image:"wo",content:"m",title:"vo",contentIsCropped:"ko",lineClamp:"zo"};var to=w(b()),Ll=(0,Ot.createContext)(kf),Ck=({title:e,src:t})=>{let n=(0,Ot.useContext)(Ll),[r,o]=(0,Ot.useState)(!1);return(0,Ot.useEffect)(()=>{o(!1)},[t]),(0,to.jsx)("div",{className:n.imageWrapper,children:t&&!r?(0,to.jsx)("img",{className:n.image,alt:e,src:t,onError:()=>o(!0)}):(0,to.jsx)(Il,{})})},bk=({className:e,lineClamp:t=!1,cropText:n=!1,children:r})=>{let o=(0,Ot.useContext)(Ll);return(0,to.jsx)("div",{className:(0,Pf.default)(o.content,e,{[o.contentIsCropped]:n,[o.lineClamp]:t}),children:r})},Tk=({as:e="h1",cropText:t=!1,className:n,children:r,...o})=>{let i=(0,Ot.useContext)(Ll);return Ot.default.createElement(e,{className:(0,Pf.default)(i.title,n,{[i.contentIsCropped]:t}),...o},r)},Ol=({children:e})=>{let t=A("Card",kf);return(0,to.jsx)("div",{className:t.root,children:(0,to.jsx)(Ll.Provider,{value:t,children:e})})};Ol.Image=Ck;Ol.Content=bk;Ol.Title=Tk;var pe=Ol;var sv=w(ee());var iv={root:"N"};var av=w(b());var Pk={"arrow-up":"\u25B2","arrow-down":"\u25BC",tab:"tab",esc:"Esc",enter:"\u21B5"},Rk=({className:e,keyCode:t,...n})=>{let r=A("KeyboardHint",iv);return(0,av.jsx)("span",{"data-key":Pk[t],className:(0,sv.default)(e,r.root),...n})},Nl=Rk;var uv=w(ee());var lv={root:"jo"};var cv=w(b()),Ik=({className:e,children:t,...n})=>{let r=A("Label",lv);return(0,cv.jsx)("span",{...n,className:(0,uv.default)(e,r.root),children:t})},Ml=Ik;var dv={root:"qo",subTitleContainer:"Co",subtitle:"So",suggestions:"Eo"};var Zo=w(b()),Ok=({title:e,children:t,type:n,...r})=>{let o=A("Section",dv);return(0,Zo.jsxs)("section",{...r,className:o.root,"data-section-type":n,children:[e&&(0,Zo.jsx)("div",{className:o.subTitleContainer,children:(0,Zo.jsx)("span",{className:o.subtitle,children:e})}),(0,Zo.jsx)("div",{className:o.suggestions,children:t})]})},Ln=Ok;var pv=w(ee()),mv=w(F());var fv={root:"Go"};var gv=w(b()),Mk=mv.default.forwardRef(({className:e,children:t},n)=>{let r=A("SectionList",fv);return(0,gv.jsx)("div",{ref:n,className:(0,pv.default)(r.root,e),children:t})}),_l=Mk;var Jo=w(ee()),yt=w(F());var ys=w(b()),hv=({className:e})=>(0,ys.jsxs)("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",className:e,children:[(0,ys.jsx)("line",{x1:"1",y1:"11",x2:"11",y2:"1",stroke:"black",strokeWidth:"2"}),(0,ys.jsx)("line",{x1:"1",y1:"1",x2:"11",y2:"11",stroke:"black",strokeWidth:"2"})]});var Rf={fadein:"Y",root:"e",isClickable:"A",isSelected:"No",actions:"F",actionsIsFixed:"Yo",actionButton:"t",dropdownList:"H",dropdownButton:"L",dropdownItem:"M",dropdownItemButton:"R",actionButtonIsPrimary:"Ao",actionButtonIsDisabled:"Fo",labels:"Ho",label:"Lo",closeIcon:"n"};var ct=w(b()),no=(0,yt.createContext)(Rf),Dk=({fixed:e,children:t,...n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("div",{...n,className:(0,Jo.default)(r.actions,{[r.actionsIsFixed]:e}),children:t})},Fk=({className:e,title:t,...n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("div",{className:(0,Jo.default)(r.closeIcon,e),title:t,role:"button","aria-label":t,...n,children:(0,ct.jsx)(hv,{})})},Hk=({className:e,primary:t,disabled:n,label:r,children:o})=>{let i=(0,yt.useContext)(no);return(0,ct.jsxs)("div",{className:(0,Jo.default)(e,i.actionButton,i.dropdownButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onMouseDown:s=>s.stopPropagation(),onClick:s=>s.stopPropagation(),children:[r,(0,ct.jsx)("ul",{className:i.dropdownList,children:o})]})},Uk=({index:e,label:t,onClick:n})=>{let r=(0,yt.useContext)(no);return(0,ct.jsx)("li",{className:r.dropdownItem,children:(0,ct.jsx)("button",{className:r.dropdownItemButton,type:"button","data-index":e,onClick:n,children:t})})},jk=({className:e,primary:t,disabled:n,onClick:r,label:o})=>{let i=(0,yt.useContext)(no);return(0,ct.jsx)("button",{type:"button",className:(0,Jo.default)(e,i.actionButton,{[i.actionButtonIsPrimary]:t,[i.actionButtonIsDisabled]:n}),onClick:r??(s=>s.stopPropagation()),disabled:n,"aria-hidden":n,children:o})},zk=({labels:e})=>{let t=(0,yt.useContext)(no);return(0,ct.jsx)("div",{className:t.labels,children:e.map(n=>(0,ct.jsx)("span",{className:t.label,children:n},n))})},ro=yt.default.forwardRef(({className:e,selected:t,onClick:n,children:r,as:o="div",...i},s)=>{let a=A("Suggestion",Rf),l=(0,yt.useCallback)(u=>{u.preventDefault(),n&&n(u)},[n]);return(0,ct.jsx)(o,{...i,ref:s,className:(0,Jo.default)(e,a.root,{[a.isSelected]:t,[a.isClickable]:!!n}),onClick:l,children:(0,ct.jsx)(no.Provider,{value:a,children:r})})});ro.Labels=zk;ro.Actions=Dk;ro.ActionButton=jk;ro.DropdownButton=Hk;ro.DropdownItem=Uk;ro.CloseIcon=Fk;var ae=ro;var vv=w(ee());var yv={root:"Mo",isWithDivider:"Ro"};var Sv=w(b()),Vk=({withDivider:e,children:t})=>{let n=A("SuggestionList",yv);return(0,Sv.jsx)("div",{"data-testid":"suggestions-overlay-list",className:(0,vv.default)(n.root,{[n.isWithDivider]:e}),children:t})},vt=Vk;var xv=w(ee());var wv={root:"u",isCollapsed:"T"};var Dl=w(b()),$k=({className:e,isCollapsed:t,title:n,onClick:r})=>{let o=A("ToggleButton",wv);return(0,Dl.jsx)("button",{type:"button",className:(0,xv.default)(o.root,e,{[o.isCollapsed]:t}),onClick:r,title:n,children:(0,Dl.jsx)("svg",{width:"14",height:"8",viewBox:"-2.5 -5 75 60",preserveAspectRatio:"none",children:(0,Dl.jsx)("path",{d:"M0,0 l35,50 l35,-50",fill:"none",stroke:"grey",strokeLinecap:"round",strokeWidth:"6"})})})},oo=$k;var Ev=/(?:[.,;:!?\\n]|:\\)|:\\(|:-\\)|:-\\()/g,Fl=/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\})/g;var Cv=/x-deepdesk-(([a-z0-9\-_])+-version)/,On=(v=>(v.SEARCH="search",v.TEMPLATE="template",v.ELASTIC_SEARCH="search-autocomplete",v.GPT="gpt",v.TRIE="trie",v.TRIE_WITH_TYPOS="trie-with-typos",v.SEMANTIC="semantic",v.TEXT_RECOMMENDATION="text_recommendation",v.URL_RECOMMENDATION="url_recommendation",v.LINK_RECOMMENDATION="link_recommendation",v.PERSONAL_COLLECTION="personal-collection",v.PERSONAL_COLLECTION_SEARCH="personal-collection-search",v.SEARCH_OVERLAY="search-overlay",v.SEARCH_PREVIEW="search-preview",v.SEARCH_URL="search-url",v))(On||{}),io=(i=>(i.ENTER="enter",i.TAB="tab",i.ARROW="arrow",i.HOTKEY="hotkey",i.MOUSE="mouse",i))(io||{});var Wt=w(Xu());var ob=w(F());function jt(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 Un(e){return!!e&&!!e[Se]}function Zt(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)===YR}(e)||Array.isArray(e)||!!e[kw]||!!(!((t=e.constructor)===null||t===void 0)&&t[kw])||qm(e)||Gm(e))}function Eo(e,t,n){n===void 0&&(n=!1),Ni(e)===0?(n?Object.keys:Oi)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,o){return t(o,r,e)})}function Ni(e){var t=e[Se];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:qm(e)?2:Gm(e)?3:0}function Li(e,t){return Ni(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function BR(e,t){return Ni(e)===2?e.get(t):e[t]}function Pw(e,t,n){var r=Ni(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Rw(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function qm(e){return qR&&e instanceof Map}function Gm(e){return GR&&e instanceof Set}function Lr(e){return e.o||e.t}function Ym(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Lw(e);delete t[Se];for(var n=Oi(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 Xm(e,t){return t===void 0&&(t=!1),Qm(e)||Un(e)||!Zt(e)||(Ni(e)>1&&(e.set=e.add=e.clear=e.delete=VR),Object.freeze(e),t&&Eo(e,function(n,r){return Xm(r,!0)},!0)),e}function VR(){jt(2)}function Qm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function xn(e){var t=Wm[e];return t||jt(18,e),t}function KR(e,t){Wm[e]||(Wm[e]=t)}function Vm(){return ya}function Um(e,t){t&&(xn("Patches"),e.u=[],e.s=[],e.v=t)}function Qu(e){Km(e),e.p.forEach($R),e.p=null}function Km(e){e===ya&&(ya=e.l)}function ww(e){return ya={p:[],l:ya,h:e,m:!0,_:0}}function $R(e){var t=e[Se];t.i===0||t.i===1?t.j():t.g=!0}function jm(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.O||xn("ES5").S(t,e,r),r?(n[Se].P&&(Qu(t),jt(4)),Zt(e)&&(e=Zu(t,e),t.l||Ju(t,e)),t.u&&xn("Patches").M(n[Se].t,e,t.u,t.s)):e=Zu(t,n,[]),Qu(t),t.u&&t.v(t.u,t.s),e!==Iw?e:void 0}function Zu(e,t,n){if(Qm(t))return t;var r=t[Se];if(!r)return Eo(t,function(a,l){return xw(e,r,t,a,l,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Ju(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=r.i===4||r.i===5?r.o=Ym(r.k):r.o,i=o,s=!1;r.i===3&&(i=new Set(o),o.clear(),s=!0),Eo(i,function(a,l){return xw(e,r,o,a,l,n,s)}),Ju(e,o,!1),n&&e.u&&xn("Patches").N(r,n,e.u,e.s)}return r.o}function xw(e,t,n,r,o,i,s){if(Un(o)){var a=Zu(e,o,i&&t&&t.i!==3&&!Li(t.R,r)?i.concat(r):void 0);if(Pw(n,r,a),!Un(a))return;e.m=!1}else s&&n.add(o);if(Zt(o)&&!Qm(o)){if(!e.h.D&&e._<1)return;Zu(e,o),t&&t.A.l||Ju(e,o)}}function Ju(e,t,n){n===void 0&&(n=!1),!e.l&&e.h.D&&e.m&&Xm(t,n)}function zm(e,t){var n=e[Se];return(n?Lr(n):e)[t]}function Ew(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 Or(e){e.P||(e.P=!0,e.l&&Or(e.l))}function Bm(e){e.o||(e.o=Ym(e.t))}function $m(e,t,n){var r=qm(t)?xn("MapSet").F(t,n):Gm(t)?xn("MapSet").T(t,n):e.O?function(o,i){var s=Array.isArray(o),a={i:s?1:0,A:i?i.A:Vm(),P:!1,I:!1,R:{},l:i,t:o,k:null,o:null,j:null,C:!1},l=a,u=va;s&&(l=[a],u=ha);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):xn("ES5").J(t,n);return(n?n.A:Vm()).p.push(r),r}function WR(e){return Un(e)||jt(22,e),function t(n){if(!Zt(n))return n;var r,o=n[Se],i=Ni(n);if(o){if(!o.P&&(o.i<4||!xn("ES5").K(o)))return o.t;o.I=!0,r=Cw(n,i),o.I=!1}else r=Cw(n,i);return Eo(r,function(s,a){o&&BR(o.t,s)===a||Pw(r,s,t(a))}),i===3?new Set(r):r}(e)}function Cw(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Ym(e)}function Aw(){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[Se];return va.get(u,s)},set:function(u){var c=this[Se];va.set(c,s,u)}},l}function t(s){for(var a=s.length-1;a>=0;a--){var l=s[a][Se];if(!l.P)switch(l.i){case 5:r(l)&&Or(l);break;case 4:n(l)&&Or(l)}}}function n(s){for(var a=s.t,l=s.k,u=Oi(l),c=u.length-1;c>=0;c--){var f=u[c];if(f!==Se){var d=a[f];if(d===void 0&&!Li(a,f))return!0;var p=l[f],y=p&&p[Se];if(y?y.t!==d:!Rw(p,d))return!0}}var v=!!a[Se];return u.length!==Oi(a).length+(v?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&&jt(3,JSON.stringify(Lr(s)))}var i={};KR("ES5",{J:function(s,a){var l=Array.isArray(s),u=function(f,d){if(f){for(var p=Array(d.length),y=0;y<d.length;y++)Object.defineProperty(p,""+y,e(y,!0));return p}var v=Lw(d);delete v[Se];for(var g=Oi(v),m=0;m<g.length;m++){var h=g[m];v[h]=e(h,f||!!v[h].enumerable)}return Object.create(Object.getPrototypeOf(d),v)}(l,s),c={i:l?5:4,A:a?a.A:Vm(),P:!1,I:!1,R:{},l:a,t:s,k:u,o:null,g:!1,C:!1};return Object.defineProperty(u,Se,{value:c,writable:!0}),u},S:function(s,a,l){l?Un(a)&&a[Se].A===s&&t(s.p):(s.u&&function u(c){if(c&&typeof c=="object"){var f=c[Se];if(f){var d=f.t,p=f.k,y=f.R,v=f.i;if(v===4)Eo(p,function(x){x!==Se&&(d[x]!==void 0||Li(d,x)?y[x]||u(p[x]):(y[x]=!0,Or(f)))}),Eo(d,function(x){p[x]!==void 0||Li(p,x)||(y[x]=!1,Or(f))});else if(v===5){if(r(f)&&(Or(f),y.length=!0),p.length<d.length)for(var g=p.length;g<d.length;g++)y[g]=!1;else for(var m=d.length;m<p.length;m++)y[m]=!0;for(var h=Math.min(p.length,d.length),S=0;S<h;S++)p.hasOwnProperty(S)||(y[S]=!0),y[S]===void 0&&u(p[S])}}}}(s.p[0]),t(s.p))},K:function(s){return s.i===4?n(s):r(s)}})}var bw,ya,Zm=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",qR=typeof Map<"u",GR=typeof Set<"u",Tw=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Iw=Zm?Symbol.for("immer-nothing"):((bw={})["immer-nothing"]=!0,bw),kw=Zm?Symbol.for("immer-draftable"):"__$immer_draftable",Se=Zm?Symbol.for("immer-state"):"__$immer_state";var YR=""+Object.prototype.constructor,Oi=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Lw=Object.getOwnPropertyDescriptors||function(e){var t={};return Oi(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Wm={},va={get:function(e,t){if(t===Se)return e;var n=Lr(e);if(!Li(n,t))return function(o,i,s){var a,l=Ew(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||!Zt(r)?r:r===zm(e.t,t)?(Bm(e),e.o[t]=$m(e.A.h,r,e)):r},has:function(e,t){return t in Lr(e)},ownKeys:function(e){return Reflect.ownKeys(Lr(e))},set:function(e,t,n){var r=Ew(Lr(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=zm(Lr(e),t),i=o==null?void 0:o[Se];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(Rw(n,o)&&(n!==void 0||Li(e.t,t)))return!0;Bm(e),Or(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 zm(e.t,t)!==void 0||t in e.t?(e.R[t]=!1,Bm(e),Or(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Lr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){jt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){jt(12)}},ha={};Eo(va,function(e,t){ha[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ha.deleteProperty=function(e,t){return ha.set.call(this,e,t,void 0)},ha.set=function(e,t,n){return va.set.call(this,e[0],t,n,e[0])};var XR=function(){function e(n){var r=this;this.O=Tw,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(v){var g=this;v===void 0&&(v=a);for(var m=arguments.length,h=Array(m>1?m-1:0),S=1;S<m;S++)h[S-1]=arguments[S];return l.produce(v,function(x){var C;return(C=i).call.apply(C,[g,x].concat(h))})}}var u;if(typeof i!="function"&&jt(6),s!==void 0&&typeof s!="function"&&jt(7),Zt(o)){var c=ww(r),f=$m(r,o,void 0),d=!0;try{u=i(f),d=!1}finally{d?Qu(c):Km(c)}return typeof Promise<"u"&&u instanceof Promise?u.then(function(v){return Um(c,s),jm(v,c)},function(v){throw Qu(c),v}):(Um(c,s),jm(u,c))}if(!o||typeof o!="object"){if((u=i(o))===void 0&&(u=o),u===Iw&&(u=void 0),r.D&&Xm(u,!0),s){var p=[],y=[];xn("Patches").M(o,u,p,y),s(p,y)}return u}jt(21,o)},this.produceWithPatches=function(o,i){if(typeof o=="function")return function(u){for(var c=arguments.length,f=Array(c>1?c-1:0),d=1;d<c;d++)f[d-1]=arguments[d];return r.produceWithPatches(u,function(p){return o.apply(void 0,[p].concat(f))})};var s,a,l=r.produce(o,i,function(u,c){s=u,a=c});return typeof Promise<"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){Zt(n)||jt(8),Un(n)&&(n=WR(n));var r=ww(this),o=$m(this,n,void 0);return o[Se].C=!0,Km(r),o},t.finishDraft=function(n,r){var o=n&&n[Se],i=o.A;return Um(i,r),jm(void 0,i)},t.setAutoFreeze=function(n){this.D=n},t.setUseProxies=function(n){n&&!Tw&&jt(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=xn("Patches").$;return Un(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),xt=new XR,QR=xt.produce,Q_=xt.produceWithPatches.bind(xt),Z_=xt.setAutoFreeze.bind(xt),J_=xt.setUseProxies.bind(xt),e2=xt.applyPatches.bind(xt),t2=xt.createDraft.bind(xt),n2=xt.finishDraft.bind(xt),ec=QR;function Nr(e){"@babel/helpers - typeof";return Nr=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},Nr(e)}function Jm(e,t){if(Nr(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Nr(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eg(e){var t=Jm(e,"string");return Nr(t)==="symbol"?t:String(t)}function tg(e,t,n){return t=eg(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ow(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 tc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(n),!0).forEach(function(r){tg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ow(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ye(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 Nw=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ng=function(){return Math.random().toString(36).substring(7).split("").join(".")},nc={INIT:"@@redux/INIT"+ng(),REPLACE:"@@redux/REPLACE"+ng(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ng()}};function ZR(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 rg(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ye(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ye(1));return n(rg)(e,t)}if(typeof e!="function")throw new Error(Ye(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(Ye(3));return i}function f(v){if(typeof v!="function")throw new Error(Ye(4));if(l)throw new Error(Ye(5));var g=!0;return u(),a.push(v),function(){if(g){if(l)throw new Error(Ye(6));g=!1,u();var h=a.indexOf(v);a.splice(h,1),s=null}}}function d(v){if(!ZR(v))throw new Error(Ye(7));if(typeof v.type>"u")throw new Error(Ye(8));if(l)throw new Error(Ye(9));try{l=!0,i=o(i,v)}finally{l=!1}for(var g=s=a,m=0;m<g.length;m++){var h=g[m];h()}return v}function p(v){if(typeof v!="function")throw new Error(Ye(10));o=v,d({type:nc.REPLACE})}function y(){var v,g=f;return v={subscribe:function(h){if(typeof h!="object"||h===null)throw new Error(Ye(11));function S(){h.next&&h.next(c())}S();var x=g(S);return{unsubscribe:x}}},v[Nw]=function(){return this},v}return d({type:nc.INIT}),r={dispatch:d,subscribe:f,getState:c,replaceReducer:p},r[Nw]=y,r}function JR(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:nc.INIT});if(typeof r>"u")throw new Error(Ye(12));if(typeof n(void 0,{type:nc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ye(13))})}function rc(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{JR(n)}catch(l){a=l}return function(u,c){if(u===void 0&&(u={}),a)throw a;if(!1)var f;for(var d=!1,p={},y=0;y<i.length;y++){var v=i[y],g=n[v],m=u[v],h=g(m,c);if(typeof h>"u"){var S=c&&c.type;throw new Error(Ye(14))}p[v]=h,d=d||h!==m}return d=d||i.length!==Object.keys(u).length,d?p:u}}function Mi(){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 Mw(){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(Ye(15))},s={getState:o.getState,dispatch:function(){return i.apply(void 0,arguments)}},a=t.map(function(l){return l(s)});return i=Mi.apply(void 0,a)(o.dispatch),tc(tc({},o),{},{dispatch:i})}}}function _w(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 Dw=_w();Dw.withExtraArgument=_w;var og=Dw;var zw=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)}}(),eA=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}}},_i=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},tA=Object.defineProperty,nA=Object.defineProperties,rA=Object.getOwnPropertyDescriptors,Fw=Object.getOwnPropertySymbols,oA=Object.prototype.hasOwnProperty,iA=Object.prototype.propertyIsEnumerable,Hw=function(e,t,n){return t in e?tA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Mr=function(e,t){for(var n in t||(t={}))oA.call(t,n)&&Hw(e,n,t[n]);if(Fw)for(var r=0,o=Fw(t);r<o.length;r++){var n=o[r];iA.call(t,n)&&Hw(e,n,t[n])}return e},ig=function(e,t){return nA(e,rA(t))},sA=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 aA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Mi:Mi.apply(null,arguments)},w2=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}};function lA(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 uA=function(e){zw(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,_i([void 0],n[0].concat(this)))):new(t.bind.apply(t,_i([void 0],n.concat(this))))},t}(Array),cA=function(e){zw(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,_i([void 0],n[0].concat(this)))):new(t.bind.apply(t,_i([void 0],n.concat(this))))},t}(Array);function lg(e){return Zt(e)?ec(e,function(){}):e}function dA(e){return typeof e=="boolean"}function fA(){return function(t){return pA(t)}}function pA(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 uA;if(n&&(dA(n)?a.push(og):a.push(og.withExtraArgument(n.extraArgument))),!1){if(o)var l;if(s)var u}return a}var sg=!0;function Bw(e){var t=fA(),n=e||{},r=n.reducer,o=r===void 0?void 0:r,i=n.middleware,s=i===void 0?t():i,a=n.devTools,l=a===void 0?!0:a,u=n.preloadedState,c=u===void 0?void 0:u,f=n.enhancers,d=f===void 0?void 0:f,p;if(typeof o=="function")p=o;else if(lA(o))p=rc(o);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var y=s;if(typeof y=="function"&&(y=y(t),!sg&&!Array.isArray(y)))throw new Error("when using a middleware builder function, an array of middleware must be returned");if(!sg&&y.some(function(x){return typeof x!="function"}))throw new Error("each middleware provided to configureStore must be a function");var v=Mw.apply(void 0,y),g=Mi;l&&(g=aA(Mr({trace:!sg},typeof l=="object"&&l)));var m=new cA(v),h=m;Array.isArray(d)?h=_i([v],d):typeof d=="function"&&(h=d(m));var S=g.apply(void 0,h);return rg(p,c,S)}function xe(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 Mr(Mr({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 Vw(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 mA(e){return typeof e=="function"}function gA(e,t,n,r){n===void 0&&(n=[]);var o=typeof t=="function"?Vw(t):[t,n,r],i=o[0],s=o[1],a=o[2],l;if(mA(e))l=function(){return lg(e())};else{var u=lg(e);l=function(){return u}}function c(f,d){f===void 0&&(f=l());var p=_i([i[d.type]],s.filter(function(y){var v=y.matcher;return v(d)}).map(function(y){var v=y.reducer;return v}));return p.filter(function(y){return!!y}).length===0&&(p=[a]),p.reduce(function(y,v){if(v)if(Un(y)){var g=y,m=v(g,d);return m===void 0?y:m}else{if(Zt(y))return ec(y,function(h){return v(h,d)});var m=v(y,d);if(m===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}return y},f)}return c.getInitialState=l,c}function hA(e,t){return e+"/"+t}function q(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:lg(e.initialState),r=e.reducers||{},o=Object.keys(r),i={},s={},a={};o.forEach(function(c){var f=r[c],d=hA(t,c),p,y;"reducer"in f?(p=f.reducer,y=f.prepare):p=f,i[c]=p,s[d]=p,a[c]=y?xe(d,y):xe(d)});function l(){var c=typeof e.extraReducers=="function"?Vw(e.extraReducers):[e.extraReducers],f=c[0],d=f===void 0?{}:f,p=c[1],y=p===void 0?[]:p,v=c[2],g=v===void 0?void 0:v,m=Mr(Mr({},d),s);return gA(n,function(h){for(var S in m)h.addCase(S,m[S]);for(var x=0,C=y;x<C.length;x++){var T=C[x];h.addMatcher(T.matcher,T.reducer)}g&&h.addDefaultCase(g)})}var u;return{name:t,reducer:function(c,f){return u||(u=l()),u(c,f)},actions:a,caseReducers:i,getInitialState:function(){return u||(u=l()),u.getInitialState()}}}var yA="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",vA=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=yA[Math.random()*64|0];return t},SA=["name","message","stack","code"],ag=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),Uw=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),wA=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=SA;n<r.length;n++){var o=r[n];typeof e[o]=="string"&&(t[o]=e[o])}return t}return{message:String(e)}},j=function(){function e(t,n,r){var o=xe(t+"/fulfilled",function(c,f,d,p){return{payload:c,meta:ig(Mr({},p||{}),{arg:d,requestId:f,requestStatus:"fulfilled"})}}),i=xe(t+"/pending",function(c,f,d){return{payload:void 0,meta:ig(Mr({},d||{}),{arg:f,requestId:c,requestStatus:"pending"})}}),s=xe(t+"/rejected",function(c,f,d,p,y){return{payload:p,error:(r&&r.serializeError||wA)(c||"Rejected"),meta:ig(Mr({},y||{}),{arg:d,requestId:f,rejectedWithValue:!!p,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),a=!1,l=typeof AbortController<"u"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function u(c){return function(f,d,p){var y=r!=null&&r.idGenerator?r.idGenerator(c):vA(),v=new l,g,m=!1;function h(x){g=x,v.abort()}var S=function(){return sA(this,null,function(){var x,C,T,k,I,L,N;return eA(this,function(z){switch(z.label){case 0:return z.trys.push([0,4,,5]),k=(x=r==null?void 0:r.condition)==null?void 0:x.call(r,c,{getState:d,extra:p}),EA(k)?[4,k]:[3,2];case 1:k=z.sent(),z.label=2;case 2:if(k===!1||v.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return m=!0,I=new Promise(function(K,J){return v.signal.addEventListener("abort",function(){return J({name:"AbortError",message:g||"Aborted"})})}),f(i(y,c,(C=r==null?void 0:r.getPendingMeta)==null?void 0:C.call(r,{requestId:y,arg:c},{getState:d,extra:p}))),[4,Promise.race([I,Promise.resolve(n(c,{dispatch:f,getState:d,extra:p,requestId:y,signal:v.signal,abort:h,rejectWithValue:function(K,J){return new ag(K,J)},fulfillWithValue:function(K,J){return new Uw(K,J)}})).then(function(K){if(K instanceof ag)throw K;return K instanceof Uw?o(K.payload,y,c,K.meta):o(K,y,c)})])];case 3:return T=z.sent(),[3,5];case 4:return L=z.sent(),T=L instanceof ag?s(null,y,c,L.payload,L.meta):s(L,y,c),[3,5];case 5:return N=r&&!r.dispatchConditionRejection&&s.match(T)&&T.meta.condition,N||f(T),[2,T]}})})}();return Object.assign(S,{abort:h,requestId:y,arg:c,unwrap:function(){return S.then(xA)}})}}return Object.assign(u,{pending:i,rejected:s,fulfilled:o,typePrefix:t})}return e.withTypes=function(){return e},e}();function xA(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function EA(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var CA="task",Kw="listener",$w="completed",ug="cancelled",b2="task-"+ug,T2="task-"+$w,k2=Kw+"-"+ug,P2=Kw+"-"+$w,R2=function(){function e(t){this.code=t,this.name="TaskAbortError",this.message=CA+" "+ug+" (reason: "+t+")"}return e}();var cg="listenerMiddleware";var A2=xe(cg+"/add"),I2=xe(cg+"/removeAll"),L2=xe(cg+"/remove");var jw,O2=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:typeof global<"u"?global:globalThis):function(e){return(jw||(jw=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},bA=function(e){return function(t){setTimeout(t,e)}},N2=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:bA(10);Aw();var Nx=w(fg()),Mx=w(Zw());var pg=w(Xu());function BA(e){e()}var Jw=BA,ex=e=>Jw=e,tx=()=>Jw;var Fi=w(F());var ox=w(F());var ic=w(F()),nx=Symbol.for(`react-redux-context-${ic.version}`),rx=globalThis;function VA(){let e=rx[nx];return e||(e=(0,ic.createContext)(null),rx[nx]=e),e}var Xe=new Proxy({},new Proxy({},{get(e,t){let n=VA();return(r,...o)=>Reflect[t](n,...o)}}));function Sa(e=Xe){return function(){return(0,ox.useContext)(e)}}var sc=Sa();var ac=()=>{throw new Error("uSES not initialized!")};var ix=ac,sx=e=>{ix=e},KA=(e,t)=>e===t;function ax(e=Xe){let t=e===Xe?sc:Sa(e);return function(r,o={}){let{equalityFn:i=KA,stabilityCheck:s=void 0,noopCheck:a=void 0}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:u,getServerState:c,stabilityCheck:f,noopCheck:d}=t(),p=(0,Fi.useRef)(!0),y=(0,Fi.useCallback)({[r.name](g){return r(g)}}[r.name],[r,f,s]),v=ix(u.addNestedSub,l.getState,c||l.getState,y,i);return(0,Fi.useDebugValue)(v),v}}var O=ax();function jn(){return jn=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},jn.apply(this,arguments)}function wa(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 Cg=w(vx()),le=w(F()),Ax=w(Ex());var sI=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function aI(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a=!1,l,u,c,f,d;function p(h,S){return l=h,u=S,c=e(l,u),f=t(r,u),d=n(c,f,u),a=!0,d}function y(){return c=e(l,u),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function v(){return e.dependsOnOwnProps&&(c=e(l,u)),t.dependsOnOwnProps&&(f=t(r,u)),d=n(c,f,u),d}function g(){let h=e(l,u),S=!s(h,c);return c=h,S&&(d=n(c,f,u)),d}function m(h,S){let x=!i(S,u),C=!o(h,l,S,u);return l=h,u=S,x&&C?y():x?v():C?g():d}return function(S,x){return a?m(S,x):p(S,x)}}function xg(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=wa(t,sI),s=n(e,i),a=r(e,i),l=o(e,i);return aI(s,a,l,e,i)}function Eg(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 xa(e){return function(n){let r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Cx(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function 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=Cx(e);let u=i(a,l);return typeof u=="function"&&(i.mapToProps=u,i.dependsOnOwnProps=Cx(u),u=i(a,l)),u},i}}function Hi(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function bx(e){return e&&typeof e=="object"?xa(t=>Eg(e,t)):e?typeof e=="function"?Rc(e,"mapDispatchToProps"):Hi(e,"mapDispatchToProps"):xa(t=>({dispatch:t}))}function Tx(e){return e?typeof e=="function"?Rc(e,"mapStateToProps"):Hi(e,"mapStateToProps"):xa(()=>({}))}function lI(e,t,n){return jn({},n,e,t)}function uI(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let i=!1,s;return function(l,u,c){let f=e(l,u,c);return i?o(f,s)||(s=f):(i=!0,s=f),s}}}function kx(e){return e?typeof e=="function"?uI(e):Hi(e,"mergeProps"):()=>lI}function cI(){let e=tx(),t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=t;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,i=n={callback:r,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){!o||t===null||(o=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var Px={notify(){},get:()=>[]};function Ac(e,t){let n,r=Px;function o(f){return l(),r.subscribe(f)}function i(){r.notify()}function s(){c.onStateChange&&c.onStateChange()}function a(){return!!n}function l(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=cI())}function u(){n&&(n(),n=void 0,r.clear(),r=Px)}let c={addNestedSub:o,notifyNestedSubs:i,handleChangeWrapper:s,isSubscribed:a,trySubscribe:l,tryUnsubscribe:u,getListeners:()=>r};return c}var Ic=w(F()),dI=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ui=dI?Ic.useLayoutEffect:Ic.useEffect;function Rx(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ji(e,t){if(Rx(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Rx(e[n[o]],t[n[o]]))return!1;return!0}var fI=["reactReduxForwardedRef"],Ix=ac,Lx=e=>{Ix=e};var pI=[null,null];function mI(e,t,n){Ui(()=>e(...t),n)}function gI(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function hI(e,t,n,r,o,i,s,a,l,u,c){if(!e)return()=>{};let f=!1,d=null,p=()=>{if(f||!a.current)return;let v=t.getState(),g,m;try{g=r(v,o.current)}catch(h){m=h,d=h}m||(d=null),g===i.current?s.current||u():(i.current=g,l.current=g,s.current=!0,c())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}function yI(e,t){return e===t}function vI(e,t,n,{pure:r,areStatesEqual:o=yI,areOwnPropsEqual:i=ji,areStatePropsEqual:s=ji,areMergedPropsEqual:a=ji,forwardRef:l=!1,context:u=Xe}={}){let c=u,f=Tx(e),d=bx(t),p=kx(n),y=!!e;return g=>{let m=g.displayName||g.name||"Component",h=`Connect(${m})`,S={shouldHandleStateChanges:y,displayName:h,wrappedComponentName:m,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:d,initMergeProps:p,areStatesEqual:o,areStatePropsEqual:s,areOwnPropsEqual:i,areMergedPropsEqual:a};function x(k){let[I,L,N]=(0,le.useMemo)(()=>{let{reactReduxForwardedRef:at}=k,It=wa(k,fI);return[k.context,at,It]},[k]),z=(0,le.useMemo)(()=>I&&I.Consumer&&(0,Ax.isContextConsumer)(le.default.createElement(I.Consumer,null))?I:c,[I,c]),K=(0,le.useContext)(z),J=!!k.store&&!!k.store.getState&&!!k.store.dispatch,oe=!!K&&!!K.store,ze=J?k.store:K.store,pn=oe?K.getServerState:ze.getState,st=(0,le.useMemo)(()=>xg(ze.dispatch,S),[ze]),[_,$]=(0,le.useMemo)(()=>{if(!y)return pI;let at=Ac(ze,J?void 0:K.subscription),It=at.notifyNestedSubs.bind(at);return[at,It]},[ze,J,K]),ar=(0,le.useMemo)(()=>J?K:jn({},K,{subscription:_}),[J,K,_]),ye=(0,le.useRef)(),lr=(0,le.useRef)(N),W=(0,le.useRef)(),ur=(0,le.useRef)(!1),yl=(0,le.useRef)(!1),$o=(0,le.useRef)(!1),Qr=(0,le.useRef)();Ui(()=>($o.current=!0,()=>{$o.current=!1}),[]);let cs=(0,le.useMemo)(()=>()=>W.current&&N===lr.current?W.current:st(ze.getState(),N),[ze,N]),vl=(0,le.useMemo)(()=>It=>_?hI(y,ze,_,st,lr,ye,ur,$o,W,$,It):()=>{},[_]);mI(gI,[lr,ye,ur,N,W,$]);let qt;try{qt=Ix(vl,cs,pn?()=>st(pn(),N):cs)}catch(at){throw Qr.current&&(at.message+=`
10
10
  The error may be correlated with this previous error:
11
- ${vd.current.stack}
11
+ ${Qr.current.stack}
12
12
 
13
- `),Kt}Jo(()=>{vd.current=void 0,ve.current=void 0,Ti.current=La});let Sd=(0,ee.useMemo)(()=>ee.default.createElement(g,yn({},La,{ref:R})),[R,g,La]);return(0,ee.useMemo)(()=>v?ee.default.createElement(B.Provider,{value:Ei},Sd):Sd,[B,Sd,Ei])}let b=ee.default.memo(w);if(b.WrappedComponent=g,b.displayName=w.displayName=h,l){let P=ee.default.forwardRef(function(N,B){return ee.default.createElement(b,yn({},N,{reactReduxForwardedRef:B}))});return P.displayName=h,P.WrappedComponent=g,(0,bm.default)(P,g)}return(0,bm.default)(b,g)}}var vn=hP;var Bs=x(A());function yP({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Bs.useMemo)(()=>{let u=Du(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Bs.useMemo)(()=>e.getState(),[e]);Jo(()=>{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||je;return Bs.default.createElement(l.Provider,{value:s},n)}var Em=yP;function ju(e=je){let t=e===je?fu:Fs(e);return function(){let{store:r}=t();return r}}var Tm=ju();function lx(e=je){let t=e===je?Tm:ju(e);return function(){return t().dispatch}}var $=lx();D0(cx.useSyncExternalStoreWithSelector);ax(ux.useSyncExternalStore);I0(mm.unstable_batchedUpdates);var zs=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(zs||{});var vP={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,adminUrl:void 0,productName:"Deepdesk"},dx=z({name:"settings",initialState:vP,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Hu}=dx.actions,km=e=>t=>t.settings[e],D=e=>I(km(e)),px=dx.reducer;var SP={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},Ve=e=>e.auth.isLoggedIn,fx=e=>e.auth.loginFetchState,mx=e=>e.auth.verifyFetchState,gx=e=>e.auth.showLoginOverlay,Sn=F("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),hx=F("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),Us=F("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),yx=z({name:"auth",initialState:SP,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Sn.pending,t=>{t.loginFetchState="loading"}),e.addCase(Sn.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Sn.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(Us.pending,t=>{t.verifyFetchState="loading"}),e.addCase(Us.rejected,t=>{t.verifyFetchState="error"}),e.addCase(Us.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:ti,setShowLoginOverlay:vx}=yx.actions,Sx=yx.reducer;function xn(){}xn.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r.callback;typeof r=="function"&&(o=r,r={}),this.options=r;var i=this;function s(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 f(){for(var y=-1*u;y<=u;y+=2){var g=void 0,m=p[y-1],h=p[y+1],S=(h?h.newPos:0)-y;m&&(p[y-1]=void 0);var w=m&&m.newPos+1<a,C=h&&0<=S&&S<l;if(!w&&!C){p[y]=void 0;continue}if(!w||C&&m.newPos<h.newPos?(g=wP(h),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),S=i.extractCommon(g,n,t,y),g.newPos+1>=a&&S+1>=l)return s(xP(i,g.components,n,t,i.useLongestToken));p[y]=g}u++}if(o)(function y(){setTimeout(function(){if(u>c)return o();f()||y()},0)})();else for(;u<=c;){var v=f();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 xP(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(f,v){var y=r[l+v];return y.length>f.length?y:f}),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 wP(e){return{newPos:e.newPos,components:e.components.slice(0)}}var _P=new xn;function _x(e,t,n){return _P.diff(e,t,n)}var xx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,wx=/\S/,Cx=new xn;Cx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!wx.test(e)&&!wx.test(t)};Cx.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]&&xx.test(t[n])&&xx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var bx=new xn;bx.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 CP=new xn;CP.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var bP=new xn;bP.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Bu(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bu=function(t){return typeof t}:Bu=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bu(e)}var EP=Object.prototype.toString,Ks=new xn;Ks.useLongestToken=!0;Ks.tokenize=bx.tokenize;Ks.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(Pm(e,null,null,o),o," ")};Ks.equals=function(e,t){return xn.prototype.equals.call(Ks,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Pm(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(EP.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]=Pm(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Bu(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]=Pm(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Rm=new xn;Rm.tokenize=function(e){return e.slice()};Rm.join=Rm.removeEmpty=function(e){return e};function Ex(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function ur(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)=>ur(i,t[s],n-1)):Ex(e)&&Ex(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>ur(e[s],t[s],n-1)):!1}function TP(e){return Math.max(...e.map(t=>t.length))}function kP(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 Tx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<TP(r);o++){let i=kP(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 PP=2;function Im(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Tx(e,PP);return n&&n.text!==t?n:e[0]}var RP={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},H=RP;var kx={current:null,isSupported:null},te=de("resetConversation"),zu=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},Uu=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},ni=e=>e.conversation.isSupported,Lm=F("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),Ku=F("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Vu=F("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),$u=F("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Uu(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Am=F("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})})}),Wu=F("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=Uu(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),IP=[Ku.rejected,Vu.rejected,$u.rejected,Wu.rejected].map(e=>e==null?void 0:e.toString()),LP=z({name:"conversation",initialState:kx,reducers:{},extraReducers:e=>{e.addCase(Lm.fulfilled,(t,n)=>{t.isSupported=n.payload}).addCase(Ku.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Vu.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Am.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase($u.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Wu.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(te,()=>kx).addMatcher(t=>IP.includes(t.type),(t,n)=>{var r;throw H.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),Px=LP.reducer;var cr={text:"",html:null,selection:{start:0,end:0},stagedSuggestion:null,userCommitted:{text:"",selection:{start:0,end:0}},tabCompletionSuggestion:void 0,previousKeyDownEvent:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function Rx(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 Gu=de("input/replaceText"),Xu=de("input/keyDown"),Ur=de("input/sendMessage"),Qu=de("input/uiInputChange"),Yu=de("input/applyImageSuggestion"),He=de("input/sendEvent");function qu(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,p=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(p||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:p?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var Ix=z({name:"input",initialState:cr,reducers:{initialInput(e,t){let{text:n,selection:r,html:o}=t.payload;e.text=n,e.selection.start=(r==null?void 0:r.start)??n.length,e.selection.end=(r==null?void 0:r.end)??n.length,e.userCommitted.text=n,e.userCommitted.selection.start=(r==null?void 0:r.start)??n.length,e.userCommitted.selection.end=(r==null?void 0:r.end)??n.length,e.html=o||null},reset(e){Object.assign(e,{...cr,selection:e.selection})},resetToCommitted(e){e.text=e.userCommitted.text,e.selection=e.userCommitted.selection,e.stagedSuggestion=null,e.tabCompletionSuggestion=Im(e.textSuggestions,e.userCommitted.text)},changeSelection(e,t){t.payload&&(ur(e.selection,t.payload)||(e.selection=t.payload,e.userCommitted.selection=e.selection,e.stagedSuggestion&&qu(e)))},platformInput(e,t){let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end),e.text=n,e.html=r||null},userInput(e,t){var i,s,a,l;if(e.previousKeyDownEvent){let{key:u,shiftKey:c,ctrlKey:p,metaKey:d,altKey:f}=e.previousKeyDownEvent;switch(u){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:v}=e,{text:y}=t.payload,g=_x(v,y);v.length-y.length>1&&e.metrics.deletions.push(...g.filter(m=>m.removed).map(m=>m.value)),e.metrics.numCharsDeleted+=v.length-y.length;break}case"C":case"V":case"X":if(!p&&!d){e.metrics.numCharsTyped+=1;let v=((i=e.selection)==null?void 0:i.start)!==void 0&&((s=e.selection)==null?void 0:s.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;v&&v.length>0&&(e.metrics.numCharsDeleted+=v.length,e.metrics.deletions.push(v))}break;case"Shift":break;default:if(!p&&!d&&!f){e.metrics.numCharsTyped+=1;let v=((a=e.selection)==null?void 0:a.start)!==void 0&&((l=e.selection)==null?void 0:l.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;v&&v.length>0&&(e.metrics.numCharsDeleted+=v.length,e.metrics.deletions.push(v))}}}!e.metrics.agentStartedTypingTimestamp&&t.payload.text!==e.text&&(e.metrics.agentStartedTypingTimestamp=Date.now()),t.payload.text===""&&(e.metrics=cr.metrics,e.textSuggestions=[],e.stagedSuggestion=null),e.text!==t.payload.text&&qu(e);let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end,e.userCommitted.selection.start=o.start,e.userCommitted.selection.end=o.end),e.text=n,e.html=r||null,e.userCommitted.text=n,e.previousKeyDownEvent=null},stageSuggestion(e,t){let{text:n}=t.payload;switch(e.stagedSuggestion=t.payload,e.tabCompletionSuggestion=void 0,t.payload.replace){case"selection":e.text=`${e.text.slice(0,e.selection.start)}${n}${e.text.slice(e.selection.end)}`,e.selection.end=e.selection.start+n.length,e.selection.start+=n.length;break;case"until-selection-end":e.text=`${n}${e.text.slice(e.selection.end)}`,e.selection.start=n.length,e.selection.end=n.length;break;default:throw new Error(`Unknown replace ${t.payload.replace}`)}t.payload.eventMetrics.inputType==="tab"&&qu(e)},commitSuggestion(e){qu(e)},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics={...e.metrics,numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]}},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o&&o.length?o.length:0),s=o&&o.length?[...n.deletions,o]:n.deletions;e.metrics={...e.metrics,numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]}},registerKeyDown(e,t){e.previousKeyDownEvent=t.payload},nextTextSuggestionIndex(e){let t=e.textSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},previousTextSuggestionIndex(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0)return;let n=e.userCommitted.text.substring(0,e.userCommitted.selection.end),r=Im(t.payload,n);e.tabCompletionSuggestion=r!=null&&r.text.includes(n)?r:void 0},setSelectedTextSuggestionIndex(e,t){e.selectedSuggestionIndex=t.payload},setMetrics(e,{payload:t}){e.metrics=t}},extraReducers:e=>{e.addCase(te,t=>{t.tabCompletionSuggestion=cr.tabCompletionSuggestion,t.previousKeyDownEvent=cr.previousKeyDownEvent,t.textSuggestions=cr.textSuggestions,t.selectedSuggestionIndex=cr.selectedSuggestionIndex,t.metrics=cr.metrics})}}),ri=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),AP=e=>e.input.selection,Lx=()=>I(AP),{userInput:Ax,changeSelection:Om,initialInput:Ox,nextTextSuggestionIndex:Nx,offeredTextSuggestion:Mx,previousTextSuggestionIndex:Dx,registerCut:Fx,registerKeyDown:jx,registerPaste:Hx,reset:Bx,resetToCommitted:Vs,platformInput:zx,setSelectedTextSuggestionIndex:dr,setTextSuggestions:Zt,stageSuggestion:Ot,commitSuggestion:wn,setMetrics:Ux}=Ix.actions,Kx=Ix.reducer;function OP(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function G(e){return Array.isArray(e)?e.map(G):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[OP(n)]:G(e[n])}),{}):e}function Nm(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function _e(e){return Array.isArray(e)?e.map(_e):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Nm(n)]:_e(e[n])}),{}):e}var NP={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},Ws=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)||""}},$s=F("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?G(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),G(r))}),Mm=F("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}),Dm=F("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),Vx=e=>e.info.agentInfo,$x=z({name:"info",initialState:NP,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase($s.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase($s.rejected,t=>{t.fetchState="error"}).addCase($s.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(Mm.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(Dm.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(te,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:Wx}=$x.actions,qx=$x.reducer;var Zu={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},Gx=e=>e.search.isOpen,Xx=e=>e.search.page,Qx=e=>e.search.list,Yx=e=>e.search.aggregates;function Zx(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var Kr=F("search/getAll",async(e,t)=>{var a;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(a=r.conversation.current)==null?void 0:a.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:s}=await n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:Ws(r)});return{results:i.map(l=>({...l,source:`search-${l.type.toLowerCase()}`,searchTerm:e.query})),aggregates:s}}),Jx=z({name:"search",initialState:Zu,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=Zu.fetchState,e.list=Zu.list}},extraReducers:e=>{e.addCase(Kr.pending,t=>{t.fetchState="loading"}).addCase(Kr.rejected,(t,n)=>{t.fetchState="error",H.error(n.error)}).addCase(Kr.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(te,()=>Zu)}}),{resetSearch:Ju,setIsOpen:it,setPage:Nt}=Jx.actions,ew=Jx.reducer;var Fm={cues:[],fetchState:"idle"},tw=e=>{var t;return(t=e.rules)==null?void 0:t.cues},MP=de("rules/resetCues"),_n=F("rules/evaluate",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=(i=t.getState().conversation.current)==null?void 0:i.id;if(!r)throw new Error("No current conversation to evaulate rules");return await n.evaluateRule(e.label,r,e.params)}),nw=z({name:"answer",initialState:Fm,reducers:{removeCue(e,t){e.cues=e.cues.filter(n=>n.id!==t.payload.id)}},extraReducers:e=>{e.addCase(_n.pending,t=>{t.fetchState="loading"}).addCase(_n.rejected,t=>{t.fetchState="error"}).addCase(_n.fulfilled,(t,n)=>{let r=Date.now(),o=n.payload.map(a=>({id:a.id||a.text,timestamp:r,...a})),i=o.map(a=>a.id),s=t.cues.filter(a=>!i.includes(a.id));t.fetchState="done",t.cues=[...o,...s]}).addCase(te,()=>Fm).addCase(MP.toString(),()=>Fm)}}),{removeCue:rw}=nw.actions,ow=nw.reducer;var jm="SetCues",oi="ShowLoginOverlay",qs="UserLoggedIn",DP="UserLoggedOut",ii="ApplySuggestion",Hm="ApplyImageSuggestion",FP="ShowCommandPalette",jP=e=>({[jm]:t=>{e.dispatch({type:_n.fulfilled,payload:t})},[FP]:t=>{e.dispatch(it(t.isOpen)),t.page&&e.dispatch(Nt(t.page))},[oi]:t=>{e.dispatch(vx(t))},[qs]:()=>{e.dispatch(Sn())},[DP]:()=>{e.dispatch(Sn())},[Hm]:t=>{e.dispatch(Yu({suggestion:t.suggestion}))},[ii]:t=>{e.dispatch(Ot({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(wn())}}),iw=jP;var Gs=x(A()),aw=x(_()),sw=Gs.default.createContext(null),Vr=({broadcastEvents:e,children:t})=>{let n=Gs.default.useMemo(()=>e,[]);return(0,aw.jsx)(sw.Provider,{value:n,children:t})},Jt=()=>{let e=(0,Gs.useContext)(sw);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var hc=x(W()),Dt=x(A());var fc=x(A());var Bm=function(e,t){return Bm=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])},Bm(e,t)};function Xs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Bm(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var st=function(){return st=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},st.apply(this,arguments)};function lw(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 ec(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 tc;(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"})(tc||(tc={}));var nc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var Mt;(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"})(Mt||(Mt={}));var rc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(rc||(rc={}));function zm(e){return e.type===Mt.literal}function uw(e){return e.type===Mt.argument}function oc(e){return e.type===Mt.number}function ic(e){return e.type===Mt.date}function sc(e){return e.type===Mt.time}function ac(e){return e.type===Mt.select}function lc(e){return e.type===Mt.plural}function cw(e){return e.type===Mt.pound}function uc(e){return e.type===Mt.tag}function cc(e){return!!(e&&typeof e=="object"&&e.type===rc.number)}function Qs(e){return!!(e&&typeof e=="object"&&e.type===rc.dateTime)}function Um(e){e.forEach(function(t){if(delete t.location,ac(t)||lc(t))for(var n in t.options)delete t.options[n].location,Um(t.options[n].value);else oc(t)&&cc(t.style)||(ic(t)||sc(t))&&Qs(t.style)?delete t.style.location:uc(t)&&Um(t.children)})}function dw(e,t){t===void 0&&(t={}),t=st({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new nc(e,t).parse();if(n.err){var r=SyntaxError(tc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||Um(n.val),n.val}function dc(e,t){var n=t&&t.cache?t.cache:VP,r=t&&t.serializer?t.serializer:KP,o=t&&t.strategy?t.strategy:BP;return o(e,{cache:n,serializer:r})}function HP(e){return e==null||typeof e=="number"||typeof e=="boolean"}function pw(e,t,n,r){var o=HP(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function fw(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 Km(e,t,n,r,o){return n.bind(t,e,r,o)}function BP(e,t){var n=e.length===1?pw:fw;return Km(e,this,n,t.cache.create(),t.serializer)}function zP(e,t){return Km(e,this,fw,t.cache.create(),t.serializer)}function UP(e,t){return Km(e,this,pw,t.cache.create(),t.serializer)}var KP=function(){return JSON.stringify(arguments)};function Vm(){this.cache=Object.create(null)}Vm.prototype.get=function(e){return this.cache[e]};Vm.prototype.set=function(e,t){this.cache[e]=t};var VP={create:function(){return new Vm}},pc={variadic:zP,monadic:UP};var $r;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})($r||($r={}));var Ys=function(e){Xs(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 $m=function(e){Xs(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('", "'),'"'),$r.INVALID_VALUE,i)||this}return t}(Ys);var mw=function(e){Xs(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),$r.INVALID_VALUE,o)||this}return t}(Ys);var gw=function(e){Xs(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,'"'),$r.MISSING_VALUE,r)||this}return t}(Ys);var Be;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Be||(Be={}));function $P(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Be.literal||n.type!==Be.literal?t.push(n):r.value+=n.value,t},[])}function WP(e){return typeof e=="function"}function Zs(e,t,n,r,o,i,s){if(e.length===1&&zm(e[0]))return[{type:Be.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(zm(c)){a.push({type:Be.literal,value:c.value});continue}if(cw(c)){typeof i=="number"&&a.push({type:Be.literal,value:n.getNumberFormat(t).format(i)});continue}var p=c.value;if(!(o&&p in o))throw new gw(p,s);var d=o[p];if(uw(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Be.literal:Be.object,value:d});continue}if(ic(c)){var f=typeof c.style=="string"?r.date[c.style]:Qs(c.style)?c.style.parsedOptions:void 0;a.push({type:Be.literal,value:n.getDateTimeFormat(t,f).format(d)});continue}if(sc(c)){var f=typeof c.style=="string"?r.time[c.style]:Qs(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Be.literal,value:n.getDateTimeFormat(t,f).format(d)});continue}if(oc(c)){var f=typeof c.style=="string"?r.number[c.style]:cc(c.style)?c.style.parsedOptions:void 0;f&&f.scale&&(d=d*(f.scale||1)),a.push({type:Be.literal,value:n.getNumberFormat(t,f).format(d)});continue}if(uc(c)){var v=c.children,y=c.value,g=o[y];if(!WP(g))throw new mw(y,"function",s);var m=Zs(v,t,n,r,o,i),h=g(m.map(function(C){return C.value}));Array.isArray(h)||(h=[h]),a.push.apply(a,h.map(function(C){return{type:typeof C=="string"?Be.literal:Be.object,value:C}}))}if(ac(c)){var S=c.options[d]||c.options.other;if(!S)throw new $m(c.value,d,Object.keys(c.options),s);a.push.apply(a,Zs(S.value,t,n,r,o));continue}if(lc(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new Ys(`Intl.PluralRules is not available in this environment.
13
+ `),at}Ui(()=>{Qr.current=void 0,W.current=void 0,ye.current=qt});let Gt=(0,le.useMemo)(()=>le.default.createElement(g,jn({},qt,{ref:L})),[L,g,qt]);return(0,le.useMemo)(()=>y?le.default.createElement(z.Provider,{value:ar},Gt):Gt,[z,Gt,ar])}let T=le.default.memo(x);if(T.WrappedComponent=g,T.displayName=x.displayName=h,l){let I=le.default.forwardRef(function(N,z){return le.default.createElement(T,jn({},N,{reactReduxForwardedRef:z}))});return I.displayName=h,I.WrappedComponent=g,(0,Cg.default)(I,g)}return(0,Cg.default)(T,g)}}var zn=vI;var Ea=w(F());function SI({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",noopCheck:i="once"}){let s=(0,Ea.useMemo)(()=>{let u=Ac(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,noopCheck:i}},[e,r,o,i]),a=(0,Ea.useMemo)(()=>e.getState(),[e]);Ui(()=>{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||Xe;return Ea.default.createElement(l.Provider,{value:s},n)}var bg=SI;function Lc(e=Xe){let t=e===Xe?sc:Sa(e);return function(){let{store:r}=t();return r}}var Tg=Lc();function Ox(e=Xe){let t=e===Xe?Tg:Lc(e);return function(){return t().dispatch}}var Z=Ox();sx(Mx.useSyncExternalStoreWithSelector);Lx(Nx.useSyncExternalStore);ex(pg.unstable_batchedUpdates);var Ca=(n=>(n.NL_NL="nl-NL",n.EN_US="en-US",n))(Ca||{});var wI={locale:"en-US",deanonymize:!1,fallbackImage:!1,isEmbedded:!1,showAutoflows:!1,showCustomMessages:!1,showImages:!1,showSearch:!1,showImageSearch:!1,showStyleSuggestions:!1,showMidSentenceSuggestions:!1,showSuggestionsBeforePattern:!1,showSuggestionsAfterPattern:!1,showTabCompletion:!0,showTextSuggestions:!0,showEntitiesCommand:!1,showSummaryCommand:!1,showKnowledgeSearch:!1,textSuggestionsCount:3,recommendTextSuggestions:!0,searchTriggerKey:"k",visible:!0,insertLink:!1,inlineSuggestions:!1,floatingMenu:!1,adminUrl:void 0,productName:"Deepdesk"},_x=q({name:"settings",initialState:wI,reducers:{set(e,t){Object.entries(t.payload).forEach(n=>{let[r,o]=n;typeof o>"u"||(e[r]=o)})}}}),{set:Oc}=_x.actions,kg=e=>t=>t.settings[e],U=e=>O(kg(e)),Dx=_x.reducer;var xI={isLoggedIn:!0,loginFetchState:"idle",verifyFetchState:"idle",showLoginOverlay:!1},nt=e=>e.auth.isLoggedIn,Fx=e=>e.auth.loginFetchState,Hx=e=>e.auth.verifyFetchState,Ux=e=>e.auth.showLoginOverlay,Bn=j("auth/validate",async(e,t)=>t.extra.deepdeskAPI.isLoggedIn()),jx=j("auth/requestLogin",async({email:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.requestLoginByEmail(e)}),ba=j("auth/verifyLoginToken",async({token:e},t)=>{let{deepdeskAPI:n}=t.extra;return n.verifyLoginToken(e)}),zx=q({name:"auth",initialState:xI,reducers:{setIsLoggedIn(e,t){e.isLoggedIn=t.payload},setShowLoginOverlay(e,t){e.showLoginOverlay=t.payload}},extraReducers:e=>{e.addCase(Bn.pending,t=>{t.loginFetchState="loading"}),e.addCase(Bn.fulfilled,(t,{payload:n})=>{t.isLoggedIn=n,t.loginFetchState="done"}),e.addCase(Bn.rejected,t=>{t.loginFetchState="error",t.isLoggedIn=!1}),e.addCase(ba.pending,t=>{t.verifyFetchState="loading"}),e.addCase(ba.rejected,t=>{t.verifyFetchState="error"}),e.addCase(ba.fulfilled,(t,n)=>{n.payload.isLoggedIn?t.verifyFetchState="done":t.verifyFetchState="error"})}}),{setIsLoggedIn:zi,setShowLoginOverlay:Bx}=zx.actions,Vx=zx.reducer;function Vn(){}Vn.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(v){return o?(setTimeout(function(){o(void 0,v)},0),!0):v}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var a=n.length,l=t.length,u=1,c=a+l;r.maxEditLength&&(c=Math.min(c,r.maxEditLength));var f=[{newPos:-1,components:[]}],d=this.extractCommon(f[0],n,t,0);if(f[0].newPos+1>=a&&d+1>=l)return s([{value:this.join(n),count:n.length}]);function p(){for(var v=-1*u;v<=u;v+=2){var g=void 0,m=f[v-1],h=f[v+1],S=(h?h.newPos:0)-v;m&&(f[v-1]=void 0);var x=m&&m.newPos+1<a,C=h&&0<=S&&S<l;if(!x&&!C){f[v]=void 0;continue}if(!x||C&&m.newPos<h.newPos?(g=CI(h),i.pushComponent(g.components,void 0,!0)):(g=m,g.newPos++,i.pushComponent(g.components,!0,void 0)),S=i.extractCommon(g,n,t,v),g.newPos+1>=a&&S+1>=l)return s(EI(i,g.components,n,t,i.useLongestToken));f[v]=g}u++}if(o)(function v(){setTimeout(function(){if(u>c)return o();p()||v()},0)})();else for(;u<=c;){var y=p();if(y)return y}},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 EI(e,t,n,r,o){for(var i=0,s=t.length,a=0,l=0;i<s;i++){var u=t[i];if(u.removed){if(u.value=e.join(r.slice(l,l+u.count)),l+=u.count,i&&t[i-1].added){var f=t[i-1];t[i-1]=t[i],t[i]=f}}else{if(!u.added&&o){var c=n.slice(a,a+u.count);c=c.map(function(p,y){var v=r[l+y];return v.length>p.length?v:p}),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 CI(e){return{newPos:e.newPos,components:e.components.slice(0)}}var bI=new Vn;function Wx(e,t,n){return bI.diff(e,t,n)}var Kx=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,$x=/\S/,qx=new Vn;qx.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!$x.test(e)&&!$x.test(t)};qx.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]&&Kx.test(t[n])&&Kx.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Gx=new Vn;Gx.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 TI=new Vn;TI.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var kI=new Vn;kI.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Nc(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Nc=function(t){return typeof t}:Nc=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}var PI=Object.prototype.toString,Ta=new Vn;Ta.useLongestToken=!0;Ta.tokenize=Gx.tokenize;Ta.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(Pg(e,null,null,o),o," ")};Ta.equals=function(e,t){return Vn.prototype.equals.call(Ta,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Pg(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(PI.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]=Pg(e[i],t,n,r,o);return t.pop(),n.pop(),s}if(e&&e.toJSON&&(e=e.toJSON()),Nc(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]=Pg(e[l],t,n,r,l);t.pop(),n.pop()}else s=e;return s}var Rg=new Vn;Rg.tokenize=function(e){return e.slice()};Rg.join=Rg.removeEmpty=function(e){return e};function Yx(e){return typeof e=="object"&&!Array.isArray(e)&&e!==null}function _r(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)=>_r(i,t[s],n-1)):Yx(e)&&Yx(t)?Object.keys(e).length!==Object.keys(t).length?!1:Object.keys(e).every(s=>_r(e[s],t[s],n-1)):!1}function RI(e){return Math.max(...e.map(t=>t.length))}function AI(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 Xx(e,t){let r=[...e.map(({text:o})=>o.split(/\b(\w+)\b/))];for(let o=0;o<RI(r);o++){let i=AI(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 II=2;function Ag(e,t=""){if(e.length===0)return;if(e.length===1)return e[0];let n=Xx(e,II);return n&&n.text!==t?n:e[0]}var LI={info(...e){console.info("[Deepdesk]",...e)},warn(...e){console.warn("[Deepdesk]",...e)},error(...e){console.error("[Deepdesk]",...e)}},V=LI;var Qx={current:null,isSupported:null},ue=xe("resetConversation"),Mc=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.sessionId)||null},_c=e=>{let{current:t}=e.conversation;return(t==null?void 0:t.id)||null},Bi=e=>e.conversation.isSupported,Ig=j("conversation/isSupported",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.isConversationSupported(e.sessionId,e.options)}),Dc=j("conversation/create",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.createConversation(e)}),Fc=j("conversation/bySessionId",(e,t)=>{let{deepdeskAPI:n}=t.extra;return n.getConversationBySessionId(e.sessionId,e.options)}),Hc=j("conversation/update",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=_c(t.getState());if(!r)throw new Error("No current conversation to update");return n.updateConversation(r,e)}),Lg=j("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})})}),Uc=j("conversation/postMessages",(e,t)=>{let{deepdeskAPI:n}=t.extra,r=_c(t.getState());if(!r)throw new Error("No current conversation to update messages");return n.postMessages(r,e.map(o=>({...o})))}),OI=[Dc.rejected,Fc.rejected,Hc.rejected,Uc.rejected].map(e=>e==null?void 0:e.toString()),NI=q({name:"conversation",initialState:Qx,reducers:{},extraReducers:e=>{e.addCase(Ig.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(Lg.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Hc.fulfilled,(t,n)=>{var r;t.current=n.payload,t.isSupported=((r=n.payload)==null?void 0:r.hasActiveProfile)??null}).addCase(Uc.fulfilled,(t,n)=>{t.current&&(t.current.messages=n.payload)}).addCase(ue,()=>Qx).addMatcher(t=>OI.includes(t.type),(t,n)=>{var r;throw V.info("Conversation action rejected",n.type,((r=n.error)==null?void 0:r.message)||"No message"),new Error(n.error.message)})}}),Zx=NI.reducer;var Dr={text:"",html:null,selection:{start:0,end:0},stagedSuggestion:null,userCommitted:{text:"",selection:{start:0,end:0}},tabCompletionSuggestion:void 0,previousKeyDownEvent:null,textSuggestions:[],selectedSuggestionIndex:-1,metrics:{numCharsTyped:0,numCharsPasted:0,numCharsCut:0,numCharsDeleted:0,numPaste:0,agentStartedTypingTimestamp:null,externalTimeTotalSeconds:null,pastes:[],deletions:[],offeredTextSuggestions:[],textSuggestions:[],cuts:[]}};function Jx(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 zc=xe("input/replaceText"),Bc=xe("input/keyDown"),Co=xe("input/sendMessage"),Vc=xe("input/uiInputChange"),Kc=xe("input/applyImageSuggestion"),Qe=xe("input/sendEvent");function jc(e){if(!e.stagedSuggestion)return;let{text:t,suggestion:{source:n,abVariant:r,abTestName:o,trainingJobs:i,sourceText:s,searchTerm:a,text:l},eventMetrics:{inputType:u},replace:c}=e.stagedSuggestion,f=n==="search"||n==="personal-collection-search",d=t.slice(e.userCommitted.text.substring(0,e.userCommitted.selection.start).length);(f||c==="selection")&&(d=t),e.stagedSuggestion.suggestion.source==="search-overlay"&&(d=l),e.userCommitted.text=e.text,e.userCommitted.selection=e.selection,e.metrics.textSuggestions.push({text:d,source:n,abVariant:r,abTestName:o,inputType:u,sourceText:s,trainingJobs:i||[],searchTerm:f?e.userCommitted.text:a}),e.stagedSuggestion=null,e.textSuggestions=[],e.selectedSuggestionIndex=-1}var eE=q({name:"input",initialState:Dr,reducers:{initialInput(e,t){let{text:n,selection:r,html:o}=t.payload;e.text=n,e.selection.start=(r==null?void 0:r.start)??n.length,e.selection.end=(r==null?void 0:r.end)??n.length,e.userCommitted.text=n,e.userCommitted.selection.start=(r==null?void 0:r.start)??n.length,e.userCommitted.selection.end=(r==null?void 0:r.end)??n.length,e.html=o||null},reset(e){Object.assign(e,{...Dr,selection:e.selection})},resetToCommitted(e){e.text=e.userCommitted.text,e.selection=e.userCommitted.selection,e.stagedSuggestion=null,e.tabCompletionSuggestion=Ag(e.textSuggestions,e.userCommitted.text)},changeSelection(e,t){t.payload&&(_r(e.selection,t.payload)||(e.selection=t.payload,e.userCommitted.selection=e.selection,e.stagedSuggestion&&jc(e)))},platformInput(e,t){let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end),e.text=n,e.html=r||null},userInput(e,t){var i,s,a,l;if(e.previousKeyDownEvent){let{key:u,shiftKey:c,ctrlKey:f,metaKey:d,altKey:p}=e.previousKeyDownEvent;switch(u){case"Enter":c&&(e.metrics.numCharsTyped+=1);break;case"Backspace":case"Delete":{let{text:y}=e,{text:v}=t.payload,g=Wx(y,v);y.length-v.length>1&&e.metrics.deletions.push(...g.filter(m=>m.removed).map(m=>m.value)),e.metrics.numCharsDeleted+=y.length-v.length;break}case"C":case"V":case"X":if(!f&&!d){e.metrics.numCharsTyped+=1;let y=((i=e.selection)==null?void 0:i.start)!==void 0&&((s=e.selection)==null?void 0:s.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;y&&y.length>0&&(e.metrics.numCharsDeleted+=y.length,e.metrics.deletions.push(y))}break;case"Shift":break;default:if(!f&&!d&&!p){e.metrics.numCharsTyped+=1;let y=((a=e.selection)==null?void 0:a.start)!==void 0&&((l=e.selection)==null?void 0:l.end)!==void 0?e.text.substring(e.selection.start,e.selection.end):null;y&&y.length>0&&(e.metrics.numCharsDeleted+=y.length,e.metrics.deletions.push(y))}}}!e.metrics.agentStartedTypingTimestamp&&t.payload.text!==e.text&&(e.metrics.agentStartedTypingTimestamp=Date.now()),t.payload.text===""&&(e.metrics=Dr.metrics,e.textSuggestions=[],e.stagedSuggestion=null),e.text!==t.payload.text&&jc(e);let{text:n,html:r,selection:o}=t.payload;o&&(e.selection.start=o.start,e.selection.end=o.end,e.userCommitted.selection.start=o.start,e.userCommitted.selection.end=o.end),e.text=n,e.html=r||null,e.userCommitted.text=n,e.previousKeyDownEvent=null},stageSuggestion(e,t){let{text:n}=t.payload;switch(e.stagedSuggestion=t.payload,e.tabCompletionSuggestion=void 0,t.payload.replace){case"selection":e.text=`${e.text.slice(0,e.selection.start)}${n}${e.text.slice(e.selection.end)}`,e.selection.end=e.selection.start+n.length,e.selection.start+=n.length;break;case"until-selection-end":e.text=`${n}${e.text.slice(e.selection.end)}`,e.selection.start=n.length,e.selection.end=n.length;break;default:throw new Error(`Unknown replace ${t.payload.replace}`)}t.payload.eventMetrics.inputType==="tab"&&jc(e)},commitSuggestion(e){jc(e)},offeredTextSuggestion(e,t){let{text:n,suggestion:{source:r}}=t.payload;e.metrics.offeredTextSuggestions.find(i=>i.text===n)||e.metrics.offeredTextSuggestions.push({text:n,source:r})},registerCut(e,t){let{metrics:n}=e,r=t.payload;e.metrics={...e.metrics,numCharsCut:n.numCharsCut+r.length,cuts:[...n.cuts,r]}},registerPaste(e,t){let{metrics:n}=e,{text:r,selectionText:o}=t.payload,i=n.numCharsDeleted+(o&&o.length?o.length:0),s=o&&o.length?[...n.deletions,o]:n.deletions;e.metrics={...e.metrics,numCharsDeleted:i,deletions:s,numCharsPasted:n.numCharsPasted+r.length,numPaste:n.numPaste+1,pastes:[...n.pastes,r]}},registerKeyDown(e,t){e.previousKeyDownEvent=t.payload},nextTextSuggestionIndex(e){let t=e.textSuggestions.length;e.selectedSuggestionIndex=e.selectedSuggestionIndex<t-1?e.selectedSuggestionIndex+1:e.selectedSuggestionIndex},previousTextSuggestionIndex(e){e.selectedSuggestionIndex=e.selectedSuggestionIndex>=0?e.selectedSuggestionIndex-1:e.selectedSuggestionIndex},setTextSuggestions(e,t){if(e.selectedSuggestionIndex=-1,e.textSuggestions=t.payload,t.payload.length===0)return;let n=e.userCommitted.text.substring(0,e.userCommitted.selection.end),r=Ag(t.payload,n);e.tabCompletionSuggestion=r!=null&&r.text.includes(n)?r:void 0},setSelectedTextSuggestionIndex(e,t){e.selectedSuggestionIndex=t.payload},setMetrics(e,{payload:t}){e.metrics=t}},extraReducers:e=>{e.addCase(ue,t=>{t.tabCompletionSuggestion=Dr.tabCompletionSuggestion,t.previousKeyDownEvent=Dr.previousKeyDownEvent,t.textSuggestions=Dr.textSuggestions,t.selectedSuggestionIndex=Dr.selectedSuggestionIndex,t.metrics=Dr.metrics})}}),Vi=e=>e.input.userCommitted.text.substring(0,e.input.userCommitted.selection.end),MI=e=>e.input.selection,tE=()=>O(MI),{userInput:nE,changeSelection:Og,initialInput:rE,nextTextSuggestionIndex:oE,offeredTextSuggestion:iE,previousTextSuggestionIndex:sE,registerCut:aE,registerKeyDown:lE,registerPaste:uE,reset:cE,resetToCommitted:ka,platformInput:dE,setSelectedTextSuggestionIndex:Fr,setTextSuggestions:En,stageSuggestion:Cn,commitSuggestion:Kn,setMetrics:fE}=eE.actions,pE=eE.reducer;function _I(e){return e.replace(/(_\w)/g,t=>t[1].toUpperCase())}function ne(e){return Array.isArray(e)?e.map(ne):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[_I(n)]:ne(e[n])}),{}):e}function Ng(e){return e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`)}function Ie(e){return Array.isArray(e)?e.map(Ie):typeof e=="object"&&e!==null?Object.keys(e).reduce((t,n)=>({...t,[Ng(n)]:Ie(e[n])}),{}):e}var DI={agentInfo:void 0,agentSettings:{},visitorInfo:void 0,fetchState:"idle"},Ra=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)||""}},Pa=j("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?ne(r):(await n.client.patch("/apis/admin/session/me/",o,{version:null}),ne(r))}),Mg=j("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}),_g=j("info/getAgentSettings",async(e,t)=>{let{deepdeskAPI:n}=t.extra;return(await n.client.get("/apis/admin/session/me/",{version:null})).ui_config}),mE=e=>e.info.agentInfo,gE=q({name:"info",initialState:DI,reducers:{setVisitorInfo(e,t){e.visitorInfo={...e.visitorInfo,...t.payload}}},extraReducers:e=>{e.addCase(Pa.pending,(t,n)=>{t.fetchState="loading",t.agentInfo={...t.agentInfo,...n.meta.arg}}).addCase(Pa.rejected,t=>{t.fetchState="error"}).addCase(Pa.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(_g.fulfilled,(t,n)=>{t.agentSettings=n.payload}).addCase(ue,t=>{t.visitorInfo=void 0})}}),{setVisitorInfo:hE}=gE.actions,yE=gE.reducer;var $c={list:[],fetchState:"idle",isOpen:!1,page:"search",aggregates:{}},vE=e=>e.search.isOpen,SE=e=>e.search.page,wE=e=>e.search.list,xE=e=>e.search.aggregates;function EE(e,t=n=>n){return n=>n.search.list.filter(r=>r.type===e).map(t)}var bo=j("search/getAll",async(e,t)=>{var a;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=(a=r.conversation.current)==null?void 0:a.profileCode;if(!o)throw new Error("Profile should be provided in order to be able to search");let{results:i,aggregates:s}=await n.search({profile:o,query:e.query,tags:e.tags,size:e.size,current:e.current,filters:{type:e.type},params:Ra(r)});return{results:i.map(l=>({...l,source:`search-${l.type.toLowerCase()}`,searchTerm:e.query})),aggregates:s}}),CE=q({name:"search",initialState:$c,reducers:{setIsOpen(e,t){e.isOpen=t.payload},setPage(e,t){e.page=t.payload},resetSearch(e){e.fetchState=$c.fetchState,e.list=$c.list}},extraReducers:e=>{e.addCase(bo.pending,t=>{t.fetchState="loading"}).addCase(bo.rejected,(t,n)=>{t.fetchState="error",V.error(n.error)}).addCase(bo.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload.results,t.aggregates=n.payload.aggregates||{}}).addCase(ue,()=>$c)}}),{resetSearch:Wc,setIsOpen:Ct,setPage:Jt}=CE.actions,bE=CE.reducer;var Dg={cues:[],fetchState:"idle"},TE=e=>{var t;return(t=e.rules)==null?void 0:t.cues},FI=xe("rules/resetCues"),$n=j("rules/evaluate",async(e,t)=>{var i;let{deepdeskAPI:n}=t.extra,r=(i=t.getState().conversation.current)==null?void 0:i.id;if(!r)throw new Error("No current conversation to evaulate rules");return await n.evaluateRule(e.label,r,e.params)}),kE=q({name:"answer",initialState:Dg,reducers:{removeCue(e,t){e.cues=e.cues.filter(n=>n.id!==t.payload.id)}},extraReducers:e=>{e.addCase($n.pending,t=>{t.fetchState="loading"}).addCase($n.rejected,t=>{t.fetchState="error"}).addCase($n.fulfilled,(t,n)=>{let r=Date.now(),o=n.payload.map(a=>({id:a.id||a.text,timestamp:r,...a})),i=o.map(a=>a.id),s=t.cues.filter(a=>!i.includes(a.id));t.fetchState="done",t.cues=[...o,...s]}).addCase(ue,()=>Dg).addCase(FI.toString(),()=>Dg)}}),{removeCue:PE}=kE.actions,RE=kE.reducer;var Fg="SetCues",Ki="ShowLoginOverlay",Aa="UserLoggedIn",HI="UserLoggedOut",Hr="ApplySuggestion",Hg="ApplyImageSuggestion",UI="ShowCommandPalette",jI=e=>({[Fg]:t=>{e.dispatch({type:$n.fulfilled,payload:t})},[UI]:t=>{e.dispatch(Ct(t.isOpen)),t.page&&e.dispatch(Jt(t.page))},[Ki]:t=>{e.dispatch(Bx(t))},[Aa]:()=>{e.dispatch(Bn())},[HI]:()=>{e.dispatch(Bn())},[Hg]:t=>{e.dispatch(Kc({suggestion:t.suggestion}))},[Hr]:t=>{e.dispatch(Cn({...t,eventMetrics:{inputType:"mouse"},replace:"selection"})),e.dispatch(Kn())}}),AE=jI;var Ia=w(F()),LE=w(b()),IE=Ia.default.createContext(null),To=({broadcastEvents:e,children:t})=>{let n=Ia.default.useMemo(()=>e,[]);return(0,LE.jsx)(IE.Provider,{value:n,children:t})},en=()=>{let e=(0,Ia.useContext)(IE);if(!e)throw new Error("You should use the useBroadcastEvents within a BroadcastEventsProvider");return e};var ud=w(ee()),nn=w(F());var sd=w(F());var Ug=function(e,t){return Ug=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])},Ug(e,t)};function La(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ug(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var bt=function(){return bt=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},bt.apply(this,arguments)};function OE(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 qc(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 Gc;(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"})(Gc||(Gc={}));var Yc=class{constructor(t){console.warn(`[vite-messages-plugin]: Message "${t}" was not precompiled. Did you use the correct extenstion *.messages.ts?`)}};var tn;(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"})(tn||(tn={}));var Xc;(function(e){e[e.number=0]="number",e[e.dateTime=1]="dateTime"})(Xc||(Xc={}));function jg(e){return e.type===tn.literal}function NE(e){return e.type===tn.argument}function Qc(e){return e.type===tn.number}function Zc(e){return e.type===tn.date}function Jc(e){return e.type===tn.time}function ed(e){return e.type===tn.select}function td(e){return e.type===tn.plural}function ME(e){return e.type===tn.pound}function nd(e){return e.type===tn.tag}function rd(e){return!!(e&&typeof e=="object"&&e.type===Xc.number)}function Oa(e){return!!(e&&typeof e=="object"&&e.type===Xc.dateTime)}function zg(e){e.forEach(function(t){if(delete t.location,ed(t)||td(t))for(var n in t.options)delete t.options[n].location,zg(t.options[n].value);else Qc(t)&&rd(t.style)||(Zc(t)||Jc(t))&&Oa(t.style)?delete t.style.location:nd(t)&&zg(t.children)})}function _E(e,t){t===void 0&&(t={}),t=bt({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new Yc(e,t).parse();if(n.err){var r=SyntaxError(Gc[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||zg(n.val),n.val}function od(e,t){var n=t&&t.cache?t.cache:WI,r=t&&t.serializer?t.serializer:$I,o=t&&t.strategy?t.strategy:BI;return o(e,{cache:n,serializer:r})}function zI(e){return e==null||typeof e=="number"||typeof e=="boolean"}function DE(e,t,n,r){var o=zI(r)?r:n(r),i=t.get(o);return typeof i>"u"&&(i=e.call(this,r),t.set(o,i)),i}function FE(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 Bg(e,t,n,r,o){return n.bind(t,e,r,o)}function BI(e,t){var n=e.length===1?DE:FE;return Bg(e,this,n,t.cache.create(),t.serializer)}function VI(e,t){return Bg(e,this,FE,t.cache.create(),t.serializer)}function KI(e,t){return Bg(e,this,DE,t.cache.create(),t.serializer)}var $I=function(){return JSON.stringify(arguments)};function Vg(){this.cache=Object.create(null)}Vg.prototype.get=function(e){return this.cache[e]};Vg.prototype.set=function(e,t){this.cache[e]=t};var WI={create:function(){return new Vg}},id={variadic:VI,monadic:KI};var ko;(function(e){e.MISSING_VALUE="MISSING_VALUE",e.INVALID_VALUE="INVALID_VALUE",e.MISSING_INTL_API="MISSING_INTL_API"})(ko||(ko={}));var Na=function(e){La(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 Kg=function(e){La(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('", "'),'"'),ko.INVALID_VALUE,i)||this}return t}(Na);var HE=function(e){La(t,e);function t(n,r,o){return e.call(this,'Value for "'.concat(n,'" must be of type ').concat(r),ko.INVALID_VALUE,o)||this}return t}(Na);var UE=function(e){La(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,'"'),ko.MISSING_VALUE,r)||this}return t}(Na);var Ze;(function(e){e[e.literal=0]="literal",e[e.object=1]="object"})(Ze||(Ze={}));function qI(e){return e.length<2?e:e.reduce(function(t,n){var r=t[t.length-1];return!r||r.type!==Ze.literal||n.type!==Ze.literal?t.push(n):r.value+=n.value,t},[])}function GI(e){return typeof e=="function"}function Ma(e,t,n,r,o,i,s){if(e.length===1&&jg(e[0]))return[{type:Ze.literal,value:e[0].value}];for(var a=[],l=0,u=e;l<u.length;l++){var c=u[l];if(jg(c)){a.push({type:Ze.literal,value:c.value});continue}if(ME(c)){typeof i=="number"&&a.push({type:Ze.literal,value:n.getNumberFormat(t).format(i)});continue}var f=c.value;if(!(o&&f in o))throw new UE(f,s);var d=o[f];if(NE(c)){(!d||typeof d=="string"||typeof d=="number")&&(d=typeof d=="string"||typeof d=="number"?String(d):""),a.push({type:typeof d=="string"?Ze.literal:Ze.object,value:d});continue}if(Zc(c)){var p=typeof c.style=="string"?r.date[c.style]:Oa(c.style)?c.style.parsedOptions:void 0;a.push({type:Ze.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(Jc(c)){var p=typeof c.style=="string"?r.time[c.style]:Oa(c.style)?c.style.parsedOptions:r.time.medium;a.push({type:Ze.literal,value:n.getDateTimeFormat(t,p).format(d)});continue}if(Qc(c)){var p=typeof c.style=="string"?r.number[c.style]:rd(c.style)?c.style.parsedOptions:void 0;p&&p.scale&&(d=d*(p.scale||1)),a.push({type:Ze.literal,value:n.getNumberFormat(t,p).format(d)});continue}if(nd(c)){var y=c.children,v=c.value,g=o[v];if(!GI(g))throw new HE(v,"function",s);var m=Ma(y,t,n,r,o,i),h=g(m.map(function(C){return C.value}));Array.isArray(h)||(h=[h]),a.push.apply(a,h.map(function(C){return{type:typeof C=="string"?Ze.literal:Ze.object,value:C}}))}if(ed(c)){var S=c.options[d]||c.options.other;if(!S)throw new Kg(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ma(S.value,t,n,r,o));continue}if(td(c)){var S=c.options["=".concat(d)];if(!S){if(!Intl.PluralRules)throw new Na(`Intl.PluralRules is not available in this environment.
14
14
  Try polyfilling it using "@formatjs/intl-pluralrules"
15
- `,$r.MISSING_INTL_API,s);var w=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[w]||c.options.other}if(!S)throw new $m(c.value,d,Object.keys(c.options),s);a.push.apply(a,Zs(S.value,t,n,r,o,d-(c.offset||0)));continue}}return $P(a)}function qP(e,t){return t?st(st(st({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=st(st({},e[r]),t[r]||{}),n},{})):e}function GP(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=qP(e[r],t[r]),n},st({},e)):e}function Wm(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function XP(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:dc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,ec([void 0],n,!1)))},{cache:Wm(e.number),strategy:pc.variadic}),getDateTimeFormat:dc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,ec([void 0],n,!1)))},{cache:Wm(e.dateTime),strategy:pc.variadic}),getPluralRules:dc(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,ec([void 0],n,!1)))},{cache:Wm(e.pluralRules),strategy:pc.variadic})}}var hw=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,f){return!d.length||f.type!==Be.literal||typeof d[d.length-1]!="string"?d.push(f.value):d[d.length-1]+=f.value,d},[]);return p.length<=1?p[0]||"":p},this.formatToParts=function(u){return Zs(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=lw(s,["formatters"]);this.ast=e.__parse(t,st(st({},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=GP(e.formats,r),this.formatters=o&&o.formatters||XP(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=dw,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 QP(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var YP="dummy",qm=(0,fc.createContext)(null);function U(e){let t=(0,fc.useContext)(qm);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=QP(n,r);return i?new hw(i).format(o):(t!==YP&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var mc=x(A());var yw={root:"_root_1h19b_1",content:"_content_1h19b_24"};var Gm=x(_()),ZP=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,mc.useRef)(null),u=k("Dialog",yw),c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},p=d=>{d.target===l.current&&e&&r()};return(0,mc.useEffect)(()=>{var d,f;!l.current||!e||!t||(f=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||f.focus()},[e,t,l]),e?(0,Gm.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:p,children:(0,Gm.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},gc=ZP;var Sw=x(W());var vw={root:"_root_1ukx5_1"};var xw=x(_()),JP=({className:e,value:t,...n})=>{let r=k("TextInput",vw);return(0,xw.jsx)("input",{className:(0,Sw.default)(e,r.root),type:"text",value:t,...n})},Js=JP;var Xm={};ze(Xm,{enUS:()=>eR,nlNL:()=>tR});var eR={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"}]},tR={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 ww={root:"_root_1edpl_1",anchorButton:"_anchorButton_1edpl_5",errorMessage:"_errorMessage_1edpl_19",title:"_title_1edpl_25",subtitle:"_subtitle_1edpl_31",text:"_text_1edpl_38",input:"_input_1edpl_43",actions:"_actions_1edpl_48",button:"_button_1edpl_55",primaryButton:"_primaryButton_1edpl_70"};var he=x(_());var nR=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},rR=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=U(Xm),s=k("LoginTokenDialog",ww),a=I(mx),l=$(),u=D("productName"),[c,p]=(0,Dt.useState)(e||""),[d,f]=(0,Dt.useState)(0),[v,y]=(0,Dt.useState)(""),g=(0,Dt.useCallback)(async w=>{w.preventDefault(),l(hx({email:c})),f(1)},[n,c]),m=()=>{y(""),f(0)},h=(0,Dt.useCallback)(async w=>{w.preventDefault();let C=nR(w.target.elements.token.value);if(!C){y(i("verifyCodeError",{login:S}));return}l(Us({token:C}))},[n]),S=(0,Dt.useMemo)(()=>w=>(0,he.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:w},"back-button"),[]);return(0,Dt.useEffect)(()=>{a==="error"&&y(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,he.jsx)(gc,{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)(Js,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:w=>p(w.target.value)}),(0,he.jsx)("div",{className:s.actions,children:(0,he.jsx)("button",{type:"submit",className:(0,hc.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,he.jsxs)("form",{onSubmit:h,children:[(0,he.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,he.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,he.jsx)(Js,{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,hc.default)(s.button),onClick:m,children:i("back")}),(0,he.jsx)("button",{type:"submit",className:(0,hc.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},_w=rR;var bw=x(_()),oR=()=>{let e=I(gx),t=I(Vx),n=D("adminUrl"),r=Jt(),o=()=>r.send(oi,!1),i=()=>{r.send(oi,!1),r.send(qs)};return(0,bw.jsx)(_w,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},Cw=oR;var A_=x(Zm()),Ye=x(A());var _R={data:null,fetchState:"idle"},Pw=e=>e.contentTypes.data,ea=F("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),CR=z({name:"contentTypes",initialState:_R,reducers:{},extraReducers:e=>{e.addCase(ea.pending,t=>{t.fetchState="loading"}).addCase(ea.rejected,t=>{t.fetchState="error"}).addCase(ea.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),Rw=CR.reducer;function ta(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 En=x(A());var Iw=x(A()),yc=x(W());var Ct={root:"_root_1xtw7_1",list:"_list_1xtw7_2",listWrapper:"_listWrapper_1xtw7_6",listHorizontal:"_listHorizontal_1xtw7_10",page:"_page_1xtw7_19",search:"_search_1xtw7_25",pageNav:"_pageNav_1xtw7_33",pageTitle:"_pageTitle_1xtw7_41",pageBackButton:"_pageBackButton_1xtw7_48",listHeader:"_listHeader_1xtw7_62",listHeading:"_listHeading_1xtw7_68",listMoreButton:"_listMoreButton_1xtw7_76",listItem:"_listItem_1xtw7_87",listItemContent:"_listItemContent_1xtw7_96",listItemText:"_listItemText_1xtw7_114",listItemDescription:"_listItemDescription_1xtw7_122",listItemActions:"_listItemActions_1xtw7_129",truncate:"_truncate_1xtw7_140",lineClamp:"_lineClamp_1xtw7_146",listItemTitle:"_listItemTitle_1xtw7_153",listItemAction:"_listItemAction_1xtw7_129",listItemPrimaryAction:"_listItemPrimaryAction_1xtw7_178",listItemSelected:"_listItemSelected_1xtw7_183",sources:"_sources_1xtw7_187",sourcesTitle:"_sourcesTitle_1xtw7_194",source:"_source_1xtw7_187",icon:"_icon_1xtw7_209",searchIcon:"_searchIcon_1xtw7_226",searchInputWrapper:"_searchInputWrapper_1xtw7_231",searchInput:"_searchInput_1xtw7_231",select:"_select_1xtw7_252",selectType:"_selectType_1xtw7_269",selectWrapper:"_selectWrapper_1xtw7_273",image:"_image_1xtw7_303",imageSrc:"_imageSrc_1xtw7_310",imageSrcHidden:"_imageSrcHidden_1xtw7_321",imageSrcStatus:"_imageSrcStatus_1xtw7_325",imageTitle:"_imageTitle_1xtw7_335",actions:"_actions_1xtw7_340",actionsWrapper:"_actionsWrapper_1xtw7_344",actionsBar:"_actionsBar_1xtw7_350",actionButton:"_actionButton_1xtw7_359",hasShortKeys:"_hasShortKeys_1xtw7_372",actionShortcut:"_actionShortcut_1xtw7_381",actionShortcutFixKerning:"_actionShortcutFixKerning_1xtw7_388"};var Wr={};ze(Wr,{enUS:()=>bR,nlNL:()=>ER});var bR={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}]},ER={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}]};var pr=x(_()),TR=({src:e,title:t})=>{let n=k("CommandPalette",Ct),[r,o]=(0,Iw.useState)("loading"),i=U(Wr);return(0,pr.jsxs)("div",{className:n.image,children:[(0,pr.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,yc.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,pr.jsx)("span",{className:(0,yc.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,pr.jsx)("span",{className:(0,yc.default)(n.imageSrc,n.imageSrcStatus),children:(0,pr.jsx)(ja,{})}),t&&(0,pr.jsx)("span",{className:n.imageTitle,children:t})]})},Lw=TR;var Aw=x(A()),Ow=x(W());var qr=x(_());function Jm({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=U(Wr),s=k("CommandPalette",Ct);return Aw.default.Children.count(e)===0?null:(0,qr.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,qr.jsxs)("div",{className:s.listHeader,children:[t&&(0,qr.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,qr.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,qr.jsx)("div",{className:(0,Ow.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var sa=x(W());var vc=x(A());function na(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var X=1,tg=2,ng=4,Ce=8,Sc=16,ra=32,Ft=64,eg={a:{content:X|Ce,self:!1,type:X|Ce|ra|Ft},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:X|Ce,void:!0},body:{content:X|tg|ng|Ce|Sc|ra|Ft},button:{content:Ce,type:X|Ce|ra|Ft},caption:{content:X,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:X|ra|Ft},dd:{content:X,parent:["dl"]},dl:{children:["dt","dd"],type:X},dt:{content:X,invalid:["footer","header"],parent:["dl"]},figcaption:{content:X,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:X,void:!0},img:{void:!0},li:{content:X,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:X},picture:{children:["source","img"],type:X|Ce|Sc},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Ce,parent:["ruby","rtc"]},rtc:{content:Ce,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Ce,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:X},tbody:{parent:["table"],children:["tr"]},td:{content:X,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:X,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:X},video:{children:["track","source"]},wbr:{type:X|Ce,void:!0}};function Xr(e){return t=>{eg[t]={...e,...eg[t]}}}["address","main","div","figure","p","pre"].forEach(Xr({content:X,type:X|Ft}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Xr({content:Ce,type:X|Ce|Ft}));["p","pre"].forEach(Xr({content:Ce,type:X|Ft}));["s","small","span","del","ins"].forEach(Xr({content:Ce,type:X|Ce}));["article","aside","footer","header","nav","section","blockquote"].forEach(Xr({content:X,type:X|tg|Ft}));["h1","h2","h3","h4","h5","h6"].forEach(Xr({content:Ce,type:X|ng|Ft}));["audio","canvas","iframe","img","video"].forEach(Xr({type:X|Ce|Sc|Ft}));var ia=Object.freeze(eg),rg=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],og=Object.keys(ia).filter(e=>e!=="canvas"&&e!=="iframe"),ne=1,ig=2,Gr=3,fr=4,wc=5,_c=Object.freeze({alt:ne,cite:ne,class:ne,colspan:Gr,controls:fr,datetime:ne,default:fr,disabled:fr,dir:ne,height:ne,href:ne,id:ne,kind:ne,label:ne,lang:ne,loading:ne,loop:fr,media:ne,muted:fr,poster:ne,rel:ne,role:ne,rowspan:Gr,scope:ne,sizes:ne,span:Gr,start:Gr,style:wc,src:ne,srclang:ne,srcset:ne,tabindex:ne,target:ne,title:ne,type:ne,width:ne}),sg=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function xc(){return xc=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},xc.apply(this,arguments)}function Cc({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?vc.default.createElement(i,xc({className:t},e)):vc.default.createElement(i,xc({className:t},e),n)}var oa=class{attribute(t,n){return n}node(t,n){return n}};function Nw(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 Cn=class{constructor(t,n,r){na(this,"greedy",!1),na(this,"options",void 0),na(this,"propName",void 0),na(this,"inverseName",void 0),na(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?vc.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return Nw(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Qr=x(A()),jw=x(Dw());function bn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RR=/(url|image|image-set)\(/i,ag=class extends oa{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(RR)&&delete n[r]}),n}},Fw=1,IR=3,LR=/^<(!doctype|(html|head|body)(\s|>))/i,AR=/^(aria-|data-|\w+:)/iu,OR=/{{{(\w+)\/?}}}/;function NR(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var bc=class{constructor(t,n={},r=[],o=[]){var i;bn(this,"allowed",void 0),bn(this,"banned",void 0),bn(this,"blocked",void 0),bn(this,"container",void 0),bn(this,"content",[]),bn(this,"props",void 0),bn(this,"matchers",void 0),bn(this,"filters",void 0),bn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new ag],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:og),this.banned=new Set(rg),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:f,match:v,valid:y,void:g,...m}=a,h=l.propName+String(s);d>0&&(p+=i.slice(0,d)),y?(p+=g?`{{{${h}/}}}`:`{{{${h}}}}${v}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:v,matcher:l,props:{...o,...m,key:this.keyIndex}}):p+=v,l.greedy?(i=p+i.slice(d+f),p=""):i=i.slice(d+(f||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
+ `,ko.MISSING_INTL_API,s);var x=n.getPluralRules(t,{type:c.pluralType}).select(d-(c.offset||0));S=c.options[x]||c.options.other}if(!S)throw new Kg(c.value,d,Object.keys(c.options),s);a.push.apply(a,Ma(S.value,t,n,r,o,d-(c.offset||0)));continue}}return qI(a)}function YI(e,t){return t?bt(bt(bt({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=bt(bt({},e[r]),t[r]||{}),n},{})):e}function XI(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=YI(e[r],t[r]),n},bt({},e)):e}function $g(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function QI(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.NumberFormat).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.number),strategy:id.variadic}),getDateTimeFormat:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.DateTimeFormat).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.dateTime),strategy:id.variadic}),getPluralRules:od(function(){for(var t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return new((t=Intl.PluralRules).bind.apply(t,qc([void 0],n,!1)))},{cache:$g(e.pluralRules),strategy:id.variadic})}}var jE=function(){function e(t,n,r,o){n===void 0&&(n=e.defaultLocale);var i=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(u){var c=i.formatToParts(u);if(c.length===1)return c[0].value;var f=c.reduce(function(d,p){return!d.length||p.type!==Ze.literal||typeof d[d.length-1]!="string"?d.push(p.value):d[d.length-1]+=p.value,d},[]);return f.length<=1?f[0]||"":f},this.formatToParts=function(u){return Ma(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=OE(s,["formatters"]);this.ast=e.__parse(t,bt(bt({},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=XI(e.formats,r),this.formatters=o&&o.formatters||QI(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=_E,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 ZI(e,t){return t.split(".").reduce((n,r)=>n?n[r]:void 0,e)}var JI="dummy",Wg=(0,sd.createContext)(null);function G(e){let t=(0,sd.useContext)(Wg);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=ZI(n,r);return i?new jE(i).format(o):(t!==JI&&console.warn(`${r} does not exist in messages of ${t}`),`[${r}]`)}}var ad=w(F());var zE={root:"U",content:"To"};var qg=w(b()),tL=({isOpen:e,autoFocus:t,children:n,onClose:r,onBack:o,onKeyDown:i,overlayAriaLabel:s,contentAriaLabel:a})=>{let l=(0,ad.useRef)(null),u=A("Dialog",zE),c=d=>{if(d.key==="Escape"){d.preventDefault(),d.stopPropagation(),o();return}i&&i(d)},f=d=>{d.target===l.current&&e&&r()};return(0,ad.useEffect)(()=>{var d,p;!l.current||!e||!t||(p=(d=l.current)==null?void 0:d.querySelector("input, textarea"))==null||p.focus()},[e,t,l]),e?(0,qg.jsx)("div",{role:"dialog","data-testid":"dialog",className:u.root,"aria-label":s,ref:l,onKeyDown:c,onMouseDown:f,children:(0,qg.jsx)("div",{"data-testid":"dialog-content",className:u.content,"aria-label":a,children:n})}):null},ld=tL;var VE=w(ee());var BE={root:"y"};var KE=w(b()),rL=({className:e,value:t,...n})=>{let r=A("TextInput",BE);return(0,KE.jsx)("input",{className:(0,VE.default)(e,r.root),type:"text",value:t,...n})},_a=rL;var Gg={};Je(Gg,{enUS:()=>oL,nlNL:()=>iL});var oL={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"}]},iL={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 $E={root:"Uo",anchorButton:"Bo",errorMessage:"Do",title:"Io",subtitle:"Oo",text:"Xo",input:"Jo",actions:"Ko",button:"w",primaryButton:"Po"};var ke=w(b());var aL=e=>{try{let t=new URL(e);return new URLSearchParams(t.search).get("token")||void 0}catch{return e}},lL=({agentEmail:e,isOpen:t,origin:n="",onSuccess:r,onDismiss:o})=>{let i=G(Gg),s=A("LoginTokenDialog",$E),a=O(Hx),l=Z(),u=U("productName"),[c,f]=(0,nn.useState)(e||""),[d,p]=(0,nn.useState)(0),[y,v]=(0,nn.useState)(""),g=(0,nn.useCallback)(async x=>{x.preventDefault(),l(jx({email:c})),p(1)},[n,c]),m=()=>{v(""),p(0)},h=(0,nn.useCallback)(async x=>{x.preventDefault();let C=aL(x.target.elements.token.value);if(!C){v(i("verifyCodeError",{login:S}));return}l(ba({token:C}))},[n]),S=(0,nn.useMemo)(()=>x=>(0,ke.jsx)("button",{type:"button","data-testid":"login-token-dialog-back-button",className:s.anchorButton,onClick:m,children:x},"back-button"),[]);return(0,nn.useEffect)(()=>{a==="error"&&v(i("verifyCodeError",{login:S})),a==="done"&&r()},[a]),(0,ke.jsx)(ld,{autoFocus:!0,isOpen:t,contentAriaLabel:i("promptTitle",{productName:u}),overlayAriaLabel:i("promptTitle",{productName:u}),onClose:o,onBack:o,children:(0,ke.jsxs)("div",{className:s.root,children:[(0,ke.jsx)("h1",{className:s.title,children:i("promptTitle",{productName:u})}),d===0&&(0,ke.jsxs)("form",{onSubmit:g,children:[(0,ke.jsx)("h2",{className:s.subtitle,children:i("requestCodeTitle")}),(0,ke.jsx)("p",{className:s.text,children:i("requestCodeBody",{productName:u})}),(0,ke.jsx)(_a,{className:s.input,name:"email",placeholder:i("requestCodeInputPlaceholder"),value:c,onChange:x=>f(x.target.value)}),(0,ke.jsx)("div",{className:s.actions,children:(0,ke.jsx)("button",{type:"submit",className:(0,ud.default)(s.button,s.primaryButton),children:i("requestCodeSubmitLabel")})})]}),d===1&&(0,ke.jsxs)("form",{onSubmit:h,children:[(0,ke.jsx)("h2",{className:s.subtitle,children:i("verifyCodeTitle")}),(0,ke.jsx)("p",{className:s.text,children:i("verifyCodeBody")}),(0,ke.jsx)(_a,{className:s.input,name:"token",placeholder:i("verifyCodeInputPlaceholder"),disabled:["loading","done"].includes(a)}),y&&(0,ke.jsx)("div",{className:s.errorMessage,children:y}),(0,ke.jsxs)("div",{className:s.actions,children:[(0,ke.jsx)("button",{type:"button",className:(0,ud.default)(s.button),onClick:m,children:i("back")}),(0,ke.jsx)("button",{type:"submit",className:(0,ud.default)(s.button,s.primaryButton),disabled:["loading","done"].includes(a),children:i("verifyCodeSubmitLabel")})]})]})]})})},WE=lL;var GE=w(b()),uL=()=>{let e=O(Ux),t=O(mE),n=U("adminUrl"),r=en(),o=()=>r.send(Ki,!1),i=()=>{r.send(Ki,!1),r.send(Aa)};return(0,GE.jsx)(WE,{isOpen:e,agentEmail:t==null?void 0:t.agentEmail,origin:n,onDismiss:o,onSuccess:i})},qE=uL;var nb=w(Qg()),gt=w(F());var PL={data:null,fetchState:"idle"},ZE=e=>e.contentTypes.data,Da=j("contentTypes/getContentTypes",async(e,t)=>t.extra.deepdeskAPI.getContentTypes()),RL=q({name:"contentTypes",initialState:PL,reducers:{},extraReducers:e=>{e.addCase(Da.pending,t=>{t.fetchState="loading"}).addCase(Da.rejected,t=>{t.fetchState="error"}).addCase(Da.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),JE=RL.reducer;function Po(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 Gn=w(F());var eC=w(F()),cd=w(ee());var Bt={root:"Qo",list:"Vo",listWrapper:"Wo",listHorizontal:"B",page:"v",search:"D",pageNav:"Zo",pageTitle:"_o",pageBackButton:"I",listHeader:"oe",listHeading:"ee",listMoreButton:"ie",listItem:"O",listItemContent:"a",listItemText:"re",listItemDescription:"te",listItemActions:"X",truncate:"ne",lineClamp:"ae",listItemTitle:"de",listItemAction:"pe",listItemPrimaryAction:"le",listItemSelected:"se",sources:"xe",sourcesTitle:"ce",source:"fe",icon:"J",searchIcon:"ge",searchInputWrapper:"be",searchInput:"k",select:"he",selectType:"me",selectWrapper:"z",image:"ue",imageSrc:"ye",imageSrcHidden:"we",imageSrcStatus:"ve",imageTitle:"ke",actions:"ze",actionsWrapper:"je",actionsBar:"qe",actionButton:"K",hasShortKeys:"Ce",actionShortcut:"Se",actionShortcutFixKerning:"Ee"};var Ro={};Je(Ro,{enUS:()=>IL,nlNL:()=>LL});var IL={visitUrl:[{type:0,value:"Visit"}],back:[{type:0,value:"Back"}],loading:[{type:0,value:"Loading..."}],imageError:[{type:0,value:"Could not load image"}],showAll:[{type:0,value:"Show more"}]},LL={visitUrl:[{type:0,value:"Bekijk"}],back:[{type:0,value:"Terug"}],loading:[{type:0,value:"Laden..."}],imageError:[{type:0,value:"Kan afbeelding niet laden"}],showAll:[{type:0,value:"Toon meer"}]};var Ur=w(b()),OL=({src:e,title:t})=>{let n=A("CommandPalette",Bt),[r,o]=(0,eC.useState)("loading"),i=G(Ro);return(0,Ur.jsxs)("div",{className:n.image,children:[(0,Ur.jsx)("img",{src:e,alt:t,onLoad:()=>o("done"),onError:()=>o("error"),className:(0,cd.default)(n.imageSrc,{[n.imageSrcHidden]:["loading","error"].includes(r)})}),r==="loading"&&(0,Ur.jsx)("span",{className:(0,cd.default)(n.imageSrc,n.imageSrcStatus),children:i("loading")}),r==="error"&&(0,Ur.jsx)("span",{className:(0,cd.default)(n.imageSrc,n.imageSrcStatus),children:(0,Ur.jsx)(Il,{})}),t&&(0,Ur.jsx)("span",{className:n.imageTitle,children:t})]})},tC=OL;var nC=w(F()),rC=w(ee());var Ao=w(b());function Zg({children:e,heading:t,orientation:n,hasMore:r,onShowAll:o}){let i=G(Ro),s=A("CommandPalette",Bt);return nC.default.Children.count(e)===0?null:(0,Ao.jsxs)("div",{"data-testid":"commandpalette-list",className:s.list,children:[(t||r)&&(0,Ao.jsxs)("div",{className:s.listHeader,children:[t&&(0,Ao.jsx)("h4",{className:s.listHeading,children:t}),r&&o&&(0,Ao.jsx)("button",{onClick:o,className:s.listMoreButton,type:"button",children:i("showAll")})]}),(0,Ao.jsx)("div",{className:(0,rC.default)(s.listWrapper,n==="horizontal"&&s.listHorizontal),children:e})]})}var za=w(ee());var dd=w(F());function Fa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=1,eh=2,th=4,Le=8,fd=16,Ha=32,rn=64,Jg={a:{content:re|Le,self:!1,type:re|Le|Ha|rn},address:{invalid:["h1","h2","h3","h4","h5","h6","address","article","aside","section","div","header","footer"],self:!1},audio:{children:["track","source"]},br:{type:re|Le,void:!0},body:{content:re|eh|th|Le|fd|Ha|rn},button:{content:Le,type:re|Le|Ha|rn},caption:{content:re,parent:["table"]},col:{parent:["colgroup"],void:!0},colgroup:{children:["col"],parent:["table"]},details:{children:["summary"],type:re|Ha|rn},dd:{content:re,parent:["dl"]},dl:{children:["dt","dd"],type:re},dt:{content:re,invalid:["footer","header"],parent:["dl"]},figcaption:{content:re,parent:["figure"]},footer:{invalid:["footer","header"]},header:{invalid:["footer","header"]},hr:{type:re,void:!0},img:{void:!0},li:{content:re,parent:["ul","ol","menu"]},main:{self:!1},ol:{children:["li"],type:re},picture:{children:["source","img"],type:re|Le|fd},rb:{parent:["ruby","rtc"]},rp:{parent:["ruby","rtc"]},rt:{content:Le,parent:["ruby","rtc"]},rtc:{content:Le,parent:["ruby"]},ruby:{children:["rb","rp","rt","rtc"]},source:{parent:["audio","video","picture"],void:!0},summary:{content:Le,parent:["details"]},table:{children:["caption","colgroup","thead","tbody","tfoot","tr"],type:re},tbody:{parent:["table"],children:["tr"]},td:{content:re,parent:["tr"]},tfoot:{parent:["table"],children:["tr"]},th:{content:re,parent:["tr"]},thead:{parent:["table"],children:["tr"]},tr:{parent:["table","tbody","thead","tfoot"],children:["th","td"]},track:{parent:["audio","video"],void:!0},ul:{children:["li"],type:re},video:{children:["track","source"]},wbr:{type:re|Le,void:!0}};function Lo(e){return t=>{Jg[t]={...e,...Jg[t]}}}["address","main","div","figure","p","pre"].forEach(Lo({content:re,type:re|rn}));["abbr","b","bdi","bdo","cite","code","data","dfn","em","i","kbd","mark","q","ruby","samp","strong","sub","sup","time","u","var"].forEach(Lo({content:Le,type:re|Le|rn}));["p","pre"].forEach(Lo({content:Le,type:re|rn}));["s","small","span","del","ins"].forEach(Lo({content:Le,type:re|Le}));["article","aside","footer","header","nav","section","blockquote"].forEach(Lo({content:re,type:re|eh|rn}));["h1","h2","h3","h4","h5","h6"].forEach(Lo({content:Le,type:re|th|rn}));["audio","canvas","iframe","img","video"].forEach(Lo({type:re|Le|fd|rn}));var ja=Object.freeze(Jg),nh=["applet","base","body","command","embed","frame","frameset","head","html","link","meta","noscript","object","script","style","title"],rh=Object.keys(ja).filter(e=>e!=="canvas"&&e!=="iframe"),ce=1,oh=2,Io=3,jr=4,md=5,gd=Object.freeze({alt:ce,cite:ce,class:ce,colspan:Io,controls:jr,datetime:ce,default:jr,disabled:jr,dir:ce,height:ce,href:ce,id:ce,kind:ce,label:ce,lang:ce,loading:ce,loop:jr,media:ce,muted:jr,poster:ce,rel:ce,role:ce,rowspan:Io,scope:ce,sizes:ce,span:Io,start:Io,style:md,src:ce,srclang:ce,srcset:ce,tabindex:ce,target:ce,title:ce,type:ce,width:ce}),ih=Object.freeze({class:"className",colspan:"colSpan",datetime:"dateTime",rowspan:"rowSpan",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex"});function pd(){return pd=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},pd.apply(this,arguments)}function hd({attributes:e={},className:t,children:n=null,selfClose:r=!1,tagName:o}){let i=o;return r?dd.default.createElement(i,pd({className:t},e)):dd.default.createElement(i,pd({className:t},e),n)}var Ua=class{attribute(t,n){return n}node(t,n){return n}};function oC(e,t,n,r=!1){let o=e.match(t instanceof RegExp?t:new RegExp(t,"i"));return o?{match:o[0],void:r,...n(o),index:o.index,length:o[0].length,valid:!0}:null}var Wn=class{constructor(t,n,r){Fa(this,"greedy",!1),Fa(this,"options",void 0),Fa(this,"propName",void 0),Fa(this,"inverseName",void 0),Fa(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?dd.default.createElement(this.factory,n,t):this.replaceWith(t,n)}doMatch(t,n,r,o=!1){return oC(t,n,r,o)}onBeforeParse(t,n){return t}onAfterParse(t,n){return t}};var Oo=w(F()),lC=w(sC());function qn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _L=/(url|image|image-set)\(/i,sh=class extends Ua{attribute(t,n){return t==="style"&&Object.keys(n).forEach(r=>{String(n[r]).match(_L)&&delete n[r]}),n}},aC=1,DL=3,FL=/^<(!doctype|(html|head|body)(\s|>))/i,HL=/^(aria-|data-|\w+:)/iu,UL=/{{{(\w+)\/?}}}/;function jL(){if(!(typeof window>"u"||typeof document>"u"))return document.implementation.createHTMLDocument("Interweave")}var yd=class{constructor(t,n={},r=[],o=[]){var i;qn(this,"allowed",void 0),qn(this,"banned",void 0),qn(this,"blocked",void 0),qn(this,"container",void 0),qn(this,"content",[]),qn(this,"props",void 0),qn(this,"matchers",void 0),qn(this,"filters",void 0),qn(this,"keyIndex",void 0),this.props=n,this.matchers=r,this.filters=[...o,new sh],this.keyIndex=-1,this.container=this.createContainer(t||""),this.allowed=new Set((i=n.allowList)!==null&&i!==void 0?i:rh),this.banned=new Set(nh),this.blocked=new Set(n.blockList)}applyAttributeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.attribute=="function"?o.attribute(t,r):r,n)}applyNodeFilters(t,n){return this.filters.reduce((r,o)=>r!==null&&typeof o.node=="function"?o.node(t,r):r,n)}applyMatchers(t,n){let r={},{props:o}=this,i=t,s=0,a=null;return this.matchers.forEach(l=>{let u=l.asTag().toLowerCase(),c=this.getTagConfig(u);if(o[l.inverseName]||!this.isTagAllowed(u)||!this.canRenderChild(n,c))return;let f="";for(;i&&(a=l.match(i));){let{index:d,length:p,match:y,valid:v,void:g,...m}=a,h=l.propName+String(s);d>0&&(f+=i.slice(0,d)),v?(f+=g?`{{{${h}/}}}`:`{{{${h}}}}${y}{{{/${h}}}}`,this.keyIndex+=1,s+=1,r[h]={children:y,matcher:l,props:{...o,...m,key:this.keyIndex}}):f+=y,l.greedy?(i=f+i.slice(d+p),f=""):i=i.slice(d+(p||y.length))}l.greedy||(i=f+i)}),s===0?t:this.replaceTokens(i,r)}canRenderChild(t,n){return!t.tagName||!n.tagName||t.void?!1:t.children.length>0?t.children.includes(n.tagName):t.invalid.length>0&&t.invalid.includes(n.tagName)?!1:n.parent.length>0?n.parent.includes(t.tagName):!t.self&&t.tagName===n.tagName?!1:!!(t&&t.content&n.type)}convertLineBreaks(t){let{noHtml:n,disableLineBreaks:r}=this.props;if(n||r||t.match(/<((?:\/[ a-z]+)|(?:[ a-z]+\/))>/gi))return t;let o=t.replace(/\r\n/g,`
16
16
  `);return o=o.replace(/\n{3,}/g,`
17
17
 
18
18
 
19
- `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||NR)();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(LR)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,jw.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==Fw||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=_c[l]||_c[s];if(!this.isSafe(t)||!l.match(AR)&&(!n&&(!u||u===ig)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===fr?c=!0:u===Gr?c=Number.parseFloat(String(c)):u!==wc&&(c=String(c)),r[sg[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 ia[t]?{...n,...ia[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===Fw){let d=c.nodeName.toLowerCase(),f=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,f);let m=s(v,y,f);if(m===null)return;if(typeof m<"u"){l.push(Qr.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,f))){var p;this.keyIndex+=1;let g=this.extractAttributes(v),m={tagName:d};g&&(m.attributes=g),f.void&&(m.selfClose=f.void),l.push(Qr.default.createElement(Cc,{...m,key:this.keyIndex},(p=y)!==null&&p!==void 0?p:this.parseNode(v,f)))}else l=[...l,...this.parseNode(v,f.tagName?f:n)]}else if(c.nodeType===IR){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(OR);){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],f;if(u)f=s.length,r.push(p.createElement(c,d));else{let v=o.match(new RegExp(`{{{/${a}}}}`));f=v.index+v[0].length,r.push(p.createElement(this.replaceTokens(o.slice(s.length,v.index),n),d))}o=o.slice(f)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function MR(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 f=new bc(i??"",e).parse();f.length>0&&(d=f)}return d||(d=s),p?Qr.default.createElement(Qr.default.Fragment,null,d):Qr.default.createElement(Cc,{attributes:n,className:r,tagName:c},d)}function si(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,...f}=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 h=g.reduce((C,b)=>b(C,e),r??""),S=new bc(h,f,v,y),w=m.reduce((C,b)=>b(C,e),S.parse());return Qr.default.createElement(MR,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:w.length===0?void 0:w,tagName:p})}var DR=/[.*+?^${}()|[\]\\]/g,FR=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function jR(e){return e.replace(DR,"\\$&")}function HR(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function BR(e){return e.search(FR)}function Hw(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${jR(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function Bw(e){return e.replace(Va,'<mark data-type="placeholder">$1</mark>')}function ai(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function zR(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 lg(e,t,n={}){if(t){let r=HR(t.toLowerCase(),e.toLowerCase()),o=ai(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=BR(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Zh).length>3||t.length>30?zR(t.trim(),r):0;return`${`${s>0?"\u2026":""}${ai(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var UR=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function Ec(e){return UR.test(e)}function zw(e){let t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}var Ie=x(A()),Uw=x(W());var ug={root:"_root_1oh4w_1",trigger:"_trigger_1oh4w_5",content:"_content_1oh4w_19",contentOpen:"_contentOpen_1oh4w_33",contentTop:"_contentTop_1oh4w_37",contentBottom:"_contentBottom_1oh4w_41",item:"_item_1oh4w_45"};var Yr=x(_()),KR=0,Kw=Ie.default.createContext(null),VR=()=>{let e=(0,Ie.useContext)(Kw);if(!e)throw new Error("Invalid DropdownContext");return e},Vw=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Ie.useMemo)(()=>++KR,[]),o=(0,Ie.useRef)(null),i=(0,Ie.useRef)(null),s=k("Dropdown",ug),[a,l]=(0,Ie.useState)(!1),[u,c]=(0,Ie.useState)(n),p=f=>{f.preventDefault(),f.stopPropagation(),l(!a)},d=(0,Ie.useCallback)(([f])=>{!f.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Ie.useEffect)(()=>{let f=v=>{o.current&&!o.current.contains(v.target)&&l(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),(0,Ie.useEffect)(()=>{if(!i.current&&!a)return()=>{};let f=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&f.observe(i.current),()=>{i.current&&f.unobserve(i.current)}},[i,a]),(0,Yr.jsx)(Kw.Provider,{value:{setIsOpen:l},children:(0,Yr.jsxs)("div",{ref:o,className:s.root,children:[(0,Yr.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:p,children:e}),(0,Yr.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,Uw.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function $R({as:e,children:t,onClick:n,...r}){let o=e||"button",i=k("Dropdown",ug),{setIsOpen:s}=VR(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,Yr.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}Vw.Item=$R;var cg=Vw;var dg=x(_()),$w=e=>(0,dg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,dg.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var Zr={};ze(Zr,{enUS:()=>WR,nlNL:()=>qR});var WR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},qR={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Tc=x(_()),GR="%0d%0a%0d%0a%0d%0a",XR=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(GR)}`},QR=({suggestion:e,onFeedback:t})=>{let n=U(Zr),r=D("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Tc.jsx)(cg,{trigger:(0,Tc.jsx)($w,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Tc.jsx)(cg.Item,{as:"a",href:XR(r,e),onClick:t,children:n("giveFeedback")})})},kc=QR;var Pc=x(A()),Gw=x(_()),Ww=Pc.default.createContext(void 0);function mr(){let e=Pc.default.useContext(Ww);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var qw=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=Pc.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,Gw.jsx)(Ww.Provider,{value:s,children:e})};var at=x(_());function pg({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,description:s,sources:a,id:l,styles:u,...c}){let{selected:p,onChangeOpen:d}=mr(),f=k("CommandPalette",Ct);function v(y){r(y),e&&d(!1)}return(0,at.jsxs)("div",{className:(0,sa.default)(f.listItem,l===p&&f.listItemSelected),children:[(0,at.jsx)("button",{type:"button",className:(0,sa.default)(f.listItemAction,f.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:v,"data-command-palette-item":!0,"data-item-id":l,...c,children:(0,at.jsxs)("div",{className:f.listItemContent,children:[typeof n=="string"?(0,at.jsx)("p",{className:(0,sa.default)(f.listItemText,f.truncate,u==null?void 0:u.title),children:n}):n,s&&(0,at.jsx)(si,{tagName:"p",allowList:[],content:Ec(s)?zw(s):s,className:(0,sa.default)(f.listItemDescription,u==null?void 0:u.description,t?f.lineClamp:f.truncate)})]})}),o&&(0,at.jsx)("div",{className:f.listItemActions,children:(0,at.jsx)(kc,{suggestion:String(n),onFeedback:o})}),a&&(0,at.jsxs)("div",{className:f.sources,children:[(0,at.jsx)("span",{className:f.sourcesTitle,children:"Sources"}),a.map(y=>y.url?(0,at.jsx)("a",{className:f.source,href:y.url,target:"_blank",title:y.url,rel:"noopener noreferrer",onClick:()=>i&&i(y),children:y.name},y.url):(0,at.jsx)("span",{className:f.source,children:y.name},y.name))]})]})}var aa=x(_()),Xw=()=>(0,aa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,aa.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,aa.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 Jr=x(_());function fg({children:e,title:t,id:n,onDismiss:r}){let o=U(Wr),i=k("CommandPalette",Ct),{page:s}=mr();return s!==n?null:(0,Jr.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,Jr.jsxs)("div",{className:i.pageNav,children:[(0,Jr.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,Jr.jsx)(Xw,{}),o("back")]}),t&&(0,Jr.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var Qw=x(A());var la=x(_()),li=()=>(0,la.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,la.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,la.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 jt=x(_());function YR({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=k("CommandPalette",Ct);return(0,jt.jsxs)("div",{className:l.search,children:[(0,jt.jsx)("div",{className:l.searchIcon,children:(0,jt.jsx)(li,{})}),(0,jt.jsxs)("div",{className:l.searchInputWrapper,children:[(0,jt.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,jt.jsx)("div",{className:l.selectWrapper,children:(0,jt.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,jt.jsx)("option",{children:r}),o.map(u=>(0,jt.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var Yw=(0,Qw.forwardRef)(YR);var mg=x(W());var Rc=x(_()),ZR=({onClick:e,shortKeys:t,children:n,...r})=>{let o=k("CommandPalette",Ct);return(0,Rc.jsxs)("button",{type:"button",...r,onClick:e,className:(0,mg.default)(o.actionButton,r.className,{[o.hasShortKeys]:t&&t.length>0}),children:[n,t&&t.map(i=>(0,Rc.jsx)("span",{className:(0,mg.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},Zw=ZR;var ua=x(_()),JR="[data-command-palette-item]";function ui({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[f,v]=(0,En.useState)(),y=(0,En.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var N;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(N=y.current)==null||N.focus();return}if(d.length>0){i("");return}a(!1)},h=()=>{let N=S();N.length!==0&&v(N[0].dataset.itemId)},S=()=>Array.from(document.querySelectorAll(JR)||[]),w=N=>document.querySelector(`[data-item-id=${N}]`),C=N=>{let B=w(N);B&&v(B.dataset.itemId)},b=N=>{let B=w(N);B&&B.scrollIntoView({behavior:"smooth"})},E=()=>{if(!f)return;let N=S(),B=w(f);if(!B)return;let O=N.indexOf(B),Z=N[O+1];Z&&Z.dataset.itemId?C(Z.dataset.itemId):h()},P=()=>{if(!f)return;let N=S(),B=w(f);if(!B)return;let O=N.indexOf(B),Z=N[O-1];Z&&Z.dataset.itemId?C(Z.dataset.itemId):C(N[N.length-1].dataset.itemId)},R=(0,En.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),E();break}case"ArrowUp":{N.preventDefault(),P();break}case"Enter":{if(f){let B=w(f);B==null||B.click()}break}}},[f]);return(0,En.useEffect)(()=>{h()},[d,r,l,p]),(0,En.useEffect)(()=>{f&&b(f)},[f]),(0,ua.jsx)(gc,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:p,onBack:m,onClose:g,onKeyDown:R,children:(0,ua.jsxs)(qw,{selected:f,setSelected:v,isOpen:p,onChangeOpen:a,page:r,children:[r===n&&(0,ua.jsx)(Yw,{ref:y,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}ui.Page=fg;ui.List=Jm;ui.Image=Lw;ui.ListItem=pg;ui.Button=Zw;var ae=ui;var Jw=x(A());function e_(e,t){(0,Jw.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=x(A());var t_={data:null,fetchState:"idle"},Ic=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},Ht=F("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)}),eI=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),tI=z({name:"entities",initialState:t_,reducers:{},extraReducers:e=>{e.addCase(Ht.pending,t=>{t.fetchState="loading"}).addCase(Ht.rejected,t=>{t.fetchState="error"}).addCase(Ht.fulfilled,(t,n)=>{t.fetchState="done",t.data=eI(t.data?[...t.data,...n.payload]:n.payload)}).addCase(te,()=>t_)}}),n_=tI.reducer;var gg={};ze(gg,{enUS:()=>nI,nlNL:()=>rI});var nI={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},rI={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var r_={root:"_root_17kae_1",empty:"_empty_17kae_5"};var ci=x(_()),oI=({onCopy:e})=>{let t=(0,ca.useRef)(null),n=k("EntitiesList",r_),r=I(Ic),{setSelected:o}=mr(),i=U(gg),s=$();return(0,ca.useEffect)(()=>{s(Ht())},[]),(0,ca.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,ci.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,ci.jsx)(ae.List,{children:r.map((a,l)=>(0,ci.jsx)(ae.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,ci.jsx)("p",{className:n.empty,children:i("noResults")})]})},o_=oI;var Bt=x(A());var i_={data:null,fetchState:"idle"},s_=e=>e.summary.data,a_=e=>e.summary.fetchState==="error",Tn=F("summary/getSummary",async(e,t)=>{var c,p,d;let n=t.getState().profile.data,r=(c=t.getState().conversation.current)==null?void 0:c.sessionId,o=(d=(p=t.getState().info)==null?void 0:p.agentInfo)==null?void 0:d.agentId;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:i,dynamicThunkObject:s}=t.extra;if(!s.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let a=s.conversationQuery,l=await a();if(l.length===0)return Promise.reject(new Error("No messages are included"));let u=await i.getSummary(l,{externalConversationId:r,agentId:o,promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return u?{summary:u}:Promise.reject(new Error("Summary is not provided"))}),iI=z({name:"summary",initialState:i_,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(te,()=>i_)}}),l_=iI.reducer;var hg={};ze(hg,{enUS:()=>sI,nlNL:()=>aI});var sI={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."}]},aI={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 u_={root:"_root_6ahh3_1",actions:"_actions_6ahh3_5",main:"_main_6ahh3_11",textInput:"_textInput_6ahh3_15",loading:"_loading_6ahh3_34",error:"_error_6ahh3_38"};var kn=x(_()),lI=({onCopy:e})=>{let t=(0,Bt.useRef)(null),n=k("SummaryForm",u_),[r,o]=(0,Bt.useState)(""),i=U(hg),s=I(s_),a=I(a_),l=$(),u=()=>{l(He({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let p=document.getSelection();p&&l(He({name:"summary copied to clipboard",data:{originalText:s,finalText:p==null?void 0:p.toString()},options:{includeConversationData:!0}}))};return(0,Bt.useEffect)(()=>{l(Tn())},[]),(0,Bt.useEffect)(()=>{o(s||"")},[s]),(0,Bt.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,Bt.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)(Bt.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)(ae.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},c_=lI;var da={};ze(da,{enUS:()=>uI,nlNL:()=>cI});var uI={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},cI={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var gr=x(A());var yg={};ze(yg,{enUS:()=>dI,nlNL:()=>pI});var dI={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"}]},pI={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 d_={root:"_root_1g4pq_1",title:"_title_1g4pq_9",empty:"_empty_1g4pq_20",status:"_status_1g4pq_24",form:"_form_1g4pq_30",input:"_input_1g4pq_43",submit:"_submit_1g4pq_55",question:"_question_1g4pq_63",answer:"_answer_1g4pq_67",alignRight:"_alignRight_1g4pq_73"};var fI={data:null,fetchState:"idle"},p_=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},pa=F("knowledgeAssistant/getKnowledgeAssistant",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");let i=(s=r.profile.data)==null?void 0:s.knowledgeAssistant;return i?n.getKnowledgeAssistant(i):null}),mI=z({name:"knowledgeAssistant",initialState:fI,reducers:{},extraReducers:e=>{e.addCase(pa.pending,t=>{t.fetchState="loading"}).addCase(pa.rejected,t=>{t.fetchState="error"}).addCase(pa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),f_=mI.reducer;var vg={data:[],fetchState:"idle"},m_=e=>{var t;return(t=e.answer)==null?void 0:t.data},g_=e=>e.answer.fetchState,pi=de("answer/resetKnowledgeSearch"),di=F("answer/getAnswer",async(e,t)=>{var l,u,c;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=p_(t.getState()),i=(l=t.getState().conversation.current)==null?void 0:l.sessionId,s=(c=(u=t.getState().info)==null?void 0:u.agentInfo)==null?void 0:c.agentId;if(!o)throw new Error("KnowledgeAssistant is not defined");let a=await n.knowledgeAssist({promptInstruction:o.prompt,question:e},r,o.code,{agentId:s,conversationId:i});return{question:e,answer:a}}),gI=z({name:"answer",initialState:vg,reducers:{},extraReducers:e=>{e.addCase(di.pending,t=>{t.fetchState="loading"}).addCase(di.rejected,t=>{t.fetchState="error"}).addCase(di.fulfilled,(t,n)=>{t.fetchState="done",t.data=[...t.data,n.payload]}).addCase(te,()=>vg).addCase(pi,()=>vg)}}),h_=gI.reducer;var fa=x(_()),y_=()=>(0,fa.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,fa.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,fa.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 lt=x(_()),hI=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=gr.default.useState(""),{setSelected:i}=mr(),s=(0,gr.useRef)(null),a=k("EntitiesList",d_),l=U(yg),u=$(),c=I(m_),p=I(g_),d=async v=>{v.preventDefault(),v.stopPropagation(),r!==""&&u(di(r))},f=(v,y)=>{u(He({name:"knowledge assist source viewed",data:{question:y,sourceViewed:v.url||v.name},options:{includeConversationData:!0}}))};return(0,gr.useEffect)(()=>{var v;n&&p==="idle"?u(di(n)):(v=s.current)==null||v.focus()},[s,p]),(0,gr.useEffect)(()=>{p==="done"&&(u(He({name:"knowledge assist question answered",data:{question:r||n,sources:c[c.length-1].answer.sources,answer:c[c.length-1].answer.answer,isFollowUpQuestion:c.length>1},options:{includeConversationData:!0}})),i(`knowledge-assist-${c.length-1}`),o(""))},[p,c]),(0,gr.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[s,c]),(0,lt.jsxs)("div",{className:a.root,children:[c.length>0&&(0,lt.jsx)("div",{className:a.alignRight,children:(0,lt.jsx)(ae.Button,{onClick:t,children:l("reset")})}),c.map(({question:v,answer:y},g)=>(0,lt.jsx)(ae.List,{children:(0,lt.jsx)(ae.ListItem,{id:`knowledge-assist-${g}`,"data-testid":"knowledge-search-answer",description:y.answer,closeOnSelect:!0,onClick:()=>e(y.answer),onSourceClick:m=>f(m,v),sources:y.sources,styles:{title:a.question,description:a.answer},children:v})},`${y.answer}_${g}`)),p==="loading"&&(0,lt.jsx)("p",{className:a.status,children:l("loading")}),p==="error"&&(0,lt.jsx)("p",{className:a.status,children:l("error")}),(0,lt.jsxs)("form",{className:a.form,onSubmit:d,children:[(0,lt.jsx)("input",{ref:s,placeholder:l("anotherQuestion"),className:a.input,type:"text",value:r,onFocus:()=>{i(void 0)},onChange:v=>{i(void 0),o(v.target.value)}}),(0,lt.jsx)("button",{type:"submit",className:a.submit,children:(0,lt.jsx)(y_,{})})]})]})},v_=hI;var yI={data:null,fetchState:"idle"},hr=e=>e.profile.data,Lc=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],ma=F("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)}),vI=z({name:"profile",initialState:yI,reducers:{},extraReducers:e=>{e.addCase(ma.pending,t=>{t.fetchState="loading"}).addCase(ma.rejected,t=>{t.fetchState="error"}).addCase(ma.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),S_=vI.reducer;var R_=x(A());var SI=["{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}"],xI=new RegExp(SI.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function x_(e,t){let n=e.split(xI),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 C_={suggestions:[],fetchState:"idle",isInitialRequest:null},__={default:C_},b_=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},E_=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")},Ac=e=>e.textSuggestions,T_=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},Oc=de("textSuggestions/refresh"),zt=F("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=ri(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,Ws(r),e);if(e==="default"){let c=s?l.filter(T_(a)):l;t.dispatch(Zt(c.slice(0,i)))}return l}),ga=F("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,{...Ws(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(T_(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?x_(c.text,e):c.text}))),l=w_(l,i),t.dispatch(Zt(l)),l}),k_=z({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(zt.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||C_;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(zt.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(zt.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(ga.pending,t=>{t.default.fetchState="loading"}).addCase(ga.rejected,t=>{t.default.fetchState="error"}).addCase(ga.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(te,()=>__)}}),{setTextSuggestions:uF,setSuggestionState:cF}=k_.actions,P_=k_.reducer;var eo=x(_()),wI=({commands:e,onClick:t})=>{var a,l,u;let n=$(),r=U(da),o=I(hr),i=I(Ac),s=((u=(l=(a=o==null?void 0:o.uiConfig)==null?void 0:a.search)==null?void 0:l.initialTypes)==null?void 0:u.filter(({isActive:c})=>c))||[];return(0,R_.useEffect)(()=>{s.forEach(({type:c})=>{(!i[c]||i[c].suggestions.length===0)&&n(zt(c))})},[]),(0,eo.jsxs)("div",{children:[e.length>0&&(0,eo.jsx)(ae.List,{heading:r("commands"),children:e.map((c,p)=>(0,eo.jsx)(ae.ListItem,{id:`command-${p}`,closeOnSelect:!1,onClick:c.onClick,children:c.label},c.label))}),s.map(({type:c,title:p})=>{var d;return(0,eo.jsx)(ae.List,{heading:p,orientation:"vertical",children:(d=i[c])==null?void 0:d.suggestions.map((f,v)=>(0,eo.jsx)(ae.ListItem,{id:`${c}-${v}`,closeOnSelect:!1,description:f.text,onClick:()=>t(f.text,f),"data-testid":"search-overlay-suggestion",children:f.title},`${f.id}-${f.text}`))},c)})]})},I_=wI;var Le=x(_()),CI=200,bI=5,EI=4,L_=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),TI=()=>{let e=$(),t=Jt(),n=U(da),[r,o]=(0,Ye.useState)(!1),[i,s]=(0,Ye.useState)(""),a=I(Xx),l=I(hr),[u,c]=(0,Ye.useState)(),p=I(Ve),d=D("showSearch"),f=D("showEntitiesCommand"),v=D("showSummaryCommand"),y=D("showKnowledgeSearch"),g=D("showImageSearch"),m=D("searchTriggerKey"),h=I(Pw),S=I(Qx),w=I(Yx),C=I(Gx),b=M=>on(S.filter(ye=>ye.type===M.toUpperCase()),M),E=[{value:"PERSONAL",label:n("personalSuggestions"),list:b("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:b("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:b("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:b("IMAGE"),listOrientation:"horizontal",shouldShow:g}].filter(M=>M.shouldShow),P=[{label:n("entitiesClipboard"),onClick:()=>e(Nt("entities")),shouldShow:f&&L_(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(Nt("summary")),shouldShow:v&&L_(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Nt("knowledgeAssist")),shouldShow:y}].filter(M=>M.shouldShow),R=(h==null?void 0:h.map(M=>({value:M.code.toUpperCase(),label:`${M.name}s`,list:b(M.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],N=(0,Ye.useCallback)((0,A_.default)((M,ye)=>{e(Kr({query:M,type:ye,tags:["search-overlay"],size:u?50:20}))},CI),[u]),B=(0,Ye.useCallback)((M,ye)=>{switch(ye.type){case"IMAGE":t.send(Hm,{suggestion:ye});break;default:t.send(ii,{text:M,suggestion:ye})}e(it(!1))},[e]),O=M=>{ta(M.text),e(He({name:"entity copied",data:{entity:M,type:"copy"}})),e(it(!1))},Z=(0,Ye.useCallback)(M=>{e(He({name:"suggestion feedback",data:{text:M.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),bi=M=>{t.send(ii,{text:M,suggestion:{source:"knowledge-assist",text:M}}),e(He({name:"answer used",data:{originalText:M},options:{includeConversationData:!0}})),s(""),e(Nt("search")),e(pi()),e(it(!1))},ct=M=>{ta(M),e(it(!1))};function on(M,ye){return M.slice(0,u?10:ye.toLowerCase()==="image"?EI:bI)}function Pt(M){return ye=>{r?window.confirm(n("warning"))&&(M(ye),o(!1)):M(ye)}}return(0,Ye.useEffect)(()=>{i?N(i,u):e(Ju())},[i,u]),(0,Ye.useEffect)(()=>{a==="search"&&e(pi())},[a]),(0,Ye.useEffect)(()=>{p&&e(ea())},[p]),e_(m,()=>e(it(!0))),!d||!l?null:(0,Le.jsxs)(ae,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:Pt(M=>e(it(M))),onChangeType:M=>c(M),onChangePage:Pt(M=>e(Nt(M))),selectedType:u,search:i,page:a,isOpen:C,types:[...R,...E],children:[(0,Le.jsxs)(ae.Page,{id:"search",children:[i.length===0&&(0,Le.jsx)(I_,{commands:P,onClick:B}),i.length>0&&(0,Le.jsxs)(Ye.Fragment,{children:[P.length>0&&(0,Le.jsx)(ae.List,{heading:n("commands"),children:P.map((M,ye)=>(0,Le.jsx)(ae.ListItem,{closeOnSelect:!1,onClick:M.onClick,id:`commands-${ye}`,children:M.label},M.label))}),[...R,...E].map(({value:M,label:ye,list:Ei,lineClamp:Ti,listOrientation:ki})=>(0,Le.jsx)(ae.List,{heading:ye,orientation:ki==="horizontal"?"horizontal":"vertical",onShowAll:()=>c(M),hasMore:!u&&w[M.toLowerCase()]>on(Ei,M).length,children:on(Ei,M).map(ve=>(0,Le.jsx)(ae.ListItem,{id:`${M}-${ve.id}`,closeOnSelect:!1,lineClamp:Ti,onClick:()=>B(ve.text,ve),description:M!=="IMAGE"?ve.title&&ve.text:void 0,onFeedback:M!=="IMAGE"?()=>Z(ve):void 0,children:M==="IMAGE"?(0,Le.jsx)(ae.Image,{title:ve.title||ve.text,src:ve.image}):ve.title||ve.text},`${ve.id}-${ve.text}`))},M))]})]}),(0,Le.jsx)(ae.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:Pt(()=>{e(Nt("search"))}),children:(0,Le.jsx)(o_,{onCopy:O})}),(0,Le.jsx)(ae.Page,{id:"summary",title:n("summaryTitle"),onDismiss:Pt(()=>{e(Nt("search"))}),children:(0,Le.jsx)(c_,{onCopy:ct})}),(0,Le.jsx)(ae.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:Pt(()=>{e(pi()),e(Nt("search"))}),children:(0,Le.jsx)(v_,{question:i,onUse:bi,onResetQuestion:()=>{e(pi()),s("")}})})]})},O_=TI;var ha=x(_()),kI=()=>{let e=D("showSearch"),t=D("isEmbedded");return(0,ha.jsxs)(N_.Fragment,{children:[e&&(0,ha.jsx)(O_,{}),t&&(0,ha.jsx)(Cw,{})]})},M_=kI;var H_=x(W());var Nc=x(_()),D_=({className:e})=>(0,Nc.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Nc.jsx)("g",{children:(0,Nc.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
19
+ `),o=o.replace(/\n/g,"<br/>"),o}createContainer(t){var n;let o=(typeof global<"u"&&global.INTERWEAVE_SSR_POLYFILL||jL)();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(FL)||(s.innerHTML=this.convertLineBreaks(this.props.escapeHtml?(0,lC.default)(t):t)),s}extractAttributes(t){let{allowAttributes:n}=this.props,r={},o=0;return t.nodeType!==aC||!t.attributes||([...t.attributes].forEach(i=>{let{name:s,value:a}=i,l=s.toLowerCase(),u=gd[l]||gd[s];if(!this.isSafe(t)||!l.match(HL)&&(!n&&(!u||u===oh)||l.startsWith("on")||a.replace(/(\s|\0|&#x0([9AD]);)/,"").match(/(javascript|vbscript|livescript|xss):/i)))return;let c=l==="style"?this.extractStyleAttribute(t):a;u===jr?c=!0:u===Io?c=Number.parseFloat(String(c)):u!==md&&(c=String(c)),r[ih[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 ja[t]?{...n,...ja[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===aC){let d=c.nodeName.toLowerCase(),p=this.getTagConfig(d);u&&(l.push(u),u="");let y=this.applyNodeFilters(d,c);if(!y)return;let v;if(s&&!(a&&!this.isTagAllowed(d))){this.keyIndex+=1;let g=this.keyIndex;v=this.parseNode(y,p);let m=s(y,v,p);if(m===null)return;if(typeof m<"u"){l.push(Oo.default.cloneElement(m,{key:g}));return}this.keyIndex=g-1}if(this.banned.has(d))return;if(!(r||o&&d!=="br")&&this.isTagAllowed(d)&&(i||this.canRenderChild(n,p))){var f;this.keyIndex+=1;let g=this.extractAttributes(y),m={tagName:d};g&&(m.attributes=g),p.void&&(m.selfClose=p.void),l.push(Oo.default.createElement(hd,{...m,key:this.keyIndex},(f=v)!==null&&f!==void 0?f:this.parseNode(y,p)))}else l=[...l,...this.parseNode(y,p.tagName?p:n)]}else if(c.nodeType===DL){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(UL);){let[s,a]=i,l=i.index,u=s.includes("/");l>0&&(r.push(o.slice(0,l)),o=o.slice(l));let{children:c,matcher:f,props:d}=n[a],p;if(u)p=s.length,r.push(f.createElement(c,d));else{let y=o.match(new RegExp(`{{{/${a}}}}`));p=y.index+y[0].length,r.push(f.createElement(this.replaceTokens(o.slice(s.length,y.index),n),d))}o=o.slice(p)}return o.length>0&&r.push(o),r.length===0?"":r.length===1&&typeof r[0]=="string"?r[0]:r}};function zL(e){var t;let{attributes:n,className:r,containerTagName:o,content:i,emptyContent:s,parsedContent:a,tagName:l,noWrap:u}=e,c=(t=o??l)!==null&&t!==void 0?t:"span",f=c==="fragment"?!0:u,d;if(a)d=a;else{let p=new yd(i??"",e).parse();p.length>0&&(d=p)}return d||(d=s),f?Oo.default.createElement(Oo.default.Fragment,null,d):Oo.default.createElement(hd,{attributes:n,className:r,tagName:c},d)}function $i(e){let{attributes:t,className:n,content:r="",disableFilters:o=!1,disableMatchers:i=!1,emptyContent:s=null,filters:a=[],matchers:l=[],onAfterParse:u=null,onBeforeParse:c=null,tagName:f="span",noWrap:d=!1,...p}=e,y=i?[]:l,v=o?[]:a,g=c?[c]:[],m=u?[u]:[];y.forEach(C=>{C.onBeforeParse&&g.push(C.onBeforeParse.bind(C)),C.onAfterParse&&m.push(C.onAfterParse.bind(C))});let h=g.reduce((C,T)=>T(C,e),r??""),S=new yd(h,p,y,v),x=m.reduce((C,T)=>T(C,e),S.parse());return Oo.default.createElement(zL,{attributes:t,className:n,containerTagName:e.containerTagName,emptyContent:s,noWrap:d,parsedContent:x.length===0?void 0:x,tagName:f})}var BL=/[.*+?^${}()|[\]\\]/g,VL=/[^0-9A-Za-zÀ-ÖØ-öø-ÿ](?=[0-9A-Za-zÀ-ÖØ-öø-ÿ]*$)/;function KL(e){return e.replace(BL,"\\$&")}function $L(e,t){let n=e.split("").findIndex((r,o)=>r!==t[o]);return n>-1?n:Math.min(e.length,t.length)}function WL(e){return e.search(VL)}function uC(e,t=[]){let n=e;return t.forEach(r=>{if(!r)return;let o=new RegExp(`\\b(${KL(r)})\\b`,"gi");n=n.replace(o,"<strong>$1</strong>")}),n}function cC(e){return e.replace(Fl,'<mark data-type="placeholder">$1</mark>')}function Wi(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function qL(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 ah(e,t,n={}){if(t){let r=$L(t.toLowerCase(),e.toLowerCase()),o=Wi(e.substring(r,e.length));if(n.stripAgentPart){let l=e.substring(0,r),u=WL(l);return`<span style="opacity: 0.5">${l.substring(u+1)}</span>${o}`}let s=t.split(Ev).length>3||t.length>30?qL(t.trim(),r):0;return`${`${s>0?"\u2026":""}${Wi(e.substring(s,r))}`}<strong>${o}</strong>`}return e}var GL=/(<\/[a-zA-Z]+[0-9]?>|<[a-zA-Z]+\s?\/>|<br>)/i;function vd(e){return GL.test(e)}function dC(e){let t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}var Ue=w(F()),fC=w(ee());var lh={root:"Ge",trigger:"P",content:"Ne",contentOpen:"Ye",contentTop:"Ae",contentBottom:"Fe",item:"Q"};var No=w(b()),XL=0,pC=Ue.default.createContext(null),QL=()=>{let e=(0,Ue.useContext)(pC);if(!e)throw new Error("Invalid DropdownContext");return e},mC=({trigger:e,children:t,position:n="bottom"})=>{let r=(0,Ue.useMemo)(()=>++XL,[]),o=(0,Ue.useRef)(null),i=(0,Ue.useRef)(null),s=A("Dropdown",lh),[a,l]=(0,Ue.useState)(!1),[u,c]=(0,Ue.useState)(n),f=p=>{p.preventDefault(),p.stopPropagation(),l(!a)},d=(0,Ue.useCallback)(([p])=>{!p.isIntersecting&&a&&c(u==="top"?"bottom":"top")},[a]);return(0,Ue.useEffect)(()=>{let p=y=>{o.current&&!o.current.contains(y.target)&&l(!1)};return document.addEventListener("click",p),()=>{document.removeEventListener("click",p)}},[]),(0,Ue.useEffect)(()=>{if(!i.current&&!a)return()=>{};let p=new IntersectionObserver(d,{root:null,rootMargin:"0px",threshold:1});return i.current&&p.observe(i.current),()=>{i.current&&p.unobserve(i.current)}},[i,a]),(0,No.jsx)(pC.Provider,{value:{setIsOpen:l},children:(0,No.jsxs)("div",{ref:o,className:s.root,children:[(0,No.jsx)("button",{id:`dropdown-${r}`,"data-testid":"dropdown-trigger","aria-haspopup":"true","aria-expanded":a,"aria-label":"Dropdown trigger",type:"button",className:s.trigger,onClick:f,children:e}),(0,No.jsx)("div",{"data-testid":"dropdown-content",ref:i,"aria-hidden":!a,"aria-labelledby":`dropdown-${r}`,className:(0,fC.default)(s.content,{[s.contentOpen]:a,[s.contentTop]:u==="top",[s.contentBottom]:u==="bottom"}),children:t})]})})};function ZL({as:e,children:t,onClick:n,...r}){let o=e||"button",i=A("Dropdown",lh),{setIsOpen:s}=QL(),a=l=>{s(!1),n(l),l.stopPropagation()};return(0,No.jsx)(o,{type:"button",className:i.item,onClick:a,...r,children:t})}mC.Item=ZL;var uh=mC;var ch=w(b()),gC=e=>(0,ch.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"16",width:"14",viewBox:"0 0 448 512",...e,children:(0,ch.jsx)("path",{fill:"currentColor",d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})});var Mo={};Je(Mo,{enUS:()=>JL,nlNL:()=>eO});var JL={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Add"}],sendSuggestion:[{type:0,value:"Send"}],suggestionSent:[{type:0,value:"Sent"}],sendingError:[{type:0,value:"Sending failed"}],tryAgain:[{type:0,value:"Try again"}],editSuggestion:[{type:0,value:"Edit"}],visitUrl:[{type:0,value:"Visit"}],giveFeedback:[{type:0,value:"Give feedback"}],answer:[{type:0,value:"Answer"}]},eO={preview:[{type:0,value:"Preview"}],useSuggestion:[{type:0,value:"Gebruik"}],sendSuggestion:[{type:0,value:"Verzenden"}],suggestionSent:[{type:0,value:"Verzonden"}],sendingError:[{type:0,value:"Verzenden mislukt"}],tryAgain:[{type:0,value:"Probeer opnieuw"}],editSuggestion:[{type:0,value:"Bewerken"}],visitUrl:[{type:0,value:"Bekijk"}],giveFeedback:[{type:0,value:"Geef feedback"}],answer:[{type:0,value:"Antwoord"}]};var Sd=w(b()),tO="%0d%0a%0d%0a%0d%0a",nO=(e,t)=>{let n=[`Suggestie: ${encodeURIComponent(t)}`,"Beschrijf je feedback:"];return`mailto:${e.join(",")}?subject=Suggestie feedback&body=${n.join(tO)}`},rO=({suggestion:e,onFeedback:t})=>{let n=G(Mo),r=U("suggestionFeedbackEmailAddresses");return!r||r.length===0?null:(0,Sd.jsx)(uh,{trigger:(0,Sd.jsx)(gC,{"data-testid":"feedback-dropdown-trigger"}),children:(0,Sd.jsx)(uh.Item,{as:"a",href:nO(r,e),onClick:t,children:n("giveFeedback")})})},wd=rO;var xd=w(F()),vC=w(b()),hC=xd.default.createContext(void 0);function zr(){let e=xd.default.useContext(hC);if(e===void 0)throw new Error("useCommandPalette must be used within the CommandPalette component");return e}var yC=({children:e,page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i})=>{let s=xd.default.useMemo(()=>({page:t,isOpen:n,onChangeOpen:r,selected:o,setSelected:i}),[n,t,o]);return(0,vC.jsx)(hC.Provider,{value:s,children:e})};var Tt=w(b());function dh({closeOnSelect:e=!0,lineClamp:t,children:n,onClick:r,onFeedback:o,onSourceClick:i,description:s,sources:a,id:l,styles:u,...c}){let{selected:f,onChangeOpen:d}=zr(),p=A("CommandPalette",Bt);function y(v){r(v),e&&d(!1)}return(0,Tt.jsxs)("div",{className:(0,za.default)(p.listItem,l===f&&p.listItemSelected),children:[(0,Tt.jsx)("button",{type:"button",className:(0,za.default)(p.listItemAction,p.listItemPrimaryAction),"aria-disabled":c.disabled??!1,onClick:y,"data-command-palette-item":!0,"data-item-id":l,...c,children:(0,Tt.jsxs)("div",{className:p.listItemContent,children:[typeof n=="string"?(0,Tt.jsx)("p",{className:(0,za.default)(p.listItemText,p.truncate,u==null?void 0:u.title),children:n}):n,s&&(0,Tt.jsx)($i,{tagName:"p",allowList:[],content:vd(s)?dC(s):s,className:(0,za.default)(p.listItemDescription,u==null?void 0:u.description,t?p.lineClamp:p.truncate)})]})}),o&&(0,Tt.jsx)("div",{className:p.listItemActions,children:(0,Tt.jsx)(wd,{suggestion:String(n),onFeedback:o})}),a&&(0,Tt.jsxs)("div",{className:p.sources,children:[(0,Tt.jsx)("span",{className:p.sourcesTitle,children:"Sources"}),a.map(v=>v.url?(0,Tt.jsx)("a",{className:p.source,href:v.url,target:"_blank",title:v.url,rel:"noopener noreferrer",onClick:()=>i&&i(v),children:v.name},v.url):(0,Tt.jsx)("span",{className:p.source,children:v.name},v.name))]})]})}var Ba=w(b()),SC=()=>(0,Ba.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 512","aria-labelledby":"angleLeftTitle",children:[(0,Ba.jsx)("title",{id:"angleLeftTitle",children:"AngleLeft"}),(0,Ba.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 _o=w(b());function fh({children:e,title:t,id:n,onDismiss:r}){let o=G(Ro),i=A("CommandPalette",Bt),{page:s}=zr();return s!==n?null:(0,_o.jsxs)("div",{className:i.page,id:`page_${n}`,tabIndex:-1,children:[r&&(0,_o.jsxs)("div",{className:i.pageNav,children:[(0,_o.jsxs)("button",{className:i.pageBackButton,type:"button",onClick:r,children:[(0,_o.jsx)(SC,{}),o("back")]}),t&&(0,_o.jsx)("h3",{className:i.pageTitle,children:t})]}),e]})}var wC=w(F());var Va=w(b()),qi=()=>(0,Va.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 24 24",width:"1em",fill:"currentColor",children:[(0,Va.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,Va.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 on=w(b());function oO({onChange:e,onChangeType:t,placeholder:n,typePlaceholder:r,types:o,value:i,selectedType:s},a){let l=A("CommandPalette",Bt);return(0,on.jsxs)("div",{className:l.search,children:[(0,on.jsx)("div",{className:l.searchIcon,children:(0,on.jsx)(qi,{})}),(0,on.jsxs)("div",{className:l.searchInputWrapper,children:[(0,on.jsx)("input",{ref:a,spellCheck:!1,autoComplete:"off",onChange:u=>{e(u.currentTarget.value)},onFocus:u=>{u.currentTarget.select()},className:l.searchInput,placeholder:n,value:i,type:"text",id:"command-palette-search-input",autoFocus:!0}),o&&o.length>0&&(0,on.jsx)("div",{className:l.selectWrapper,children:(0,on.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,on.jsx)("option",{children:r}),o.map(u=>(0,on.jsx)("option",{value:u.value,children:u.label},u.value))]})})]})]})}var xC=(0,wC.forwardRef)(oO);var ph=w(ee());var Ed=w(b()),iO=({onClick:e,shortKeys:t,children:n,...r})=>{let o=A("CommandPalette",Bt);return(0,Ed.jsxs)("button",{type:"button",...r,onClick:e,className:(0,ph.default)(o.actionButton,r.className,{[o.hasShortKeys]:t&&t.length>0}),children:[n,t&&t.map(i=>(0,Ed.jsx)("span",{className:(0,ph.default)(o.actionShortcut,i===8629&&o.actionShortcutFixKerning),children:typeof i=="number"?String.fromCharCode(i):i},i))]})},EC=iO;var Ka=w(b()),sO="[data-command-palette-item]";function Gi({placeholder:e="Start typing to search...",typePlaceholder:t="All types",defaultPage:n="search",page:r,onChangePage:o,onChangeSearch:i,onChangeType:s,onChangeOpen:a,selectedType:l,types:u,children:c,isOpen:f,search:d}){let[p,y]=(0,Gn.useState)(),v=(0,Gn.useRef)(null),g=()=>{o&&o(n),s(void 0),i(""),a(!1)},m=()=>{var N;if(r!==n&&o){o(n);return}if(l&&s){s(void 0),(N=v.current)==null||N.focus();return}if(d.length>0){i("");return}a(!1)},h=()=>{let N=S();N.length!==0&&y(N[0].dataset.itemId)},S=()=>Array.from(document.querySelectorAll(sO)||[]),x=N=>document.querySelector(`[data-item-id=${N}]`),C=N=>{let z=x(N);z&&y(z.dataset.itemId)},T=N=>{let z=x(N);z&&z.scrollIntoView({behavior:"smooth"})},k=()=>{if(!p)return;let N=S(),z=x(p);if(!z)return;let K=N.indexOf(z),J=N[K+1];J&&J.dataset.itemId?C(J.dataset.itemId):h()},I=()=>{if(!p)return;let N=S(),z=x(p);if(!z)return;let K=N.indexOf(z),J=N[K-1];J&&J.dataset.itemId?C(J.dataset.itemId):C(N[N.length-1].dataset.itemId)},L=(0,Gn.useCallback)(N=>{switch(N.key){case"ArrowDown":{N.preventDefault(),k();break}case"ArrowUp":{N.preventDefault(),I();break}case"Enter":{if(p){let z=x(p);z==null||z.click()}break}}},[p]);return(0,Gn.useEffect)(()=>{h()},[d,r,l,f]),(0,Gn.useEffect)(()=>{p&&T(p)},[p]),(0,Ka.jsx)(ld,{autoFocus:!0,contentAriaLabel:"Search Results",overlayAriaLabel:"Command Palette",isOpen:f,onBack:m,onClose:g,onKeyDown:L,children:(0,Ka.jsxs)(yC,{selected:p,setSelected:y,isOpen:f,onChangeOpen:a,page:r,children:[r===n&&(0,Ka.jsx)(xC,{ref:v,onChange:i,onChangeType:s,placeholder:e,value:d,selectedType:l,types:u,typePlaceholder:t}),c]})})}Gi.Page=fh;Gi.List=Zg;Gi.Image=tC;Gi.ListItem=dh;Gi.Button=EC;var he=Gi;var CC=w(F());function bC(e,t){(0,CC.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 $a=w(F());var TC={data:null,fetchState:"idle"},Cd=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},sn=j("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)}),aO=e=>e.filter((t,n)=>n===e.findIndex(r=>r.text===t.text)),lO=q({name:"entities",initialState:TC,reducers:{},extraReducers:e=>{e.addCase(sn.pending,t=>{t.fetchState="loading"}).addCase(sn.rejected,t=>{t.fetchState="error"}).addCase(sn.fulfilled,(t,n)=>{t.fetchState="done",t.data=aO(t.data?[...t.data,...n.payload]:n.payload)}).addCase(ue,()=>TC)}}),kC=lO.reducer;var mh={};Je(mh,{enUS:()=>uO,nlNL:()=>cO});var uO={noResults:[{type:0,value:"No entities have been found"}],copy:[{type:0,value:"Copy"}],use:[{type:0,value:"Use"}]},cO={noResults:[{type:0,value:"Er zijn geen entiteiten gevonden"}],copy:[{type:0,value:"Kopieer"}],use:[{type:0,value:"Gebruik"}]};var PC={root:"He",empty:"Le"};var Yi=w(b()),fO=({onCopy:e})=>{let t=(0,$a.useRef)(null),n=A("EntitiesList",PC),r=O(Cd),{setSelected:o}=zr(),i=G(mh),s=Z();return(0,$a.useEffect)(()=>{s(sn())},[]),(0,$a.useEffect)(()=>{t.current&&(t.current.focus(),o("entity-0"))},[t]),(0,Yi.jsxs)("div",{className:n.root,ref:t,tabIndex:-1,children:[r&&r.length>0&&(0,Yi.jsx)(he.List,{children:r.map((a,l)=>(0,Yi.jsx)(he.ListItem,{id:`entity-${l}`,closeOnSelect:!0,onClick:()=>e(a),children:a.text},a.text))},"entities"),r&&r.length===0&&(0,Yi.jsx)("p",{className:n.empty,children:i("noResults")})]})},RC=fO;var an=w(F());var AC={data:null,fetchState:"idle"},IC=e=>e.summary.data,LC=e=>e.summary.fetchState==="error",Yn=j("summary/getSummary",async(e,t)=>{var c,f,d;let n=t.getState().profile.data,r=(c=t.getState().conversation.current)==null?void 0:c.sessionId,o=(d=(f=t.getState().info)==null?void 0:f.agentInfo)==null?void 0:d.agentId;if(!n)throw new Error("Profile is not defined");let{deepdeskAPI:i,dynamicThunkObject:s}=t.extra;if(!s.conversationQuery)return Promise.reject(new Error("setConversationQuery method is not defined"));let a=s.conversationQuery,l=await a();if(l.length===0)return Promise.reject(new Error("No messages are included"));let u=await i.getSummary(l,{externalConversationId:r,agentId:o,promptInstruction:n.summarizerPromptInstruction,model:n.summarizerModel});return u?{summary:u}:Promise.reject(new Error("Summary is not provided"))}),pO=q({name:"summary",initialState:AC,reducers:{},extraReducers:e=>{e.addCase(Yn.pending,t=>{t.data=null,t.fetchState="loading"}).addCase(Yn.rejected,t=>{t.data=null,t.fetchState="error"}).addCase(Yn.fulfilled,(t,n)=>{t.fetchState="done",n.payload&&(t.data=n.payload.summary)}).addCase(ue,()=>AC)}}),OC=pO.reducer;var gh={};Je(gh,{enUS:()=>mO,nlNL:()=>gO});var mO={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."}]},gO={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 NC={root:"Me",actions:"Re",main:"Te",textInput:"V",loading:"Ue",error:"Be"};var Xn=w(b()),yO=({onCopy:e})=>{let t=(0,an.useRef)(null),n=A("SummaryForm",NC),[r,o]=(0,an.useState)(""),i=G(gh),s=O(IC),a=O(LC),l=Z(),u=()=>{l(Qe({name:"summary copied to clipboard",data:{originalText:s,finalText:r},options:{includeConversationData:!0}})),e(r)},c=()=>{let f=document.getSelection();f&&l(Qe({name:"summary copied to clipboard",data:{originalText:s,finalText:f==null?void 0:f.toString()},options:{includeConversationData:!0}}))};return(0,an.useEffect)(()=>{l(Yn())},[]),(0,an.useEffect)(()=>{o(s||"")},[s]),(0,an.useEffect)(()=>{t.current&&s&&t.current.focus()},[t,s]),(0,an.useEffect)(()=>{let f=d=>{d.key==="Enter"&&d.shiftKey&&u()};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f)}},[r]),(0,Xn.jsx)("div",{className:n.root,tabIndex:-1,children:a?(0,Xn.jsx)("p",{className:n.error,children:i("error")}):(0,Xn.jsxs)(an.Fragment,{children:[(0,Xn.jsx)("div",{className:n.main,children:(0,Xn.jsx)("textarea",{placeholder:s?void 0:i("loading"),disabled:!s,className:n.textInput,ref:t,value:r,onCopy:c,onChange:f=>o(f.target.value)})}),(0,Xn.jsx)("div",{className:n.actions,children:(0,Xn.jsx)(he.Button,{shortKeys:[8679,8629],onClick:u,children:i("copy")})})]})})},MC=yO;var Wa={};Je(Wa,{enUS:()=>vO,nlNL:()=>SO});var vO={personalCollectionLink:[{type:0,value:"Go to Personal Collection"}],searchPlaceholder:[{type:0,value:"Start typing to search..."}],urlSuggestions:[{type:0,value:"Link suggestions"}],personalSuggestions:[{type:0,value:"Personal suggestions"}],pinnedMessages:[{type:0,value:"Pinned messages"}],imageSuggestions:[{type:0,value:"Images"}],typePlaceholder:[{type:0,value:"All types"}],navigation:[{type:0,value:"Navigation"}],entitiesClipboard:[{type:0,value:"Conversation clipper"}],entitiesTitle:[{type:0,value:"Copy to your clipboard"}],summaryClipboard:[{type:0,value:"Summarize conversation"}],summaryTitle:[{type:0,value:"Conversation summary"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Commands"}],use:[{type:0,value:"Use"}],preview:[{type:0,value:"Preview"}],warning:[{type:0,value:"Are you sure you want to discard the message?"}]},SO={personalCollectionLink:[{type:0,value:"Ga naar persoonlijke collectie"}],searchPlaceholder:[{type:0,value:"Begin met typen om te zoeken..."}],personalSuggestions:[{type:0,value:"Persoonlijke suggesties"}],urlSuggestions:[{type:0,value:"Link suggesties"}],imageSuggestions:[{type:0,value:"Afbeeldingen"}],navigation:[{type:0,value:"Navigatie"}],typePlaceholder:[{type:0,value:"Alle types"}],pinnedMessages:[{type:0,value:"Actueel"}],entitiesClipboard:[{type:0,value:"Klembord"}],entitiesTitle:[{type:0,value:"Kopieer naar klembord"}],summaryClipboard:[{type:0,value:"Gesprek samenvatten"}],summaryTitle:[{type:0,value:"Gesprek samenvatting"}],knowledgeAssist:[{type:0,value:"Knowledge assist"}],commands:[{type:0,value:"Acties"}],use:[{type:0,value:"Gebruik"}],preview:[{type:0,value:"Bewerk"}],warning:[{type:0,value:"Weet je zeker dat je de wijzigingen wilt weggooien?"}]};var Br=w(F());var hh={};Je(hh,{enUS:()=>wO,nlNL:()=>xO});var wO={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"}]},xO={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 _C={root:"W",title:"De",empty:"Ie",status:"Oe",form:"Z",input:"_",submit:"Xe",question:"Je",answer:"Ke",alignRight:"Pe"};var CO={data:null,fetchState:"idle"},DC=e=>{var t;return(t=e.knowledgeAssistant)==null?void 0:t.data},qa=j("knowledgeAssistant/getKnowledgeAssistant",async(e,t)=>{var s;let{deepdeskAPI:n}=t.extra,r=t.getState(),o=r.conversation.current;if(!o||!o.profileCode)throw new Error("No conversation of conversation profileCode found");let i=(s=r.profile.data)==null?void 0:s.knowledgeAssistant;return i?n.getKnowledgeAssistant(i):null}),bO=q({name:"knowledgeAssistant",initialState:CO,reducers:{},extraReducers:e=>{e.addCase(qa.pending,t=>{t.fetchState="loading"}).addCase(qa.rejected,t=>{t.fetchState="error"}).addCase(qa.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),FC=bO.reducer;var yh={data:[],fetchState:"idle"},HC=e=>{var t;return(t=e.answer)==null?void 0:t.data},UC=e=>e.answer.fetchState,Qi=xe("answer/resetKnowledgeSearch"),Xi=j("answer/getAnswer",async(e,t)=>{var l,u,c;let{deepdeskAPI:n}=t.extra,r=t.getState().answer.data,o=DC(t.getState()),i=(l=t.getState().conversation.current)==null?void 0:l.sessionId,s=(c=(u=t.getState().info)==null?void 0:u.agentInfo)==null?void 0:c.agentId;if(!o)throw new Error("KnowledgeAssistant is not defined");let a=await n.knowledgeAssist({promptInstruction:o.prompt,question:e},r,o.code,{agentId:s,conversationId:i});return{question:e,answer:a}}),TO=q({name:"answer",initialState:yh,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(ue,()=>yh).addCase(Qi,()=>yh)}}),jC=TO.reducer;var Ga=w(b()),zC=()=>(0,Ga.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512","aria-labelledby":"paperPlaneTitle",children:[(0,Ga.jsx)("title",{id:"paperPlaneTitle",children:"PaperPlane"}),(0,Ga.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 kt=w(b()),kO=({onUse:e,onResetQuestion:t,question:n})=>{let[r,o]=Br.default.useState(""),{setSelected:i}=zr(),s=(0,Br.useRef)(null),a=A("EntitiesList",_C),l=G(hh),u=Z(),c=O(HC),f=O(UC),d=async y=>{y.preventDefault(),y.stopPropagation(),r!==""&&u(Xi(r))},p=(y,v)=>{u(Qe({name:"knowledge assist source viewed",data:{question:v,sourceViewed:y.url||y.name},options:{includeConversationData:!0}}))};return(0,Br.useEffect)(()=>{var y;n&&f==="idle"?u(Xi(n)):(y=s.current)==null||y.focus()},[s,f]),(0,Br.useEffect)(()=>{f==="done"&&(u(Qe({name:"knowledge assist question answered",data:{question:r||n,sources:c[c.length-1].answer.sources,answer:c[c.length-1].answer.answer,isFollowUpQuestion:c.length>1},options:{includeConversationData:!0}})),i(`knowledge-assist-${c.length-1}`),o(""))},[f,c]),(0,Br.useEffect)(()=>{s.current&&s.current.scrollIntoView({behavior:"smooth"})},[s,c]),(0,kt.jsxs)("div",{className:a.root,children:[c.length>0&&(0,kt.jsx)("div",{className:a.alignRight,children:(0,kt.jsx)(he.Button,{onClick:t,children:l("reset")})}),c.map(({question:y,answer:v},g)=>(0,kt.jsx)(he.List,{children:(0,kt.jsx)(he.ListItem,{id:`knowledge-assist-${g}`,"data-testid":"knowledge-search-answer",description:v.answer,closeOnSelect:!0,onClick:()=>e(v.answer),onSourceClick:m=>p(m,y),sources:v.sources,styles:{title:a.question,description:a.answer},children:y})},`${v.answer}_${g}`)),f==="loading"&&(0,kt.jsx)("p",{className:a.status,children:l("loading")}),f==="error"&&(0,kt.jsx)("p",{className:a.status,children:l("error")}),(0,kt.jsxs)("form",{className:a.form,onSubmit:d,children:[(0,kt.jsx)("input",{ref:s,placeholder:l("anotherQuestion"),className:a.input,type:"text",value:r,onFocus:()=>{i(void 0)},onChange:y=>{i(void 0),o(y.target.value)}}),(0,kt.jsx)("button",{type:"submit",className:a.submit,children:(0,kt.jsx)(zC,{})})]})]})},BC=kO;var PO={data:null,fetchState:"idle"},Vr=e=>e.profile.data,bd=e=>e.profile.data?e.profile.data.uiConfig.widget.types.filter(t=>t.isActive):[],Ya=j("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)}),RO=q({name:"profile",initialState:PO,reducers:{},extraReducers:e=>{e.addCase(Ya.pending,t=>{t.fetchState="loading"}).addCase(Ya.rejected,t=>{t.fetchState="error"}).addCase(Ya.fulfilled,(t,n)=>{t.fetchState="done",t.data=n.payload})}}),VC=RO.reducer;var JC=w(F());var AO=["{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}"],IO=new RegExp(AO.map(e=>`(?:${e.replace("{","\\{").replace("}","\\}")})`).join("|"));function KC(e,t){let n=e.split(IO),r=0,o=[];for(let i=0;i<n.length;i++){let s=n[i];if(o.push(s),i===n.length-1)break;if(t.indexOf(s)===-1)return e;let a=n[i+1],l=i===n.length-2;r+=s.length;let u=r;if(l){let f=a.charAt(0),d=0;do u=f?t.indexOf(f,u+1):-1,d+=1;while(u!==-1&&a.indexOf(t.slice(u))!==0);if(u===-1&&d>2)return e}else u=a&&a!==""?t.indexOf(a,r):-1;let c=u===-1?t.slice(r):t.slice(r,u);o.push(c),r=u}return o.join("")}function $C(e,t){return typeof t=="boolean"?e:e.slice(0,t)}var qC={suggestions:[],fetchState:"idle",isInitialRequest:null},WC={default:qC},GC=e=>t=>{var n;return((n=t.textSuggestions[e])==null?void 0:n.suggestions)??[]},YC=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")},Td=e=>e.textSuggestions,XC=e=>{let t=e.toLowerCase();return n=>{let r=n.text.toLowerCase();return r.startsWith(t)&&r.length>t.length}},kd=xe("textSuggestions/refresh"),ln=j("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=Vi(r);if(!o)throw new Error("No current conversation to fetch text suggestions");let l=await n.getTextSuggestions(o,Ra(r),e);if(e==="default"){let c=s?l.filter(XC(a)):l;t.dispatch(En(c.slice(0,i)))}return l}),Xa=j("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,{...Ra(r),input:e});if(!t.getState().input.text)throw new Error("Abort");return a&&(l=l.filter(XC(e))),s&&(l=l.map(c=>({...c,text:c.source!=="trie-with-typos"?KC(c.text,e):c.text}))),l=$C(l,i),t.dispatch(En(l)),l}),QC=q({name:"textSuggestions",initialState:WC,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(ln.pending,(t,n)=>{let r=n.meta.arg,o=t[r]||qC;return{...t,[r]:{...o,fetchState:"loading",isInitialRequest:o.isInitialRequest===null}}}).addCase(ln.rejected,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="error")}).addCase(ln.fulfilled,(t,n)=>{let r=n.meta.arg;t[r]&&(t[r].fetchState="done",t[r].suggestions=n.payload)}).addCase(Xa.pending,t=>{t.default.fetchState="loading"}).addCase(Xa.rejected,t=>{t.default.fetchState="error"}).addCase(Xa.fulfilled,(t,n)=>{t.default.fetchState="done",t.default.suggestions=n.payload}).addCase(ue,()=>WC)}}),{setTextSuggestions:oH,setSuggestionState:iH}=QC.actions,ZC=QC.reducer;var Do=w(b()),LO=({commands:e,onClick:t})=>{var a,l,u;let n=Z(),r=G(Wa),o=O(Vr),i=O(Td),s=((u=(l=(a=o==null?void 0:o.uiConfig)==null?void 0:a.search)==null?void 0:l.initialTypes)==null?void 0:u.filter(({isActive:c})=>c))||[];return(0,JC.useEffect)(()=>{s.forEach(({type:c})=>{(!i[c]||i[c].suggestions.length===0)&&n(ln(c))})},[]),(0,Do.jsxs)("div",{children:[e.length>0&&(0,Do.jsx)(he.List,{heading:r("commands"),children:e.map((c,f)=>(0,Do.jsx)(he.ListItem,{id:`command-${f}`,closeOnSelect:!1,onClick:c.onClick,children:c.label},c.label))}),s.map(({type:c,title:f})=>{var d;return(0,Do.jsx)(he.List,{heading:f,orientation:"vertical",children:(d=i[c])==null?void 0:d.suggestions.map((p,y)=>(0,Do.jsx)(he.ListItem,{id:`${c}-${y}`,closeOnSelect:!1,description:p.text,onClick:()=>t(p.text,p),"data-testid":"search-overlay-suggestion",children:p.title},`${p.id}-${p.text}`))},c)})]})},eb=LO;var je=w(b()),NO=200,MO=5,_O=4,tb=(e,t)=>!t||e.toLowerCase().includes(t.toLowerCase()),DO=()=>{let e=Z(),t=en(),n=G(Wa),[r,o]=(0,gt.useState)(!1),[i,s]=(0,gt.useState)(""),a=O(SE),l=O(Vr),[u,c]=(0,gt.useState)(),f=O(nt),d=U("showSearch"),p=U("showEntitiesCommand"),y=U("showSummaryCommand"),v=U("showKnowledgeSearch"),g=U("showImageSearch"),m=U("searchTriggerKey"),h=O(ZE),S=O(wE),x=O(xE),C=O(vE),T=_=>pn(S.filter($=>$.type===_.toUpperCase()),_),k=[{value:"PERSONAL",label:n("personalSuggestions"),list:T("PERSONAL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"URL",label:n("urlSuggestions"),list:T("URL"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"STICKYMESSAGE",label:n("pinnedMessages"),list:T("STICKYMESSAGE"),lineClamp:!1,listOrientation:"vertical",shouldShow:!0},{value:"IMAGE",label:n("imageSuggestions"),lineClamp:!1,list:T("IMAGE"),listOrientation:"horizontal",shouldShow:g}].filter(_=>_.shouldShow),I=[{label:n("entitiesClipboard"),onClick:()=>e(Jt("entities")),shouldShow:p&&tb(n("entitiesClipboard"),i)},{label:n("summaryClipboard"),onClick:()=>e(Jt("summary")),shouldShow:y&&tb(n("summaryClipboard"),i)},{label:i?`${n("knowledgeAssist")}: ${i}`:n("knowledgeAssist"),onClick:()=>e(Jt("knowledgeAssist")),shouldShow:v}].filter(_=>_.shouldShow),L=(h==null?void 0:h.map(_=>({value:_.code.toUpperCase(),label:`${_.name}s`,list:T(_.code.toUpperCase()),listOrientation:"vertical",lineClamp:!0})))||[],N=(0,gt.useCallback)((0,nb.default)((_,$)=>{e(bo({query:_,type:$,tags:["search-overlay"],size:u?50:20}))},NO),[u]),z=(0,gt.useCallback)((_,$)=>{switch($.type){case"IMAGE":t.send(Hg,{suggestion:$});break;default:t.send(Hr,{text:_,suggestion:$})}e(Ct(!1))},[e]),K=_=>{Po(_.text),e(Qe({name:"entity copied",data:{entity:_,type:"copy"}})),e(Ct(!1))},J=(0,gt.useCallback)(_=>{e(Qe({name:"suggestion feedback",data:{text:_.text,source:"search",context:i},options:{includeConversationData:!0}}))},[i]),oe=_=>{t.send(Hr,{text:_,suggestion:{source:"knowledge-assist",text:_}}),e(Qe({name:"answer used",data:{originalText:_},options:{includeConversationData:!0}})),s(""),e(Jt("search")),e(Qi()),e(Ct(!1))},ze=_=>{Po(_),e(Ct(!1))};function pn(_,$){return _.slice(0,u?10:$.toLowerCase()==="image"?_O:MO)}function st(_){return $=>{r?window.confirm(n("warning"))&&(_($),o(!1)):_($)}}return(0,gt.useEffect)(()=>{i?N(i,u):e(Wc())},[i,u]),(0,gt.useEffect)(()=>{a==="search"&&e(Qi())},[a]),(0,gt.useEffect)(()=>{f&&e(Da())},[f]),bC(m,()=>e(Ct(!0))),!d||!l?null:(0,je.jsxs)(he,{placeholder:n("searchPlaceholder"),typePlaceholder:n("typePlaceholder"),onChangeSearch:s,onChangeOpen:st(_=>e(Ct(_))),onChangeType:_=>c(_),onChangePage:st(_=>e(Jt(_))),selectedType:u,search:i,page:a,isOpen:C,types:[...L,...k],children:[(0,je.jsxs)(he.Page,{id:"search",children:[i.length===0&&(0,je.jsx)(eb,{commands:I,onClick:z}),i.length>0&&(0,je.jsxs)(gt.Fragment,{children:[I.length>0&&(0,je.jsx)(he.List,{heading:n("commands"),children:I.map((_,$)=>(0,je.jsx)(he.ListItem,{closeOnSelect:!1,onClick:_.onClick,id:`commands-${$}`,children:_.label},_.label))}),[...L,...k].map(({value:_,label:$,list:ar,lineClamp:ye,listOrientation:lr})=>(0,je.jsx)(he.List,{heading:$,orientation:lr==="horizontal"?"horizontal":"vertical",onShowAll:()=>c(_),hasMore:!u&&x[_.toLowerCase()]>pn(ar,_).length,children:pn(ar,_).map(W=>(0,je.jsx)(he.ListItem,{id:`${_}-${W.id}`,closeOnSelect:!1,lineClamp:ye,onClick:()=>z(W.text,W),description:_!=="IMAGE"?W.title&&W.text:void 0,onFeedback:_!=="IMAGE"?()=>J(W):void 0,children:_==="IMAGE"?(0,je.jsx)(he.Image,{title:W.title||W.text,src:W.image}):W.title||W.text},`${W.id}-${W.text}`))},_))]})]}),(0,je.jsx)(he.Page,{id:"entities",title:n("entitiesTitle"),onDismiss:st(()=>{e(Jt("search"))}),children:(0,je.jsx)(RC,{onCopy:K})}),(0,je.jsx)(he.Page,{id:"summary",title:n("summaryTitle"),onDismiss:st(()=>{e(Jt("search"))}),children:(0,je.jsx)(MC,{onCopy:ze})}),(0,je.jsx)(he.Page,{id:"knowledgeAssist",title:n("knowledgeAssist"),onDismiss:st(()=>{e(Qi()),e(Jt("search"))}),children:(0,je.jsx)(BC,{question:i,onUse:oe,onResetQuestion:()=>{e(Qi()),s("")}})})]})},rb=DO;var Qa=w(b()),FO=()=>{let e=U("showSearch"),t=U("isEmbedded");return(0,Qa.jsxs)(ob.Fragment,{children:[e&&(0,Qa.jsx)(rb,{}),t&&(0,Qa.jsx)(qE,{})]})},ib=FO;var ub=w(ee());var Pd=w(b()),sb=({className:e})=>(0,Pd.jsx)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve",className:e,children:(0,Pd.jsx)("g",{children:(0,Pd.jsx)("path",{d:`M163.4,233h186v-70c0-25.6-9.4-47.8-27.3-65.7C304.2,79.4,282,70,256.4,70s-47.8,9.4-65.7,27.3
20
20
  c-17.9,17.9-27.3,40.1-27.3,65.7C163.4,163,163.4,233,163.4,233z M465.5,267.9V477c0,9.4-3.4,17.9-10.2,24.7
21
21
  c-6.8,6.8-15.4,10.2-24.7,10.2h-349c-9.4,0-17.9-3.4-24.7-10.2c-6.8-6.8-10.2-15.4-10.2-24.7V267.9c0-9.4,3.4-17.9,10.2-24.7
22
22
  c6.8-6.8,15.4-10.2,24.7-10.2h11.9v-70c0-44.4,16.2-82.8,47.8-115.2S212.1,0,256.4,0s82.8,16.2,115.2,47.8
23
- c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var Sg=x(_()),PI={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},F_=({className:e,color:t})=>(0,Sg.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Sg.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:PI[t||"pink"]})});var j_={root:"_root_1tvv4_1",text:"_text_1tvv4_18",isLoggedIn:"_isLoggedIn_1tvv4_25",isLoggedOut:"_isLoggedOut_1tvv4_29",icon:"_icon_1tvv4_39",logo:"_logo_1tvv4_44",lock:"_lock_1tvv4_49"};var xg={};ze(xg,{enUS:()=>RI,nlNL:()=>II});var RI={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},II={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var to=x(_()),B_=({onLogIn:e})=>{let t=U(xg),n=D("floatingMenu"),r=D("productName"),o=$(),i=I(Ve),s=k("FloatingMenu",j_);if(i===null||n===!1)return null;let a=()=>{i===!0?o(it(!0)):e()};return(0,to.jsxs)("button",{className:(0,H_.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,to.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,to.jsxs)("div",{className:s.icon,children:[(0,to.jsx)(F_,{className:s.logo,color:"pink"}),i===!1&&(0,to.jsx)(D_,{className:s.lock})]})]})};var jc=x(A());var z_=x(A());function fi(e){(0,z_.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function no(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}function mi(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 LI={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Mc=({ui:e})=>e.overlayCollapsed;var U_=z({name:"ui",initialState:LI,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:wg,setOverlayCollapsed:yr,setOpenOverlayWhenTyping:K_,setOverlayCollapsedUserOverwrite:V_}=U_.actions,$_=U_.reducer;var Dc=x(A());var gi=x(A());var W_=x(A());function q_(e,t,n){(0,W_.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var G_={root:"_root_4u430_1",actions:"_actions_4u430_8",badge:"_badge_4u430_15",formattedText:"_formattedText_4u430_19"};var ro=x(_()),OI=["search","personal-collection-search","search-autocomplete"];function NI(e,t,n,r={}){let o="";return OI.includes(t)?o=Hw(lg(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=lg(e,n,r),r.placeholders===!0&&(o=Bw(o)),o}var MI=()=>{},DI=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=D("inlineSuggestions"),i=I(ri),s=$(),a=k("TextSuggestion",G_),l=(0,gi.useRef)(null);(0,gi.useEffect)(()=>{let c=setTimeout(()=>{s(Mx({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),q_(l,"click",()=>{s(dr(e)),s(Ot({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,gi.useMemo)(()=>NI(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,ro.jsxs)("div",{className:a.root,onMouseEnter:()=>s(dr(e)),children:[(0,ro.jsx)(J,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:MI,children:(0,ro.jsx)(si,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,ro.jsx)("div",{className:a.actions,children:(0,ro.jsx)(kc,{onFeedback:()=>r(n),suggestion:n.text})})]})},X_=DI;var _g=x(_()),FI=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,Dc.useMemo)(()=>{let i=t.map((s,a)=>(0,_g.jsx)(X_,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,_g.jsx)(Dc.Fragment,{children:o})},Fc=FI;var Q_={root:"_root_otdbu_1",paper:"_paper_otdbu_11"};var va=x(_()),jI=({textSuggestions:e,selectedIndex:t})=>{let n=(0,jc.useRef)(null),r=k("InlineSuggestionsOverlay",Q_),o=I(mi),i=$(),s=I(Ve),a=I(ni),l=I(Mc),u=D("showTextSuggestions");return fi(()=>{setTimeout(()=>{i(yr({collapse:!0,skipWhenInputFocus:!0}))})}),(0,jc.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let p=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-p.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,va.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,va.jsx)("div",{ref:n,className:r.paper,children:(0,va.jsx)(et,{children:(0,va.jsx)(Fc,{suggestions:e,selectedIndex:t})})})})},HI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Y_=vn(HI)(jI);var Sa=x(_()),BI=({children:e})=>{let n=D("locale").replace("-","");return(0,Sa.jsx)(qm.Provider,{value:n,children:e})},zI=({store:e,customStyles:t={},children:n})=>(0,Sa.jsx)(Em,{store:e,children:(0,Sa.jsx)(BI,{children:(0,Sa.jsx)(Ii.Provider,{value:t,children:n})})}),oo=zI;var Bc=x(W()),hi=x(A());var Z_=x(A());function J_(e,t){let[n,r]=(0,Z_.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)}}]}var e1=()=>/Mac/i.test(navigator.platform);var n1=x(W()),Pn=x(A());var Cg={};ze(Cg,{enUS:()=>UI,nlNL:()=>KI});var UI={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"}]}]},KI={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 t1={root:"_root_1vfca_1",anchor:"_anchor_1vfca_6",anchorButton:"_anchorButton_1vfca_11"};var vr=x(_()),bg=(e,t,n)=>r=>(0,vr.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),VI=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=U(Cg),s=Jt(),a=k("Login",t1),l=D("productName"),u=(0,Pn.useCallback)(g=>{g.preventDefault(),r&&r(parseInt(g.target.value,10))},[]),c=(0,Pn.useCallback)(g=>{g.preventDefault(),s.send(oi,!0)},[t]),p=(0,Pn.useMemo)(()=>g=>(0,vr.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:g},"login"),[t]),d=(0,Pn.useCallback)(g=>(0,vr.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:g},"prompt"),[c]),{min:f,hour:v,day:y}=(0,Pn.useMemo)(()=>({min:bg(a,60*10,u),hour:bg(a,60*60,u),day:bg(a,60*60*12,u)}),[]);return(0,vr.jsxs)("div",{className:(0,n1.default)(e,a.root),children:[i("loginPlease",{login:n?d:p,productName:l}),r&&(0,vr.jsxs)(Pn.Fragment,{children:[(0,vr.jsx)("br",{}),i("snooze",{min:f,hour:v,day:y})]})]})},Hc=VI;var r1={root:"_root_1g8fi_1",text:"_text_1g8fi_19"};var xa=x(_()),$I=({title:e})=>{let t=k("SearchTrigger",r1),n=$();return(0,xa.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(it(!0)),children:[(0,xa.jsx)(li,{}),(0,xa.jsx)("span",{className:t.text,children:e})]})},o1=$I;var Eg={};ze(Eg,{enUS:()=>WI,nlNL:()=>qI});var WI={arrowHint:[{type:0,value:"Tip: use arrow keys to navigate suggestions"}],searchHintWindows:[{type:0,value:"Press CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],searchHintMac:[{type:0,value:"Press CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" to search"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Close"}],search:[{type:0,value:"Search"}]},qI={arrowHint:[{type:0,value:"Tip: Selecteer suggesties met pijltoetsen"}],searchHintWindows:[{type:0,value:"Druk CTRL+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],searchHintMac:[{type:0,value:"Druk CMD+"},{type:1,value:"searchTriggerKey"},{type:0,value:" om te zoeken"}],open:[{type:0,value:"Open "},{type:1,value:"productName"}],collapse:[{type:0,value:"Sluiten"}],search:[{type:0,value:"Zoeken"}]};var i1={root:"_root_onpov_1",isInline:"_isInline_onpov_14",toggleButton:"_toggleButton_onpov_21",toggleButtonWrapper:"_toggleButtonWrapper_onpov_25",toggleButtonWrapperHidden:"_toggleButtonWrapperHidden_onpov_32",isCollapsed:"_isCollapsed_onpov_36",collapsible:"_collapsible_onpov_36",hints:"_hints_onpov_44",hintsHidden:"_hintsHidden_onpov_51",triggers:"_triggers_onpov_56",triggersRight:"_triggersRight_onpov_71"};var ce=x(_()),GI=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=k("SuggestionsOverlay",i1),o=U(Eg),i=I(mi),s=Lx(),a=$(),l=(0,hi.useRef)(null),u=D("searchTriggerKey"),c=D("productName"),p=I(Mc),d=I(Ve),f=I(ni),[v,y]=(0,hi.useState)(null),g=D("showSearch"),m=D("showTextSuggestions"),h=D("adminUrl"),S=D("isEmbedded"),[w,C]=J_("dd-snooze-until-ms",0),b=p||w>Date.now(),E=I(O=>O.input.text),P=e.filter(O=>O.source!=="gpt").length,R=()=>{b&&C(0),a(V_(!b))},N=O=>{a(He({name:"suggestion feedback",data:{text:O.text,source:"overlay",context:E},options:{includeConversationData:!0}}))},B=O=>{let Z=Date.now()+O*1e3;C(Z),H.info(`Snooze until: ${new Date(Z)}`),a(yr({collapse:!0}))};return(0,hi.useEffect)(()=>{P===0&&y(null)},[e,P]),fi(()=>{a(yr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||f===!1?null:d===!1?(0,ce.jsxs)("div",{ref:l,className:(0,Bc.default)(r.root,{[r.isCollapsed]:b}),children:[!b&&(0,ce.jsxs)("div",{className:r.triggers,children:[(0,ce.jsx)("div",{style:{flex:1}}),(0,ce.jsx)("div",{className:r.triggersRight,children:(0,ce.jsx)(br,{className:r.toggleButton,title:o("collapse"),onClick:R,isCollapsed:!1})})]}),(0,ce.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ce.jsx)(br,{className:r.toggleButton,title:o("open",{productName:c}),onClick:R,isCollapsed:!0})}),(0,ce.jsx)("div",{className:r.collapsible,children:(0,ce.jsx)(Hc,{loginUrl:h,isEmbedded:S,onLogIn:n,onSnooze:B})})]}):!s||!i?null:(0,ce.jsxs)("div",{ref:l,className:(0,Bc.default)(r.root,{[r.isCollapsed]:b}),children:[!b&&(0,ce.jsxs)("div",{className:r.triggers,children:[(0,ce.jsx)("div",{style:{flex:1},children:g&&(0,ce.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>y(o(e1()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>y(null),children:(0,ce.jsx)(o1,{title:o("search")})})}),(0,ce.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,ce.jsx)("div",{className:(0,Bc.default)(!v&&r.hintsHidden,r.hints),children:v}),(0,ce.jsx)(br,{className:r.toggleButton,title:o("collapse"),onClick:R,isCollapsed:!1})]})]}),(0,ce.jsx)("div",{className:r.toggleButtonWrapper,children:(0,ce.jsx)(br,{className:r.toggleButton,title:o("open",{productName:c}),onClick:R,isCollapsed:!0})}),P>0&&m&&(0,ce.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,ce.jsx)(et,{children:(0,ce.jsx)(Fc,{onFeedback:N,suggestions:e,selectedIndex:t,reverse:!0})})})]})},XI=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),s1=vn(XI)(GI);var nd=x(W());var An=x(A());var yi=x(A());function zc(e){return e.contentEditable==="true"}function QI(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 a1(e){let{selectionStart:t,selectionEnd:n}=zc(e)?QI(e):e;return[t,n]}function l1(e){let[,t]=(0,yi.useState)(),n=(0,yi.useRef)(null);return n.current=a1(e),(0,yi.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=a1(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 u1(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Va);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 c1=x(A()),YI=["div","span","mark","strong","b","i","u","em"];function Tg(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(YI.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,c1.cloneElement)(r,{children:Tg(s,t,n+1)})]}return[...e,...t]}function Sr(e){return e.tagName.toLowerCase()==="textarea"}var d1={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var w1=x(W());var Yc=x(A());var vi=x(A());function p1(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function Uc(e){let t=(0,vi.useRef)(null),[n,r]=(0,vi.useState)(!1);return(0,vi.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=p1((c,p)=>{let d=t.current;if(!d)return;let f=c/i,v=p/i,y=d.getBoundingClientRect(),g=f>y.x&&f<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]=p1(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),u(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function f1(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Kc(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function m1(e){return e!=null}var Pg=x(W()),bt=x(A());var Vc=x(A()),ZI=["bottom","height","left","right","top","width"],JI=(e={},t={})=>ZI.some(n=>e[n]!==t[n]),Rn=new Map,g1,h1=()=>{let e=[],t=[];Rn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();JI(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))}),g1=window.requestAnimationFrame(h1)};function eL(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&&h1()},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(g1)}}}}function kg(e){let[t,n]=(0,Vc.useState)(null);return(0,Vc.useLayoutEffect)(()=>{if(!e.current)return;let r=eL(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var Si=x(A()),v1=x(ru());var y1={root:"_root_1jq08_1"};var S1=({children:e})=>{let[t,n]=(0,Si.useState)(null),r=(0,Si.useContext)(Ii);return(0,Si.useLayoutEffect)(()=>{let o=document.createElement("div");return no(o),o.classList.add(y1.root),r!=null&&r.portalRootNode&&o.classList.add(r==null?void 0:r.portalRootNode),document.body.appendChild(o),n(o),()=>{o.isConnected&&document.body.removeChild(o)}},[]),t?(0,v1.createPortal)(e,t):null};var en={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 $c=x(_()),Wc=(e=!1)=>{let[t,n]=(0,bt.useState)(e),r=(0,bt.useCallback)(()=>n(!0),[]),o=(0,bt.useCallback)(()=>n(!1),[]),i=(0,bt.useCallback)(()=>n(a=>!a),[]),s=(0,bt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Rg(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 qc=({className:e,triggerRef:t,boundaryRef:n=(0,bt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Rg,...a})=>{let l=kg(t),u=kg(n),c=(0,bt.useMemo)(()=>s(l,u,0),[l,u]);return(0,$c.jsx)(S1,{children:(0,$c.jsx)("div",{className:(0,Pg.default)(en.ref,{[en.positionAbove]:r==="above",[en.positionBelow]:r==="below",[en.positionLeft]:r==="left",[en.positionRight]:r==="right",[en.alignStart]:o==="start",[en.alignCenter]:o==="center",[en.alignEnd]:o==="end"}),style:c,...a,role:"dialog",children:(0,$c.jsx)("div",{className:(0,Pg.default)(e,en.root),children:i})})})};var x1=x(W()),Gc=x(A());var In={root:"_root_81non_1",container:"_container_81non_3",agentText:"_agentText_81non_5",tabText:"_tabText_81non_6",hint:"_hint_81non_6",matchSelection:"_matchSelection_81non_10",focus:"_focus_81non_16",resetIndent:"_resetIndent_81non_20",matchKeyword:"_matchKeyword_81non_24",matchPlaceholder:"_matchPlaceholder_81non_25",hover:"_hover_81non_31",hintText:"_hintText_81non_64",popover:"_popover_81non_72",popoverRoot:"_popoverRoot_81non_77",popoverContentContainer:"_popoverContentContainer_81non_81",popoverContent:"_popoverContent_81non_81",selectionOptions:"_selectionOptions_81non_107",selectionOptionsIsHidden:"_selectionOptionsIsHidden_81non_112",selectionOptionsButton:"_selectionOptionsButton_81non_116",caret:"_caret_81non_132",popoverSuggestionsRoot:"_popoverSuggestionsRoot_81non_136",suggestionsOverlayInputStyles:"_suggestionsOverlayInputStyles_81non_141"};var Ig=x(_()),Xc=(0,Gc.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,Gc.useRef)(null),i=k("TabCompletion",In);return(0,Ig.jsx)("div",{ref:Kc([o,r]),className:(0,x1.default)(e,i.popoverContentContainer),...n,children:(0,Ig.jsx)("div",{className:i.popoverContent,children:t})})});var xr=x(_()),tL=e=>t=>{let n=Rg(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},nL=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=k("TabCompletion",In),s=Wc(),a=(0,Yc.useMemo)(()=>tL(e.getBoundingClientRect()),[e]),[l,u]=Uc(e);return(0,Yc.useEffect)(()=>{u?s.open():s.close()},[u]),(0,xr.jsxs)("span",{children:[(0,xr.jsx)("mark",{ref:Kc([l,s.triggerRef]),className:(0,w1.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,xr.jsx)(qc,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,xr.jsx)(Xc,{style:n,children:(0,xr.jsx)("div",{className:i.hintText,children:o})})})]})},Qc=class extends Cn{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${f1(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(m1);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,xr.jsx)(nL,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var _1=x(W());var Lg=x(_()),rL=({inputElement:e,children:t})=>{let n=k("TabCompletion",In),[r,o]=Uc(e);return(0,Lg.jsx)("mark",{ref:r,className:(0,_1.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Zc=class extends Cn{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,Lg.jsx)(rL,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var ed=x(W());var We=x(A());var Ag=x(_()),C1=()=>(0,Ag.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,Ag.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 wr=x(A());var E1=x(Zm());var b1={root:"_root_1muu8_1",content:"_content_1muu8_7"};function Jc(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 Og(e){return e.replace("https://www.","").replace("https://","")}var Et=x(_()),oL=3,iL=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),sL=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=oL})=>{let i=k("LinkSearch",b1),[s,a]=(0,wr.useState)(""),l=$(),u=I(b_("url")),c=I(Zx("URL",iL)),[p,d]=(0,wr.useState)(c.length-1),f=D("fallbackImage"),v=h=>{let S=h.target;a(S.value)},y=(h,S)=>{h.stopPropagation(),h.preventDefault(),window.open(S,"_blank")},g=h=>{var C;let S=p-1<0?c.length-1:p-1,w=p+1===c.length?0:p+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&d(S),h.code==="ArrowDown"&&d(w),h.code==="Enter"&&e(((C=c[p])==null?void 0:C.text)||s)},m=(0,wr.useCallback)((0,E1.default)(h=>{l(Kr({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,wr.useEffect)(()=>{s&&m(s)},[s]),(0,wr.useEffect)(()=>()=>{l(Ju())},[]),(0,Et.jsxs)("div",{className:i.root,children:[(0,Et.jsx)(et,{withDivider:!0,children:(s?c:u).slice(0,o).map((h,S)=>(0,Et.jsx)(J,{selected:p===S,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Et.jsxs)(re,{children:[(0,Et.jsx)(re.Image,{src:Jc(h,"small",f||void 0),title:h.title||h.text}),(0,Et.jsxs)(re.Content,{className:i.content,cropText:!0,children:[(0,Et.jsx)(re.Title,{children:h.title||Og(h.text)}),h.title&&Og(h.text)]}),(0,Et.jsx)(J.Actions,{children:(0,Et.jsx)(J.ActionButton,{label:r,onClick:w=>y(w,h.text)})})]})},h.text))}),(0,Et.jsx)(Js,{value:s,onChange:v,autoFocus:!0,placeholder:n,onKeyUp:g})]})},T1=sL;var Ng={};ze(Ng,{enUS:()=>aL,nlNL:()=>lL});var aL={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},lL={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var $e=x(_()),uL=(0,We.forwardRef)((e,t)=>{let n=k("TabCompletion",In);return(0,$e.jsx)("mark",{ref:t,className:(0,ed.default)(n.matchSelection)},"selection-start")}),cL=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=U(Ng),s=k("TabCompletion",In),a=(0,We.useRef)(null),l=(0,We.useRef)(null),[u,c]=(0,We.useState)(null),p=$(),d=Wc(document.activeElement===r),[f]=(0,We.useState)(()=>document.createRange());d.triggerRef.current=f,(0,We.useEffect)(()=>()=>f.detach(),[]),(0,We.useEffect)(()=>{let y=e.current,g=a.current;!y||!g||(f.setStart(y,0),f.setEnd(g,0))},[e.current,a.current]),fi(()=>{d.close()});let v=(0,We.useCallback)(y=>{let g=f.toString(),m=/^http(s?):\/\//.test(y)?y:`https://${y}`;p(Gu({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,$e.jsxs)("span",{children:[(0,$e.jsx)("mark",{ref:a,className:(0,ed.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,$e.jsx)(qc,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,$e.jsxs)(Xc,{style:n,ref:l,children:[(0,$e.jsx)("div",{className:(0,ed.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,$e.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,$e.jsx)(C1,{}),(0,$e.jsx)("span",{children:"\xA0"}),(0,$e.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,$e.jsx)(T1,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:v,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},td=class extends Cn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,We.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,$e.jsx)(uL,{ref:this.startRef}):(0,$e.jsx)(cL,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Ln=x(_()),dL=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=k("TabCompletion",d1),c=D("insertLink"),p=D("showMidSentenceSuggestions"),d=D("inlineSuggestions"),f=l1(a),v=(0,An.useRef)(null),y=I(Ve);(0,An.useEffect)(()=>{Sr(a)&&f&&u1(a,f)},[f]);let g=(0,An.useCallback)(S=>{if(!o||!n)return S;let w=[(0,Ln.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Ln.jsx)("span",{"data-testid":"tab-completion",className:(0,nd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&w.push((0,Ln.jsx)("span",{className:(0,nd.default)(u.hint,u.resetIndent),children:(0,Ln.jsx)(Ba,{keyCode:"tab"},"tabHint")})),Tg(S,w)},[o,n,r]),m=(0,An.useMemo)(()=>{let S=[];return c&&S.push(new td("selection")),S.push(new Zc("placeholders")),i&&S.push(new Qc("keywords")),S},[d,c,i]),h=(0,An.useMemo)(()=>{let S=window.getComputedStyle(a);return{"--dd-color":S.color,"--dd-font-size":S.fontSize,"--dd-font-family":S.fontFamily,"--dd-font-variant":S.fontVariant}},[]);return!e||!y?null:(0,Ln.jsxs)("div",{ref:S=>{S!=null&&S.parentElement&&(v.current=S==null?void 0:S.parentElement)},className:u.root,style:h,children:[(0,Ln.jsx)(si,{tagName:"span",containerTagName:"div",className:(0,nd.default)(u.container,u.agentText),disableLineBreaks:Sr(a),content:t||"\u200B",onAfterParse:g,matchers:m,selection:f,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:v,inlineSuggestionsOnlyAtEnd:!p}),(0,Ln.jsx)("br",{})]})},pL=({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??ai(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:p}=o,{showTabCompletion:d,visible:f,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:f&&p!==!1}},k1=vn(pL)(dL);var vC=x(W()),SC=x(A());var P1={list:[],fetchState:"idle",isInitialRequest:null},I1=e=>e.autoflows.list||[],R1=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},On=F("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Mg=F("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))}),Dg=F("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))}),fL=z({name:"autoflows",initialState:P1,reducers:{},extraReducers:e=>{e.addCase(Mg.pending,(t,n)=>{let r=R1(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(Dg.pending,(t,n)=>{let r=R1(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(te,()=>P1)}}),L1=F("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))})}),A1=F("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),O1=fL.reducer;var N1={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},M1=e=>e.customMessages.list,D1=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),F1=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),j1=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),wa=F("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),rd=F("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)}),od=F("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)}),H1=z({name:"customMessages",initialState:N1,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(wa.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(wa.rejected,t=>{t.fetchState="error"}).addCase(wa.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(rd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(rd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(od.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(od.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(te,()=>N1)}}),B1=F("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(H1.actions.onCustomMessage(i))})}),z1=F("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),U1=H1.reducer;var mL={token:null,accountUrl:null,interval:null},K1=e=>t=>{let{passwordlessToken:{token:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null},Fg=F("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.requestPasswordlessToken();return{accountUrl:n.client.baseUrl,token:r}}),jg=F("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(Fg()),setInterval(()=>r(Fg()),n)}),V1=z({name:"passwordlessToken",initialState:mL,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Fg.fulfilled,(t,n)=>{t.token=n.payload.token,t.accountUrl=n.payload.accountUrl}),e.addCase(jg.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:$1}=V1.actions,W1=V1.reducer;function q1(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var nC=x(A());var J1=x(W()),eC=x(A());var X1=x(W());var G1={root:"_root_838fd_1"};var Y1=x(_()),gL=({className:e,children:t})=>{let n=k("Unicode",G1);return(0,Y1.jsx)("span",{className:(0,X1.default)(e,n.root),children:t})},Q1=gL;var Z1={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 Hg={};ze(Hg,{enUS:()=>hL,nlNL:()=>yL});var hL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]},yL={start:[{type:0,value:"Start"}],stop:[{type:0,value:"Stop"}],aborted:[{type:0,value:"Stopped"}],completed:[{type:0,value:"Completed"}],Aborted:[{type:0,value:"Stopped"}],Started:[{type:0,value:"Running"}],Completed:[{type:0,value:"Completed"}]};var ut=x(_()),SL=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=k("Autoflow",Z1),a=U(Hg),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,ut.jsxs)(J,{className:(0,J1.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,ut.jsx)(re,{children:(0,ut.jsxs)(re.Content,{children:[(0,ut.jsxs)(re.Title,{children:[t&&(0,ut.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,ut.jsx)("span",{children:r})]})}),(0,ut.jsx)(J.Actions,{fixed:t==="Started",children:(0,ut.jsx)(J.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,ut.jsxs)(eC.Fragment,{children:[(0,ut.jsx)(Q1,{children:u})," ",(0,ut.jsx)("span",{children:a(l)})]})})})]})},tC=SL;var Bg=x(_()),xL=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},wL=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Bg.jsx)(nC.Fragment,{children:e.map(o=>(0,Bg.jsx)(tC,{displayName:o.displayName,description:o.description,disabled:o.isBusy||xL(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),_L=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},CL={onStartAutoflow:Mg,onStopAutoflow:Dg},rC=vn(_L,CL)(wL);var oC=x(W()),zg=x(A());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=x(_()),bL=({suggestion:e})=>{let t=U(Zr),n=$(),r=I(D1(e.text)),o=I(F1(e.text)),i=I(j1(e.text)),s=I(zu),{replyOptions:a}=e,l=(0,zg.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(rd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,zg.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let p=parseInt(c.target.dataset.index,10),d=a[p];n(od({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,Ze.jsxs)(J,{onClick:l,className:(0,oC.default)(Nn.root,{[Nn.isUsed]:r,[Nn.hasError]:i}),children:[(0,Ze.jsx)(re,{children:(0,Ze.jsxs)(re.Content,{children:[(0,Ze.jsxs)(re.Title,{className:Nn.title,children:[e.text," ",(0,Ze.jsx)(za,{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)(J.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,Ze.jsx)(J.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,p)=>(0,Ze.jsx)(J.DropdownItem,{index:p,label:c.title,onClick:u},c.title))}),(0,Ze.jsx)(J.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},iC=bL;var id=x(A());var Vg=x(W());var Ug=x(_()),Kg=()=>(0,Ug.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,Ug.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 sC={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 tn=x(_()),EL=({entities:e})=>{let t=k("EntitiesWidgetList",sC),[n,r]=(0,id.useState)(void 0),o=$(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),ta(a.text),o(He({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,id.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,tn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,tn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,tn.jsx)("span",{className:t.entityText,children:a.text}),(0,tn.jsxs)("span",{className:t.iconWrapper,children:[(0,tn.jsx)("span",{className:(0,Vg.default)(t.icon),children:(0,tn.jsx)(Kg,{})}),(0,tn.jsx)("span",{className:(0,Vg.default)(t.icon,n===l&&t.iconClicked),children:(0,tn.jsx)(Kg,{})})]})]},a.text))})},aC=EL;var $g=x(_()),lC=()=>(0,$g.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,$g.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 Wg=x(_()),uC=()=>(0,Wg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Wg.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 qg=x(_()),cC=()=>(0,qg.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,qg.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 sd=x(A());var Gg={};ze(Gg,{enUS:()=>TL,nlNL:()=>kL});var TL={copyCue:[{type:0,value:"Copy"}],copiedCue:[{type:0,value:"Copied!"}],removeCue:[{type:0,value:"Close"}]},kL={copyCue:[{type:0,value:"Kopieer"}],copiedCue:[{type:0,value:"Gekopieerd!"}],removeCue:[{type:0,value:"Sluiten"}]};var Mn=x(_()),PL=({cue:e,onRemove:t,onCopy:n})=>{let r=U(Gg),[o,i]=(0,sd.useState)(!1),s=l=>{l.preventDefault(),l.stopPropagation(),n&&(n(e.text),i(!0))},a=l=>{l.preventDefault(),l.stopPropagation(),t&&t(e.id)};return(0,sd.useEffect)(()=>{if(!o)return;let l=setTimeout(()=>{i(!1)},1e3);return()=>{clearTimeout(l)}},[o]),(0,Mn.jsx)(J,{"data-testid":"cue",children:(0,Mn.jsxs)(re,{children:[(0,Mn.jsxs)(re.Content,{children:[e.title&&(0,Mn.jsx)(re.Title,{"data-testid":"widget-cue-title",children:e.title}),e.text]}),(0,Mn.jsx)(J.Actions,{children:n&&(0,Mn.jsx)(J.ActionButton,{primary:!0,onClick:s,label:r(o?"copiedCue":"copyCue")})}),(0,Mn.jsx)(re.CloseIcon,{title:r("removeCue"),onClick:a})]})})},dC=PL;var _a=x(_()),RL=({cues:e,onCopyCue:t,onRemoveCue:n})=>(0,_a.jsx)(_a.Fragment,{children:e.map(r=>(0,_a.jsx)(dC,{cue:r,onRemove:n,onCopy:t},`${r.id}_${r.timestamp}`))}),pC=RL;var mC=x(A());var IL=/(https?:\/\/[^\s]+)/,fC=e=>e.split(" ").find(t=>IL.test(t));var Tt=x(_()),LL=({suggestion:e,lines:t,onUse:n})=>{var c;let r=e.text||e.url||e.message,o=fC(r),i=U(Zr),s=D("showImages"),a=D("fallbackImage"),l=p=>{p.preventDefault(),p.stopPropagation(),n(r)},u=(0,mC.useCallback)(p=>{window.open(o,"_blank"),p.stopPropagation(),p.preventDefault()},[o]);return(0,Tt.jsxs)(J,{onClick:l,"data-testid":"edit-suggestion",children:[(0,Tt.jsxs)(re,{children:[s&&e.image&&(0,Tt.jsx)(re.Image,{src:Jc(e,"small",a||void 0),title:e.title}),(0,Tt.jsxs)(re.Content,{children:[e.title&&(0,Tt.jsx)(re.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((c=e.searchKeywords)==null?void 0:c.length)>0&&(0,Tt.jsx)(J.Labels,{labels:e.searchKeywords}),(0,Tt.jsx)(re.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,Tt.jsxs)(J.Actions,{children:[o&&(0,Tt.jsx)(J.ActionButton,{onClick:u,label:i("visitUrl")}),(0,Tt.jsx)(J.ActionButton,{primary:!0,onClick:l,label:i("useSuggestion")})]})]})},gC=LL;var Ca=x(_()),AL=({lines:e,suggestions:t})=>{let n=Jt(),r=(o,i)=>{n.send(ii,{text:o,suggestion:{...i,source:i.source,sourceText:i.text}})};return(0,Ca.jsx)(Ca.Fragment,{children:t.map(o=>(0,Ca.jsx)(gC,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},hC=AL;var Xg={};ze(Xg,{enUS:()=>OL,nlNL:()=>NL});var OL={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"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},NL={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"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var yC={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 K=x(_()),ad=(e,t)=>{let n=I(Ve);(0,SC.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},ML=({onLogIn:e})=>{let t=U(Xg),n=$(),r=D("isEmbedded"),o=k("Widget",yC),i=D("showAutoflows"),s=D("showCustomMessages"),a=D("showSummaryCommand"),l=D("showKnowledgeSearch"),u=D("showSearch"),c=I(hr),p=I(Lc),d=I(I1),f=I(tw),v=I(Ic),y=I(M1),g=I(Uu),m=I(ni),h=I(Ve),S=I(zu),w=I(q1),C=I(Ac),b=Jt(),E=I(E_),P=I(K1("/admin/")),R=D("adminUrl"),N=D("productName");if(ad(()=>(n(wa(S)),n(B1(S)),()=>{n(z1(S))}),[n,m,s,S]),ad(()=>(n(On(S)),n(L1(S)),()=>{n(A1(S))}),[n,m,i,S]),ad(()=>{p.forEach(({type:O})=>{n(O==="entities"?Ht():zt(O))})},[n,m,g,c]),ad(()=>(n(jg()),()=>{n($1())}),[n]),m===!1)return(0,K.jsx)("div",{className:o.stateText,children:(0,K.jsx)("div",{children:(0,K.jsx)("p",{children:t("notSupported")})})},"supported");if(h===!1)return(0,K.jsx)("div",{className:o.loginText,children:(0,K.jsx)("div",{children:(0,K.jsx)(Hc,{isEmbedded:r,loginUrl:R,onLogIn:e})})},"login");if(!c||!S||h===null||E||w)return(0,K.jsx)("div",{className:o.stateText,children:(0,K.jsx)("div",{children:(0,K.jsx)("p",{children:t("waiting")})})},"waiting");let B=u||a||l||P;return(0,K.jsx)("div",{className:(0,vC.default)(o.root),"data-testid":"widget",children:(0,K.jsxs)(Ua,{className:o.sectionList,children:[B&&(0,K.jsx)(ln,{title:t("actions"),type:"shortcuts",children:(0,K.jsxs)("div",{className:o.shortcutList,children:[u&&(0,K.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-search",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0}),children:[(0,K.jsx)(li,{}),t("linkSearch")]}),a&&(0,K.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-summary",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,K.jsx)(cC,{}),t("linkSummary")]}),l&&(0,K.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>b.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,K.jsx)(uC,{}),t("linkKnowledgeSearch")]}),P&&(0,K.jsxs)("a",{className:o.shortcut,target:"_blank",href:P,"data-testid":"shortcut-studio-login",rel:"noreferrer",children:[(0,K.jsx)(lC,{}),t("linkStudioLogin",{productName:N})]})]})}),s&&y.length>0&&(0,K.jsx)(ln,{type:"custom-messages","data-testid":"custom-messages",children:(0,K.jsx)(et,{withDivider:!0,children:y.map(O=>(0,K.jsx)(iC,{suggestion:O},O.text))})}),i&&d.length>0&&(0,K.jsx)(ln,{type:"autoflows",title:t("titleAutoflows"),"data-testid":"autoflows",children:(0,K.jsx)(et,{withDivider:!0,children:(0,K.jsx)(rC,{})})}),p.map(({type:O,title:Z,amount:bi,lines:ct})=>{var on;switch(O){case"entities":return v&&v.length>0&&(0,K.jsx)(ln,{type:O,title:Z,"data-testid":`type-${O}`,children:(0,K.jsx)(aC,{entities:v})},O);case"cues":return f&&f.length>0&&(0,K.jsx)(ln,{type:O,title:Z,"data-testid":`type-${O}`,children:(0,K.jsx)(et,{withDivider:!0,children:(0,K.jsx)(pC,{cues:f,onRemoveCue:Pt=>n(rw({id:Pt}))})})},O);default:return((on=C[O])==null?void 0:on.fetchState)==="done"&&C[O].suggestions.length>0&&(0,K.jsx)(ln,{type:O,title:Z,"data-testid":`type-${O}`,children:(0,K.jsx)(et,{withDivider:!0,children:(0,K.jsx)(hC,{lines:ct,contentType:O,suggestions:C[O].suggestions.slice(0,bi)||[]})})},O)}})]})})},xC=ML;function xi(e){let t=new Range;return t.selectNodeContents(e),t}function wC(e,t,n){try{return _r(e,t,n),!0}catch{return!1}}function ld(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function ud(e){return"tagName"in e&&e.tagName==="BR"}var ba=/[\u200B-\u200D\uFEFF]/g;function _r(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){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(ba,""),p=o+c.length,d=t>=o&&t<=p,f=n>=o&&n<=p;if(d){let v=s(u,t-o);v===0&&!f?r.setStartBefore(l):r.setStart(l,v)}f&&(r.setEnd(l,s(u,n-o)),i=!0),o=p;break}case Node.ELEMENT_NODE:{if(ud(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;ld(l)&&u&&!ld(u)&&!ud(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function Ea(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(p){let d=p===n,f=p===o;switch(p.nodeType){case Node.TEXT_NODE:{let v=p.textContent;d&&(a=u+v.substring(0,r).replace(ba,"").length),f&&(l=u+v.substring(0,i).replace(ba,"").length),u+=v.replace(ba,"").length;break}case Node.ELEMENT_NODE:{let v=p.nextSibling===null;ud(p)&&!v&&u++;for(let y=0;y<p.childNodes.length;y++){let g=d&&y===r,m=f&&y===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(p.childNodes[y]),f&&y===i-1&&(l=u),l!==void 0))break}!f&&ld(p)&&!v&&u++,f&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function Ta(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,p=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,f=p?i:void 0,v=u.textContent.replace(ba,"");d===0&&f===void 0?a+=v:a+=v.substring(d,f);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&ud(u)&&!d&&(a+=`
24
- `);for(let f=c?r:0;f<(p?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[f]),s!==1);f++);!p&&s===0&&ld(u)&&!d&&(a+=`
25
- `);break}default:break}p&&s++}return l(e),a}var _C=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(_C||{}),Dn=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();ur(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(_C).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),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",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()}),this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function CC(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var io=class extends Dn{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),Ta(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!CC(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!CC(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return Ea(this.element,t);let n=this.lastKnownSelection;if(n&&wC(this.element,n.start,n.end))return n;let r=xi(this.element);return r.collapse(!1),Ea(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return Ta(this.element,_r(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var so=class extends Dn{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};function bC(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function DL(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}var Qg=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},Yg=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=bC(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},Zg=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.sessionId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),H.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new Yg(t,this.deepdeskUrl,{debug:!0}):new Qg(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=DL(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(H.info("Received broadcast event",this.sessionId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;H.info("Broadcast event",{sessionId:this.sessionId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.sessionId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage({...o,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},EC=Zg;var wi=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var Jg=e=>new Promise(t=>{setTimeout(t,e)});var _i=class extends wi{name="ClientError"},eh=class extends wi{name="ServerError"},Ut=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:p=!0,retryOnError:d=w=>w instanceof TypeError,retryOnResponse:f=w=>w.status>=500,version:v="v1",...y}=n,g={credentials:"include",...y,headers:{"Content-Type":"application/json",...y.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(g.headers={...g.headers,"X-CSRFToken":this.csrfToken}),typeof v=="string"&&(g.headers={...g.headers,"X-Deepdesk-API-Version":v});let m=u,h=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let S=async()=>(m--,a(s,g).then(async w=>f(w)&&!i.isAborted&&m>0?(await Jg(c),S()):w.status===401&&p===!0&&h===!1?(h=!0,await this.refreshToken(),S()):w).catch(async w=>{if(d(w)&&!i.isAborted&&m>0)return await Jg(c),S();throw w}));S().then(w=>w.json().catch(()=>null).then(C=>{w.status>=500?o(new eh("Server Error",C)):w.status===401?o(new _i("Unauthorized",C)):w.status===403?o(new _i("Forbidden",C)):w.status===404?o(new _i("Not Found",C)):w.status>=400&&o(new _i("Bad Request",C)),delete this.latestRequestByUrl[s],r(C)})).catch(w=>{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 FL;(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||={})})(FL||={});function cd(e){return{...G(e),tags:e.tags}}var Fn=class e{constructor(t,n={}){this.options=n;this.client=new Ut(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",{..._e(t),tags:t.tags},{version:"v2"});return cd(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return G(n)}async getKnowledgeAssistant(t){let n=await this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{version:null});return G(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return G(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return G(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 H.info(`Successfully retrieved conversation ${i.id} for session ${t}`),cd(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=_e(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return cd(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({..._e(o),tags:o.tags})),{version:"v2"})).map(o=>cd(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",_e({...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:_e({...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),agent_id:n.agentId,id:n.externalConversationId},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.preflight(),await this.client.post("/apis/admin/session/api-key/",_e(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}`,_e(n),{abortLatest:!0})).map(i=>({...G(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`,_e(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 G(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",_e(t),{abortLatest:!0});return G(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,_e(t),{version:"v2"});return G(n)}async knowledgeAssist(t,n,r,o={}){let i=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,_e({question:t.question,promptInstruction:t.promptInstruction,chatHistory:n.map(s=>({question:s.question,answer:s.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return G(i)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return G(n)}async requestPasswordlessToken(){let t=await this.client.get("/apis/admin/session/passwordless/request/",{version:null});return G(t.token)}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 G(n)}async evaluateRule(t,n,r,o={}){let i=new URLSearchParams;o.raiseForFailingConditions&&i.set("raise_for_failing_conditions","true");let s=await this.client.post(`/api/conversations/${n}/rules/${t}/evaluate?${i.toString()}`,r,{version:"v2"});return G(s.cues)}async translateMessages(t){let n=await this.client.post("/api/translate",_e(t),{version:"v2"});return G(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Jh);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 ka=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Nm(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,G(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 jL;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(jL||={});var Pa=class{constructor(t,n={}){this.apiUrl=t;this.client=new Ut(t,n)}client;streams={};logger=H;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return G(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,_e(n));return G(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,_e(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return G(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",_e(t));return G(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new ka(`${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 TC={startTime:null,stopTime:null},kC=z({name:"handlingTime",initialState:TC,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(te,()=>TC)}}),{handlingTimeStart:PC,handlingTimeStop:dd,handlingTimeReset:RC}=kC.actions,IC=kC.reducer;var LC=(e={})=>{let t={onAuthError:ti(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var pd={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var ao=F("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 pd.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),HL=z({name:"styleSuggestions",initialState:pd,reducers:{},extraReducers:e=>{e.addCase(ao.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(ao.rejected,t=>{t.fetchState="error"}).addCase(ao.fulfilled,(t,n)=>{t.fetchState="done",ur(t.list,n.payload)||(t.list=n.payload)}).addCase(Ur,t=>{t.list=pd.list}).addCase(te,()=>pd)}}),AC=HL.reducer;var OC=(e={})=>{let t,n=!0,r={getStyleSuggestions:ao,debounce:500,...e};return o=>i=>s=>{var f;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(!((f=u.conversation.current)==null?void 0:f.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 BL(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var NC=(e={})=>{let t={getTextSuggestions:zt,getAutocompleteSuggestions:ga,debounce:200,check:mi,...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===Oc.toString();if(!p||!u&&!c)return a;let{input:{userCommitted:f}}=l;return BL(f,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=ri(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var MC=ao.fulfilled.toString();function zL(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 DC=e=>t=>n=>r=>{var u;if(r.type!==MC){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=zL(o,s);r.type===MC&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var UL=cu({answer:h_,auth:Sx,autoflows:O1,conversation:Px,contentTypes:Rw,customMessages:U1,passwordlessToken:W1,entities:n_,knowledgeAssistant:f_,handlingTime:IC,info:qx,input:Kx,settings:px,profile:S_,search:ew,summary:l_,styleSuggestions:AC,ui:$_,rules:ow,textSuggestions:P_});function FC(e){return v0({reducer:UL,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),LC(),NC({debounce:200}),OC({debounce:500}),DC(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"},VL=e=>t=>n=>r=>{var a;let o=t.getState(),i=km("inlineSuggestions")(o);switch(r.type){case ti.toString():{!r.payload&&e.emit("logout",void 0);break}case Ot.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 Gu.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 Vs.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Yu.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 Ht.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:{summary:r.payload.summary}});break;case He.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 Xu.toString():e.handleKeyDown(r.payload);break;case Ur.toString():e.logSendMessage(r.payload);break;case Qu.toString():e.handleInputChanged(r.payload);break;case _n.fulfilled.toString():e.broadcast(jm,r.payload,!1),e.emit("cues",r.payload);break;default:break}let s=n(r);switch(r.type){case Ur.toString():e.handleAfterSendMessage(r.payload);break;case ya.toString():e.onUpdateShowTabHint(r.payload);break;case dd.toString():e.logHandlingTime();break;case Ot.toString():{i&&(t.dispatch(Zt([])),t.dispatch(wn()));break}case Zt.toString():{i&&r.payload.length>0&&t.dispatch(dr(0));break}default:break}return s},jC=VL;function th(e){return e.toISOString().replace("T"," ").replace("Z","")}function HC(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:th(n),timeStop:th(r)}}function BC(e,t,n){var E,P,R;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:p,cuts:d,deletions:f,textSuggestions:v,offeredTextSuggestions:y}}=t[e],g=r.length,h=v.reduce((N,{text:B,searchTerm:O})=>N+B.length-(O?O.length:0),0),S=u??Date.now(),w=(Date.now()-S)/1e3+(c||0),C=o/w,b=v.reduce((N,{searchTerm:B})=>N+(B?B.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:p,cuts:d,deletions:f,lenTextTyped:o+b,lenTextTotal:g,lenTextAssisted:h,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:w,charsPerSecond:C,numPastes:l,textSuggestionsV2:v,suggestionsCounters:[{source:"gpt",countOffered:y.filter(N=>N.source==="gpt").length}],agentId:(E=t.info.agentInfo)==null?void 0:E.agentId,agentName:(P=t.info.agentInfo)==null?void 0:P.agentName,agentEmail:(R=t.info.agentInfo)==null?void 0:R.agentEmail}}function nh(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return nh(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?nh(o,t):null}function zC(e,t){return nh(e,t)}function UC(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function $L(e){return typeof e=="object"&&e!==null&&"tagName"in e}function fd(e){return $L(e)&&(Sr(e)||zc(e))}var KC,nn=new Map,WL=["bottom","height","left","right","top","width"],qL=(e={},t={})=>WL.some(n=>e[n]!==t[n]);function VC(e){var n,r;if(e.ownerDocument===document)return[];let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...VC(t)]:[]}function $C(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var md=!1,WC=()=>{md=!0;let e=[];if(nn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),nn.delete(n);return}let r=n.getBoundingClientRect();qL(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce($C,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),nn.size===0){md=!1;return}KC=window.requestAnimationFrame(WC)};function rh(e,t){let n=VC(e),r=[],o=n.map((i,s)=>rh(i,a=>{r[s]=a;let l=nn.get(e);if(!l)return;let u=r.reduce($C,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),nn.has(e)){let s=nn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else nn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!md&&WC()},unobserve(){o.forEach(s=>s.unobserve());let i=nn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||nn.delete(e),nn.size||(cancelAnimationFrame(KC),md=!1)}}}}var qC,rn=new Map,GC=()=>{rn.forEach((e,t)=>{if(!t.isConnected){rn.delete(t);return}let{clientHeight:n,scrollHeight:r}=t,o=r>n;e.visible!==o&&(e.visible=o,e.callbacks.forEach(i=>i(e.visible)))}),rn.size!==0&&(qC=window.requestAnimationFrame(GC))};function XC(e,t){return{observe(){let n=rn.size===0;rn.has(e)?rn.get(e).callbacks.push(t):rn.set(e,{visible:void 0,callbacks:[t]}),n&&GC()},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(qC)}}}}var oh=["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 ih(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function Ci(e){return parseFloat(e)}function gd(e){return Math.round(e*1e6)}function QC(e){return e/1e6}function sh(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=QC(gd(o)-gd(i)-gd(s)),u=QC(gd(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function Ra(e,t={}){var c;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",no(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};ih(r,n,oh),sh(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=XC(e,()=>{ih(r,n,oh),sh(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=rh(e,p=>{if(p===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),p.height===0&&p.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(ih(r,n,oh),sh(r,e,n),i(),n.style.top=`${p.top}px`,n.style.left=`${p.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let d=t.closestScrollElement.getBoundingClientRect(),f=window.getComputedStyle(t.closestScrollElement),v=Ci(f.borderTopWidth),y=Ci(f.borderBottomWidth),g=d.top+v-p.top,m=p.top+p.height+-(d.top+d.height-y);n.style.clipPath=`inset(${g}px 0px ${m}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(c=e.parentElement)==null||c.appendChild(n),u.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),u.unobserve(),s.unobserve()}]}var YC=(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 GL(e){return e.offsetParent!==null}function ZC(e){if(!GL(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 hd(e,t,n=100){let r=ZC(e);t({isVisible:r});let o=setInterval(()=>{let i=ZC(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var be=x(_());var JC=YC("showTabHint",!0),Ia=class e{static version="11.0.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new Fn(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[jC({broadcast:(p,d,f)=>{this.broadcastEvents.send(p,d,f)},emit:(p,d,f)=>this.emit(p,d,f),handleAfterSendMessage:p=>this.handleAfterSendMessage(p),handleInputChanged:p=>this.handleInputChanged(p),handleKeyDown:p=>this.handleKeyDown(p),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:p=>this.logSendMessage(p),onUpdateShowTabHint:p=>JC.update(p),sendEvent:(p,d)=>this.deepdeskApi.sendEvent(p,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new Pa(n)}),this.store=FC(c),this.broadcastEvents=new EC({debug:!0,deepdeskUrl:u,eventMap:iw(this.store),createCustomChannel:l}),this.store.dispatch(ya(JC.value())),this.store.dispatch(Hu({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(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(ti(null)),this.store.dispatch(Sn()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();Ve(r)&&fx(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(Sn())).payload}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(Lm({sessionId:t,options:n}))).payload}async createConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Ku(t))).payload}async getConversationBySessionId(t,n){return this.hasConversation()&&this.sessionId()!==t&&this.resetConversation(),(await this.store.dispatch(Vu({sessionId:t,options:n}))).payload}async upsertConversation(t){return this.hasConversation()&&this.sessionId()!==t.sessionId&&this.resetConversation(),(await this.store.dispatch(Am(t))).payload}async postMessages(t){return(await this.store.dispatch(Wu(t))).payload}async updateConversation(t){return(await this.store.dispatch($u(t))).payload}resetConversation(){this.store.dispatch(te()),this.loadProfileConfigPromise=null,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(Hu(t))}setVisitorInfo(t){this.store.dispatch(Wx(t))}async setAgentInfo(t){await this.store.dispatch($s(t))}async setAgentSettings(t){await this.store.dispatch(Mm(t))}async getAgentSettings(){return(await this.store.dispatch(Dm())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(Oc()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Qu(t))}notifyKeyDown(t){this.store.dispatch(Xu(t))}notifyPaste(t,n){this.store.dispatch(Hx({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(Fx(t))}notifyExternalSuggestion(t){this.store.dispatch(Ot(t)),this.store.dispatch(wn())}async evaluateRule(t,n={}){let{payload:r,error:o}=await this.store.dispatch(_n({label:t,params:n}));if(o)throw o;return r}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(yr({collapse:!1})),this.inputMediator&&this.store.dispatch(Ax({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(Zt([])))}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(jx(Rx(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(Nx()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{n||!a||s&&o<=0||i&&(t.shiftKey||(this.store.dispatch(Dx()),t.preventDefault(),!s&&(this.state.input.selectedSuggestionIndex===-1?this.store.dispatch(Vs()):this.stageSelectedSuggestion({inputType:"arrow"}))))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(dr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(dr(-1)),this.store.dispatch(Vs()),t.preventDefault()):n||(this.store.dispatch(yr({collapse:!0})),this.store.dispatch(K_(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:p}=this.state.input,d=p.text.substring(0,p.selection.end),{tabCompletionSuggestion:f}=this.state.input;this.store.dispatch(ya(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&f&&f.text.startsWith(d)&&(this.store.dispatch(Ot({text:f.text,suggestion:f,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(wn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(Bx()),this.store.dispatch(Zt([]))}handlingTimeStart(){this.state.handlingTime.startTime||(H.info("Start handling time"),this.store.dispatch(PC()))}handlingTimeStop(){this.state.handlingTime.startTime&&(H.info("Stop handling time"),this.store.dispatch(dd()))}logSendMessage(t){let n=BC("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logHandlingTime(){let t=HC(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(RC())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(wn()),this.store.dispatch(Ur(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Ot({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]=Ra(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,kt.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=Ra(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,kt.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return no(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,kt.unmountComponentAtNode)(o),o.remove()}),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),H.info(`Stored analytics for ${this.conversationId()}`)}catch{}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(H.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(Ux(r.metrics))):H.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch{}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!fd(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:f,inputMediator:v,closestScrollSelector:y,appendOverlayTo:g,inlineSuggestions:m,floatingMenu:h}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:f,isEmbedded:p,inlineSuggestions:m,floatingMenu:!!h}),n.automaticHandlingTime&&this.setupHandlingTime(t),no(t),this.inputMediator=v||(Sr(t)?new so(t):new io(t)),this.inputMediator.on("change",({plainText:C})=>{this.notifyInputChanged(C)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(zx({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",C=>{this.notifyKeyDown(C)}),this.inputMediator.on("paste",({pastedText:C,selectionText:b})=>{this.notifyPaste(C,b)}),this.inputMediator.on("cut",({selectionText:C})=>{this.notifyCut(C)});let S=y&&zC(t,y)||void 0;if(m){let{customStyles:C,appendOverlayTo:b}=n;if(Sr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let E=this.createInlineContainer(t,"deepdesk-caret");(0,kt.render)((0,be.jsx)(oo,{store:this.store,customStyles:C,children:(0,be.jsx)(Vr,{broadcastEvents:this.broadcastEvents,children:(0,be.jsx)(Y_,{})})}),E),this.inputMediator.on("caret",R=>{this.store.dispatch(Zt([])),R?(E.style.display="block",E.style.top=`${R.top}px`,E.style.left=`${R.left}px`):E.style.display="none"});let P=this.overlayContainerFactory("floating-menu",S||t,{appendTo:typeof h=="object"&&"appendOverlayTo"in h?h.appendOverlayTo:b},C==null?void 0:C.floatingMenuRootNode);(0,kt.render)((0,be.jsx)(oo,{store:this.store,customStyles:C,children:(0,be.jsx)(Vr,{broadcastEvents:this.broadcastEvents,children:(0,be.jsx)(B_,{onLogIn:()=>this.loginViaPopup().catch(R=>H.warn(R.message))})})}),P)}else{let C=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:g,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),b=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,kt.render)((0,be.jsx)(oo,{store:this.store,customStyles:r,children:(0,be.jsx)(Vr,{broadcastEvents:this.broadcastEvents,children:(0,be.jsx)(k1,{inputElement:t})})}),C),(0,kt.render)((0,be.jsx)(oo,{store:this.store,customStyles:r,children:(0,be.jsx)(Vr,{broadcastEvents:this.broadcastEvents,children:(0,be.jsx)(s1,{onLogIn:()=>this.loginViaPopup().catch(E=>H.warn(E.message))})})}),b)}(0,kt.render)((0,be.jsx)(oo,{store:this.store,customStyles:r,children:(0,be.jsx)(Vr,{broadcastEvents:this.broadcastEvents,children:(0,be.jsx)(M_,{})})}),this.createContainer("deepdesk-overlays"));let w;this.inputMediator.on("selection",C=>{clearTimeout(w),C===null?w=setTimeout(()=>{C!==null&&this.store.dispatch(Om(C))},500):this.store.dispatch(Om(C))}),this.inputMediator.on("disabled",()=>{var C;(C=this.inputMediator)==null||C.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(wg(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(wg(!0))),this.store.dispatch(Ox({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(wn()),this.storeMetrics())}),this.whenConversationLoaded(()=>{var C;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setSessionId((C=this.state.conversation.current)==null?void 0:C.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,isEmbedded:i}=n;this.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,kt.render)((0,be.jsx)(oo,{store:this.store,customStyles:r,children:(0,be.jsx)(Vr,{broadcastEvents:this.broadcastEvents,children:(0,be.jsx)(xC,{onLogIn:()=>this.loginViaPopup().catch(s=>H.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setSessionId((s=this.state.conversation.current)==null?void 0:s.sessionId)})}unmountWidget(){this.widgetRoot&&(0,kt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=hd(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){UC(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(ma());let t=hr(this.state);t&&(await this.store.dispatch(pa()),this.store.dispatch(Hu({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions})))}),this.loadProfileConfigPromise)}async loginViaPopup(t){return new Promise((n,r)=>{let o=new MessageChannel,i=o.port1,s=this.state.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,u=()=>{c&&!c.closed&&c.close(),window.removeEventListener("message",p),clearInterval(d)};i.onmessage=async f=>{var v,y;if((v=f.data)!=null&&v.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((y=f.data)==null?void 0:y.jwt),await this.isLoggedIn(),this.broadcastEvents.send(qs),l=!0,o.port1.close(),n()}catch(g){console.error(g),r(g)}finally{l=!0,u()}};let c=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");c===null&&r(new Error("Popup blocked by browser"));let p=async f=>{var v;if(f.origin===a.origin)switch((v=f.data)==null?void 0:v.type){case"deepdesk-popup-loaded":{try{let y=JSON.stringify({type:"deepdesk-popup-create-channel"});c==null||c.postMessage(y,a.origin,[o.port2])}catch(y){H.error("Error posting message to popup",y),r(y)}break}case"deepdesk-popup-error":{u(),f.data.message==="Timeout"&&H.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(f.data.message));break}}};window.addEventListener("message",p);let d=setInterval(()=>{c&&!c.closed||(u(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(u)})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}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=Lc(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(Ht()):this.store.dispatch(zt(r))})}catch(r){this.handleError(r)}}};async function eb(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 tb(e,t,n={}){let r=n.replace?_r(e,n.replace.start,n.replace.end):xi(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
26
- `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?_r(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 XL(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function QL(e){let t=document.createDocumentFragment();return e.split(`
27
- `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function nb(e,t){return!e.contains(t)||t===e?null:t.parentNode===e?t:nb(e,t.parentNode)}async function rb(e,t,{isBlock:n,isHTML:r}={}){let o;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let i=()=>{let s=e.ownerDocument.defaultView??window,a=s.getSelection();if((!a||a.rangeCount===0)&&(e.focus(),a=s.getSelection()),!a||a.rangeCount===0)return;let l=a.getRangeAt(0);if(!l)return;o=document.createElement("span"),l.insertNode(o);let u=r?XL(t):QL(t);if(n){let c=l.startContainer===e?e.childNodes[l.startOffset]:l.startContainer,p=nb(e,c)??e.firstChild;e.insertBefore(u,(p==null?void 0:p.nextSibling)??null)}else l.insertNode(u),l.collapse(!1)};return Promise.resolve(i()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!o)try{o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function ob(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function ib(e,t,n){await new Fn(e).authenticateWithKey(t,n)}async function sb(e){let n=await new Ut(e).get("/platform/config/",{version:null});return G(n)}async function YL(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 ab(e,t){let n=await YL(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 mb(ZL);})();
23
+ c32.4,32.4,47.8,70,47.8,115.2v70h11.9c9.4,0,17.9,3.4,24.7,10.2C462.1,250,465.5,257.7,465.5,267.9z`})})});var vh=w(b()),HO={green:"#0A5E52",pink:"#CD8EF2",red:"#DF341D",yellow:"#DEBD00"},ab=({className:e,color:t})=>(0,vh.jsx)("svg",{className:e,viewBox:"0 0 345 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,vh.jsx)("path",{d:"M172.03 0.0199966H0V86.03C47.5 86.03 86 124.54 86 172.04C86 124.54 124.51 86.03 172.01 86.03C219.51 86.03 258.03 124.54 258.03 172.04C258.03 219.54 219.52 258.05 172.01 258.05C124.5 258.05 86 219.54 86 172.04C86 219.54 47.5 258.05 0 258.05V344.06H172.03C267.04 344.06 344.06 267.04 344.06 172.03C344.06 77.02 267.04 0 172.03 0V0.0199966Z",fill:HO[t||"pink"]})});var lb={root:"j",text:"q",isLoggedIn:"Qe",isLoggedOut:"oo",icon:"Ve",logo:"We",lock:"Ze"};var Sh={};Je(Sh,{enUS:()=>jO,nlNL:()=>zO});var jO={signin:[{type:0,value:"Sign in to "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Search"}]},zO={signin:[{type:0,value:"Log in bij "},{type:1,value:"productName"}],search:[{type:1,value:"productName"},{type:0,value:" Zoeken"}]};var Fo=w(b()),cb=({onLogIn:e})=>{let t=G(Sh),n=U("floatingMenu"),r=U("productName"),o=Z(),i=O(nt),s=A("FloatingMenu",lb);if(i===null||n===!1)return null;let a=()=>{i===!0?o(Ct(!0)):e()};return(0,Fo.jsxs)("button",{className:(0,ub.default)(s.root,{[s.isLoggedIn]:i,[s.isLoggedOut]:!i}),onClick:a,children:[(0,Fo.jsx)("div",{className:s.text,children:t(i?"search":"signin",{productName:r})}),(0,Fo.jsxs)("div",{className:s.icon,children:[(0,Fo.jsx)(ab,{className:s.logo,color:"pink"}),i===!1&&(0,Fo.jsx)(sb,{className:s.lock})]})]})};var Ld=w(F());var db=w(F());function Zi(e){(0,db.useEffect)(()=>{let t=n=>{n.isWithinRoot||e(n)};return document.body.addEventListener("mouseup",t),()=>{document.body.removeEventListener("mouseup",t)}},[e])}function Ho(e){e.addEventListener("mouseup",t=>{t.isWithinRoot=!0},!0)}function Ji(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 BO={showTabHint:!1,inputHasFocus:!1,overlayCollapsed:!1,openOverlayWhenTyping:!1,overlayCollapsedUserOverwrite:!1};var Rd=({ui:e})=>e.overlayCollapsed;var fb=q({name:"ui",initialState:BO,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:Za,setInputHasFocus:wh,setOverlayCollapsed:Kr,setOpenOverlayWhenTyping:pb,setOverlayCollapsedUserOverwrite:mb}=fb.actions,gb=fb.reducer;var Ad=w(F());var es=w(F());var hb=w(F());function yb(e,t,n){(0,hb.useEffect)(()=>{let r=e.current;return r?(r.addEventListener(t,n),()=>{r.removeEventListener(t,n)}):()=>{}},[e,t,n])}var vb={root:"_e",actions:"oi",badge:"ei",formattedText:"eo"};var Uo=w(b()),$O=["search","personal-collection-search","search-autocomplete"];function WO(e,t,n,r={}){let o="";return $O.includes(t)?o=uC(ah(e,n,{stripAgentPart:!0}),r.searchKeywords??[n]):o=ah(e,n,r),r.placeholders===!0&&(o=cC(o)),o}var qO=()=>{},GO=({index:e,selected:t,suggestion:n,onFeedback:r})=>{let o=U("inlineSuggestions"),i=O(Vi),s=Z(),a=A("TextSuggestion",vb),l=(0,es.useRef)(null);(0,es.useEffect)(()=>{let c=setTimeout(()=>{s(iE({text:n.text,suggestion:n}))},500);return()=>{clearTimeout(c)}},[n]),yb(l,"click",()=>{s(Fr(e)),s(Cn({suggestion:n,text:n.text,eventMetrics:{inputType:"mouse"},replace:"until-selection-end"}))});let u=(0,es.useMemo)(()=>WO(n.text,n.source,i,{stripAgentPart:o,placeholders:!0,searchKeywords:n.searchKeywords}),[o,n.text,n.source,i,n.searchKeywords]);return n.source==="gpt"&&!o?null:(0,Uo.jsxs)("div",{className:a.root,onMouseEnter:()=>s(Fr(e)),children:[(0,Uo.jsx)(ae,{ref:l,as:"button","data-testid":"suggestions-overlay-item",selected:t,onClick:qO,children:(0,Uo.jsx)($i,{containerTagName:"div",noWrap:!1,tagName:"span",className:a.formattedText,content:u})}),t&&r&&(0,Uo.jsx)("div",{className:a.actions,children:(0,Uo.jsx)(wd,{onFeedback:()=>r(n),suggestion:n.text})})]})},Sb=GO;var xh=w(b()),YO=({onFeedback:e,suggestions:t,selectedIndex:n,reverse:r})=>{let o=(0,Ad.useMemo)(()=>{let i=t.map((s,a)=>(0,xh.jsx)(Sb,{index:a,selected:a===n,suggestion:s,onFeedback:e},`${s.text}-${s.source}`));return r?i.reverse():i},[t,n,r]);return(0,xh.jsx)(Ad.Fragment,{children:o})},Id=YO;var wb={root:"ii",paper:"ri"};var Ja=w(b()),QO=({textSuggestions:e,selectedIndex:t})=>{let n=(0,Ld.useRef)(null),r=A("InlineSuggestionsOverlay",wb),o=O(Ji),i=Z(),s=O(nt),a=O(Bi),l=O(Rd),u=U("showTextSuggestions");return Zi(()=>{setTimeout(()=>{i(Kr({collapse:!0,skipWhenInputFocus:!0}))})}),(0,Ld.useEffect)(()=>{let c=n.current;if(!c||!c.parentElement)return;c.parentElement.style.left="0px";let f=c.getBoundingClientRect();c.parentElement.style.left=`${Math.min(window.innerWidth-4-f.right,0)}px`}),l||!o||!u||e.length===0||s!==!0||a===!1?null:(0,Ja.jsx)("div",{className:r.root,"data-variant":"inline",children:(0,Ja.jsx)("div",{ref:n,className:r.paper,children:(0,Ja.jsx)(vt,{children:(0,Ja.jsx)(Id,{suggestions:e,selectedIndex:t})})})})},ZO=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),xb=zn(ZO)(QO);var el=w(b()),JO=({children:e})=>{let n=U("locale").replace("-","");return(0,el.jsx)(Wg.Provider,{value:n,children:e})},eN=({store:e,customStyles:t={},children:n})=>(0,el.jsx)(bg,{store:e,children:(0,el.jsx)(JO,{children:(0,el.jsx)(gs.Provider,{value:t,children:n})})}),jo=eN;var Nd=w(ee()),ts=w(F());var Eb=w(F());function Cb(e,t){let[n,r]=(0,Eb.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch(i){return V.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){V.error(s)}}]}var bb=()=>/Mac/i.test(navigator.platform);var kb=w(ee()),Qn=w(F());var Eh={};Je(Eh,{enUS:()=>tN,nlNL:()=>nN});var tN={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"}]}]},nN={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 Tb={root:"ti",anchor:"ni",anchorButton:"ai"};var $r=w(b()),Ch=(e,t,n)=>r=>(0,$r.jsx)("button",{className:e.anchorButton,type:"button",value:t,onClick:n,children:r},t),oN=({className:e,loginUrl:t,isEmbedded:n,onSnooze:r,onLogIn:o})=>{let i=G(Eh),s=en(),a=A("Login",Tb),l=U("productName"),u=(0,Qn.useCallback)(g=>{g.preventDefault(),r&&r(parseInt(g.target.value,10))},[]),c=(0,Qn.useCallback)(g=>{g.preventDefault(),s.send(Ki,!0)},[t]),f=(0,Qn.useMemo)(()=>g=>(0,$r.jsx)("a",{onClick:h=>{h.preventDefault(),o()},href:t,className:a.anchor,target:"_blank",rel:"noreferrer",children:g},"login"),[t]),d=(0,Qn.useCallback)(g=>(0,$r.jsx)("button",{type:"button",className:a.anchorButton,onClick:c,children:g},"prompt"),[c]),{min:p,hour:y,day:v}=(0,Qn.useMemo)(()=>({min:Ch(a,60*10,u),hour:Ch(a,60*60,u),day:Ch(a,60*60*12,u)}),[]);return(0,$r.jsxs)("div",{className:(0,kb.default)(e,a.root),children:[i("loginPlease",{login:n?d:f,productName:l}),r&&(0,$r.jsxs)(Qn.Fragment,{children:[(0,$r.jsx)("br",{}),i("snooze",{min:p,hour:y,day:v})]})]})},Od=oN;var Pb={root:"io",text:"di"};var tl=w(b()),sN=({title:e})=>{let t=A("SearchTrigger",Pb),n=Z();return(0,tl.jsxs)("button",{type:"button",className:t.root,onClick:()=>n(Ct(!0)),children:[(0,tl.jsx)(qi,{}),(0,tl.jsx)("span",{className:t.text,children:e})]})},Rb=sN;var bh={};Je(bh,{enUS:()=>aN,nlNL:()=>lN});var aN={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"}]},lN={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 Ab={root:"pi",isInline:"C",toggleButton:"li",toggleButtonWrapper:"S",toggleButtonWrapperHidden:"si",isCollapsed:"ro",collapsible:"xi",hints:"to",hintsHidden:"ci",triggers:"no",triggersRight:"fi"};var we=w(b()),cN=({textSuggestions:e,selectedIndex:t,onLogIn:n})=>{let r=A("SuggestionsOverlay",Ab),o=G(bh),i=O(Ji),s=tE(),a=Z(),l=(0,ts.useRef)(null),u=U("searchTriggerKey"),c=U("productName"),f=O(Rd),d=O(nt),p=O(Bi),[y,v]=(0,ts.useState)(null),g=U("showSearch"),m=U("showTextSuggestions"),h=U("adminUrl"),S=U("isEmbedded"),[x,C]=Cb("dd-snooze-until-ms",0),T=f||x>Date.now(),k=O(K=>K.input.text),I=e.filter(K=>K.source!=="gpt").length,L=()=>{T&&C(0),a(mb(!T))},N=K=>{a(Qe({name:"suggestion feedback",data:{text:K.text,source:"overlay",context:k},options:{includeConversationData:!0}}))},z=K=>{let J=Date.now()+K*1e3;C(J),V.info(`Snooze until: ${new Date(J)}`),a(Kr({collapse:!0}))};return(0,ts.useEffect)(()=>{I===0&&v(null)},[e,I]),Zi(()=>{a(Kr({collapse:!0,skipWhenInputFocus:!0}))}),d===null||p===!1?null:d===!1?(0,we.jsxs)("div",{ref:l,className:(0,Nd.default)(r.root,{[r.isCollapsed]:T}),children:[!T&&(0,we.jsxs)("div",{className:r.triggers,children:[(0,we.jsx)("div",{style:{flex:1}}),(0,we.jsx)("div",{className:r.triggersRight,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("collapse"),onClick:L,isCollapsed:!1})})]}),(0,we.jsx)("div",{className:r.toggleButtonWrapper,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:L,isCollapsed:!0})}),(0,we.jsx)("div",{className:r.collapsible,children:(0,we.jsx)(Od,{loginUrl:h,isEmbedded:S,onLogIn:n,onSnooze:z})})]}):!s||!i?null:(0,we.jsxs)("div",{ref:l,className:(0,Nd.default)(r.root,{[r.isCollapsed]:T}),children:[!T&&(0,we.jsxs)("div",{className:r.triggers,children:[(0,we.jsx)("div",{style:{flex:1},children:g&&(0,we.jsx)("div",{style:{display:"inline-block"},onFocus:()=>{},onMouseOver:()=>v(o(bb()?"searchHintMac":"searchHintWindows",{searchTriggerKey:u.toUpperCase()})),onMouseLeave:()=>v(null),children:(0,we.jsx)(Rb,{title:o("search")})})}),(0,we.jsxs)("div",{className:r.triggersRight,onFocus:()=>{},children:[(0,we.jsx)("div",{className:(0,Nd.default)(!y&&r.hintsHidden,r.hints),children:y}),(0,we.jsx)(oo,{className:r.toggleButton,title:o("collapse"),onClick:L,isCollapsed:!1})]})]}),(0,we.jsx)("div",{className:r.toggleButtonWrapper,children:(0,we.jsx)(oo,{className:r.toggleButton,title:o("open",{productName:c}),onClick:L,isCollapsed:!0})}),I>0&&m&&(0,we.jsx)("div",{className:r.collapsible,onFocus:()=>{},children:(0,we.jsx)(vt,{children:(0,we.jsx)(Id,{onFeedback:N,suggestions:e,selectedIndex:t,reverse:!0})})})]})},dN=({input:e})=>({selectedIndex:e.selectedSuggestionIndex,textSuggestions:e.textSuggestions}),Ib=zn(dN)(cN);var Gd=w(ee());var er=w(F());var ns=w(F());function Md(e){return e.contentEditable==="true"}function fN(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 Lb(e){let{selectionStart:t,selectionEnd:n}=Md(e)?fN(e):e;return[t,n]}function Ob(e){let[,t]=(0,ns.useState)(),n=(0,ns.useRef)(null);return n.current=Lb(e),(0,ns.useEffect)(()=>{let r=()=>{let[o,i]=n.current??[],s=Lb(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 Nb(e,t){if(!t)return;let n=e,{value:r}=n,[o,i]=t,s=r.match(Fl);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 Mb=w(F()),pN=["div","span","mark","strong","b","i","u","em"];function Th(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(pN.includes(o)){let s=Array.isArray(r.props.children)?r.props.children:[r.props.children];return[...e.slice(0,e.length-1),(0,Mb.cloneElement)(r,{children:Th(s,t,n+1)})]}return[...e,...t]}function Wr(e){return e.tagName.toLowerCase()==="textarea"}var un={root:"gi",container:"bi",agentText:"ao",tabText:"do",hint:"E",matchSelection:"po",focus:"hi",resetIndent:"mi",matchKeyword:"d",matchPlaceholder:"p",hover:"lo",hintText:"ui",popover:"yi",popoverRoot:"wi",popoverContentContainer:"so",popoverContent:"vi",selectionOptions:"ki",selectionOptionsIsHidden:"zi",selectionOptionsButton:"ji",caret:"qi",popoverSuggestionsRoot:"Ci",suggestionsOverlayInputStyles:"Si"};var Kb=w(ee());var Vd=w(F());var rs=w(F());function _b(e,t){let n;return[(...r)=>{window.cancelAnimationFrame(n);let o=t?t(...r):r;n=window.requestAnimationFrame(()=>{e(...o)})},()=>window.cancelAnimationFrame(n)]}function _d(e){let t=(0,rs.useRef)(null),[n,r]=(0,rs.useState)(!1);return(0,rs.useEffect)(()=>{let o=!1,i=parseFloat(window.getComputedStyle(document.body).zoom??"1"),[s,a]=_b((c,f)=>{let d=t.current;if(!d)return;let p=c/i,y=f/i,v=d.getBoundingClientRect(),g=p>v.x&&p<v.x+v.width&&y>v.y&&y<v.y+v.height;g&&!o?(o=!0,r(!0)):!g&&o&&(o=!1,r(!1))},({clientX:c,clientY:f})=>[c,f]),[l,u]=_b(()=>{o=!1,r(!1)});return e.addEventListener("mousemove",s),e.addEventListener("mouseleave",l),()=>{a(),u(),e.removeEventListener("mousemove",s),e.removeEventListener("mouseleave",l)}},[t]),[t,n]}function Db(e){return e.replace(/[.*+^${}()|[\]\\]/g,"\\$&")}function Dd(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Fb(e){return e!=null}var Ph=w(ee()),Vt=w(F());var Fd=w(F()),gN=["bottom","height","left","right","top","width"],hN=(e={},t={})=>gN.some(n=>e[n]!==t[n]),Zn=new Map,Hb,Ub=()=>{let e=[],t=[];Zn.forEach((n,r)=>{if(r instanceof Element&&!r.isConnected){t.push(r);return}let o=r.getBoundingClientRect();hN(o,n.rect)&&(n.rect=o,e.push(n))}),t.forEach(n=>{Zn.delete(n)}),e.forEach(n=>{n.callbacks.forEach(r=>r(n.rect))}),Hb=window.requestAnimationFrame(Ub)};function yN(e,t){return{observe(){let n=Zn.size===0;if(Zn.has(e)){let r=Zn.get(e);r.callbacks.push(t),r.rect&&t(r.rect)}else Zn.set(e,{rect:void 0,hasRectChanged:!1,callbacks:[t]});n&&Ub()},unobserve(){let n=Zn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Zn.delete(e),Zn.size||cancelAnimationFrame(Hb)}}}}function kh(e){let[t,n]=(0,Fd.useState)(null);return(0,Fd.useLayoutEffect)(()=>{if(!e.current)return;let r=yN(e.current,o=>{n(o)});return r.observe(),()=>{r.unobserve()}},[e]),t}var os=w(F()),zb=w(Xu());var jb={root:"Ei"};var Bb=({children:e,parentNode:t})=>{let[n,r]=(0,os.useState)(null),o=(0,os.useContext)(gs);return(0,os.useLayoutEffect)(()=>{let i=document.createElement("div");return Ho(i),i.classList.add(jb.root),o!=null&&o.portalRootNode&&i.classList.add(o==null?void 0:o.portalRootNode),(t||document.body).appendChild(i),r(i),()=>{i.isConnected&&i.remove()}},[]),n?(0,zb.createPortal)(e,n):null};var bn={ref:"Gi",root:"o",positionAbove:"l",positionBelow:"s",positionLeft:"x",positionRight:"c",alignStart:"f",alignCenter:"g",alignEnd:"b"};var Hd=w(b()),Ud=(e=!1)=>{let[t,n]=(0,Vt.useState)(e),r=(0,Vt.useCallback)(()=>n(!0),[]),o=(0,Vt.useCallback)(()=>n(!1),[]),i=(0,Vt.useCallback)(()=>n(a=>!a),[]),s=(0,Vt.useRef)(null);return{opened:t,open:r,close:o,toggle:i,triggerRef:s}};function Rh(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 is=({className:e,triggerRef:t,boundaryRef:n=(0,Vt.createRef)(),position:r="above",align:o="center",children:i,toStyle:s=Rh,parentNode:a,...l})=>{let u=kh(t),c=kh(n),f=(0,Vt.useMemo)(()=>s(u,c,0),[u,c]);return(0,Hd.jsx)(Bb,{parentNode:a,children:(0,Hd.jsx)("div",{className:(0,Ph.default)(bn.ref,{[bn.positionAbove]:r==="above",[bn.positionBelow]:r==="below",[bn.positionLeft]:r==="left",[bn.positionRight]:r==="right",[bn.alignStart]:o==="start",[bn.alignCenter]:o==="center",[bn.alignEnd]:o==="end"}),style:f,...l,role:"dialog",children:(0,Hd.jsx)("div",{className:(0,Ph.default)(e,bn.root),children:i})})})};var Vb=w(ee()),jd=w(F());var Ah=w(b()),zd=(0,jd.forwardRef)(({className:e,children:t,...n},r)=>{let o=(0,jd.useRef)(null),i=A("TabCompletion",un);return(0,Ah.jsx)("div",{ref:Dd([o,r]),className:(0,Vb.default)(e,i.popoverContentContainer),...n,children:(0,Ah.jsx)("div",{className:i.popoverContent,children:t})})});var qr=w(b()),wN=e=>t=>{let n=Rh(t);return"top"in n&&(n.width=e.width-(t.left-e.left)-10),n},xN=({inputElement:e,boundaryRef:t,inputStyle:n,children:r,suggestion:o})=>{let i=A("TabCompletion",un),s=Ud(),a=(0,Vd.useMemo)(()=>wN(e.getBoundingClientRect()),[e]),[l,u]=_d(e);return(0,Vd.useEffect)(()=>{u?s.open():s.close()},[u]),(0,qr.jsxs)("span",{children:[(0,qr.jsx)("mark",{ref:Dd([l,s.triggerRef]),className:(0,Kb.default)(i.matchKeyword,{[i.hover]:u}),"aria-haspopup":"dialog","aria-expanded":s.opened?"true":"false",children:r}),s.opened&&(0,qr.jsx)(is,{className:i.popover,triggerRef:s.triggerRef,boundaryRef:t,position:"below",align:"start",toStyle:a,children:(0,qr.jsx)(zd,{style:n,children:(0,qr.jsx)("div",{className:i.hintText,children:o})})})]})},Bd=class extends Wn{keywordMatches=[];preparedKeywordMatches=[];usedKeywordMatches=new Set;onBeforeParse(t,n){return n.keywordMatches&&n.keywordMatches!==this.keywordMatches&&(this.preparedKeywordMatches=n.keywordMatches.map(r=>({...r,keywordRegex:new RegExp(`\\b${Db(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(Fb);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,qr.jsx)(xN,{inputElement:n.inputElement,suggestion:n.suggestion,inputStyle:n.inputStyle,boundaryRef:n.boundaryRef,children:t},`keyword_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var $b=w(ee());var Ih=w(b()),EN=({inputElement:e,children:t})=>{let n=A("TabCompletion",un),[r,o]=_d(e);return(0,Ih.jsx)("mark",{ref:r,className:(0,$b.default)(n.matchPlaceholder,{[n.hover]:o}),children:t})},Kd=class extends Wn{match(t){let n=t.match(/(((\$!\{)|(\{))[a-zA-Z0-9_.]+\}(?!\}))/);return n?{index:n.index,length:n[0].length,match:n[0],matchString:n[0],valid:!0}:null}replaceWith(t,n){return(0,Ih.jsx)(EN,{inputElement:n.inputElement,children:t},`placeholder_${n.matchString}_${n.key}`)}asTag(){return"mark"}};var Wd=w(ee());var ot=w(F());var Lh=w(b()),Wb=()=>(0,Lh.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,Lh.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 Gr=w(F());var Gb=w(Qg());var qb={root:"Ni",content:"Yi"};function $d(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 Oh(e){return e.replace("https://www.","").replace("https://","")}var Kt=w(b()),bN=3,TN=e=>({image:e.image||"",text:e.text,id:e.id,title:e.title}),kN=({onSelectLink:e,onDismiss:t,placeholder:n,visitUrlText:r,linkCount:o=bN})=>{let i=A("LinkSearch",qb),[s,a]=(0,Gr.useState)(""),l=Z(),u=O(GC("url")),c=O(EE("URL",TN)),[f,d]=(0,Gr.useState)(c.length-1),p=U("fallbackImage"),y=h=>{let S=h.target;a(S.value)},v=(h,S)=>{h.stopPropagation(),h.preventDefault(),window.open(S,"_blank")},g=h=>{var C;let S=f-1<0?c.length-1:f-1,x=f+1===c.length?0:f+1;h.code==="Escape"&&(a(""),t()),h.code==="ArrowUp"&&d(S),h.code==="ArrowDown"&&d(x),h.code==="Enter"&&e(((C=c[f])==null?void 0:C.text)||s)},m=(0,Gr.useCallback)((0,Gb.default)(h=>{l(bo({query:h,type:"URL",tags:["link-search"]}))},300),[]);return(0,Gr.useEffect)(()=>{s&&m(s)},[s]),(0,Gr.useEffect)(()=>()=>{l(Wc())},[]),(0,Kt.jsxs)("div",{className:i.root,children:[(0,Kt.jsx)(vt,{withDivider:!0,children:(s?c:u).slice(0,o).map((h,S)=>(0,Kt.jsx)(ae,{selected:f===S,onClick:()=>e(h.text),"data-testid":"linksearch-suggestion",children:(0,Kt.jsxs)(pe,{children:[(0,Kt.jsx)(pe.Image,{src:$d(h,"small",p||void 0),title:h.title||h.text}),(0,Kt.jsxs)(pe.Content,{className:i.content,cropText:!0,children:[(0,Kt.jsx)(pe.Title,{children:h.title||Oh(h.text)}),h.title&&Oh(h.text)]}),(0,Kt.jsx)(ae.Actions,{children:(0,Kt.jsx)(ae.ActionButton,{label:r,onClick:x=>v(x,h.text)})})]})},h.text))}),(0,Kt.jsx)(_a,{value:s,onChange:y,autoFocus:!0,placeholder:n,onKeyUp:g})]})},Yb=kN;var Nh={};Je(Nh,{enUS:()=>PN,nlNL:()=>RN});var PN={insertLink:[{type:0,value:"Insert link"}],linkInputPlaceholder:[{type:0,value:"Search, type or paste link"}],visitUrl:[{type:0,value:"Visit"}]},RN={insertLink:[{type:0,value:"Voeg link toe"}],linkInputPlaceholder:[{type:0,value:"Zoek, typ of plak link"}],visitUrl:[{type:0,value:"Bekijk"}]};var rt=w(b()),AN=(0,ot.forwardRef)((e,t)=>{let n=A("TabCompletion",un);return(0,rt.jsx)("mark",{ref:t,className:(0,Wd.default)(n.matchSelection)},"selection-start")}),IN=({startRef:e,boundaryRef:t,inputStyle:n,inputElement:r,children:o})=>{let i=G(Nh),s=A("TabCompletion",un),a=(0,ot.useRef)(null),l=(0,ot.useRef)(null),[u,c]=(0,ot.useState)(null),f=Z(),d=Ud(document.activeElement===r),[p]=(0,ot.useState)(()=>document.createRange());d.triggerRef.current=p,(0,ot.useEffect)(()=>()=>p.detach(),[]),(0,ot.useEffect)(()=>{let v=e.current,g=a.current;!v||!g||(p.setStart(v,0),p.setEnd(g,0))},[e.current,a.current]),Zi(()=>{d.close()});let y=(0,ot.useCallback)(v=>{let g=p.toString(),m=/^http(s?):\/\//.test(v)?v:`https://${v}`;f(zc({text:`[${g}](${m})`,replace:"selection"}))},[]);return(0,rt.jsxs)("span",{children:[(0,rt.jsx)("mark",{ref:a,className:(0,Wd.default)(s.matchSelection),"aria-haspopup":"dialog","aria-expanded":d.opened?"true":"false",children:o}),d.opened&&(0,rt.jsx)(is,{className:s.popoverRoot,triggerRef:d.triggerRef,boundaryRef:t,position:"above",align:"start",children:(0,rt.jsxs)(zd,{style:n,ref:l,children:[(0,rt.jsx)("div",{className:(0,Wd.default)(s.selectionOptions,{[s.selectionOptionsIsHidden]:u!==null}),children:(0,rt.jsxs)("button",{type:"button",tabIndex:u===null?-1:void 0,className:s.selectionOptionsButton,onClick:()=>c("insertLink"),children:[(0,rt.jsx)(Wb,{}),(0,rt.jsx)("span",{children:"\xA0"}),(0,rt.jsx)("span",{children:i("insertLink")})]})}),u==="insertLink"&&(0,rt.jsx)(Yb,{placeholder:i("linkInputPlaceholder"),visitUrlText:i("visitUrl"),onSelectLink:y,onDismiss:()=>{c(null),d.close()}})]})})]},"selection-end")},qd=class extends Wn{charCount=0;foundIndex=0;startRef=null;props;onBeforeParse(t,n){return this.props=n,this.charCount=0,this.startRef=(0,ot.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,rt.jsx)(AN,{ref:this.startRef}):(0,rt.jsx)(IN,{inputElement:n.inputElement,startRef:this.startRef,boundaryRef:n.boundaryRef,inputStyle:n.inputStyle})}asTag(){return"mark"}};var Jn=w(b()),LN=({enabled:e,content:t,tabText:n,showTabHint:r,showTabCompletion:o,showStyleSuggestions:i,keywordMatches:s,inputElement:a,source:l})=>{let u=A("TabCompletion",un),c=U("insertLink"),f=U("showMidSentenceSuggestions"),d=U("inlineSuggestions"),p=Ob(a),y=(0,er.useRef)(null),v=O(nt);(0,er.useEffect)(()=>{Wr(a)&&p&&Nb(a,p)},[p]);let g=(0,er.useCallback)(S=>{if(!o||!n)return S;let x=[(0,Jn.jsx)("span",{className:u.resetIndent,children:"\u200B"},"u200B"),(0,Jn.jsx)("span",{"data-testid":"tab-completion",className:(0,Gd.default)(u.tabText,u.resetIndent),"data-source":l,children:n},"tabText")];return r&&x.push((0,Jn.jsx)("span",{className:(0,Gd.default)(u.hint,u.resetIndent),children:(0,Jn.jsx)(Nl,{keyCode:"tab"},"tabHint")})),Th(S,x)},[o,n,r]),m=(0,er.useMemo)(()=>{let S=[];return c&&S.push(new qd("selection")),S.push(new Kd("placeholders")),i&&S.push(new Bd("keywords")),S},[d,c,i]),h=(0,er.useMemo)(()=>{let S=window.getComputedStyle(a);return{"--dd-color":S.color,"--dd-font-size":S.fontSize,"--dd-font-family":S.fontFamily,"--dd-font-variant":S.fontVariant}},[]);return!e||!v?null:(0,Jn.jsxs)("div",{ref:S=>{S!=null&&S.parentElement&&(y.current=S==null?void 0:S.parentElement)},className:u.root,style:h,children:[(0,Jn.jsx)($i,{tagName:"span",containerTagName:"div",className:(0,Gd.default)(u.container,u.agentText),disableLineBreaks:Wr(a),content:t||"\u200B",onAfterParse:g,matchers:m,selection:p,keywordMatches:s,inputElement:a,inputStyle:h,boundaryRef:y,inlineSuggestionsOnlyAtEnd:!f}),(0,Jn.jsx)("br",{})]})},ON=({input:e,ui:t,settings:n,styleSuggestions:r,conversation:o})=>{var v;let{tabCompletionSuggestion:i}=e,s=(i==null?void 0:i.text)||"",a=(i==null?void 0:i.source)||"",l=e.html??Wi(e.text),u=s.indexOf(e.text)===0?s.slice(e.text.length):"",{showTabHint:c}=t,{isSupported:f}=o,{showTabCompletion:d,visible:p,showStyleSuggestions:y}=n;return{showTabHint:c,showStyleSuggestions:y,showTabCompletion:d,content:l,tabText:u,source:a,keywordMatches:((v=r.list)==null?void 0:v.keywordMatches)??[],enabled:p&&f!==!1}},Xb=zn(ON)(LN);var r1=w(ee()),o1=w(F());var Qb={list:[],fetchState:"idle",isInitialRequest:null},Jb=e=>e.autoflows.list||[],Zb=e=>t=>{var n;return(n=t.list)==null?void 0:n.find(r=>r.triggerPayload===e)},tr=j("autoflows/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getAutoflows(e)}),Mh=j("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(tr(e.platformSessionId))}),_h=j("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(tr(e.platformSessionId))}),NN=q({name:"autoflows",initialState:Qb,reducers:{},extraReducers:e=>{e.addCase(Mh.pending,(t,n)=>{let r=Zb(n.meta.arg.triggerPayload)(t);r.state="Started",r.isBusy=!0}),e.addCase(_h.pending,(t,n)=>{let r=Zb(n.meta.arg.triggerPayload)(t);r.state="Aborted",r.isBusy=!0}),e.addCase(tr.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}),e.addCase(tr.rejected,t=>{t.fetchState="error"}),e.addCase(tr.fulfilled,(t,n)=>{t.list=n.payload,t.fetchState="done"}),e.addCase(ue,()=>Qb)}}),eT=j("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(tr(e))}),o.on("sessionCompleted",()=>{n(tr(e))})}),tT=j("autoflows/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),nT=NN.reducer;var rT={list:[],fetchState:"idle",isInitialRequest:null,sentSuggestions:[],errorSuggestions:[],answeredSuggestions:[]},oT=e=>e.customMessages.list,iT=e=>t=>!!t.customMessages.sentSuggestions.find(n=>n===e),sT=e=>t=>!!t.customMessages.answeredSuggestions.find(n=>n===e),aT=e=>t=>!!t.customMessages.errorSuggestions.find(n=>n===e),nl=j("customMessages/getAll",async(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");return n.getCustomMessages(e)}),Yd=j("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)}),Xd=j("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)}),lT=q({name:"customMessages",initialState:rT,reducers:{onCustomMessage(e,t){Array.isArray(t.payload)?e.list=t.payload:e.list=[t.payload]}},extraReducers:e=>{e.addCase(nl.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(nl.rejected,t=>{t.fetchState="error"}).addCase(nl.fulfilled,(t,n)=>{t.fetchState="done",t.list=n.payload||[]}).addCase(Yd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.errorSuggestions=t.errorSuggestions.filter(r=>n.meta.arg.suggestion.text!==r)}).addCase(Yd.rejected,(t,n)=>{let r=t.sentSuggestions.indexOf(n.meta.arg.suggestion.text);t.errorSuggestions.push(...t.sentSuggestions.splice(r,1))}).addCase(Xd.pending,(t,n)=>{t.sentSuggestions.push(n.meta.arg.suggestion.text),t.answeredSuggestions.push(n.meta.arg.suggestion.text)}).addCase(Xd.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(ue,()=>rT)}}),uT=j("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(lT.actions.onCustomMessage(i))})}),cT=j("customMessages/closeStream",(e,t)=>{let{deepdeskBrokerAPI:n}=t.extra;if(!n)throw new Error("Deepdesk Broker not initialized");n.closeStream(e)}),dT=lT.reducer;var MN={token:null,accountUrl:null,interval:null},fT=e=>t=>{let{passwordlessToken:{token:n,accountUrl:r}}=t;return n&&r?`${r}/apis/admin/session/passwordless/login/?token=${n}&redirect=${e}`:null},Dh=j("passwordlessToken/getTemporaryPasswordlessToken",async(e,t)=>{let{deepdeskAPI:n}=t.extra,r=await n.requestPasswordlessToken();return{accountUrl:n.client.baseUrl,token:r}}),Fh=j("passwordlessToken/pollPasswordlessToken",(e={},t)=>{let{interval:n=1e3*60*10}=e,{dispatch:r}=t;return r(Dh()),setInterval(()=>r(Dh()),n)}),pT=q({name:"passwordlessToken",initialState:MN,reducers:{stopPollPasswordlessToken(e){e.interval&&clearInterval(e.interval),e.interval=null}},extraReducers:e=>{e.addCase(Dh.fulfilled,(t,n)=>{t.token=n.payload.token,t.accountUrl=n.payload.accountUrl}),e.addCase(Fh.fulfilled,(t,n)=>{t.interval=n.payload})}}),{stopPollPasswordlessToken:mT}=pT.actions,gT=pT.reducer;function hT(e){let{customMessages:t,autoflows:n}=e;return n.fetchState==="loading"&&n.isInitialRequest===!0||t.fetchState==="loading"&&t.isInitialRequest===!0}var TT=w(F());var ET=w(ee()),CT=w(F());var vT=w(ee());var yT={root:"Ai"};var wT=w(b()),DN=({className:e,children:t})=>{let n=A("Unicode",yT);return(0,wT.jsx)("span",{className:(0,vT.default)(e,n.root),children:t})},ST=DN;var xT={isDisabled:"Fi",buttonStart:"Hi",root:"Li",buttonStop:"xo",stateBadge:"h",isCompleted:"Mi",isStarted:"Ri",isAborted:"Ti"};var Hh={};Je(Hh,{enUS:()=>HN,nlNL:()=>UN});var HN={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"}]},UN={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 Pt=w(b()),zN=({disabled:e,state:t,displayName:n,description:r,onStartAutoflow:o,onStopAutoflow:i})=>{let s=A("Autoflow",xT),a=G(Hh),l=t==="Started"?"stop":"start",u=l==="start"?"\u25B6":l==="stop"?"\u25FC":"";return(0,Pt.jsxs)(ae,{className:(0,ET.default)(s.root,{[s.isDisabled]:e,[s.isCompleted]:t==="Completed",[s.isAborted]:t==="Aborted",[s.isStarted]:t==="Started"}),children:[(0,Pt.jsx)(pe,{children:(0,Pt.jsxs)(pe.Content,{children:[(0,Pt.jsxs)(pe.Title,{children:[t&&(0,Pt.jsx)("span",{className:s.stateBadge,children:a(t)}),n]}),(0,Pt.jsx)("span",{children:r})]})}),(0,Pt.jsx)(ae.Actions,{fixed:t==="Started",children:(0,Pt.jsx)(ae.ActionButton,{primary:!0,className:l==="start"?s.buttonStart:s.buttonStop,onClick:t==="Started"?i:o,disabled:e,label:(0,Pt.jsxs)(CT.Fragment,{children:[(0,Pt.jsx)(ST,{children:u})," ",(0,Pt.jsx)("span",{children:a(l)})]})})})]})},bT=zN;var Uh=w(b()),BN=(e,t)=>{let n=t.filter(r=>r.state==="Started");return n.length>0?n.indexOf(e)===-1:!1},VN=({autoflows:e,onStartAutoflow:t,onStopAutoflow:n,platformSessionId:r})=>(0,Uh.jsx)(TT.Fragment,{children:e.map(o=>(0,Uh.jsx)(bT,{displayName:o.displayName,description:o.description,disabled:o.isBusy||BN(o,e),state:o.state,onStartAutoflow:()=>t({platformSessionId:r,triggerPayload:o.triggerPayload}),onStopAutoflow:()=>n({platformSessionId:r,triggerPayload:o.triggerPayload})},o.displayName))}),KN=({autoflows:e,conversation:t})=>{var n;return{autoflows:e.list,platformSessionId:(n=t.current)==null?void 0:n.sessionId}},$N={onStartAutoflow:Mh,onStopAutoflow:_h},kT=zn(KN,$N)(VN);var PT=w(ee()),jh=w(F());var nr={root:"co",title:"fo",isUsed:"Ui",quickReplies:"Bi",quickReply:"Di",hasError:"Ii",label:"Oi",errorIcon:"Xi"};var ht=w(b()),qN=({suggestion:e})=>{let t=G(Mo),n=Z(),r=O(iT(e.text)),o=O(sT(e.text)),i=O(aT(e.text)),s=O(Mc),{replyOptions:a}=e,l=(0,jh.useCallback)(c=>{c.preventDefault(),c.stopPropagation(),!(r||!s)&&n(Yd({platformSessionId:s,suggestion:e}))},[e,r,n,s]),u=(0,jh.useCallback)(c=>{if(c.preventDefault(),c.stopPropagation(),!s||!a)return;let f=parseInt(c.target.dataset.index,10),d=a[f];n(Xd({platformSessionId:s,reply:d,suggestion:e}))},[e,r,n,s]);return(0,ht.jsxs)(ae,{onClick:l,className:(0,PT.default)(nr.root,{[nr.isUsed]:r,[nr.hasError]:i}),children:[(0,ht.jsx)(pe,{children:(0,ht.jsxs)(pe.Content,{children:[(0,ht.jsxs)(pe.Title,{className:nr.title,children:[e.text," ",(0,ht.jsx)(Ml,{className:nr.label,children:"analyse tool"})," ",i&&(0,ht.jsx)("span",{className:nr.errorIcon,role:"img","aria-label":t("sendingError"),title:t("sendingError"),children:"!"})]}),a&&a.length>0&&(0,ht.jsx)("ul",{className:nr.quickReplies,children:a.map(c=>(0,ht.jsx)("li",{className:nr.quickReply,children:c.title},c.title))})]})}),(0,ht.jsxs)(ae.Actions,{fixed:i||r,children:[a&&a.length>0&&(0,ht.jsx)(ae.DropdownButton,{label:t("answer"),disabled:o,children:a.map((c,f)=>(0,ht.jsx)(ae.DropdownItem,{index:f,label:c.title,onClick:u},c.title))}),(0,ht.jsx)(ae.ActionButton,{primary:!0,disabled:r,onClick:l,label:t(r?"suggestionSent":i?"tryAgain":"sendSuggestion")})]})]})},RT=qN;var Qd=w(F());var Vh=w(ee());var zh=w(b()),Bh=()=>(0,zh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:(0,zh.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 AT={root:"Ji",entity:"r",entityText:"Ki",iconWrapper:"Pi",icon:"Qi",iconClicked:"Vi"};var Tn=w(b()),YN=({entities:e})=>{let t=A("EntitiesWidgetList",AT),[n,r]=(0,Qd.useState)(void 0),o=Z(),i=()=>{r(void 0)},s=a=>{e&&(r(e.indexOf(a)),Po(a.text),o(Qe({name:"entity copied",data:{entity:a,type:"copy"}})))};return(0,Qd.useEffect)(()=>{let a=setTimeout(i,500);return()=>{clearTimeout(a)}},[n]),!e||e.length===0?null:(0,Tn.jsx)("div",{className:t.root,"data-testid":"widget-entities-list",children:e.map((a,l)=>(0,Tn.jsxs)("button",{title:a.text,className:t.entity,type:"button",onClick:()=>s(a),children:[(0,Tn.jsx)("span",{className:t.entityText,children:a.text}),(0,Tn.jsxs)("span",{className:t.iconWrapper,children:[(0,Tn.jsx)("span",{className:(0,Vh.default)(t.icon),children:(0,Tn.jsx)(Bh,{})}),(0,Tn.jsx)("span",{className:(0,Vh.default)(t.icon,n===l&&t.iconClicked),children:(0,Tn.jsx)(Bh,{})})]})]},a.text))})},IT=YN;var Kh=w(b()),LT=()=>(0,Kh.jsx)("svg",{width:"1em",height:"1em",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,Kh.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 $h=w(b()),OT=()=>(0,$h.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,$h.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 Wh=w(b()),NT=()=>(0,Wh.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 -960 960 960",width:"1em",children:(0,Wh.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{entries:zT,setPrototypeOf:MT,isFrozen:XN,getPrototypeOf:QN,getOwnPropertyDescriptor:ZN}=Object,{freeze:it,seal:dn,create:BT}=Object,{apply:Zh,construct:Jh}=typeof Reflect<"u"&&Reflect;it||(it=function(t){return t});dn||(dn=function(t){return t});Zh||(Zh=function(t,n,r){return t.apply(n,r)});Jh||(Jh=function(t,n){return new t(...n)});var Zd=At(Array.prototype.forEach),_T=At(Array.prototype.pop),rl=At(Array.prototype.push),tf=At(String.prototype.toLowerCase),qh=At(String.prototype.toString),JN=At(String.prototype.match),ol=At(String.prototype.replace),eM=At(String.prototype.indexOf),tM=At(String.prototype.trim),cn=At(Object.prototype.hasOwnProperty),Rt=At(RegExp.prototype.test),il=nM(TypeError);function At(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return Zh(e,t,r)}}function nM(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Jh(e,n)}}function Y(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:tf;MT&&MT(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){let i=n(o);i!==o&&(XN(t)||(t[r]=i),o=i)}e[o]=!0}return e}function rM(e){for(let t=0;t<e.length;t++)cn(e,t)||(e[t]=null);return e}function zo(e){let t=BT(null);for(let[n,r]of zT(e))cn(e,n)&&(Array.isArray(r)?t[n]=rM(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=zo(r):t[n]=r);return t}function Jd(e,t){for(;e!==null;){let r=ZN(e,t);if(r){if(r.get)return At(r.get);if(typeof r.value=="function")return At(r.value)}e=QN(e)}function n(){return null}return n}var DT=it(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Gh=it(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Yh=it(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),oM=it(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Xh=it(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),iM=it(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),FT=it(["#text"]),HT=it(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Qh=it(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),UT=it(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ef=it(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),sM=dn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),aM=dn(/<%[\w\W]*|[\w\W]*%>/gm),lM=dn(/\${[\w\W]*}/gm),uM=dn(/^data-[\-\w.\u00B7-\uFFFF]/),cM=dn(/^aria-[\-\w]+$/),VT=dn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),dM=dn(/^(?:\w+script|data):/i),fM=dn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),KT=dn(/^html$/i),jT=Object.freeze({__proto__:null,MUSTACHE_EXPR:sM,ERB_EXPR:aM,TMPLIT_EXPR:lM,DATA_ATTR:uM,ARIA_ATTR:cM,IS_ALLOWED_URI:VT,IS_SCRIPT_OR_DATA:dM,ATTR_WHITESPACE:fM,DOCTYPE_NAME:KT}),pM=function(){return typeof window>"u"?null:window},mM=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null,o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));let i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function $T(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pM(),t=H=>$T(H);if(t.version="3.0.9",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let{document:n}=e,r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:s,Node:a,Element:l,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:d,trustedTypes:p}=e,y=l.prototype,v=Jd(y,"cloneNode"),g=Jd(y,"nextSibling"),m=Jd(y,"childNodes"),h=Jd(y,"parentNode");if(typeof s=="function"){let H=n.createElement("template");H.content&&H.content.ownerDocument&&(n=H.content.ownerDocument)}let S,x="",{implementation:C,createNodeIterator:T,createDocumentFragment:k,getElementsByTagName:I}=n,{importNode:L}=r,N={};t.isSupported=typeof zT=="function"&&typeof h=="function"&&C&&C.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:K,TMPLIT_EXPR:J,DATA_ATTR:oe,ARIA_ATTR:ze,IS_SCRIPT_OR_DATA:pn,ATTR_WHITESPACE:st}=jT,{IS_ALLOWED_URI:_}=jT,$=null,ar=Y({},[...DT,...Gh,...Yh,...Xh,...FT]),ye=null,lr=Y({},[...HT,...Qh,...UT,...ef]),W=Object.seal(BT(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ur=null,yl=null,$o=!0,Qr=!0,cs=!1,vl=!0,qt=!1,Gt=!1,Sl=!1,at=!1,It=!1,wl=!1,xl=!1,py=!0,my=!1,q1="user-content-",pf=!0,ds=!1,Wo={},qo=null,gy=Y({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),hy=null,yy=Y({},["audio","video","img","source","image","track"]),mf=null,vy=Y({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),El="http://www.w3.org/1998/Math/MathML",Cl="http://www.w3.org/2000/svg",Rn="http://www.w3.org/1999/xhtml",Go=Rn,gf=!1,hf=null,G1=Y({},[El,Cl,Rn],qh),fs=null,Y1=["application/xhtml+xml","text/html"],X1="text/html",Ne=null,Yo=null,Q1=n.createElement("form"),Sy=function(E){return E instanceof RegExp||E instanceof Function},yf=function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Yo&&Yo===E)){if((!E||typeof E!="object")&&(E={}),E=zo(E),fs=Y1.indexOf(E.PARSER_MEDIA_TYPE)===-1?X1:E.PARSER_MEDIA_TYPE,Ne=fs==="application/xhtml+xml"?qh:tf,$=cn(E,"ALLOWED_TAGS")?Y({},E.ALLOWED_TAGS,Ne):ar,ye=cn(E,"ALLOWED_ATTR")?Y({},E.ALLOWED_ATTR,Ne):lr,hf=cn(E,"ALLOWED_NAMESPACES")?Y({},E.ALLOWED_NAMESPACES,qh):G1,mf=cn(E,"ADD_URI_SAFE_ATTR")?Y(zo(vy),E.ADD_URI_SAFE_ATTR,Ne):vy,hy=cn(E,"ADD_DATA_URI_TAGS")?Y(zo(yy),E.ADD_DATA_URI_TAGS,Ne):yy,qo=cn(E,"FORBID_CONTENTS")?Y({},E.FORBID_CONTENTS,Ne):gy,ur=cn(E,"FORBID_TAGS")?Y({},E.FORBID_TAGS,Ne):{},yl=cn(E,"FORBID_ATTR")?Y({},E.FORBID_ATTR,Ne):{},Wo=cn(E,"USE_PROFILES")?E.USE_PROFILES:!1,$o=E.ALLOW_ARIA_ATTR!==!1,Qr=E.ALLOW_DATA_ATTR!==!1,cs=E.ALLOW_UNKNOWN_PROTOCOLS||!1,vl=E.ALLOW_SELF_CLOSE_IN_ATTR!==!1,qt=E.SAFE_FOR_TEMPLATES||!1,Gt=E.WHOLE_DOCUMENT||!1,It=E.RETURN_DOM||!1,wl=E.RETURN_DOM_FRAGMENT||!1,xl=E.RETURN_TRUSTED_TYPE||!1,at=E.FORCE_BODY||!1,py=E.SANITIZE_DOM!==!1,my=E.SANITIZE_NAMED_PROPS||!1,pf=E.KEEP_CONTENT!==!1,ds=E.IN_PLACE||!1,_=E.ALLOWED_URI_REGEXP||VT,Go=E.NAMESPACE||Rn,W=E.CUSTOM_ELEMENT_HANDLING||{},E.CUSTOM_ELEMENT_HANDLING&&Sy(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=E.CUSTOM_ELEMENT_HANDLING.tagNameCheck),E.CUSTOM_ELEMENT_HANDLING&&Sy(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),E.CUSTOM_ELEMENT_HANDLING&&typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),qt&&(Qr=!1),wl&&(It=!0),Wo&&($=Y({},FT),ye=[],Wo.html===!0&&(Y($,DT),Y(ye,HT)),Wo.svg===!0&&(Y($,Gh),Y(ye,Qh),Y(ye,ef)),Wo.svgFilters===!0&&(Y($,Yh),Y(ye,Qh),Y(ye,ef)),Wo.mathMl===!0&&(Y($,Xh),Y(ye,UT),Y(ye,ef))),E.ADD_TAGS&&($===ar&&($=zo($)),Y($,E.ADD_TAGS,Ne)),E.ADD_ATTR&&(ye===lr&&(ye=zo(ye)),Y(ye,E.ADD_ATTR,Ne)),E.ADD_URI_SAFE_ATTR&&Y(mf,E.ADD_URI_SAFE_ATTR,Ne),E.FORBID_CONTENTS&&(qo===gy&&(qo=zo(qo)),Y(qo,E.FORBID_CONTENTS,Ne)),pf&&($["#text"]=!0),Gt&&Y($,["html","head","body"]),$.table&&(Y($,["tbody"]),delete ur.tbody),E.TRUSTED_TYPES_POLICY){if(typeof E.TRUSTED_TYPES_POLICY.createHTML!="function")throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof E.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=E.TRUSTED_TYPES_POLICY,x=S.createHTML("")}else S===void 0&&(S=mM(p,o)),S!==null&&typeof x=="string"&&(x=S.createHTML(""));it&&it(E),Yo=E}},wy=Y({},["mi","mo","mn","ms","mtext"]),xy=Y({},["foreignobject","desc","title","annotation-xml"]),Z1=Y({},["title","style","font","a","script"]),Ey=Y({},[...Gh,...Yh,...oM]),Cy=Y({},[...Xh,...iM]),J1=function(E){let R=h(E);(!R||!R.tagName)&&(R={namespaceURI:Go,tagName:"template"});let D=tf(E.tagName),de=tf(R.tagName);return hf[E.namespaceURI]?E.namespaceURI===Cl?R.namespaceURI===Rn?D==="svg":R.namespaceURI===El?D==="svg"&&(de==="annotation-xml"||wy[de]):!!Ey[D]:E.namespaceURI===El?R.namespaceURI===Rn?D==="math":R.namespaceURI===Cl?D==="math"&&xy[de]:!!Cy[D]:E.namespaceURI===Rn?R.namespaceURI===Cl&&!xy[de]||R.namespaceURI===El&&!wy[de]?!1:!Cy[D]&&(Z1[D]||!Ey[D]):!!(fs==="application/xhtml+xml"&&hf[E.namespaceURI]):!1},Zr=function(E){rl(t.removed,{element:E});try{E.parentNode.removeChild(E)}catch{E.remove()}},vf=function(E,R){try{rl(t.removed,{attribute:R.getAttributeNode(E),from:R})}catch{rl(t.removed,{attribute:null,from:R})}if(R.removeAttribute(E),E==="is"&&!ye[E])if(It||wl)try{Zr(R)}catch{}else try{R.setAttribute(E,"")}catch{}},by=function(E){let R=null,D=null;if(at)E="<remove></remove>"+E;else{let Ve=JN(E,/^[\r\n\t ]+/);D=Ve&&Ve[0]}fs==="application/xhtml+xml"&&Go===Rn&&(E='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+E+"</body></html>");let de=S?S.createHTML(E):E;if(Go===Rn)try{R=new d().parseFromString(de,fs)}catch{}if(!R||!R.documentElement){R=C.createDocument(Go,"template",null);try{R.documentElement.innerHTML=gf?x:de}catch{}}let Be=R.body||R.documentElement;return E&&D&&Be.insertBefore(n.createTextNode(D),Be.childNodes[0]||null),Go===Rn?I.call(R,Gt?"html":"body")[0]:Gt?R.documentElement:Be},Ty=function(E){return T.call(E.ownerDocument||E,E,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,null)},ek=function(E){return E instanceof f&&(typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof c)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"||typeof E.hasChildNodes!="function")},ky=function(E){return typeof a=="function"&&E instanceof a},An=function(E,R,D){N[E]&&Zd(N[E],de=>{de.call(t,R,D,Yo)})},Py=function(E){let R=null;if(An("beforeSanitizeElements",E,null),ek(E))return Zr(E),!0;let D=Ne(E.nodeName);if(An("uponSanitizeElement",E,{tagName:D,allowedTags:$}),E.hasChildNodes()&&!ky(E.firstElementChild)&&Rt(/<[/\w]/g,E.innerHTML)&&Rt(/<[/\w]/g,E.textContent))return Zr(E),!0;if(!$[D]||ur[D]){if(!ur[D]&&Ay(D)&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,D)||W.tagNameCheck instanceof Function&&W.tagNameCheck(D)))return!1;if(pf&&!qo[D]){let de=h(E)||E.parentNode,Be=m(E)||E.childNodes;if(Be&&de){let Ve=Be.length;for(let lt=Ve-1;lt>=0;--lt)de.insertBefore(v(Be[lt],!0),g(E))}}return Zr(E),!0}return E instanceof l&&!J1(E)||(D==="noscript"||D==="noembed"||D==="noframes")&&Rt(/<\/no(script|embed|frames)/i,E.innerHTML)?(Zr(E),!0):(qt&&E.nodeType===3&&(R=E.textContent,Zd([z,K,J],de=>{R=ol(R,de," ")}),E.textContent!==R&&(rl(t.removed,{element:E.cloneNode()}),E.textContent=R)),An("afterSanitizeElements",E,null),!1)},Ry=function(E,R,D){if(py&&(R==="id"||R==="name")&&(D in n||D in Q1))return!1;if(!(Qr&&!yl[R]&&Rt(oe,R))){if(!($o&&Rt(ze,R))){if(!ye[R]||yl[R]){if(!(Ay(E)&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,E)||W.tagNameCheck instanceof Function&&W.tagNameCheck(E))&&(W.attributeNameCheck instanceof RegExp&&Rt(W.attributeNameCheck,R)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(R))||R==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Rt(W.tagNameCheck,D)||W.tagNameCheck instanceof Function&&W.tagNameCheck(D))))return!1}else if(!mf[R]){if(!Rt(_,ol(D,st,""))){if(!((R==="src"||R==="xlink:href"||R==="href")&&E!=="script"&&eM(D,"data:")===0&&hy[E])){if(!(cs&&!Rt(pn,ol(D,st,"")))){if(D)return!1}}}}}}return!0},Ay=function(E){return E!=="annotation-xml"&&E.indexOf("-")>0},Iy=function(E){An("beforeSanitizeAttributes",E,null);let{attributes:R}=E;if(!R)return;let D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ye},de=R.length;for(;de--;){let Be=R[de],{name:Ve,namespaceURI:lt,value:Jr}=Be,ps=Ne(Ve),ut=Ve==="value"?Jr:tM(Jr);if(D.attrName=ps,D.attrValue=ut,D.keepAttr=!0,D.forceKeepAttr=void 0,An("uponSanitizeAttribute",E,D),ut=D.attrValue,D.forceKeepAttr||(vf(Ve,E),!D.keepAttr))continue;if(!vl&&Rt(/\/>/i,ut)){vf(Ve,E);continue}qt&&Zd([z,K,J],Oy=>{ut=ol(ut,Oy," ")});let Ly=Ne(E.nodeName);if(Ry(Ly,ps,ut)){if(my&&(ps==="id"||ps==="name")&&(vf(Ve,E),ut=q1+ut),S&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!lt)switch(p.getAttributeType(Ly,ps)){case"TrustedHTML":{ut=S.createHTML(ut);break}case"TrustedScriptURL":{ut=S.createScriptURL(ut);break}}try{lt?E.setAttributeNS(lt,Ve,ut):E.setAttribute(Ve,ut),_T(t.removed)}catch{}}}An("afterSanitizeAttributes",E,null)},tk=function H(E){let R=null,D=Ty(E);for(An("beforeSanitizeShadowDOM",E,null);R=D.nextNode();)An("uponSanitizeShadowNode",R,null),!Py(R)&&(R.content instanceof i&&H(R.content),Iy(R));An("afterSanitizeShadowDOM",E,null)};return t.sanitize=function(H){let E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},R=null,D=null,de=null,Be=null;if(gf=!H,gf&&(H="<!-->"),typeof H!="string"&&!ky(H))if(typeof H.toString=="function"){if(H=H.toString(),typeof H!="string")throw il("dirty is not a string, aborting")}else throw il("toString is not a function");if(!t.isSupported)return H;if(Sl||yf(E),t.removed=[],typeof H=="string"&&(ds=!1),ds){if(H.nodeName){let Jr=Ne(H.nodeName);if(!$[Jr]||ur[Jr])throw il("root node is forbidden and cannot be sanitized in-place")}}else if(H instanceof a)R=by("<!---->"),D=R.ownerDocument.importNode(H,!0),D.nodeType===1&&D.nodeName==="BODY"||D.nodeName==="HTML"?R=D:R.appendChild(D);else{if(!It&&!qt&&!Gt&&H.indexOf("<")===-1)return S&&xl?S.createHTML(H):H;if(R=by(H),!R)return It?null:xl?x:""}R&&at&&Zr(R.firstChild);let Ve=Ty(ds?H:R);for(;de=Ve.nextNode();)Py(de)||(de.content instanceof i&&tk(de.content),Iy(de));if(ds)return H;if(It){if(wl)for(Be=k.call(R.ownerDocument);R.firstChild;)Be.appendChild(R.firstChild);else Be=R;return(ye.shadowroot||ye.shadowrootmode)&&(Be=L.call(r,Be,!0)),Be}let lt=Gt?R.outerHTML:R.innerHTML;return Gt&&$["!doctype"]&&R.ownerDocument&&R.ownerDocument.doctype&&R.ownerDocument.doctype.name&&Rt(KT,R.ownerDocument.doctype.name)&&(lt="<!DOCTYPE "+R.ownerDocument.doctype.name+`>
24
+ `+lt),qt&&Zd([z,K,J],Jr=>{lt=ol(lt,Jr," ")}),S&&xl?S.createHTML(lt):lt},t.setConfig=function(){let H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};yf(H),Sl=!0},t.clearConfig=function(){Yo=null,Sl=!1},t.isValidAttribute=function(H,E,R){Yo||yf({});let D=Ne(H),de=Ne(E);return Ry(D,de,R)},t.addHook=function(H,E){typeof E=="function"&&(N[H]=N[H]||[],rl(N[H],E))},t.removeHook=function(H){if(N[H])return _T(N[H])},t.removeHooks=function(H){N[H]&&(N[H]=[])},t.removeAllHooks=function(){N={}},t}var WT=$T();var or=w(F());var gM={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function qT(e){return e.replace(RegExp("^"+(e.match(/^(\t| )+/)||"")[0],"gm"),"")}function sl(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function al(e,t){var n,r,o,i,s,a=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,l=[],u="",c=t||{},f=0;function d(y){var v=gM[y[1]||""],g=l[l.length-1]==y;return v?v[1]?(g?l.pop():l.push(y),v[0|g]):v[0]:y}function p(){for(var y="";l.length;)y+=d(l[l.length-1]);return y}for(e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(y,v,g){return c[v.toLowerCase()]=g,""}).replace(/^\n+|\n+$/g,"");o=a.exec(e);)r=e.substring(f,o.index),f=a.lastIndex,n=o[0],r.match(/[^\\](\\\\)*\\$/)||((s=o[3]||o[4])?n='<pre class="code '+(o[4]?"poetry":o[2].toLowerCase())+'"><code'+(o[2]?' class="language-'+o[2].toLowerCase()+'"':"")+">"+qT(sl(s).replace(/^\n+|\n+$/g,""))+"</code></pre>":(s=o[6])?(s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=al(qT(o[5].replace(/^\s*[>*+.-]/gm,""))),s==">"?s="blockquote":(s=s.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),n="<"+s+">"+i+"</"+s+">"):o[8]?n='<img src="'+sl(o[8])+'" alt="'+sl(o[7])+'">':o[10]?(u=u.replace("<a>",'<a href="'+sl(o[11]||c[r.toLowerCase()])+'">'),n=p()+"</a>"):o[9]?n="<a>":o[12]||o[14]?n="<"+(s="h"+(o[14]?o[14].length:o[13]>"="?1:2))+">"+al(o[12]||o[15],c)+"</"+s+">":o[16]?n="<code>"+sl(o[16])+"</code>":(o[17]||o[1])&&(n=d(o[17]||"--"))),u+=r,u+=n;return(u+e.substring(f)+p()).replace(/^\n+|\n+$/g,"")}var GT={root:"i",popover:"Wi",options:"go",copyIcon:"Zi",option:"bo",divider:"_i"};var rr=w(b()),yM=e=>`<svg class=${e} version="1.1" x="0px" y="0px" viewBox="0 0 115.77 122.88" width="10px" height="10px" fill="black" fill-opacity="0.5" stroke-opacity="0.8"><g><path d="M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"/></g></svg>`,vM=({content:e,useLabel:t,copyLabel:n,onCopy:r,onUse:o})=>{let i=A("Markdown",GT),s=(0,or.useRef)(null),[a,l]=(0,or.useState)(null),[u,c]=(0,or.useState)(null),f=(0,or.useMemo)(()=>{let g=al(e);return WT.sanitize(g).replace(/<\/code>/g,`${yM(i.copyIcon)}</code>`)},[e]),d=()=>{l(null),c(null)},p=g=>{var S;let m=g.target,h=!!((S=s.current)!=null&&S.querySelector("code"));a||h&&m.tagName!=="CODE"||!h&&m!==s.current||(m.addEventListener("mouseleave",d,{once:!0}),c(m.textContent),l(m))},y=()=>{u&&r(u),d()},v=()=>{u&&o(u),d()};return(0,rr.jsxs)(or.Fragment,{children:[a&&(0,rr.jsx)(is,{triggerRef:{current:a},parentNode:a,className:i.popover,children:(0,rr.jsxs)("div",{className:i.options,children:[(0,rr.jsx)("button",{type:"button",className:i.option,onClick:y,children:n}),(0,rr.jsx)("div",{className:i.divider}),(0,rr.jsx)("button",{type:"button",className:i.option,onClick:v,children:t})]})}),(0,rr.jsx)("div",{ref:s,className:i.root,dangerouslySetInnerHTML:{__html:f},onMouseOver:p})]})},YT=vM;var ey={};Je(ey,{enUS:()=>SM,nlNL:()=>wM});var SM={useCue:[{type:0,value:"Copy"}],copyCue:[{type:0,value:"Copy"}],removeCue:[{type:0,value:"Close"}]},wM={useCue:[{type:0,value:"Gebruik"}],copyCue:[{type:0,value:"Kopieer"}],removeCue:[{type:0,value:"Sluiten"}]};var Yr=w(b()),xM=({cue:e,onRemove:t,onCopy:n,onUse:r})=>{let o=G(ey),i=l=>{n&&n(l)},s=l=>{r&&r(l)},a=l=>{l.preventDefault(),l.stopPropagation(),t&&t(e.id)};return(0,Yr.jsxs)(ae,{"data-testid":"cue",children:[(0,Yr.jsx)(pe,{children:(0,Yr.jsxs)(pe.Content,{children:[e.title&&(0,Yr.jsx)(pe.Title,{"data-testid":"widget-cue-title",children:e.title}),(0,Yr.jsx)(YT,{content:e.text,useLabel:o("useCue"),copyLabel:o("copyCue"),onCopy:i,onUse:s})]})}),(0,Yr.jsx)(ae.CloseIcon,{title:o("removeCue"),onClick:a})]})},XT=xM;var ll=w(b()),EM=({cues:e,onCopyCue:t,onUseCue:n,onRemoveCue:r})=>(0,ll.jsx)(ll.Fragment,{children:e.map(o=>(0,ll.jsx)(XT,{cue:o,onRemove:r,onCopy:t,onUse:n},`${o.id}_${o.timestamp}`))}),QT=EM;var JT=w(F());var CM=/(https?:\/\/[^\s]+)/,ZT=e=>e.split(" ").find(t=>CM.test(t));var $t=w(b()),bM=({suggestion:e,lines:t,onUse:n})=>{var c;let r=e.text||e.url||e.message,o=ZT(r),i=G(Mo),s=U("showImages"),a=U("fallbackImage"),l=f=>{f.preventDefault(),f.stopPropagation(),n(r)},u=(0,JT.useCallback)(f=>{window.open(o,"_blank"),f.stopPropagation(),f.preventDefault()},[o]);return(0,$t.jsxs)(ae,{onClick:l,"data-testid":"edit-suggestion",children:[(0,$t.jsxs)(pe,{children:[s&&e.image&&(0,$t.jsx)(pe.Image,{src:$d(e,"small",a||void 0),title:e.title}),(0,$t.jsxs)(pe.Content,{children:[e.title&&(0,$t.jsx)(pe.Title,{"data-testid":"widget-suggestion-title",children:e.title}),e.searchKeywords&&((c=e.searchKeywords)==null?void 0:c.length)>0&&(0,$t.jsx)(ae.Labels,{labels:e.searchKeywords}),(0,$t.jsx)(pe.Content,{cropText:t==="single",lineClamp:t==="multiple",children:r})]})]}),(0,$t.jsxs)(ae.Actions,{children:[o&&(0,$t.jsx)(ae.ActionButton,{onClick:u,label:i("visitUrl")}),(0,$t.jsx)(ae.ActionButton,{primary:!0,onClick:l,label:i("useSuggestion")})]})]})},e1=bM;var ul=w(b()),TM=({lines:e,suggestions:t})=>{let n=en(),r=(o,i)=>{n.send(Hr,{text:o,suggestion:{...i,source:i.source,sourceText:i.text}})};return(0,ul.jsx)(ul.Fragment,{children:t.map(o=>(0,ul.jsx)(e1,{suggestion:o,lines:e,onUse:i=>r(i,o)},o.text||o.url||o.message))})},t1=TM;var ty={};Je(ty,{enUS:()=>kM,nlNL:()=>PM});var kM={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"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"My "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Summarize"}],linkKnowledgeSearch:[{type:0,value:"Knowledge Assist"}],linkSearch:[{type:0,value:"Search"}]},PM={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"}],titleCues:[{type:0,value:"Assistant updates"}],actions:[{type:0,value:"Shortcuts"}],linkStudioLogin:[{type:0,value:"Mijn "},{type:1,value:"productName"}],linkSummary:[{type:0,value:"Gesprek samenvatten"}],linkKnowledgeSearch:[{type:0,value:"Knowledge assist"}],linkSearch:[{type:0,value:"Zoeken"}]};var n1={root:"or",loginText:"er",stateText:"ho",sectionList:"ir",shortcutList:"rr",shortcut:"tr",link:"mo"};var X=w(b()),nf=(e,t)=>{let n=O(nt);(0,o1.useEffect)(()=>n?t.every(r=>!!r)?e():()=>{}:()=>{},[...t,n])},AM=({onLogIn:e})=>{let t=G(ty),n=Z(),r=U("isEmbedded"),o=A("Widget",n1),i=U("showAutoflows"),s=U("showCustomMessages"),a=U("showSummaryCommand"),l=U("showKnowledgeSearch"),u=U("showSearch"),c=O(Vr),f=O(bd),d=O(Jb),p=O(TE),y=O(Cd),v=O(oT),g=O(_c),m=O(Bi),h=O(nt),S=O(Mc),x=O(hT),C=O(Td),T=en(),k=O(YC),I=O(fT("/admin/")),L=U("adminUrl"),N=U("productName"),z=en();if(nf(()=>(n(nl(S)),n(uT(S)),()=>{n(cT(S))}),[n,m,s,S]),nf(()=>(n(tr(S)),n(eT(S)),()=>{n(tT(S))}),[n,m,i,S]),nf(()=>{f.forEach(({type:oe})=>{n(oe==="entities"?sn():ln(oe))})},[n,m,g,c]),nf(()=>(n(Fh()),()=>{n(mT())}),[n]),m===!1)return(0,X.jsx)("div",{className:o.stateText,children:(0,X.jsx)("div",{children:(0,X.jsx)("p",{children:t("notSupported")})})},"supported");if(h===!1)return(0,X.jsx)("div",{className:o.loginText,children:(0,X.jsx)("div",{children:(0,X.jsx)(Od,{isEmbedded:r,loginUrl:L,onLogIn:e})})},"login");if(!c||!S||h===null||k||x)return(0,X.jsx)("div",{className:o.stateText,children:(0,X.jsx)("div",{children:(0,X.jsx)("p",{children:t("waiting")})})},"waiting");let K=oe=>{z.send(Hr,{text:oe,suggestion:{source:"cue",sourceText:oe}})},J=u||a||l||I;return(0,X.jsx)("div",{className:(0,r1.default)(o.root),"data-testid":"widget",children:(0,X.jsxs)(_l,{className:o.sectionList,children:[J&&(0,X.jsx)(Ln,{title:t("actions"),type:"shortcuts",children:(0,X.jsxs)("div",{className:o.shortcutList,children:[u&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-search",onClick:()=>T.send("ShowCommandPalette",{isOpen:!0}),children:[(0,X.jsx)(qi,{}),t("linkSearch")]}),a&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-summary",onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"summary"}),children:[(0,X.jsx)(NT,{}),t("linkSummary")]}),l&&(0,X.jsxs)("button",{className:o.shortcut,"data-testid":"shortcut-knowledge-assist",onClick:()=>T.send("ShowCommandPalette",{isOpen:!0,page:"knowledgeAssist"}),children:[(0,X.jsx)(OT,{}),t("linkKnowledgeSearch")]}),I&&(0,X.jsxs)("a",{className:o.shortcut,target:"_blank",href:I,"data-testid":"shortcut-studio-login",rel:"noreferrer",children:[(0,X.jsx)(LT,{}),t("linkStudioLogin",{productName:N})]})]})}),s&&v.length>0&&(0,X.jsx)(Ln,{type:"custom-messages","data-testid":"custom-messages",children:(0,X.jsx)(vt,{withDivider:!0,children:v.map(oe=>(0,X.jsx)(RT,{suggestion:oe},oe.text))})}),i&&d.length>0&&(0,X.jsx)(Ln,{type:"autoflows",title:t("titleAutoflows"),"data-testid":"autoflows",children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(kT,{})})}),f.map(({type:oe,title:ze,amount:pn,lines:st})=>{var _;switch(oe){case"entities":return y&&y.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(IT,{entities:y})},oe);case"cues":return p&&p.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(QT,{cues:p,onRemoveCue:$=>n(PE({id:$})),onCopyCue:$=>Po($),onUseCue:K})})},oe);default:return((_=C[oe])==null?void 0:_.fetchState)==="done"&&C[oe].suggestions.length>0&&(0,X.jsx)(Ln,{type:oe,title:ze,"data-testid":`type-${oe}`,children:(0,X.jsx)(vt,{withDivider:!0,children:(0,X.jsx)(t1,{lines:st,contentType:oe,suggestions:C[oe].suggestions.slice(0,pn)||[]})})},oe)}})]})})},i1=AM;function ss(e){let t=new Range;return t.selectNodeContents(e),t}function s1(e,t,n){try{return Xr(e,t,n),!0}catch{return!1}}function rf(e){return"tagName"in e&&(e.tagName==="DIV"||e.tagName==="P")}function of(e){return"tagName"in e&&e.tagName==="BR"}var cl=/[\u200B-\u200D\uFEFF]/g;function Xr(e,t,n){let r=new Range;if(e.firstChild===null&&t===0&&n===0)return r.selectNodeContents(e),r;let o=0,i=!1;function s(l,u){let c=-1,f=/[\u200B-\u200D\uFEFF]/;if(!f.test(l))return u;for(let d=0;d<=l.length;d++)if(f.test(l[d])||c++,c===u)return d;throw new Error("Offset out of range")}function a(l){switch(l.nodeType){case Node.TEXT_NODE:{let u=l.textContent,c=u.replace(cl,""),f=o+c.length,d=t>=o&&t<=f,p=n>=o&&n<=f;if(d){let y=s(u,t-o);y===0&&!p?r.setStartBefore(l):r.setStart(l,y)}p&&(r.setEnd(l,s(u,n-o)),i=!0),o=f;break}case Node.ELEMENT_NODE:{if(of(l)&&(o===t&&r.setStartBefore(l),o++,o===n)){r.setEndAfter(l),i=!0;return}for(let c=0;c<l.childNodes.length&&(a(l.childNodes[c]),!i);c++);let u=l.lastChild;rf(l)&&u&&!rf(u)&&!of(u)&&o++;break}default:break}}if(a(e),r.startContainer===document)throw new Error("Offsets out of bound");return r}function dl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i,collapsed:s}=t,a,l,u=0;function c(f){let d=f===n,p=f===o;switch(f.nodeType){case Node.TEXT_NODE:{let y=f.textContent;d&&(a=u+y.substring(0,r).replace(cl,"").length),p&&(l=u+y.substring(0,i).replace(cl,"").length),u+=y.replace(cl,"").length;break}case Node.ELEMENT_NODE:{let y=f.nextSibling===null;of(f)&&!y&&u++;for(let v=0;v<f.childNodes.length;v++){let g=d&&v===r,m=p&&v===i;if(g&&(a=u),m&&(l=u),l!==void 0||((!g||!s)&&c(f.childNodes[v]),p&&v===i-1&&(l=u),l!==void 0))break}!p&&rf(f)&&!y&&u++,p&&(l=u);break}default:break}}if(c(e),l===void 0)throw new Error("Could not determine start and end");return{start:a??l,end:l}}function fl(e,t){if(!e.contains(t.startContainer)||!e.contains(t.endContainer))throw new Error("Range not within root element");let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=-1,a="";function l(u){let c=u===n,f=u===o;switch(c&&s++,u.nodeType){case Node.TEXT_NODE:{if(s!==0)return;let d=c?r:0,p=f?i:void 0,y=u.textContent.replace(cl,"");d===0&&p===void 0?a+=y:a+=y.substring(d,p);break}case Node.ELEMENT_NODE:{let d=u.nextSibling===null;s===0&&of(u)&&!d&&(a+=`
25
+ `);for(let p=c?r:0;p<(f?Math.min(i,u.childNodes.length):u.childNodes.length)&&(l(u.childNodes[p]),s!==1);p++);!f&&s===0&&rf(u)&&!d&&(a+=`
26
+ `);break}default:break}f&&s++}return l(e),a}var a1=(s=>(s.CUT="Cut",s.BACKSPACE="Backspace",s.DELETE="Delete",s.ERASEEOF="EraseEof",s.UNDO="Undo",s.CLEAR="Clear",s))(a1||{}),ir=class{constructor(t){this.element=t;this.currentText=this.getText(),this.currentHTML=this.getHTML(),this.listen()}eventListeners={};disposeHandlers=[];currentText="";currentCaret=null;currentSelection={start:0,end:0};currentHTML="";isFocused=!1;isActive=!0;isSettingValue=!1;isSubmitting=!1;isPossibleClearInputAction=!1;isDisposed=!1;addEventListener(t,n){let r=o=>{n(o)};this.element.addEventListener(t,r),this.disposeHandlers.push(()=>{this.element.removeEventListener(t,r)})}removeEventListener(t,n){this.element.removeEventListener(t,n)}triggerChange(){let t=this.getText(),n=this.getHTML(),r=t!==this.currentText;this.isActive&&(t===""&&this.currentText!==""&&!this.isSettingValue&&!this.isPossibleClearInputAction&&(this.isSubmitting=!0,this.emit("submit")),!this.isSettingValue&&r&&!this.isSubmitting&&this.emit("change",{plainText:t}),r&&(this.currentSelection=this.getSelection()),this.currentText=t,this.isSubmitting=!1,(this.currentHTML!==n||n===null&&r)&&(this.emit("updated",{plainText:t}),this.triggerCaretPosition(),this.currentHTML=n))}triggerSelection(){let t=this.getSelection();(t.start!==this.currentSelection.start||t.end!==this.currentSelection.end)&&(this.currentSelection=t,this.emit("selection",t),this.triggerCaretPosition())}triggerCaretPosition(){let t=this.getCaretPosition();_r(t,this.currentCaret)||(this.currentCaret=t,this.emit("caret",t))}handleKeyUp(t){let{key:n,shiftKey:r}=t;(n==="Enter"&&r===!0||n==="Backspace")&&this.triggerChange(),this.triggerSelection()}handleClick(){this.triggerSelection()}handleFocus(){this.isFocused||this.emit("focus"),this.triggerSelection(),this.isFocused=!0}handleBlur(){this.isPossibleClearInputAction=!1,this.isFocused&&this.emit("blur"),this.isFocused=!1}handleKeyDown(t){let{key:n,ctrlKey:r,metaKey:o}=t;this.isPossibleClearInputAction=Object.values(a1).includes(n)||n.toLowerCase()==="z"&&(r||o),this.emit("keydown",t)}handleCut(){this.isPossibleClearInputAction=!0,this.emit("cut",{selectionText:this.getSelectedText()})}handlePaste(t){var r,o;let n=((r=t.clipboardData)==null?void 0:r.getData("text"))||((o=t.clipboardData)==null?void 0:o.getData("text/plain"))||"";this.emit("paste",{pastedText:n,selectionText:this.getSelectedText()})}listen(){this.addEventListener("keydown",n=>this.handleKeyDown(n)),this.addEventListener("keyup",n=>this.handleKeyUp(n)),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",n=>this.handlePaste(n)),this.addEventListener("click",()=>this.triggerSelection()),document.activeElement===this.element&&setTimeout(()=>{this.handleFocus()},0);let t=new MutationObserver(()=>{this.element.isConnected||(this.emit("unmounted"),this.dispose())});t.observe(document.body,{subtree:!0,childList:!0}),this.disposeHandlers.push(()=>{t.disconnect()}),this.currentSelection=this.getSelection()}focus(){this.element.focus()}emit(t,...n){this.isDisposed||this.eventListeners[t]&&this.eventListeners[t].forEach(r=>{r(...n)})}on(t,n){this.isDisposed||(this.eventListeners[t]||(this.eventListeners[t]=[]),this.eventListeners[t].push(n))}activate(){let t=this.isActive===!1;this.isActive=!0,t&&this.triggerChange()}deactivate(){this.isActive=!1}dispose(){this.disposeHandlers.forEach(t=>t()),this.eventListeners={},this.isDisposed=!0}};function l1(e){return e.top!==0||e.left!==0||e.height!==0||e.width!==0}var Bo=class extends ir{observer;lastKnownSelection=null;getRootNode(){return this.element.getRootNode()}getText(){let t=new Range;return t.selectNodeContents(this.element),fl(this.element,t)}getHTML(){return this.element.innerHTML||""}getRange(){var i;let t=this.getRootNode();if(t.activeElement!==this.element)return null;let n="getSelection"in t?t.getSelection():window.getSelection();if(!n)return null;let r="getComposedRanges"in n&&t instanceof ShadowRoot?(i=n.getComposedRanges(t))==null?void 0:i[0]:n.rangeCount>0?n.getRangeAt(0):null;if(!r)return null;let o=this.element.ownerDocument.createRange();return o.setStart(r==null?void 0:r.startContainer,r==null?void 0:r.startOffset),o.setEnd(r==null?void 0:r.endContainer,r==null?void 0:r.endOffset),!o||!this.element.contains(o.startContainer)||!this.element.contains(o.endContainer)?null:o}getCaretPosition(){let t=this.getRange();if(!t||!t.collapsed||!("getBoundingClientRect"in t))return null;let n=t.getBoundingClientRect();return!l1(n)&&(t.insertNode(this.element.ownerDocument.createTextNode("\u2060")),n=t.getBoundingClientRect(),t.deleteContents(),!l1(n))?null:{top:n.top+n.height,left:n.left}}getSelection(){let t=this.getRange();if(t)return dl(this.element,t);let n=this.lastKnownSelection;if(n&&s1(this.element,n.start,n.end))return n;let r=ss(this.element);return r.collapse(!1),dl(this.element,r)}getSelectedText(){let{start:t,end:n}=this.getSelection();return fl(this.element,Xr(this.element,t,n))}applyChanges(t){var o;if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return(o=this.observer)==null||o.takeRecords(),Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen(),this.observer=new MutationObserver(()=>{setTimeout(()=>{this.triggerChange()},0)}),this.observer.observe(this.element,{attributes:!0,characterData:!0,childList:!0,subtree:!0});let t=this.element.isContentEditable,n=new MutationObserver(()=>{this.element.isContentEditable!==t&&(t=this.element.isContentEditable,this.emit(this.element.isContentEditable?"enabled":"disabled"))});n.observe(this.element,{attributes:!0,attributeFilter:["contenteditable"]}),this.disposeHandlers.push(()=>n.disconnect())}dispose(){super.dispose(),this.observer&&this.observer.disconnect()}};var Vo=class extends ir{lastKnownSelection=null;getText(){return this.element.value}getHTML(){return null}getSelection(){let{selectionStart:t,selectionEnd:n}=this.element;return{start:t,end:n}}getSelectedText(){let t=this.getSelection();return t?this.getText().slice(t.start,t.end):""}getCaretPosition(){return null}applyChanges(t){if(!this.isActive)return;this.isSettingValue=!0;let n=this.getText(),r=t(this.element);return Promise.resolve(r).then(()=>{this.currentText=this.getText(),n!==this.currentText&&this.triggerChange(),this.isSettingValue=!1})}listen(){super.listen();let t=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value");Object.defineProperty(this.element,"value",{configurable:!0,get:()=>{var o;return(o=t==null?void 0:t.get)==null?void 0:o.call(this.element)},set:o=>{var i;(i=t==null?void 0:t.set)==null||i.call(this.element,o),this.triggerChange()}});let n=this.element.disabled,r=new MutationObserver(()=>{this.element.disabled!==n&&(n=this.element.disabled,this.emit(n?"disabled":"enabled"))});r.observe(this.element,{attributes:!0,attributeFilter:["disabled"]}),this.disposeHandlers.push(()=>r.disconnect())}};function u1(e,t,n){let r=`deepdesk-iframe-${e}`,o=document.getElementById(r);if(o)return o;let i=document.createElement("iframe"),s=new URL(t);return Object.entries(n).forEach(([a,l])=>{s.searchParams.append(a,l)}),i.style.position="absolute",i.style.left="-999em",i.style.width="0px",i.style.height="0px",i.tabIndex=-1,i.id=r,i.title=`iframe-${e}`,i.src=s.toString(),window.document.body.appendChild(i),i}function IM(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}var ny=class{constructor(t){this.name=t;this.broadcastChannel=new BroadcastChannel(t)}broadcastChannel;disposeHandlers=[];onMessage(t){this.broadcastChannel.addEventListener("message",t),this.disposeHandlers.push(()=>{this.broadcastChannel.removeEventListener("message",t)})}postMessage(t){this.broadcastChannel.postMessage(JSON.stringify(t))}close(){this.disposeHandlers.forEach(t=>t()),this.broadcastChannel.close()}},ry=class{constructor(t,n,r){this.name=t;this.targetOrigin=n;this.options=r;this.iframe=u1(t,`${this.targetOrigin}/sdk/proxy/proxy.html`,{channel:this.name,host:window.location.origin,debug:"1"}),document.body.appendChild(this.iframe)}iframe;disposeHandlers=[];onMessage(t){window.addEventListener("message",t),this.disposeHandlers.push(()=>{window.removeEventListener("message",t)})}postMessage(t){var n;(n=this.iframe.contentWindow)==null||n.postMessage(JSON.stringify(t),this.targetOrigin)}close(){var t;this.disposeHandlers.forEach(n=>n()),(t=this.iframe)==null||t.remove()}},oy=class{constructor(t){this.params=t;this.deepdeskUrl=t.deepdeskUrl,this.eventMap=t.eventMap,this.sessionId="deepdesk-general",this.defaultChannel=this.createChannel("deepdesk-general")}sessionId;deepdeskUrl;channel;defaultChannel;eventMap;get isCrossOrigin(){return this.params.deepdeskUrl!==(this.params.origin||window.location.origin)}setSessionId(t){this.sessionId!==t&&(this.cleanup(),V.info("Set sessionId",t),this.sessionId=t,this.channel=this.createChannel(t))}createChannel(t){let n=this.params.createCustomChannel?this.params.createCustomChannel(t):this.isCrossOrigin?new ry(t,this.deepdeskUrl,{debug:!0}):new ny(t),r=o=>{var s,a;if(o.origin!==this.deepdeskUrl)return;let i=IM(o.data);typeof i!="object"||i.type!=="event"||i.channel!==t||(V.info("Received broadcast event",this.sessionId,o),(a=(s=this.eventMap)[i.name])==null||a.call(s,i.payload))};return n.onMessage(r),n}send(t,n,r){var s,a;V.info("Broadcast event",{sessionId:this.sessionId,name:t,payload:n});let o={type:"event",name:t,payload:n};r!==!1&&((a=(s=this.eventMap)[t])==null||a.call(s,n));let i=this.sessionId==="deepdesk-general"?this.defaultChannel:this.channel;i==null||i.postMessage({...o,channel:this.sessionId})}cleanup(t=!1){var n,r;(n=this.channel)==null||n.close(),delete this.channel,t&&((r=this.defaultChannel)==null||r.close(),delete this.defaultChannel)}},c1=oy;var as=class extends Error{constructor(n,r){super(n);this.body=r}name="CustomError"};var iy=e=>new Promise(t=>{setTimeout(t,e)});var ls=class extends as{name="ClientError"},sy=class extends as{name="ServerError"},fn=class e{constructor(t="",n={}){this.baseUrl=t;this.options=n;n.fetch&&(this.fetch=n.fetch)}latestRequestByUrl={};csrfToken;fetch=window.fetch.bind(window);static refreshingToken=null;patchFetch(t){this.fetch=t(this.fetch)}setCsrfToken(t){this.csrfToken=t}request(t,n={}){return new Promise((r,o)=>{let i={isAborted:!1,reject:o},s=`${this.baseUrl}${t}`,a=this.fetch,{abortLatest:l=!1,attempts:u=1,retryDelay:c=500,refreshTokenOn401:f=!0,retryOnError:d=x=>x instanceof TypeError,retryOnResponse:p=x=>x.status>=500,version:y="v1",...v}=n,g={credentials:"include",...v,headers:{"Content-Type":"application/json",...v.headers}};n.method!==void 0&&n.method!=="GET"&&this.csrfToken&&(g.headers={...g.headers,"X-CSRFToken":this.csrfToken}),typeof y=="string"&&(g.headers={...g.headers,"X-Deepdesk-API-Version":y});let m=u,h=!1;if(!a)throw new Error("fetch is not set");this.latestRequestByUrl[s]&&l&&(this.latestRequestByUrl[s].isAborted=!0,this.latestRequestByUrl[s].reject(new Error("Aborted"))),this.latestRequestByUrl[s]=i;let S=async()=>(m--,a(s,g).then(async x=>p(x)&&!i.isAborted&&m>0?(await iy(c),S()):x.status===401&&f===!0&&h===!1?(h=!0,await this.refreshToken(),S()):x).catch(async x=>{if(d(x)&&!i.isAborted&&m>0)return await iy(c),S();throw x}));S().then(x=>x.json().catch(()=>null).then(C=>{x.status>=500?o(new sy("Server Error",C)):x.status===401?o(new ls("Unauthorized",C)):x.status===403?o(new ls("Forbidden",C)):x.status===404?o(new ls("Not Found",C)):x.status>=400&&o(new ls("Bad Request",C)),delete this.latestRequestByUrl[s],r(C)})).catch(x=>{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 LM;(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||={})})(LM||={});function sf(e){return{...ne(e),tags:e.tags}}var sr=class e{constructor(t,n={}){this.options=n;this.client=new fn(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(),V.info(`Creating conversation for session ${t.sessionId} and agent ${t.agentId}`);let n=await this.client.post("/api/conversations",{...Ie(t),tags:t.tags},{version:"v2"});return sf(n)}async getProfile(t){let n=await this.client.get(`/apis/admin/profiles/${t}/`,{version:null});return ne(n)}async getKnowledgeAssistant(t){let n=await this.client.get(`/apis/admin/knowledge-assist/assistants/${t}/`,{version:null});return ne(n)}async getContentTypes(){let t=await this.client.get("/apis/admin/content-types/",{version:null});return ne(t)}async getPlatformConfig(){let{config:t}=await this.client.get("/platform/config/",{version:null});return ne(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(),V.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 V.info(`Successfully retrieved conversation ${i.id} for session ${t}`),sf(i)}async isConversationSupported(t,n={}){V.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=Ie(n);n.tags&&(r.tags=n.tags);let o=await this.client.put(`/api/conversations/${t}`,r,{version:"v2"});return sf(o)}async postMessages(t,n){return(await this.client.post(`/api/conversations/${t}/messages`,n.map(o=>({...Ie(o),tags:o.tags})),{version:"v2"})).map(o=>sf(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",Ie({...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:Ie({...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),agent_id:n.agentId,id:n.externalConversationId},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 V.warn(`Invalid token '${t}'`),n})}async authenticateWithKey(t,n){await this.preflight(),await this.client.post("/apis/admin/session/api-key/",Ie(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}`,Ie(n),{abortLatest:!0})).map(i=>({...ne(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`,Ie(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 ne(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",Ie(t),{abortLatest:!0});return ne(n)}async search(t){let n=await this.client.post(`/api/profiles/${t.profile}/search`,Ie(t),{version:"v2"});return ne(n)}async knowledgeAssist(t,n,r,o={}){let i=await this.client.post(`/api/knowledge-assist/assistants/${r}/search`,Ie({question:t.question,promptInstruction:t.promptInstruction,chatHistory:n.map(s=>({question:s.question,answer:s.answer.answer})),agentId:o.agentId,conversationId:o.conversationId}),{version:"v2"});return ne(i)}async requestLoginByEmail(t){let n=await this.client.post("/apis/admin/session/passwordless/request/",{email:t},{version:null});return ne(n)}async requestPasswordlessToken(){let t=await this.client.get("/apis/admin/session/passwordless/request/",{version:null});return ne(t.token)}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 ne(n)}async evaluateRule(t,n,r,o={}){let i=new URLSearchParams;o.raiseForFailingConditions&&i.set("raise_for_failing_conditions","true");let s=await this.client.post(`/api/conversations/${n}/rules/${t}/evaluate?${i.toString()}`,r,{version:"v2"});return ne(s.cues)}async translateMessages(t){let n=await this.client.post("/api/translate",Ie(t),{version:"v2"});return ne(n)}handleDeepdeskVersionHeaders(t){t.headers.forEach((n,r)=>{let o=r.toLowerCase(),i=o.match(Cv);if(!n||!i)return;let s=i[1].replace("-","_"),a=this.latestReceivedDeepdeskVersions[s];a&&n&&a!==n&&V.warn(`Overwritten Version header ${o}: ${JSON.stringify(a)} -> ${JSON.stringify(n)}`),this.latestReceivedDeepdeskVersions[s]=n})}};var pl=class{constructor(t,n){this.url=t;this.options={timeout:25e3,...n}}eventListeners={};options;timeoutTimer;eventSource;proxyEvent(t){this.eventSource.addEventListener(Ng(t),n=>{let{data:r}=n;try{let o=JSON.parse(r);this.emit(t,ne(o))}catch{V.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 OM;(t=>{let e;(i=>(i.Started="Started",i.Aborted="Aborted",i.Completed="Completed"))(e=t.AutoflowSessionState||={})})(OM||={});var ml=class{constructor(t,n={}){this.apiUrl=t;this.client=new fn(t,n)}client;streams={};logger=V;async getCustomMessages(t){let n=await this.client.get(`/sessions/${t}/suggestions`);return ne(n.suggestions)}async sendCustomMessage(t,n){let r=await this.client.post(`/sessions/${t}/messages`,Ie(n));return ne(r)}async answerCustomMessage(t,n){await this.client.post(`/sessions/${t}/answers`,Ie(n))}async getAutoflows(t){let n=await this.client.get(`/sessions/${t}/autoflows`);return ne(n.autoflows)}async startAutoflowSession(t){let n=await this.client.post("/autoflow-sessions",Ie(t));return ne(n)}async stopAutoflowSession(t){await this.client.delete(`/autoflow-sessions/${t}`)}openStream(t){return this.streams[t]||(this.streams[t]=new pl(`${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 d1={startTime:null,stopTime:null},f1=q({name:"handlingTime",initialState:d1,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(ue,()=>d1)}}),{handlingTimeStart:p1,handlingTimeStop:af,handlingTimeReset:m1}=f1.actions,g1=f1.reducer;var h1=(e={})=>{let t={onAuthError:zi(!1),...e};return n=>r=>o=>("error"in o&&o.error.message==="Unauthorized"&&n.dispatch(t.onAuthError),r(o))};var lf={list:{keywordMatches:[]},fetchState:"idle",isInitialRequest:null};var Ko=j("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 lf.list;if(!i)throw new Error("No current conversation to fetch pinned messages");return n.getStyleSuggestions({profileCode:i,message:e})}),NM=q({name:"styleSuggestions",initialState:lf,reducers:{},extraReducers:e=>{e.addCase(Ko.pending,t=>{t.isInitialRequest=t.isInitialRequest===null,t.fetchState="loading"}).addCase(Ko.rejected,t=>{t.fetchState="error"}).addCase(Ko.fulfilled,(t,n)=>{t.fetchState="done",_r(t.list,n.payload)||(t.list=n.payload)}).addCase(Co,t=>{t.list=lf.list}).addCase(ue,()=>lf)}}),y1=NM.reducer;var v1=(e={})=>{let t,n=!0,r={getStyleSuggestions:Ko,debounce:500,...e};return o=>i=>s=>{var p;let a=o.getState().input.text,l=i(s),u=o.getState();if(u.auth.isLoggedIn!==!0)return l;let{showStyleSuggestions:c}=u.settings;if(!((p=u.conversation.current)==null?void 0:p.id)||!c)return l;let{text:d}=u.input;return d===a&&!n||(clearTimeout(t),d==="")||(t=setTimeout(()=>{n=!1,o.dispatch(r.getStyleSuggestions({text:d}))},e.debounce)),l}};function MM(e,t){return e.text===t.text&&e.selection.start===t.selection.start&&e.selection.end===t.selection.end}var S1=(e={})=>{let t={getTextSuggestions:ln,getAutocompleteSuggestions:Xa,debounce:200,check:Ji,...e},n;return r=>o=>i=>{var v;let{input:{userCommitted:s}}=r.getState(),a=o(i),l=r.getState();if(l.auth.isLoggedIn!==!0)return a;let{recommendTextSuggestions:u,showTabCompletion:c}=l.settings,f=(v=l.conversation.current)==null?void 0:v.id,d=i.type===kd.toString();if(!f||!u&&!c)return a;let{input:{userCommitted:p}}=l;return MM(p,s)&&!d||(clearTimeout(n),!t.check(l))||(n=setTimeout(()=>{let g=Vi(l);g===""?r.dispatch(t.getTextSuggestions("default")):r.dispatch(t.getAutocompleteSuggestions(g))},d?0:t.debounce)),a}};var w1=Ko.fulfilled.toString();function _M(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 x1=e=>t=>n=>r=>{var u;if(r.type!==w1){n(r);return}let o=t.getState().styleSuggestions.list;n(r);let i=t.getState(),s=i.styleSuggestions.list,a=(u=i.conversation)==null?void 0:u.current;if(o===s)return;let l=_M(o,s);r.type===w1&&l.length>0&&e.sendEvent("style suggested",{conversationId:a==null?void 0:a.id,data:{keywordMatches:l}})};var DM=rc({answer:jC,auth:Vx,autoflows:nT,conversation:Zx,contentTypes:JE,customMessages:dT,passwordlessToken:gT,entities:kC,knowledgeAssistant:FC,handlingTime:g1,info:yE,input:pE,settings:Dx,profile:VC,search:bE,summary:OC,styleSuggestions:y1,ui:gb,rules:RE,textSuggestions:ZC});function E1(e){return Bw({reducer:DM,middleware:t=>[...t({thunk:{extraArgument:{dynamicThunkObject:e.dynamicThunkObject,deepdeskAPI:e.deepdeskAPI,deepdeskBrokerAPI:e.deepdeskBrokerAPI}},serializableCheck:!1}),h1(),S1({debounce:200}),v1({debounce:500}),x1(e.deepdeskAPI),...e.middleware?e.middleware:[]],preloadedState:e.preloadedState})}var FM=e=>{var t;return((t=e==null?void 0:e.type)==null?void 0:t.toLowerCase())??"unknown"},HM=e=>t=>n=>r=>{var a;let o=t.getState(),i=kg("inlineSuggestions")(o);switch(r.type){case zi.toString():{!r.payload&&e.emit("logout",void 0);break}case sn.fulfilled.toString():r.payload.length>0&&e.sendEvent("entities found",{conversationId:o.conversation.current.id,data:{entities:r.payload}});break;case Yn.fulfilled.toString():e.sendEvent("conversation summarized",{conversationId:o.conversation.current.id,data:{summary:r.payload.summary}});break;case Qe.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 Bc.toString():e.handleKeyDown(r.payload);break;case Co.toString():e.logSendMessage(r.payload);break;case Vc.toString():e.handleInputChanged(r.payload);break;case $n.fulfilled.toString():e.broadcast(Fg,r.payload,!1),e.emit("cues",r.payload);break;default:break}let s=n(r);switch(r.type){case Co.toString():e.handleAfterSendMessage(r.payload);break;case Za.toString():e.onUpdateShowTabHint(r.payload);break;case af.toString():e.logHandlingTime();break;case Cn.toString():{let{start:l,end:u}=o.input.selection;e.emit("select-suggestion",{type:FM(r.payload.suggestion),...r.payload,replace:r.payload.replace==="selection"?{start:l,end:u}:{start:0,end:u}},{mayApplyChanges:!0}),i&&(t.dispatch(En([])),t.dispatch(Kn()));break}case zc.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 ka.toString():{let l=t.getState(),{text:u,selection:c}=l.input.userCommitted;e.emit("reset",{text:u,selectionAfter:c},{mayApplyChanges:!0});break}case Kc.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 En.toString():{i&&r.payload.length>0&&t.dispatch(Fr(0));break}default:break}return s},C1=HM;function ay(e){return e.toISOString().replace("T"," ").replace("Z","")}function b1(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:ay(n),timeStop:ay(r)}}function T1(e,t,n){var k,I,L;let{text:r,metrics:{numCharsTyped:o,numCharsPasted:i,numCharsCut:s,numCharsDeleted:a,numPaste:l,agentStartedTypingTimestamp:u,externalTimeTotalSeconds:c,pastes:f,cuts:d,deletions:p,textSuggestions:y,offeredTextSuggestions:v}}=t[e],g=r.length,h=y.reduce((N,{text:z,searchTerm:K})=>N+z.length-(K?K.length:0),0),S=u??Date.now(),x=(Date.now()-S)/1e3+(c||0),C=o/x,T=y.reduce((N,{searchTerm:z})=>N+(z?z.length:0),0);return{conversationId:t.conversation.current.id,source:"agent",text:r,clientVersion:n.version,pastes:f,cuts:d,deletions:p,lenTextTyped:o+T,lenTextTotal:g,lenTextAssisted:h,lenTextPasted:i,lenTextCut:s,lenTextDeleted:a,timeTotalSeconds:x,charsPerSecond:C,numPastes:l,textSuggestionsV2:y,suggestionsCounters:[{source:"gpt",countOffered:v.filter(N=>N.source==="gpt").length}],agentId:(k=t.info.agentInfo)==null?void 0:k.agentId,agentName:(I=t.info.agentInfo)==null?void 0:I.agentName,agentEmail:(L=t.info.agentInfo)==null?void 0:L.agentEmail}}function ly(e,t){var i;let n=e.closest(t);if(n)return n;let r=e.getRootNode().host;if(r instanceof HTMLElement)return ly(r,t);let o=(i=e.ownerDocument.defaultView)==null?void 0:i.frameElement;return o?ly(o,t):null}function k1(e,t){return ly(e,t)}function P1(e){return typeof e=="object"&&e!==null&&"name"in e&&"message"in e}function UM(e){return typeof e=="object"&&e!==null&&"tagName"in e}function uf(e){return UM(e)&&(Wr(e)||Md(e))}var R1,kn=new Map,jM=["bottom","height","left","right","top","width"],zM=(e={},t={})=>jM.some(n=>e[n]!==t[n]);function A1(e){var n,r;if(e.ownerDocument===document)return[];let t=((r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement)??null;return t?[t,...A1(t)]:[]}function I1(e,t){return!e||!t?null:{...e,top:e.top+t.top,left:e.left+t.left}}var cf=!1,L1=()=>{cf=!0;let e=[];if(kn.forEach((t,n)=>{if(!n.isConnected){t.rect=null,e.push(t),kn.delete(n);return}let r=n.getBoundingClientRect();zM(r,t.rect)&&(t.rect=r,e.push(t))}),e.forEach(t=>{let n=t.parentRects?t.parentRects.reduce(I1,t.rect):t.rect;t.callbacks.forEach(r=>r(n))}),kn.size===0){cf=!1;return}R1=window.requestAnimationFrame(L1)};function uy(e,t){let n=A1(e),r=[],o=n.map((i,s)=>uy(i,a=>{r[s]=a;let l=kn.get(e);if(!l)return;let u=r.reduce(I1,l.rect);l.callbacks.forEach(c=>c(u))}));return{observe(i=!0){if(o.forEach(s=>s.observe(!1)),kn.has(e)){let s=kn.get(e);s.callbacks.push(t),s.rect&&t(s.rect)}else kn.set(e,{rect:void 0,callbacks:[t],parentRects:r});i&&!cf&&L1()},unobserve(){o.forEach(s=>s.unobserve());let i=kn.get(e);if(i){let s=i.callbacks.indexOf(t);s>=0&&i.callbacks.splice(s,1),i.callbacks.length||kn.delete(e),kn.size||(cancelAnimationFrame(R1),cf=!1)}}}}var O1,Pn=new Map,N1=()=>{Pn.forEach((e,t)=>{if(!t.isConnected){Pn.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)))}),Pn.size!==0&&(O1=window.requestAnimationFrame(N1))};function M1(e,t){return{observe(){let n=Pn.size===0;Pn.has(e)?Pn.get(e).callbacks.push(t):Pn.set(e,{visible:void 0,callbacks:[t]}),n&&N1()},unobserve(){let n=Pn.get(e);if(n){let r=n.callbacks.indexOf(t);r>=0&&n.callbacks.splice(r,1),n.callbacks.length||Pn.delete(e),Pn.size||cancelAnimationFrame(O1)}}}}var cy=["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 dy(e,t,n){return n.forEach(r=>{t.style[r]=e[r]})}function us(e){return parseFloat(e)}function df(e){return Math.round(e*1e6)}function _1(e){return e/1e6}function fy(e,t,n){if(e.boxSizing==="content-box")return;let{clientWidth:r}=t,o=us(e.width),i=us(e.borderLeftWidth),s=us(e.borderRightWidth),a=us(e.paddingRight),l=_1(df(o)-df(i)-df(s)),u=_1(df(r));if(l-u>2){let c=l-u;n.style.paddingRight=`${a+c}px`}}function gl(e,t={}){var c;let n=t.overlayContainer||document.createElement("div");n.style.display="none",n.style.position=t.position??"fixed",n.style.pointerEvents="none",n.style.borderColor="transparent",Ho(n);let r=window.getComputedStyle(e),o=!0,i=()=>{n.scrollTop=e.scrollTop};dy(r,n,cy),fy(r,e,n),t.mirrorOverflow&&(n.style.overflow="hidden",e.addEventListener("scroll",i));let s=M1(e,()=>{dy(r,n,cy),fy(r,e,n),i(),setTimeout(i,0)}),a,l=!0,u=uy(e,f=>{if(f===null){t.onRemove&&t.onRemove(),n.remove();return}if(!l&&t.onMoveStart&&(Promise.resolve().then(()=>t.onMoveStart()),l=!0),clearTimeout(a),a=setTimeout(()=>{t.onMoveEnd&&t.onMoveEnd(),l=!1},200),f.height===0&&f.width===0){if(o===!0)return;t.onHide&&t.onHide(),n.style.display="none",o=!0;return}if(dy(r,n,cy),fy(r,e,n),i(),n.style.top=`${f.top}px`,n.style.left=`${f.left}px`,t.closestScrollElement&&t.closestScrollElement!==e){let d=t.closestScrollElement.getBoundingClientRect(),p=window.getComputedStyle(t.closestScrollElement),y=us(p.borderTopWidth),v=us(p.borderBottomWidth),g=d.top+y-f.top,m=f.top+f.height+-(d.top+d.height-v);n.style.clipPath=`inset(${g}px 0px ${m}px 0px)`}o&&(n.style.display="block",t.onShow&&t.onShow(),o=!1)});return t.appendTo?t.appendTo.appendChild(n):(c=e.parentElement)==null||c.appendChild(n),u.observe(),s.observe(),[n,()=>{e.removeEventListener("scroll",i),u.unobserve(),s.unobserve()}]}var D1=(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{V.warn("[Deepdesk] SessionStorage is blocked by browser")}}});function BM(e){return e.offsetParent!==null}function F1(e){if(!BM(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 ff(e,t,n=100){let r=F1(e);t({isVisible:r});let o=setInterval(()=>{let i=F1(e);i!==r&&(r=i,t({isVisible:r}))},n);return()=>{clearTimeout(o)}}var Oe=w(b());var H1=D1("showTabHint",!0),hl=class e{static version="11.0.1-beta.0";static count=0;deepdeskApi;inputMediator=null;version;broadcastEvents;eventListeners={};unmountHandlers=[];widgetRoot=null;dynamicThunkObject={};isMounted=!1;instanceId;shouldRender=!0;store;constructor({deepdeskUrl:t,brokerUrl:n,version:r=e.version||"unknown",locale:o="en-US",token:i,fetch:s,productName:a,createCustomChannel:l}){let u=t.replace(/\/api$/,"");this.deepdeskApi=new sr(u,{token:i,fetch:s}),this.version=r,this.instanceId=e.count++;let c={deepdeskAPI:this.deepdeskApi,dynamicThunkObject:this.dynamicThunkObject,middleware:[C1({broadcast:(f,d,p)=>{this.broadcastEvents.send(f,d,p)},emit:(f,d,p)=>this.emit(f,d,p),handleAfterSendMessage:f=>this.handleAfterSendMessage(f),handleInputChanged:f=>this.handleInputChanged(f),handleKeyDown:f=>this.handleKeyDown(f),logHandlingTime:()=>this.logHandlingTime(),logSendMessage:f=>this.logSendMessage(f),onUpdateShowTabHint:f=>H1.update(f),sendEvent:(f,d)=>this.deepdeskApi.sendEvent(f,d)})]};n&&Object.assign(c,{deepdeskBrokerAPI:new ml(n)}),this.store=E1(c),this.broadcastEvents=new c1({debug:!0,deepdeskUrl:u,eventMap:AE(this.store),createCustomChannel:l}),this.store.dispatch(Za(H1.value())),this.store.dispatch(Oc({locale:o,adminUrl:u,productName:a}))}get state(){return this.store.getState()}get settings(){return this.state.settings}get selectedTextSuggestion(){return this.state.input.textSuggestions[this.state.input.selectedSuggestionIndex]??null}hasConversation(){return!!this.state.conversation.current}conversationId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.id}sessionId(){if(!this.hasConversation())throw new Error("No conversation loaded");return this.state.conversation.current.sessionId}shouldAbort(){return this.state.conversation.isSupported===!1?(V.warn("Conversation is not supported"),!0):this.hasConversation()?this.state.profile.data?!1:(V.warn("Profile has not been loaded (yet)"),!0):(V.warn("No conversation loaded (yet)"),!0)}login(){return this.store.dispatch(zi(null)),this.store.dispatch(Bn()),new Promise(t=>{let n=this.store.subscribe(()=>{let r=this.store.getState();nt(r)&&Fx(r)!=="loading"&&(n(),t())});this.unmountHandlers.push(()=>{n()})})}async isLoggedIn(){return(await this.store.dispatch(Bn())).payload}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){V.warn("Failed to attach user:",n)}}async isConversationSupported(t,n){return(await this.store.dispatch(Ig({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(Lg(t))).payload}async postMessages(t){return(await this.store.dispatch(Uc(t))).payload}async updateConversation(t){return(await this.store.dispatch(Hc(t))).payload}resetConversation(){this.store.dispatch(ue()),this.loadProfileConfigPromise=null,this.dynamicThunkObject.conversationQuery=null}async getSummary(){let t=await this.store.dispatch(Yn());if(t.error)throw new Error(t.error.message);return t.payload.summary}configure(t){this.store.dispatch(Oc(t))}setVisitorInfo(t){this.store.dispatch(hE(t))}async setAgentInfo(t){await this.store.dispatch(Pa(t))}async setAgentSettings(t){await this.store.dispatch(Mg(t))}async getAgentSettings(){return(await this.store.dispatch(_g())).payload}async refresh(){if(this.shouldAbort())return Promise.resolve();this.inputMediator&&this.handleInputChanged(this.inputMediator.getText());let t=[];return this.store.dispatch(kd()),t.push(this.refreshWidgetSuggestions()),Promise.all(t).then(()=>{})}notifyInputChanged(t){this.store.dispatch(Vc(t))}notifyKeyDown(t){this.store.dispatch(Bc(t))}notifyPaste(t,n){this.store.dispatch(uE({text:t,selectionText:n}))}notifyCut(t){this.store.dispatch(aE(t))}notifyExternalSuggestion(t){this.store.dispatch(Cn(t)),this.store.dispatch(Kn())}async evaluateRule(t,n={}){let{payload:r,error:o}=await this.store.dispatch($n({label:t,params:n}));if(o)throw o;return r}handleInputChanged(t){let{overlayCollapsed:n,openOverlayWhenTyping:r}=this.state.ui;n&&r&&this.store.dispatch(Kr({collapse:!1})),this.inputMediator&&this.store.dispatch(nE({text:t,html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),!this.shouldAbort()&&(this.isMounted||this.store.dispatch(En([])))}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(lE(Jx(t))),t.key!=="Tab"&&!this.settings.showTextSuggestions)return;let u=()=>{n||!a||i&&(t.shiftKey||(this.store.dispatch(oE()),s||this.stageSelectedSuggestion({inputType:"arrow"}),t.preventDefault()))},c=()=>{n||!a||s&&o<=0||i&&(t.shiftKey||(this.store.dispatch(sE()),t.preventDefault(),!s&&(this.state.input.selectedSuggestionIndex===-1?this.store.dispatch(ka()):this.stageSelectedSuggestion({inputType:"arrow"}))))};switch(t.key){case"Up":case"ArrowUp":s?c():u();return;case"Down":case"ArrowDown":{s?u():c();return}case"Esc":case"Escape":{s&&l&&this.store.dispatch(Fr(-1)),this.state.input.selectedSuggestionIndex!==-1?(this.store.dispatch(Fr(-1)),this.store.dispatch(ka()),t.preventDefault()):n||(this.store.dispatch(Kr({collapse:!0})),this.store.dispatch(pb(!0)),t.preventDefault());return}case"Tab":{let{userCommitted:f}=this.state.input,d=f.text.substring(0,f.selection.end),{tabCompletionSuggestion:p}=this.state.input;this.store.dispatch(Za(!1)),this.state.input.selectedSuggestionIndex>-1?this.stageSelectedSuggestion({inputType:"tab"}):!s&&this.settings.showTabCompletion&&p&&p.text.startsWith(d)&&(this.store.dispatch(Cn({text:p.text,suggestion:p,eventMetrics:{inputType:"tab"},replace:"until-selection-end"})),this.store.dispatch(Kn())),t.preventDefault();break}default:}}handleAfterSendMessage(t){this.emit("send-message",t),this.store.dispatch(cE()),this.store.dispatch(En([]))}handlingTimeStart(){this.state.handlingTime.startTime||(V.info("Start handling time"),this.store.dispatch(p1()))}handlingTimeStop(){this.state.handlingTime.startTime&&(V.info("Stop handling time"),this.store.dispatch(af()))}logSendMessage(t){let n=T1("input",this.state,{version:this.version});t&&(Object.assign(n,{text:t}),Object.assign(n,{lenTextTotal:t.length})),this.deepdeskApi.sendEventV1("Send Message",n),this.emit("send-message-event",n)}logHandlingTime(){let t=b1(this.state,{version:this.version});this.deepdeskApi.sendEventV1("Handling Time",t),this.store.dispatch(m1())}notifySubmit(t={}){this.shouldAbort()||(this.store.dispatch(Kn()),this.store.dispatch(Co(t.text??this.state.input.text)))}stageSelectedSuggestion(t){let n=this.state.input.selectedSuggestionIndex,{textSuggestions:r}=this.state.input;this.store.dispatch(Cn({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){V.warn(`The following error occurred in deepdeskSDK.on('${t}', handler)`),V.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]=gl(n,r);return i.setAttribute("translate","no"),i.dataset.testid=t,o&&i.classList.add(o),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(i),s(),i.remove()}),i}createInlineContainer(t,n){var s;let r=document.createElement("div");r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.height="0px",r.style.width="0px";let o=document.createElement("div");o.style.display="none",o.style.position="absolute",o.style.height="0px",o.style.width="0px",o.style.backgroundColor="red",r.appendChild(o);let i=(s=t.ownerDocument.defaultView)==null?void 0:s.frameElement;if(i){let[a,l]=gl(i,{appendTo:document.body,onMoveStart:()=>{o.style.display="none"}});a.dataset.testid=n,a.style.zIndex="2",a.appendChild(r),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(o),l()})}else document.body.appendChild(r);return o}createContainer(t,n=document.body){let r=window.getComputedStyle(n),o=document.createElement("div");return Ho(o),o.dataset.testid=t,o.style.color=r.color,o.style.fontSize=r.fontSize,o.style.fontFamily=r.fontFamily,o.style.fontVariant=r.fontVariant,o.setAttribute("translate","no"),n.appendChild(o),this.unmountHandlers.push(()=>{(0,Wt.unmountComponentAtNode)(o),o.remove()}),o}storeMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=JSON.stringify({text:this.state.input.text,metrics:this.state.input.metrics});window.sessionStorage.setItem(t,n),V.info(`Stored analytics for ${this.conversationId()}`)}catch{}}restoreMetrics(){try{let t=`dd-metrics-${this.conversationId()}`,n=window.sessionStorage.getItem(t);if(!n)return;let r=JSON.parse(n);r.text.trim()===this.state.input.text.trim()?(V.info(`Restored metrics for ${this.conversationId()}`),this.store.dispatch(fE(r.metrics))):V.warn(`Metrics mismatch, disregarding stored metrics for ${this.conversationId()}`),window.sessionStorage.removeItem(t)}catch{}}mount(t,n={}){if(this.isMounted)throw new Error("[Deepdesk] This instance was already mounted. Make sure to unmount before you remount.");if(!uf(t))throw new Error("[Deepdesk] Only mount on textarea or contentEditable div.");if(!this.shouldRender)return;let{customStyles:r={},showStyleSuggestions:o,showTabCompletion:i,showTextSuggestions:s,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,isEmbedded:f,detectSubmit:d,insertLink:p,inputMediator:y,closestScrollSelector:v,appendOverlayTo:g,inlineSuggestions:m,floatingMenu:h}=n;this.configure({showStyleSuggestions:o,showTabCompletion:i,textSuggestionsCount:a,showMidSentenceSuggestions:l,showSuggestionsBeforePattern:u,showSuggestionsAfterPattern:c,showTextSuggestions:s,insertLink:p,isEmbedded:f,inlineSuggestions:m,floatingMenu:!!h}),n.automaticHandlingTime&&this.setupHandlingTime(t),Ho(t),this.inputMediator=y||(Wr(t)?new Vo(t):new Bo(t)),this.inputMediator.on("change",({plainText:C})=>{this.notifyInputChanged(C)}),this.inputMediator.on("updated",()=>{this.inputMediator&&this.store.dispatch(dE({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()}))}),this.inputMediator.on("keydown",C=>{this.notifyKeyDown(C)}),this.inputMediator.on("paste",({pastedText:C,selectionText:T})=>{this.notifyPaste(C,T)}),this.inputMediator.on("cut",({selectionText:C})=>{this.notifyCut(C)});let S=v&&k1(t,v)||void 0;if(m){let{customStyles:C,appendOverlayTo:T}=n;if(Wr(t))throw new Error("[Deepdesk] Inline suggestion is not supported for textarea yet.");let k=this.createInlineContainer(t,"deepdesk-caret");(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:C,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(xb,{})})}),k),this.inputMediator.on("caret",L=>{this.store.dispatch(En([])),L?(k.style.display="block",k.style.top=`${L.top}px`,k.style.left=`${L.left}px`):k.style.display="none"});let I=this.overlayContainerFactory("floating-menu",S||t,{appendTo:typeof h=="object"&&"appendOverlayTo"in h?h.appendOverlayTo:T},C==null?void 0:C.floatingMenuRootNode);(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:C,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(cb,{onLogIn:()=>this.loginViaPopup().catch(L=>V.warn(L.message))})})}),I)}else{let C=this.overlayContainerFactory("deepdesk-tab-completion",S||t,{appendTo:g,closestScrollElement:S,mirrorOverflow:!0,onRemove:()=>this.unmount()},r==null?void 0:r.rootNode),T=this.overlayContainerFactory("deepdesk-suggestions-overlay",S||t,{appendTo:g},r==null?void 0:r.suggestionsRootNode);(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(Xb,{inputElement:t})})}),C),(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(Ib,{onLogIn:()=>this.loginViaPopup().catch(k=>V.warn(k.message))})})}),T)}(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(ib,{})})}),this.createContainer("deepdesk-overlays"));let x;this.inputMediator.on("selection",C=>{clearTimeout(x),C===null?x=setTimeout(()=>{C!==null&&this.store.dispatch(Og(C))},500):this.store.dispatch(Og(C))}),this.inputMediator.on("disabled",()=>{var C;(C=this.inputMediator)==null||C.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(wh(!1))),this.inputMediator.on("focus",()=>this.store.dispatch(wh(!0))),this.store.dispatch(rE({text:this.inputMediator.getText(),html:this.inputMediator.getHTML(),selection:this.inputMediator.getSelection()})),this.unmountHandlers.push(()=>{this.state.input.text!==""&&(this.store.dispatch(Kn()),this.storeMetrics())}),this.whenConversationLoaded(()=>{var C;this.restoreMetrics(),this.refresh(),this.broadcastEvents.setSessionId((C=this.state.conversation.current)==null?void 0:C.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&&V.warn("A widget was already rendered for this instance. Make sure to unmountWidget before rerendering"),!this.shouldRender)return;let{customStyles:r,showImages:o,isEmbedded:i}=n;this.widgetRoot=t,this.configure({showImages:o,isEmbedded:i}),(0,Wt.render)((0,Oe.jsx)(jo,{store:this.store,customStyles:r,children:(0,Oe.jsx)(To,{broadcastEvents:this.broadcastEvents,children:(0,Oe.jsx)(i1,{onLogIn:()=>this.loginViaPopup().catch(s=>V.warn(s.message))})})}),t),this.whenConversationLoaded(()=>{var s;this.broadcastEvents.setSessionId((s=this.state.conversation.current)==null?void 0:s.sessionId)})}unmountWidget(){this.widgetRoot&&(0,Wt.unmountComponentAtNode)(this.widgetRoot),this.widgetRoot=null}setupHandlingTime(t){let n=ff(t,({isVisible:r})=>{r?this.handlingTimeStart():this.handlingTimeStop()});this.unmountHandlers.push(()=>{this.handlingTimeStop(),n()}),this.whenConversationLoaded(()=>{this.handlingTimeStart()})}handleError(t){P1(t)&&t.message==="Unauthorized"&&this.login()}loadProfileConfigPromise=null;loadProfileConfig(){return this.loadProfileConfigPromise?this.loadProfileConfigPromise:(this.loadProfileConfigPromise=Promise.resolve().then(async()=>{await this.store.dispatch(Ya());let t=Vr(this.state);t&&(await this.store.dispatch(qa()),this.store.dispatch(Oc({showSearch:t.search,showAutoflows:t.autoflows,showCustomMessages:t.customMessages,showImageSearch:t.imageSearch,showEntitiesCommand:t.entitiesCommand,showSummaryCommand:t.summarizer,showKnowledgeSearch:!!t.knowledgeAssistant,recommendTextSuggestions:t.recommendTextSuggestions})))}),this.loadProfileConfigPromise)}async loginViaPopup(t){return new Promise((n,r)=>{let o=new MessageChannel,i=o.port1,s=this.state.settings.adminUrl,a=new URL(t!=null&&t.url?t==null?void 0:t.url:`${s}/platform/sso/`);a.searchParams.append("redirect","/sdk/popup/close.html");let l=!1,u=()=>{c&&!c.closed&&c.close(),window.removeEventListener("message",f),clearInterval(d)};i.onmessage=async p=>{var y,v;if((y=p.data)!=null&&y.jwt)try{await this.deepdeskApi.exchangeTokenForAccessCookie((v=p.data)==null?void 0:v.jwt),await this.isLoggedIn(),this.broadcastEvents.send(Aa),l=!0,o.port1.close(),n()}catch(g){console.error(g),r(g)}finally{l=!0,u()}};let c=window.open(a.toString(),"deepdesk-login","scrollbars=no,left=100,top=150,width=500,height=500");c===null&&r(new Error("Popup blocked by browser"));let f=async p=>{var y;if(p.origin===a.origin)switch((y=p.data)==null?void 0:y.type){case"deepdesk-popup-loaded":{try{let v=JSON.stringify({type:"deepdesk-popup-create-channel"});c==null||c.postMessage(v,a.origin,[o.port2])}catch(v){V.error("Error posting message to popup",v),r(v)}break}case"deepdesk-popup-error":{u(),p.data.message==="Timeout"&&V.warn("Popup timed out. Check if the account's platform url is configured correctly."),r(new Error(p.data.message));break}}};window.addEventListener("message",f);let d=setInterval(()=>{c&&!c.closed||(u(),l||r(new Error("Popup closed by user")))},200);this.unmountHandlers.push(u)})}translateMessages(t){return this.deepdeskApi.translateMessages(t)}async checkForTrialMode(t){try{let{account:n}=await this.deepdeskApi.getPlatformConfig();if(!n.isTrial){this.shouldRender=!0;return}if(V.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;V.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=bd(this.state);try{n.forEach(({type:r})=>{r==="entities"?this.store.dispatch(sn()):this.store.dispatch(ln(r))})}catch(r){this.handleError(r)}}};async function U1(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 j1(e,t,n={}){let r=n.replace?Xr(e,n.replace.start,n.replace.end):ss(e),o,i=()=>{if(n.setRange)return n.setRange(r.cloneRange());r.deleteContents(),o=document.createElement("span"),r.insertNode(o),n.insertBRs!==!1?t.split(`
27
+ `).reverse().forEach((s,a)=>{a>0&&r.insertNode(document.createElement("br")),r.insertNode(document.createTextNode(s))}):r.insertNode(document.createTextNode(t))};return Promise.resolve(i()).then(()=>{try{if(n.selectionAfter!==!1){e.focus();let s=n.selectionAfter?Xr(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 VM(e){let t=document.createElement("template");return t.innerHTML=e.replace(/(\[([^\]]+)])\(([^)]+)\)/g,'<a href="$3" target="_blank" rel="noopener noreferrer">$2</a>'),t.content}function KM(e){let t=document.createDocumentFragment();return e.split(`
28
+ `).forEach((n,r)=>{r>0&&t.appendChild(document.createElement("br"));let o={index:0},i=0;for(;o=n.slice(i).match(/(\[([^\]]+)])\(([^)]+)\)/);){let s=document.createElement("a");s.href=o[3],s.setAttribute("target","_blank"),s.setAttribute("rel","noopener noreferrer"),s.appendChild(document.createTextNode(o[2])),t.appendChild(document.createTextNode(n.slice(i,i+o.index))),t.appendChild(s),i=i+o.index+o[0].length}t.appendChild(document.createTextNode(n.slice(i)))}),t}function z1(e,t){return!e.contains(t)||t===e?null:t.parentNode===e?t:z1(e,t.parentNode)}async function B1(e,t,{isBlock:n,isHTML:r}={}){let o;e.dispatchEvent(new InputEvent("beforeinput",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0}));let i=()=>{let s=e.ownerDocument.defaultView??window,a=s.getSelection();if((!a||a.rangeCount===0)&&(e.focus(),a=s.getSelection()),!a||a.rangeCount===0)return;let l=a.getRangeAt(0);if(!l)return;o=document.createElement("span"),l.insertNode(o);let u=r?VM(t):KM(t);if(n){let c=l.startContainer===e?e.childNodes[l.startOffset]:l.startContainer,f=z1(e,c)??e.firstChild;e.insertBefore(u,(f==null?void 0:f.nextSibling)??null)}else l.insertNode(u),l.collapse(!1)};return Promise.resolve(i()).then(()=>{if(e.dispatchEvent(new InputEvent("input",{inputType:"insertText",data:t,bubbles:!0,cancelable:!0})),e.focus(),!!o)try{o.scrollIntoView&&o.scrollIntoView({block:"nearest",inline:"nearest"})}finally{o&&o.remove()}})}function V1(e){return e.replace(/\[([\w\s\d]+)\]\((https?:\/\/[^\s]+)\)/g,'<a href="$2" target="_blank" rel="noreferrer">$1</a>')}async function K1(e,t,n){await new sr(e).authenticateWithKey(t,n)}async function $1(e){let n=await new fn(e).get("/platform/config/",{version:null});return ne(n)}async function $M(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 W1(e,t){let n=await $M(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 ak(WM);})();
28
29
  /*! Bundled license information:
29
30
 
30
31
  classnames/index.js:
@@ -132,4 +133,7 @@ escape-html/index.js:
132
133
  * Copyright(c) 2015 Tiancheng "Timothy" Gu
133
134
  * MIT Licensed
134
135
  *)
136
+
137
+ dompurify/dist/purify.es.mjs:
138
+ (*! @license DOMPurify 3.0.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.9/LICENSE *)
135
139
  */