deepseek-1.x-dev/js/React/dist/chatFrame.js

js/React/dist/chatFrame.js
import{r as l,g as No,a as Mo,R as Z,j as y,c as z,u as ko,P as Wt,w as Po,B as vr,b as ne,d as et,e as mr,F as Lo,f as Io,C as Bo,h as Fo,i as Wo,k as Ho}from"./chat-bot.js";function tn(){return tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tn.apply(null,arguments)}function hr(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $n(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function Uo(e){var t=Vo(e,"string");return typeof t=="symbol"?t:String(t)}function Vo(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ko(e,t,n){var r=l.useRef(e!==void 0),o=l.useState(t),i=o[0],a=o[1],s=e!==void 0,c=r.current;return r.current=s,!s&&c&&i!==t&&a(t),[s?e:i,l.useCallback(function(d){for(var f=arguments.length,v=new Array(f>1?f-1:0),g=1;g<f;g++)v[g-1]=arguments[g];n&&n.apply(void 0,[d].concat(v)),a(d)},[n])]}function _o(e,t){return Object.keys(t).reduce(function(n,r){var o,i=n,a=i[$n(r)],s=i[r],c=hr(i,[$n(r),r].map(Uo)),d=t[r],f=Ko(s,a,e[d]),v=f[0],g=f[1];return tn({},c,(o={},o[r]=v,o[d]=g,o))},e)}function nn(e,t){return nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},nn(e,t)}function zo(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nn(e,t)}function pt(e){return e&&e.ownerDocument||document}function qo(e){var t=pt(e);return t&&t.defaultView||window}function Go(e,t){return qo(e).getComputedStyle(e,t)}var Xo=/([A-Z])/g;function Yo(e){return e.replace(Xo,"-$1").toLowerCase()}var Jo=/^ms-/;function xt(e){return Yo(e).replace(Jo,"-ms-")}var Zo=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function Qo(e){return!!(e&&Zo.test(e))}function Ue(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(xt(t))||Go(e).getPropertyValue(xt(t));Object.keys(t).forEach(function(o){var i=t[o];!i&&i!==0?e.style.removeProperty(xt(o)):Qo(o)?r+=o+"("+i+") ":n+=xt(o)+": "+i+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}var gr=Mo();const Qe=No(gr),Nn={disabled:!1},yr=Z.createContext(null);var ei=function(t){return t.scrollTop},st="unmounted",Be="exited",$e="entering",We="entered",rn="exiting",je=function(e){zo(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,c;return i.appearStatus=null,r.in?s?(c=Be,i.appearStatus=$e):c=We:r.unmountOnExit||r.mountOnEnter?c=st:c=Be,i.state={status:c},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===st?{status:Be}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==$e&&a!==We&&(i=$e):(a===$e||a===We)&&(i=rn)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===$e){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Qe.findDOMNode(this);a&&ei(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Be&&this.setState({status:st})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,c=this.props.nodeRef?[s]:[Qe.findDOMNode(this),s],d=c[0],f=c[1],v=this.getTimeouts(),g=s?v.appear:v.enter;if(!o&&!a||Nn.disabled){this.safeSetState({status:We},function(){i.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:$e},function(){i.props.onEntering(d,f),i.onTransitionEnd(g,function(){i.safeSetState({status:We},function(){i.props.onEntered(d,f)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Qe.findDOMNode(this);if(!i||Nn.disabled){this.safeSetState({status:Be},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:rn},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Be},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:Qe.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],d=c[0],f=c[1];this.props.addEndListener(d,f)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===st)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=hr(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Z.createElement(yr.Provider,{value:null},typeof a=="function"?a(o,s):Z.cloneElement(Z.Children.only(a),s))},t}(Z.Component);je.contextType=yr;je.propTypes={};function Ye(){}je.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ye,onEntering:Ye,onEntered:Ye,onExit:Ye,onExiting:Ye,onExited:Ye};je.UNMOUNTED=st;je.EXITED=Be;je.ENTERING=$e;je.ENTERED=We;je.EXITING=rn;function ti(e){return e.code==="Escape"||e.keyCode===27}function ni(){const e=l.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}function Mt(e){if(!e||typeof e=="function")return null;const{major:t}=ni();return t>=19?e.props.ref:e.ref}const it=!!(typeof window<"u"&&window.document&&window.document.createElement);var on=!1,an=!1;try{var Ht={get passive(){return on=!0},get once(){return an=on=!0}};it&&(window.addEventListener("test",Ht,Ht),window.removeEventListener("test",Ht,!0))}catch{}function fn(e,t,n,r){if(r&&typeof r!="boolean"&&!an){var o=r.once,i=r.capture,a=n;!an&&o&&(a=n.__once||function s(c){this.removeEventListener(t,s,i),n.call(this,c)},n.__once=a),e.addEventListener(t,a,on?r:i)}e.addEventListener(t,n,r)}function sn(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function Me(e,t,n,r){return fn(e,t,n,r),function(){sn(e,t,n,r)}}function ri(e,t,n,r){if(r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function oi(e){var t=Ue(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function ii(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||ri(e,"transitionend",!0)},t+n),i=Me(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),i()}}function br(e,t,n,r){n==null&&(n=oi(e)||0);var o=ii(e,n,r),i=Me(e,"transitionend",t);return function(){o(),i()}}function Mn(e,t){const n=Ue(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function ai(e,t){const n=Mn(e,"transitionDuration"),r=Mn(e,"transitionDelay"),o=br(e,i=>{i.target===e&&(o(),t(i))},n+r)}function si(e){e.offsetHeight}const kn=e=>!e||typeof e=="function"?e:t=>{e.current=t};function ui(e,t){const n=kn(e),r=kn(t);return o=>{n&&n(o),r&&r(o)}}function kt(e,t){return l.useMemo(()=>ui(e,t),[e,t])}function ci(e){return e&&"setState"in e?Qe.findDOMNode(e):e??null}const li=Z.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:i,addEndListener:a,children:s,childRef:c,...d},f)=>{const v=l.useRef(null),g=kt(v,c),h=w=>{g(ci(w))},b=w=>R=>{w&&v.current&&w(v.current,R)},E=l.useCallback(b(e),[e]),m=l.useCallback(b(t),[t]),O=l.useCallback(b(n),[n]),x=l.useCallback(b(r),[r]),C=l.useCallback(b(o),[o]),u=l.useCallback(b(i),[i]),T=l.useCallback(b(a),[a]);return y.jsx(je,{ref:f,...d,onEnter:E,onEntered:O,onEntering:m,onExit:x,onExited:u,onExiting:C,addEndListener:T,nodeRef:v,children:typeof s=="function"?(w,R)=>s(w,{...R,ref:h}):Z.cloneElement(s,{ref:h})})});function fi(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e},[e]),t}function Rt(e){const t=fi(e);return l.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const di=e=>l.forwardRef((t,n)=>y.jsx("div",{...t,ref:n,className:z(t.className,e)}));function pi(){return l.useState(null)}function vi(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e},[e]),t}function Q(e){const t=vi(e);return l.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function mi(e,t,n,r=!1){const o=Q(n);l.useEffect(()=>{const i=typeof e=="function"?e():e;return i.addEventListener(t,o,r),()=>i.removeEventListener(t,o,r)},[e])}function wr(){const e=l.useRef(!0),t=l.useRef(()=>e.current);return l.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function xr(e){const t=l.useRef(null);return l.useEffect(()=>{t.current=e}),t.current}const hi=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",gi=typeof document<"u",Pn=gi||hi?l.useLayoutEffect:l.useEffect,yi=["onKeyDown"];function bi(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wi(e){return!e||e.trim()==="#"}const dn=l.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=bi(e,yi);const[o]=ko(Object.assign({tagName:"a"},r)),i=Q(a=>{o.onKeyDown(a),n==null||n(a)});return wi(r.href)||r.role==="button"?y.jsx("a",Object.assign({ref:t},r,o,{onKeyDown:i})):y.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});dn.displayName="Anchor";const xi={[$e]:"show",[We]:"show"},pn=l.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},i)=>{const a={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},s=l.useCallback((c,d)=>{si(c),r==null||r(c,d)},[r]);return y.jsx(li,{ref:i,addEndListener:ai,...a,onEnter:s,childRef:Mt(t),children:(c,d)=>l.cloneElement(t,{...d,className:z("fade",e,t.props.className,xi[c],n[c])})})});pn.displayName="Fade";const Ei={"aria-label":Wt.string,onClick:Wt.func,variant:Wt.oneOf(["white"])},vn=l.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>y.jsx("button",{ref:o,type:"button",className:z("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));vn.displayName="CloseButton";vn.propTypes=Ei;function Oi(e){const t=l.useRef(e);return t.current=e,t}function Ci(e){const t=Oi(e);l.useEffect(()=>()=>t.current(),[])}var Ti=Function.prototype.bind.call(Function.prototype.call,[].slice);function Ne(e,t){return Ti(e.querySelectorAll(t))}function Si(e,t,n){const r=l.useRef(e!==void 0),[o,i]=l.useState(t),a=e!==void 0,s=r.current;return r.current=a,!a&&s&&o!==t&&i(t),[a?e:o,l.useCallback((...c)=>{const[d,...f]=c;let v=n==null?void 0:n(d,...f);return i(d),v},[n])]}function Ri(){const[,e]=l.useReducer(t=>t+1,0);return e}const Pt=l.createContext(null);var Ln=Object.prototype.hasOwnProperty;function In(e,t,n){for(n of e.keys())if(ut(n,t))return n}function ut(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ut(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=In(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=In(t,o),!o)||!ut(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Ln.call(e,n)&&++r&&!Ln.call(t,n)||!(n in t)||!ut(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Di(e){const t=wr();return[e[0],l.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var re="top",fe="bottom",de="right",oe="left",mn="auto",vt=[re,fe,de,oe],tt="start",ft="end",ji="clippingParents",Er="viewport",at="popper",Ai="reference",Bn=vt.reduce(function(e,t){return e.concat([t+"-"+tt,t+"-"+ft])},[]),Or=[].concat(vt,[mn]).reduce(function(e,t){return e.concat([t,t+"-"+tt,t+"-"+ft])},[]),$i="beforeRead",Ni="read",Mi="afterRead",ki="beforeMain",Pi="main",Li="afterMain",Ii="beforeWrite",Bi="write",Fi="afterWrite",Wi=[$i,Ni,Mi,ki,Pi,Li,Ii,Bi,Fi];function Te(e){return e.split("-")[0]}function se(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ke(e){var t=se(e).Element;return e instanceof t||e instanceof Element}function le(e){var t=se(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function hn(e){if(typeof ShadowRoot>"u")return!1;var t=se(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Ve=Math.max,Dt=Math.min,nt=Math.round;function un(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Cr(){return!/^((?!chrome|android).)*safari/i.test(un())}function rt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&le(e)&&(o=e.offsetWidth>0&&nt(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&nt(r.height)/e.offsetHeight||1);var a=Ke(e)?se(e):window,s=a.visualViewport,c=!Cr()&&n,d=(r.left+(c&&s?s.offsetLeft:0))/o,f=(r.top+(c&&s?s.offsetTop:0))/i,v=r.width/o,g=r.height/i;return{width:v,height:g,top:f,right:d+v,bottom:f+g,left:d,x:d,y:f}}function gn(e){var t=rt(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Tr(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&hn(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Se(e){return e?(e.nodeName||"").toLowerCase():null}function De(e){return se(e).getComputedStyle(e)}function Hi(e){return["table","td","th"].indexOf(Se(e))>=0}function ke(e){return((Ke(e)?e.ownerDocument:e.document)||window.document).documentElement}function Lt(e){return Se(e)==="html"?e:e.assignedSlot||e.parentNode||(hn(e)?e.host:null)||ke(e)}function Fn(e){return!le(e)||De(e).position==="fixed"?null:e.offsetParent}function Ui(e){var t=/firefox/i.test(un()),n=/Trident/i.test(un());if(n&&le(e)){var r=De(e);if(r.position==="fixed")return null}var o=Lt(e);for(hn(o)&&(o=o.host);le(o)&&["html","body"].indexOf(Se(o))<0;){var i=De(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function mt(e){for(var t=se(e),n=Fn(e);n&&Hi(n)&&De(n).position==="static";)n=Fn(n);return n&&(Se(n)==="html"||Se(n)==="body"&&De(n).position==="static")?t:n||Ui(e)||t}function yn(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ct(e,t,n){return Ve(e,Dt(t,n))}function Vi(e,t,n){var r=ct(e,t,n);return r>n?n:r}function Sr(){return{top:0,right:0,bottom:0,left:0}}function Rr(e){return Object.assign({},Sr(),e)}function Dr(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Ki=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Rr(typeof t!="number"?t:Dr(t,vt))};function _i(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Te(n.placement),c=yn(s),d=[oe,de].indexOf(s)>=0,f=d?"height":"width";if(!(!i||!a)){var v=Ki(o.padding,n),g=gn(i),h=c==="y"?re:oe,b=c==="y"?fe:de,E=n.rects.reference[f]+n.rects.reference[c]-a[c]-n.rects.popper[f],m=a[c]-n.rects.reference[c],O=mt(i),x=O?c==="y"?O.clientHeight||0:O.clientWidth||0:0,C=E/2-m/2,u=v[h],T=x-g[f]-v[b],w=x/2-g[f]/2+C,R=ct(u,w,T),$=c;n.modifiersData[r]=(t={},t[$]=R,t.centerOffset=R-w,t)}}function zi(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Tr(t.elements.popper,o)&&(t.elements.arrow=o))}const jr={name:"arrow",enabled:!0,phase:"main",fn:_i,effect:zi,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ot(e){return e.split("-")[1]}var qi={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Gi(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:nt(n*o)/o||0,y:nt(r*o)/o||0}}function Wn(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,v=e.isFixed,g=a.x,h=g===void 0?0:g,b=a.y,E=b===void 0?0:b,m=typeof f=="function"?f({x:h,y:E}):{x:h,y:E};h=m.x,E=m.y;var O=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),C=oe,u=re,T=window;if(d){var w=mt(n),R="clientHeight",$="clientWidth";if(w===se(n)&&(w=ke(n),De(w).position!=="static"&&s==="absolute"&&(R="scrollHeight",$="scrollWidth")),w=w,o===re||(o===oe||o===de)&&i===ft){u=fe;var A=v&&w===T&&T.visualViewport?T.visualViewport.height:w[R];E-=A-r.height,E*=c?1:-1}if(o===oe||(o===re||o===fe)&&i===ft){C=de;var P=v&&w===T&&T.visualViewport?T.visualViewport.width:w[$];h-=P-r.width,h*=c?1:-1}}var D=Object.assign({position:s},d&&qi),j=f===!0?Gi({x:h,y:E},se(n)):{x:h,y:E};if(h=j.x,E=j.y,c){var M;return Object.assign({},D,(M={},M[u]=x?"0":"",M[C]=O?"0":"",M.transform=(T.devicePixelRatio||1)<=1?"translate("+h+"px, "+E+"px)":"translate3d("+h+"px, "+E+"px, 0)",M))}return Object.assign({},D,(t={},t[u]=x?E+"px":"",t[C]=O?h+"px":"",t.transform="",t))}function Xi(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,c=s===void 0?!0:s,d={placement:Te(t.placement),variation:ot(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Wn(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Wn(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Ar={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Xi,data:{}};var Et={passive:!0};function Yi(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,c=se(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&d.forEach(function(f){f.addEventListener("scroll",n.update,Et)}),s&&c.addEventListener("resize",n.update,Et),function(){i&&d.forEach(function(f){f.removeEventListener("scroll",n.update,Et)}),s&&c.removeEventListener("resize",n.update,Et)}}const $r={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Yi,data:{}};var Ji={left:"right",right:"left",bottom:"top",top:"bottom"};function St(e){return e.replace(/left|right|bottom|top/g,function(t){return Ji[t]})}var Zi={start:"end",end:"start"};function Hn(e){return e.replace(/start|end/g,function(t){return Zi[t]})}function bn(e){var t=se(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function wn(e){return rt(ke(e)).left+bn(e).scrollLeft}function Qi(e,t){var n=se(e),r=ke(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;var d=Cr();(d||!d&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s+wn(e),y:c}}function ea(e){var t,n=ke(e),r=bn(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Ve(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Ve(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+wn(e),c=-r.scrollTop;return De(o||n).direction==="rtl"&&(s+=Ve(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:c}}function xn(e){var t=De(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function Nr(e){return["html","body","#document"].indexOf(Se(e))>=0?e.ownerDocument.body:le(e)&&xn(e)?e:Nr(Lt(e))}function lt(e,t){var n;t===void 0&&(t=[]);var r=Nr(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=se(r),a=o?[i].concat(i.visualViewport||[],xn(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(lt(Lt(a)))}function cn(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function ta(e,t){var n=rt(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Un(e,t,n){return t===Er?cn(Qi(e,n)):Ke(t)?ta(t,n):cn(ea(ke(e)))}function na(e){var t=lt(Lt(e)),n=["absolute","fixed"].indexOf(De(e).position)>=0,r=n&&le(e)?mt(e):e;return Ke(r)?t.filter(function(o){return Ke(o)&&Tr(o,r)&&Se(o)!=="body"}):[]}function ra(e,t,n,r){var o=t==="clippingParents"?na(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(c,d){var f=Un(e,d,r);return c.top=Ve(f.top,c.top),c.right=Dt(f.right,c.right),c.bottom=Dt(f.bottom,c.bottom),c.left=Ve(f.left,c.left),c},Un(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Mr(e){var t=e.reference,n=e.element,r=e.placement,o=r?Te(r):null,i=r?ot(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(o){case re:c={x:a,y:t.y-n.height};break;case fe:c={x:a,y:t.y+t.height};break;case de:c={x:t.x+t.width,y:s};break;case oe:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var d=o?yn(o):null;if(d!=null){var f=d==="y"?"height":"width";switch(i){case tt:c[d]=c[d]-(t[f]/2-n[f]/2);break;case ft:c[d]=c[d]+(t[f]/2-n[f]/2);break}}return c}function dt(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,c=s===void 0?ji:s,d=n.rootBoundary,f=d===void 0?Er:d,v=n.elementContext,g=v===void 0?at:v,h=n.altBoundary,b=h===void 0?!1:h,E=n.padding,m=E===void 0?0:E,O=Rr(typeof m!="number"?m:Dr(m,vt)),x=g===at?Ai:at,C=e.rects.popper,u=e.elements[b?x:g],T=ra(Ke(u)?u:u.contextElement||ke(e.elements.popper),c,f,a),w=rt(e.elements.reference),R=Mr({reference:w,element:C,placement:o}),$=cn(Object.assign({},C,R)),A=g===at?$:w,P={top:T.top-A.top+O.top,bottom:A.bottom-T.bottom+O.bottom,left:T.left-A.left+O.left,right:A.right-T.right+O.right},D=e.modifiersData.offset;if(g===at&&D){var j=D[o];Object.keys(P).forEach(function(M){var I=[de,fe].indexOf(M)>=0?1:-1,N=[re,fe].indexOf(M)>=0?"y":"x";P[M]+=j[N]*I})}return P}function oa(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,d=c===void 0?Or:c,f=ot(r),v=f?s?Bn:Bn.filter(function(b){return ot(b)===f}):vt,g=v.filter(function(b){return d.indexOf(b)>=0});g.length===0&&(g=v);var h=g.reduce(function(b,E){return b[E]=dt(e,{placement:E,boundary:o,rootBoundary:i,padding:a})[Te(E)],b},{});return Object.keys(h).sort(function(b,E){return h[b]-h[E]})}function ia(e){if(Te(e)===mn)return[];var t=St(e);return[Hn(e),t,Hn(t)]}function aa(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,c=n.fallbackPlacements,d=n.padding,f=n.boundary,v=n.rootBoundary,g=n.altBoundary,h=n.flipVariations,b=h===void 0?!0:h,E=n.allowedAutoPlacements,m=t.options.placement,O=Te(m),x=O===m,C=c||(x||!b?[St(m)]:ia(m)),u=[m].concat(C).reduce(function(X,J){return X.concat(Te(J)===mn?oa(t,{placement:J,boundary:f,rootBoundary:v,padding:d,flipVariations:b,allowedAutoPlacements:E}):J)},[]),T=t.rects.reference,w=t.rects.popper,R=new Map,$=!0,A=u[0],P=0;P<u.length;P++){var D=u[P],j=Te(D),M=ot(D)===tt,I=[re,fe].indexOf(j)>=0,N=I?"width":"height",W=dt(t,{placement:D,boundary:f,rootBoundary:v,altBoundary:g,padding:d}),U=I?M?de:oe:M?fe:re;T[N]>w[N]&&(U=St(U));var L=St(U),_=[];if(i&&_.push(W[j]<=0),s&&_.push(W[U]<=0,W[L]<=0),_.every(function(X){return X})){A=D,$=!1;break}R.set(D,_)}if($)for(var B=b?3:1,q=function(J){var ie=u.find(function(pe){var ae=R.get(pe);if(ae)return ae.slice(0,J).every(function(ue){return ue})});if(ie)return A=ie,"break"},Y=B;Y>0;Y--){var G=q(Y);if(G==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const kr={name:"flip",enabled:!0,phase:"main",fn:aa,requiresIfExists:["offset"],data:{_skip:!1}};function Vn(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Kn(e){return[re,de,fe,oe].some(function(t){return e[t]>=0})}function sa(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=dt(t,{elementContext:"reference"}),s=dt(t,{altBoundary:!0}),c=Vn(a,r),d=Vn(s,o,i),f=Kn(c),v=Kn(d);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:v},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":v})}const Pr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:sa};function ua(e,t,n){var r=Te(e),o=[oe,re].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[oe,de].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function ca(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=Or.reduce(function(f,v){return f[v]=ua(v,t.rects,i),f},{}),s=a[t.placement],c=s.x,d=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[r]=a}const Lr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ca};function la(e){var t=e.state,n=e.name;t.modifiersData[n]=Mr({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const Ir={name:"popperOffsets",enabled:!0,phase:"read",fn:la,data:{}};function fa(e){return e==="x"?"y":"x"}function da(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,c=n.boundary,d=n.rootBoundary,f=n.altBoundary,v=n.padding,g=n.tether,h=g===void 0?!0:g,b=n.tetherOffset,E=b===void 0?0:b,m=dt(t,{boundary:c,rootBoundary:d,padding:v,altBoundary:f}),O=Te(t.placement),x=ot(t.placement),C=!x,u=yn(O),T=fa(u),w=t.modifiersData.popperOffsets,R=t.rects.reference,$=t.rects.popper,A=typeof E=="function"?E(Object.assign({},t.rects,{placement:t.placement})):E,P=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(w){if(i){var M,I=u==="y"?re:oe,N=u==="y"?fe:de,W=u==="y"?"height":"width",U=w[u],L=U+m[I],_=U-m[N],B=h?-$[W]/2:0,q=x===tt?R[W]:$[W],Y=x===tt?-$[W]:-R[W],G=t.elements.arrow,X=h&&G?gn(G):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Sr(),ie=J[I],pe=J[N],ae=ct(0,R[W],X[W]),ue=C?R[W]/2-B-ae-ie-P.mainAxis:q-ae-ie-P.mainAxis,ee=C?-R[W]/2+B+ae+pe+P.mainAxis:Y+ae+pe+P.mainAxis,ve=t.elements.arrow&&mt(t.elements.arrow),me=ve?u==="y"?ve.clientTop||0:ve.clientLeft||0:0,he=(M=D==null?void 0:D[u])!=null?M:0,ge=U+ue-he-me,V=U+ee-he,Ee=ct(h?Dt(L,ge):L,U,h?Ve(_,V):_);w[u]=Ee,j[u]=Ee-U}if(s){var ye,_e=u==="x"?re:oe,ze=u==="x"?fe:de,be=w[T],Oe=T==="y"?"height":"width",Pe=be+m[_e],Re=be-m[ze],Ae=[re,oe].indexOf(O)!==-1,qe=(ye=D==null?void 0:D[T])!=null?ye:0,F=Ae?Pe:be-R[Oe]-$[Oe]-qe+P.altAxis,we=Ae?be+R[Oe]+$[Oe]-qe-P.altAxis:Re,Le=h&&Ae?Vi(F,be,we):ct(h?F:Pe,be,h?we:Re);w[T]=Le,j[T]=Le-be}t.modifiersData[r]=j}}const Br={name:"preventOverflow",enabled:!0,phase:"main",fn:da,requiresIfExists:["offset"]};function pa(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function va(e){return e===se(e)||!le(e)?bn(e):pa(e)}function ma(e){var t=e.getBoundingClientRect(),n=nt(t.width)/e.offsetWidth||1,r=nt(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ha(e,t,n){n===void 0&&(n=!1);var r=le(t),o=le(t)&&ma(t),i=ke(t),a=rt(e,o,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Se(t)!=="body"||xn(i))&&(s=va(t)),le(t)?(c=rt(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):i&&(c.x=wn(i))),{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function ga(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var c=t.get(s);c&&o(c)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function ya(e){var t=ga(e);return Wi.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function ba(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function wa(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var _n={placement:"bottom",modifiers:[],strategy:"absolute"};function zn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Fr(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?_n:o;return function(s,c,d){d===void 0&&(d=i);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},_n,i),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},v=[],g=!1,h={state:f,setOptions:function(O){var x=typeof O=="function"?O(f.options):O;E(),f.options=Object.assign({},i,f.options,x),f.scrollParents={reference:Ke(s)?lt(s):s.contextElement?lt(s.contextElement):[],popper:lt(c)};var C=ya(wa([].concat(r,f.options.modifiers)));return f.orderedModifiers=C.filter(function(u){return u.enabled}),b(),h.update()},forceUpdate:function(){if(!g){var O=f.elements,x=O.reference,C=O.popper;if(zn(x,C)){f.rects={reference:ha(x,mt(C),f.options.strategy==="fixed"),popper:gn(C)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(P){return f.modifiersData[P.name]=Object.assign({},P.data)});for(var u=0;u<f.orderedModifiers.length;u++){if(f.reset===!0){f.reset=!1,u=-1;continue}var T=f.orderedModifiers[u],w=T.fn,R=T.options,$=R===void 0?{}:R,A=T.name;typeof w=="function"&&(f=w({state:f,options:$,name:A,instance:h})||f)}}}},update:ba(function(){return new Promise(function(m){h.forceUpdate(),m(f)})}),destroy:function(){E(),g=!0}};if(!zn(s,c))return h;h.setOptions(d).then(function(m){!g&&d.onFirstUpdate&&d.onFirstUpdate(m)});function b(){f.orderedModifiers.forEach(function(m){var O=m.name,x=m.options,C=x===void 0?{}:x,u=m.effect;if(typeof u=="function"){var T=u({state:f,name:O,instance:h,options:C}),w=function(){};v.push(T||w)}})}function E(){v.forEach(function(m){return m()}),v=[]}return h}}const xa=Fr({defaultModifiers:[Pr,Ir,Ar,$r,Lr,kr,Br,jr]}),Ea=["enabled","placement","strategy","modifiers"];function Oa(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const Ca={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Ta={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&o==="tooltip"&&"setAttribute"in r){const i=r.getAttribute("aria-describedby");if(i&&i.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",i?`${i},${n.id}`:n.id)}}},Sa=[];function Ra(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:i="absolute",modifiers:a=Sa}=n,s=Oa(n,Ea);const c=l.useRef(a),d=l.useRef(),f=l.useCallback(()=>{var m;(m=d.current)==null||m.update()},[]),v=l.useCallback(()=>{var m;(m=d.current)==null||m.forceUpdate()},[]),[g,h]=Di(l.useState({placement:o,update:f,forceUpdate:v,attributes:{},styles:{popper:{},arrow:{}}})),b=l.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:m})=>{const O={},x={};Object.keys(m.elements).forEach(C=>{O[C]=m.styles[C],x[C]=m.attributes[C]}),h({state:m,styles:O,attributes:x,update:f,forceUpdate:v,placement:m.placement})}}),[f,v,h]),E=l.useMemo(()=>(ut(c.current,a)||(c.current=a),c.current),[a]);return l.useEffect(()=>{!d.current||!r||d.current.setOptions({placement:o,strategy:i,modifiers:[...E,b,Ca]})},[i,o,b,r,E]),l.useEffect(()=>{if(!(!r||e==null||t==null))return d.current=xa(e,t,Object.assign({},s,{placement:o,strategy:i,modifiers:[...E,Ta,b]})),()=>{d.current!=null&&(d.current.destroy(),d.current=void 0,h(m=>Object.assign({},m,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),g}function jt(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}const qn=()=>{};function Da(e){return e.button===0}function ja(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Ut=e=>e&&("current"in e?e.current:e),Gn={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Aa(e,t=qn,{disabled:n,clickTrigger:r="click"}={}){const o=l.useRef(!1),i=l.useRef(!1),a=l.useCallback(d=>{const f=Ut(e);Po(!!f,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),o.current=!f||ja(d)||!Da(d)||!!jt(f,d.target)||i.current,i.current=!1},[e]),s=Q(d=>{const f=Ut(e);f&&jt(f,d.target)?i.current=!0:i.current=!1}),c=Q(d=>{o.current||t(d)});l.useEffect(()=>{var d,f;if(n||e==null)return;const v=pt(Ut(e)),g=v.defaultView||window;let h=(d=g.event)!=null?d:(f=g.parent)==null?void 0:f.event,b=null;Gn[r]&&(b=Me(v,Gn[r],s,!0));const E=Me(v,r,a,!0),m=Me(v,r,x=>{if(x===h){h=void 0;return}c(x)});let O=[];return"ontouchstart"in v.documentElement&&(O=[].slice.call(v.body.children).map(x=>Me(x,"mousemove",qn))),()=>{b==null||b(),E(),m(),O.forEach(x=>x())}},[e,n,r,a,s,c])}function $a(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function Na(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Ma({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:i,containerPadding:a,arrowElement:s,popperConfig:c={}}){var d,f,v,g,h;const b=$a(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:i?"fixed":c.strategy,modifiers:Na(Object.assign({},b,{eventListeners:{enabled:t,options:(d=b.eventListeners)==null?void 0:d.options},preventOverflow:Object.assign({},b.preventOverflow,{options:a?Object.assign({padding:a},(f=b.preventOverflow)==null?void 0:f.options):(v=b.preventOverflow)==null?void 0:v.options}),offset:{options:Object.assign({offset:o},(g=b.offset)==null?void 0:g.options)},arrow:Object.assign({},b.arrow,{enabled:!!s,options:Object.assign({},(h=b.arrow)==null?void 0:h.options,{element:s})}),flip:Object.assign({enabled:!!r},b.flip)}))})}const ka=["children","usePopper"];function Pa(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const La=()=>{};function Wr(e={}){const t=l.useContext(Pt),[n,r]=pi(),o=l.useRef(!1),{flip:i,offset:a,rootCloseEvent:s,fixed:c=!1,placement:d,popperConfig:f={},enableEventListeners:v=!0,usePopper:g=!!t}=e,h=(t==null?void 0:t.show)==null?!!e.show:t.show;h&&!o.current&&(o.current=!0);const b=w=>{t==null||t.toggle(!1,w)},{placement:E,setMenu:m,menuElement:O,toggleElement:x}=t||{},C=Ra(x,O,Ma({placement:d||E||"bottom-start",enabled:g,enableEvents:v??h,offset:a,flip:i,fixed:c,arrowElement:n,popperConfig:f})),u=Object.assign({ref:m||La,"aria-labelledby":x==null?void 0:x.id},C.attributes.popper,{style:C.styles.popper}),T={show:h,placement:E,hasShown:o.current,toggle:t==null?void 0:t.toggle,popper:g?C:null,arrowProps:g?Object.assign({ref:r},C.attributes.arrow,{style:C.styles.arrow}):{}};return Aa(O,b,{clickTrigger:s,disabled:!h}),[u,T]}function Hr(e){let{children:t,usePopper:n=!0}=e,r=Pa(e,ka);const[o,i]=Wr(Object.assign({},r,{usePopper:n}));return y.jsx(y.Fragment,{children:t(o,i)})}Hr.displayName="DropdownMenu";const Ur={prefix:String(Math.round(Math.random()*1e10)),current:0},Vr=Z.createContext(Ur),Ia=Z.createContext(!1);let Vt=new WeakMap;function Ba(e=!1){let t=l.useContext(Vr),n=l.useRef(null);if(n.current===null&&!e){var r,o;let i=(o=Z.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(i){let a=Vt.get(i);a==null?Vt.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==a.state&&(t.current=a.id,Vt.delete(i))}n.current=++t.current}return n.current}function Fa(e){let t=l.useContext(Vr),n=Ba(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Wa(e){let t=Z.useId(),[n]=l.useState(_a()),r=n?"react-aria":`react-aria${Ur.prefix}`;return e||`${r}-${t}`}const Ha=typeof Z.useId=="function"?Wa:Fa;function Ua(){return!1}function Va(){return!0}function Ka(e){return()=>{}}function _a(){return typeof Z.useSyncExternalStore=="function"?Z.useSyncExternalStore(Ka,Ua,Va):l.useContext(Ia)}const Kr=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Xn=()=>{};function _r(){const e=Ha(),{show:t=!1,toggle:n=Xn,setToggle:r,menuElement:o}=l.useContext(Pt)||{},i=l.useCallback(s=>{n(!t,s)},[t,n]),a={id:e,ref:r||Xn,onClick:i,"aria-expanded":!!t};return o&&Kr(o)&&(a["aria-haspopup"]=!0),[a,{show:t,toggle:n}]}function zr({children:e}){const[t,n]=_r();return y.jsx(y.Fragment,{children:e(t,n)})}zr.displayName="DropdownToggle";const At=l.createContext(null),$t=(e,t=null)=>e!=null?String(e):t||null,En=l.createContext(null);En.displayName="NavContext";const za="data-rr-ui-";function ht(e){return`${za}${e}`}const qa=["eventKey","disabled","onClick","active","as"];function Ga(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qr({key:e,href:t,active:n,disabled:r,onClick:o}){const i=l.useContext(At),a=l.useContext(En),{activeKey:s}=a||{},c=$t(e,t),d=n==null&&e!=null?$t(s)===c:n;return[{onClick:Q(v=>{r||(o==null||o(v),i&&!v.isPropagationStopped()&&i(c,v))}),"aria-disabled":r||void 0,"aria-selected":d,[ht("dropdown-item")]:""},{isActive:d}]}const Gr=l.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:i,as:a=vr}=e,s=Ga(e,qa);const[c]=qr({key:n,href:s.href,disabled:r,onClick:o,active:i});return y.jsx(a,Object.assign({},s,{ref:t},c))});Gr.displayName="DropdownItem";const Xr=l.createContext(it?window:void 0);Xr.Provider;function It(){return l.useContext(Xr)}function Yn(){const e=Ri(),t=l.useRef(null),n=l.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function gt({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${ht("dropdown-item")}]`,focusFirstItemOnShow:i,placement:a="bottom-start",children:s}){const c=It(),[d,f]=Si(t,e,r),[v,g]=Yn(),h=v.current,[b,E]=Yn(),m=b.current,O=xr(d),x=l.useRef(null),C=l.useRef(!1),u=l.useContext(At),T=l.useCallback((D,j,M=j==null?void 0:j.type)=>{f(D,{originalEvent:j,source:M})},[f]),w=Q((D,j)=>{n==null||n(D,j),T(!1,j,"select"),j.isPropagationStopped()||u==null||u(D,j)}),R=l.useMemo(()=>({toggle:T,placement:a,show:d,menuElement:h,toggleElement:m,setMenu:g,setToggle:E}),[T,a,d,h,m,g,E]);h&&O&&!d&&(C.current=h.contains(h.ownerDocument.activeElement));const $=Q(()=>{m&&m.focus&&m.focus()}),A=Q(()=>{const D=x.current;let j=i;if(j==null&&(j=v.current&&Kr(v.current)?"keyboard":!1),j===!1||j==="keyboard"&&!/^key.+$/.test(D))return;const M=Ne(v.current,o)[0];M&&M.focus&&M.focus()});l.useEffect(()=>{d?A():C.current&&(C.current=!1,$())},[d,C,$,A]),l.useEffect(()=>{x.current=null});const P=(D,j)=>{if(!v.current)return null;const M=Ne(v.current,o);let I=M.indexOf(D)+j;return I=Math.max(0,Math.min(I,M.length)),M[I]};return mi(l.useCallback(()=>c.document,[c]),"keydown",D=>{var j,M;const{key:I}=D,N=D.target,W=(j=v.current)==null?void 0:j.contains(N),U=(M=b.current)==null?void 0:M.contains(N);if(/input|textarea/i.test(N.tagName)&&(I===" "||I!=="Escape"&&W||I==="Escape"&&N.type==="search")||!W&&!U||I==="Tab"&&(!v.current||!d))return;x.current=D.type;const _={originalEvent:D,source:D.type};switch(I){case"ArrowUp":{const B=P(N,-1);B&&B.focus&&B.focus(),D.preventDefault();return}case"ArrowDown":if(D.preventDefault(),!d)f(!0,_);else{const B=P(N,1);B&&B.focus&&B.focus()}return;case"Tab":fn(N.ownerDocument,"keyup",B=>{var q;(B.key==="Tab"&&!B.target||!((q=v.current)!=null&&q.contains(B.target)))&&f(!1,_)},{once:!0});break;case"Escape":I==="Escape"&&(D.preventDefault(),D.stopPropagation()),f(!1,_);break}}),y.jsx(At.Provider,{value:w,children:y.jsx(Pt.Provider,{value:R,children:s})})}gt.displayName="Dropdown";gt.Menu=Hr;gt.Toggle=zr;gt.Item=Gr;const On=l.createContext({});On.displayName="DropdownContext";const Yr=l.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},i)=>(t=ne(t,"dropdown-divider"),y.jsx(n,{ref:i,className:z(e,t),role:r,...o})));Yr.displayName="DropdownDivider";const Jr=l.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},i)=>(t=ne(t,"dropdown-header"),y.jsx(n,{ref:i,className:z(e,t),role:r,...o})));Jr.displayName="DropdownHeader";const Zr=l.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:i,as:a=dn,...s},c)=>{const d=ne(e,"dropdown-item"),[f,v]=qr({key:n,href:s.href,disabled:r,onClick:o,active:i});return y.jsx(a,{...s,...f,ref:c,className:z(t,d,v.isActive&&"active",r&&"disabled")})});Zr.displayName="DropdownItem";const Qr=l.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=ne(t,"dropdown-item-text"),y.jsx(n,{ref:o,className:z(e,t),...r})));Qr.displayName="DropdownItemText";const Xa=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Ya=typeof document<"u",Ja=Ya||Xa?l.useLayoutEffect:l.useEffect,Cn=l.createContext(null);Cn.displayName="InputGroupContext";const eo=l.createContext(null);eo.displayName="NavbarContext";function to(e,t){return e}function no(e,t,n){const r=n?"top-end":"top-start",o=n?"top-start":"top-end",i=n?"bottom-end":"bottom-start",a=n?"bottom-start":"bottom-end",s=n?"right-start":"left-start",c=n?"right-end":"left-end",d=n?"left-start":"right-start",f=n?"left-end":"right-end";let v=e?a:i;return t==="up"?v=e?o:r:t==="end"?v=e?f:d:t==="start"?v=e?c:s:t==="down-centered"?v="bottom":t==="up-centered"&&(v="top"),v}const ro=l.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:o=!0,show:i,renderOnMount:a,as:s="div",popperConfig:c,variant:d,...f},v)=>{let g=!1;const h=l.useContext(eo),b=ne(e,"dropdown-menu"),{align:E,drop:m,isRTL:O}=l.useContext(On);n=n||E;const x=l.useContext(Cn),C=[];if(n)if(typeof n=="object"){const D=Object.keys(n);if(D.length){const j=D[0],M=n[j];g=M==="start",C.push(`${b}-${j}-${M}`)}}else n==="end"&&(g=!0);const u=no(g,m,O),[T,{hasShown:w,popper:R,show:$,toggle:A}]=Wr({flip:o,rootCloseEvent:r,show:i,usePopper:!h&&C.length===0,offset:[0,2],popperConfig:c,placement:u});if(T.ref=kt(to(v),T.ref),Ja(()=>{$&&(R==null||R.update())},[$]),!w&&!a&&!x)return null;typeof s!="string"&&(T.show=$,T.close=()=>A==null?void 0:A(!1),T.align=n);let P=f.style;return R!=null&&R.placement&&(P={...f.style,...T.style},f["x-placement"]=R.placement),y.jsx(s,{...f,...T,style:P,...(C.length||h)&&{"data-bs-popper":"static"},className:z(t,b,$&&"show",g&&`${b}-end`,d&&`${b}-${d}`,...C)})});ro.displayName="DropdownMenu";const oo=l.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=et,...i},a)=>{const s=ne(e,"dropdown-toggle"),c=l.useContext(Pt);r!==void 0&&(i.bsPrefix=r);const[d]=_r();return d.ref=kt(d.ref,to(a)),y.jsx(o,{className:z(n,s,t&&`${s}-split`,(c==null?void 0:c.show)&&"show"),...d,...i})});oo.displayName="DropdownToggle";const io=l.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:o,className:i,align:a="start",onSelect:s,onToggle:c,focusFirstItemOnShow:d,as:f="div",navbar:v,autoClose:g=!0,...h}=_o(e,{show:"onToggle"}),b=l.useContext(Cn),E=ne(n,"dropdown"),m=mr(),O=R=>g===!1?R==="click":g==="inside"?R!=="rootClose":g==="outside"?R!=="select":!0,x=Rt((R,$)=>{var A;!((A=$.originalEvent)==null||(A=A.target)==null)&&A.classList.contains("dropdown-toggle")&&$.source==="mousedown"||($.originalEvent.currentTarget===document&&($.source!=="keydown"||$.originalEvent.key==="Escape")&&($.source="rootClose"),O($.source)&&(c==null||c(R,$)))}),u=no(a==="end",r,m),T=l.useMemo(()=>({align:a,drop:r,isRTL:m}),[a,r,m]),w={down:E,"down-centered":`${E}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return y.jsx(On.Provider,{value:T,children:y.jsx(gt,{placement:u,show:o,onSelect:s,onToggle:x,focusFirstItemOnShow:d,itemSelector:`.${E}-item:not(.disabled):not(:disabled)`,children:b?h.children:y.jsx(f,{...h,ref:t,className:z(i,o&&"show",w[r])})})})});io.displayName="Dropdown";const He=Object.assign(io,{Toggle:oo,Menu:ro,Item:Zr,ItemText:Qr,Divider:Yr,Header:Jr}),Jn=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Za(e,t){const n=Jn(e),r=Jn(t);return o=>{n&&n(o),r&&r(o)}}function Tn(e,t){return l.useMemo(()=>Za(e,t),[e,t])}const Qa=l.createContext(null),es=["as","active","eventKey"];function ts(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ao({key:e,onClick:t,active:n,id:r,role:o,disabled:i}){const a=l.useContext(At),s=l.useContext(En),c=l.useContext(Qa);let d=n;const f={role:o};if(s){!o&&s.role==="tablist"&&(f.role="tab");const v=s.getControllerId(e??null),g=s.getControlledId(e??null);f[ht("event-key")]=e,f.id=v||r,d=n==null&&e!=null?s.activeKey===e:n,(d||!(c!=null&&c.unmountOnExit)&&!(c!=null&&c.mountOnEnter))&&(f["aria-controls"]=g)}return f.role==="tab"&&(f["aria-selected"]=d,d||(f.tabIndex=-1),i&&(f.tabIndex=-1,f["aria-disabled"]=!0)),f.onClick=Q(v=>{i||(t==null||t(v),e!=null&&a&&!v.isPropagationStopped()&&a(e,v))}),[f,{isActive:d}]}const ns=l.forwardRef((e,t)=>{let{as:n=vr,active:r,eventKey:o}=e,i=ts(e,es);const[a,s]=ao(Object.assign({key:$t(o,i.href),active:r},i));return a[ht("active")]=s.isActive,y.jsx(n,Object.assign({},i,a,{ref:t}))});ns.displayName="NavItem";var Ot;function Zn(e){if((!Ot&&Ot!==0||e)&&it){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Ot=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ot}function rs(){return l.useState(null)}function Kt(e){e===void 0&&(e=pt());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function os(e){const t=l.useRef(e);return t.current=e,t}function is(e){const t=os(e);l.useEffect(()=>()=>t.current(),[])}function as(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Qn=ht("modal-open");class Sn{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return as(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(Ue(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Qn,""),Ue(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Qn),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const _t=(e,t)=>it?e==null?(t||pt()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function ss(e,t){const n=It(),[r,o]=l.useState(()=>_t(e,n==null?void 0:n.document));if(!r){const i=_t(e);i&&o(i)}return l.useEffect(()=>{},[t,r]),l.useEffect(()=>{const i=_t(e);i!==r&&o(i)},[e,r]),r}function us({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const i=l.useRef(null),a=l.useRef(t),s=Q(n);l.useEffect(()=>{t?a.current=!0:s(i.current)},[t,s]);const c=Tn(i,Mt(e)),d=l.cloneElement(e,{ref:c});return t?d:o||!a.current&&r?null:d}const cs=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function ls(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function fs(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:o,onExiting:i,onExited:a,addEndListener:s,children:c}=e,d=ls(e,cs);const f=l.useRef(null),v=Tn(f,Mt(c)),g=u=>T=>{u&&f.current&&u(f.current,T)},h=l.useCallback(g(t),[t]),b=l.useCallback(g(n),[n]),E=l.useCallback(g(r),[r]),m=l.useCallback(g(o),[o]),O=l.useCallback(g(i),[i]),x=l.useCallback(g(a),[a]),C=l.useCallback(g(s),[s]);return Object.assign({},d,{nodeRef:f},t&&{onEnter:h},n&&{onEntering:b},r&&{onEntered:E},o&&{onExit:m},i&&{onExiting:O},a&&{onExited:x},s&&{addEndListener:C},{children:typeof c=="function"?(u,T)=>c(u,Object.assign({},T,{ref:v})):l.cloneElement(c,{ref:v})})}const ds=["component"];function ps(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const vs=l.forwardRef((e,t)=>{let{component:n}=e,r=ps(e,ds);const o=fs(r);return y.jsx(n,Object.assign({ref:t},o))});function ms({in:e,onTransition:t}){const n=l.useRef(null),r=l.useRef(!0),o=Q(t);return Pn(()=>{if(!n.current)return;let i=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>i}),()=>{i=!0}},[e,o]),Pn(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function hs({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[i,a]=l.useState(!t);t&&i&&a(!1);const s=ms({in:!!t,onTransition:d=>{const f=()=>{d.isStale()||(d.in?r==null||r(d.element,d.initial):(a(!0),n==null||n(d.element)))};Promise.resolve(o(d)).then(f,v=>{throw d.in||a(!0),v})}}),c=Tn(s,Mt(e));return i&&!t?null:l.cloneElement(e,{ref:c})}function er(e,t,n){return e?y.jsx(vs,Object.assign({},n,{component:e})):t?y.jsx(hs,Object.assign({},n,{transition:t})):y.jsx(us,Object.assign({},n))}const gs=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function ys(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}let zt;function bs(e){return zt||(zt=new Sn({ownerDocument:e==null?void 0:e.document})),zt}function ws(e){const t=It(),n=e||bs(t),r=l.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:l.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:l.useCallback(o=>{r.current.backdrop=o},[])})}const so=l.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:i,children:a,backdrop:s=!0,keyboard:c=!0,onBackdropClick:d,onEscapeKeyDown:f,transition:v,runTransition:g,backdropTransition:h,runBackdropTransition:b,autoFocus:E=!0,enforceFocus:m=!0,restoreFocus:O=!0,restoreFocusOptions:x,renderDialog:C,renderBackdrop:u=V=>y.jsx("div",Object.assign({},V)),manager:T,container:w,onShow:R,onHide:$=()=>{},onExit:A,onExited:P,onExiting:D,onEnter:j,onEntering:M,onEntered:I}=e,N=ys(e,gs);const W=It(),U=ss(w),L=ws(T),_=wr(),B=xr(n),[q,Y]=l.useState(!n),G=l.useRef(null);l.useImperativeHandle(t,()=>L,[L]),it&&!B&&n&&(G.current=Kt(W==null?void 0:W.document)),n&&q&&Y(!1);const X=Q(()=>{if(L.add(),ee.current=Me(document,"keydown",ae),ue.current=Me(document,"focus",()=>setTimeout(ie),!0),R&&R(),E){var V,Ee;const ye=Kt((V=(Ee=L.dialog)==null?void 0:Ee.ownerDocument)!=null?V:W==null?void 0:W.document);L.dialog&&ye&&!jt(L.dialog,ye)&&(G.current=ye,L.dialog.focus())}}),J=Q(()=>{if(L.remove(),ee.current==null||ee.current(),ue.current==null||ue.current(),O){var V;(V=G.current)==null||V.focus==null||V.focus(x),G.current=null}});l.useEffect(()=>{!n||!U||X()},[n,U,X]),l.useEffect(()=>{q&&J()},[q,J]),is(()=>{J()});const ie=Q(()=>{if(!m||!_()||!L.isTopModal())return;const V=Kt(W==null?void 0:W.document);L.dialog&&V&&!jt(L.dialog,V)&&L.dialog.focus()}),pe=Q(V=>{V.target===V.currentTarget&&(d==null||d(V),s===!0&&$())}),ae=Q(V=>{c&&ti(V)&&L.isTopModal()&&(f==null||f(V),V.defaultPrevented||$())}),ue=l.useRef(),ee=l.useRef(),ve=(...V)=>{Y(!0),P==null||P(...V)};if(!U)return null;const me=Object.assign({role:r,ref:L.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},N,{style:i,className:o,tabIndex:-1});let he=C?C(me):y.jsx("div",Object.assign({},me,{children:l.cloneElement(a,{role:"document"})}));he=er(v,g,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:A,onExiting:D,onExited:ve,onEnter:j,onEntering:M,onEntered:I,children:he});let ge=null;return s&&(ge=u({ref:L.setBackdropRef,onClick:pe}),ge=er(h,b,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:ge})),y.jsx(y.Fragment,{children:Qe.createPortal(y.jsxs(y.Fragment,{children:[ge,he]}),U)})});so.displayName="Modal";const xs=Object.assign(so,{Manager:Sn});function Es(e,t){return e.classList?e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Os(e,t){e.classList?e.classList.add(t):Es(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function tr(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Cs(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=tr(e.className,t):e.setAttribute("class",tr(e.className&&e.className.baseVal||"",t))}const Je={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Ts extends Sn{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,Ue(n,{[t]:`${parseFloat(Ue(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],Ue(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(Os(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Ne(n,Je.FIXED_CONTENT).forEach(i=>this.adjustAndStore(r,i,t.scrollBarWidth)),Ne(n,Je.STICKY_CONTENT).forEach(i=>this.adjustAndStore(o,i,-t.scrollBarWidth)),Ne(n,Je.NAVBAR_TOGGLER).forEach(i=>this.adjustAndStore(o,i,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();Cs(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Ne(n,Je.FIXED_CONTENT).forEach(i=>this.restore(r,i)),Ne(n,Je.STICKY_CONTENT).forEach(i=>this.restore(o,i)),Ne(n,Je.NAVBAR_TOGGLER).forEach(i=>this.restore(o,i))}}let qt;function Ss(e){return qt||(qt=new Ts(e)),qt}const uo=l.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=ne(t,"modal-body"),y.jsx(n,{ref:o,className:z(e,t),...r})));uo.displayName="ModalBody";const co=l.createContext({onHide(){}}),Rn=l.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:i,children:a,scrollable:s,...c},d)=>{e=ne(e,"modal");const f=`${e}-dialog`,v=typeof i=="string"?`${e}-fullscreen-${i}`:`${e}-fullscreen`;return y.jsx("div",{...c,ref:d,className:z(f,t,o&&`${e}-${o}`,r&&`${f}-centered`,s&&`${f}-scrollable`,i&&v),children:y.jsx("div",{className:z(`${e}-content`,n),children:a})})});Rn.displayName="ModalDialog";const lo=l.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=ne(t,"modal-footer"),y.jsx(n,{ref:o,className:z(e,t),...r})));lo.displayName="ModalFooter";const Rs=l.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...i},a)=>{const s=l.useContext(co),c=Rt(()=>{s==null||s.onHide(),r==null||r()});return y.jsxs("div",{ref:a,...i,children:[o,n&&y.jsx(vn,{"aria-label":e,variant:t,onClick:c})]})}),fo=l.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},i)=>(e=ne(e,"modal-header"),y.jsx(Rs,{ref:i,...o,className:z(t,e),closeLabel:n,closeButton:r})));fo.displayName="ModalHeader";const Ds=di("h4"),po=l.forwardRef(({className:e,bsPrefix:t,as:n=Ds,...r},o)=>(t=ne(t,"modal-title"),y.jsx(n,{ref:o,className:z(e,t),...r})));po.displayName="ModalTitle";function js(e){return y.jsx(pn,{...e,timeout:null})}function As(e){return y.jsx(pn,{...e,timeout:null})}const vo=l.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:i,dialogAs:a=Rn,"data-bs-theme":s,"aria-labelledby":c,"aria-describedby":d,"aria-label":f,show:v=!1,animation:g=!0,backdrop:h=!0,keyboard:b=!0,onEscapeKeyDown:E,onShow:m,onHide:O,container:x,autoFocus:C=!0,enforceFocus:u=!0,restoreFocus:T=!0,restoreFocusOptions:w,onEntered:R,onExit:$,onExiting:A,onEnter:P,onEntering:D,onExited:j,backdropClassName:M,manager:I,...N},W)=>{const[U,L]=l.useState({}),[_,B]=l.useState(!1),q=l.useRef(!1),Y=l.useRef(!1),G=l.useRef(null),[X,J]=rs(),ie=kt(W,J),pe=Rt(O),ae=mr();e=ne(e,"modal");const ue=l.useMemo(()=>({onHide:pe}),[pe]);function ee(){return I||Ss({isRTL:ae})}function ve(F){if(!it)return;const we=ee().getScrollbarWidth()>0,Le=F.scrollHeight>pt(F).documentElement.clientHeight;L({paddingRight:we&&!Le?Zn():void 0,paddingLeft:!we&&Le?Zn():void 0})}const me=Rt(()=>{X&&ve(X.dialog)});Ci(()=>{sn(window,"resize",me),G.current==null||G.current()});const he=()=>{q.current=!0},ge=F=>{q.current&&X&&F.target===X.dialog&&(Y.current=!0),q.current=!1},V=()=>{B(!0),G.current=br(X.dialog,()=>{B(!1)})},Ee=F=>{F.target===F.currentTarget&&V()},ye=F=>{if(h==="static"){Ee(F);return}if(Y.current||F.target!==F.currentTarget){Y.current=!1;return}O==null||O()},_e=F=>{b?E==null||E(F):(F.preventDefault(),h==="static"&&V())},ze=(F,we)=>{F&&ve(F),P==null||P(F,we)},be=F=>{G.current==null||G.current(),$==null||$(F)},Oe=(F,we)=>{D==null||D(F,we),fn(window,"resize",me)},Pe=F=>{F&&(F.style.display=""),j==null||j(F),sn(window,"resize",me)},Re=l.useCallback(F=>y.jsx("div",{...F,className:z(`${e}-backdrop`,M,!g&&"show")}),[g,M,e]),Ae={...n,...U};Ae.display="block";const qe=F=>y.jsx("div",{role:"dialog",...F,style:Ae,className:z(t,e,_&&`${e}-static`,!g&&"show"),onClick:h?ye:void 0,onMouseUp:ge,"data-bs-theme":s,"aria-label":f,"aria-labelledby":c,"aria-describedby":d,children:y.jsx(a,{...N,onMouseDown:he,className:r,contentClassName:o,children:i})});return y.jsx(co.Provider,{value:ue,children:y.jsx(xs,{show:v,ref:ie,backdrop:h,container:x,keyboard:!0,autoFocus:C,enforceFocus:u,restoreFocus:T,restoreFocusOptions:w,onEscapeKeyDown:_e,onShow:m,onHide:O,onEnter:ze,onEntering:Oe,onEntered:R,onExit:be,onExiting:A,onExited:Pe,manager:ee(),transition:g?js:void 0,backdropTransition:g?As:void 0,renderBackdrop:Re,renderDialog:qe})})});vo.displayName="Modal";const Ct=Object.assign(vo,{Body:uo,Header:fo,Title:po,Footer:lo,Dialog:Rn,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),mo=l.forwardRef(({bsPrefix:e,className:t,as:n=dn,active:r,eventKey:o,disabled:i=!1,...a},s)=>{e=ne(e,"nav-link");const[c,d]=ao({key:$t(o,a.href),active:r,disabled:i,...a});return y.jsx(n,{...a,...c,ref:s,disabled:i,className:z(t,e,i&&"disabled",d.isActive&&"active")})});mo.displayName="NavLink";const ho=l.forwardRef(({id:e,title:t,children:n,bsPrefix:r,className:o,rootCloseEvent:i,menuRole:a,disabled:s,active:c,renderMenuOnMount:d,menuVariant:f,...v},g)=>{const h=ne(void 0,"nav-item");return y.jsxs(He,{ref:g,...v,className:z(o,h),children:[y.jsx(He.Toggle,{id:e,eventKey:null,active:c,disabled:s,childBsPrefix:r,as:mo,children:t}),y.jsx(He.Menu,{role:a,renderOnMount:d,rootCloseEvent:i,variant:f,children:n})]})});ho.displayName="NavDropdown";const $s=Object.assign(ho,{Item:He.Item,ItemText:He.ItemText,Divider:He.Divider,Header:He.Header});function Ns(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!le(i)||!Se(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function Ms(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(c,d){return c[d]="",c},{});!le(o)||!Se(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(c){o.removeAttribute(c)}))})}}const go={name:"applyStyles",enabled:!0,phase:"write",fn:Ns,effect:Ms,requires:["computeStyles"]};var ks=[$r,Ir,Ar,go,Lr,kr,Br,jr,Pr],Ps=Fr({defaultModifiers:ks}),Ls="tippy-content",Is="tippy-backdrop",Bs="tippy-arrow",Fs="tippy-svg-arrow",Fe={passive:!0,capture:!0},yo=function(){return document.body};function Gt(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function Dn(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function bo(e,t){return typeof e=="function"?e.apply(void 0,t):e}function nr(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function Ws(e){return e.split(/\s+/).filter(Boolean)}function Ze(e){return[].concat(e)}function rr(e,t){e.indexOf(t)===-1&&e.push(t)}function Hs(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Us(e){return e.split("-")[0]}function Nt(e){return[].slice.call(e)}function or(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function Vs(){return document.createElement("div")}function wo(e){return["Element","Fragment"].some(function(t){return Dn(e,t)})}function Ks(e){return Dn(e,"NodeList")}function _s(e){return Dn(e,"MouseEvent")}function zs(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function qs(e){return wo(e)?[e]:Ks(e)?Nt(e):Array.isArray(e)?e:Nt(document.querySelectorAll(e))}function Xt(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function ir(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Gs(e){var t,n=Ze(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Xs(e,t){var n=t.clientX,r=t.clientY;return e.every(function(o){var i=o.popperRect,a=o.popperState,s=o.props,c=s.interactiveBorder,d=Us(a.placement),f=a.modifiersData.offset;if(!f)return!0;var v=d==="bottom"?f.top.y:0,g=d==="top"?f.bottom.y:0,h=d==="right"?f.left.x:0,b=d==="left"?f.right.x:0,E=i.top-r+v>c,m=r-i.bottom-g>c,O=i.left-n+h>c,x=n-i.right-b>c;return E||m||O||x})}function Yt(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){e[r](o,n)})}function ar(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Ce={isTouch:!1},sr=0;function Ys(){Ce.isTouch||(Ce.isTouch=!0,window.performance&&document.addEventListener("mousemove",xo))}function xo(){var e=performance.now();e-sr<20&&(Ce.isTouch=!1,document.removeEventListener("mousemove",xo)),sr=e}function Js(){var e=document.activeElement;if(zs(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Zs(){document.addEventListener("touchstart",Ys,Fe),window.addEventListener("blur",Js)}var Qs=typeof window<"u"&&typeof document<"u",eu=Qs?!!window.msCrypto:!1,tu={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},nu={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},xe=Object.assign({appendTo:yo,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},tu,nu),ru=Object.keys(xe),ou=function(t){var n=Object.keys(t);n.forEach(function(r){xe[r]=t[r]})};function Eo(e){var t=e.plugins||[],n=t.reduce(function(r,o){var i=o.name,a=o.defaultValue;if(i){var s;r[i]=e[i]!==void 0?e[i]:(s=xe[i])!=null?s:a}return r},{});return Object.assign({},e,n)}function iu(e,t){var n=t?Object.keys(Eo(Object.assign({},xe,{plugins:t}))):ru,r=n.reduce(function(o,i){var a=(e.getAttribute("data-tippy-"+i)||"").trim();if(!a)return o;if(i==="content")o[i]=a;else try{o[i]=JSON.parse(a)}catch{o[i]=a}return o},{});return r}function ur(e,t){var n=Object.assign({},t,{content:bo(t.content,[e])},t.ignoreAttributes?{}:iu(e,t.plugins));return n.aria=Object.assign({},xe.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function cr(e){var t=e.firstElementChild,n=Nt(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(Ls)}),arrow:n.find(function(r){return r.classList.contains(Bs)||r.classList.contains(Fs)}),backdrop:n.find(function(r){return r.classList.contains(Is)})}}var au=1,Tt=[],Jt=[];function su(e,t){var n=ur(e,Object.assign({},xe,Eo(or(t)))),r,o,i,a=!1,s=!1,c=!1,d=!1,f,v,g,h=[],b=nr(ge,n.interactiveDebounce),E,m=au++,O=null,x=Hs(n.plugins),C={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},u={id:m,reference:e,popper:Vs(),popperInstance:O,props:n,state:C,plugins:x,clearDelayTimeouts:F,setProps:we,setContent:Le,show:So,hide:Ro,hideWithInteractivity:Do,enable:Ae,disable:qe,unmount:jo,destroy:Ao};if(!n.render)return u;var T=n.render(u),w=T.popper,R=T.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+u.id,u.popper=w,e._tippy=u,w._tippy=u;var $=x.map(function(p){return p.fn(u)}),A=e.hasAttribute("aria-expanded");return ve(),B(),U(),L("onCreate",[u]),n.showOnCreate&&Pe(),w.addEventListener("mouseenter",function(){u.props.interactive&&u.state.isVisible&&u.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){u.props.interactive&&u.props.trigger.indexOf("mouseenter")>=0&&I().addEventListener("mousemove",b)}),u;function P(){var p=u.props.touch;return Array.isArray(p)?p:[p,0]}function D(){return P()[0]==="hold"}function j(){var p;return!!((p=u.props.render)!=null&&p.$$tippy)}function M(){return E||e}function I(){var p=M().parentNode;return p?Gs(p):document}function N(){return cr(w)}function W(p){return u.state.isMounted&&!u.state.isVisible||Ce.isTouch||f&&f.type==="focus"?0:Gt(u.props.delay,p?0:1,xe.delay)}function U(p){p===void 0&&(p=!1),w.style.pointerEvents=u.props.interactive&&!p?"":"none",w.style.zIndex=""+u.props.zIndex}function L(p,S,k){if(k===void 0&&(k=!0),$.forEach(function(H){H[p]&&H[p].apply(H,S)}),k){var K;(K=u.props)[p].apply(K,S)}}function _(){var p=u.props.aria;if(p.content){var S="aria-"+p.content,k=w.id,K=Ze(u.props.triggerTarget||e);K.forEach(function(H){var te=H.getAttribute(S);if(u.state.isVisible)H.setAttribute(S,te?te+" "+k:k);else{var ce=te&&te.replace(k,"").trim();ce?H.setAttribute(S,ce):H.removeAttribute(S)}})}}function B(){if(!(A||!u.props.aria.expanded)){var p=Ze(u.props.triggerTarget||e);p.forEach(function(S){u.props.interactive?S.setAttribute("aria-expanded",u.state.isVisible&&S===M()?"true":"false"):S.removeAttribute("aria-expanded")})}}function q(){I().removeEventListener("mousemove",b),Tt=Tt.filter(function(p){return p!==b})}function Y(p){if(!(Ce.isTouch&&(c||p.type==="mousedown"))){var S=p.composedPath&&p.composedPath()[0]||p.target;if(!(u.props.interactive&&ar(w,S))){if(Ze(u.props.triggerTarget||e).some(function(k){return ar(k,S)})){if(Ce.isTouch||u.state.isVisible&&u.props.trigger.indexOf("click")>=0)return}else L("onClickOutside",[u,p]);u.props.hideOnClick===!0&&(u.clearDelayTimeouts(),u.hide(),s=!0,setTimeout(function(){s=!1}),u.state.isMounted||ie())}}}function G(){c=!0}function X(){c=!1}function J(){var p=I();p.addEventListener("mousedown",Y,!0),p.addEventListener("touchend",Y,Fe),p.addEventListener("touchstart",X,Fe),p.addEventListener("touchmove",G,Fe)}function ie(){var p=I();p.removeEventListener("mousedown",Y,!0),p.removeEventListener("touchend",Y,Fe),p.removeEventListener("touchstart",X,Fe),p.removeEventListener("touchmove",G,Fe)}function pe(p,S){ue(p,function(){!u.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&S()})}function ae(p,S){ue(p,S)}function ue(p,S){var k=N().box;function K(H){H.target===k&&(Yt(k,"remove",K),S())}if(p===0)return S();Yt(k,"remove",v),Yt(k,"add",K),v=K}function ee(p,S,k){k===void 0&&(k=!1);var K=Ze(u.props.triggerTarget||e);K.forEach(function(H){H.addEventListener(p,S,k),h.push({node:H,eventType:p,handler:S,options:k})})}function ve(){D()&&(ee("touchstart",he,{passive:!0}),ee("touchend",V,{passive:!0})),Ws(u.props.trigger).forEach(function(p){if(p!=="manual")switch(ee(p,he),p){case"mouseenter":ee("mouseleave",V);break;case"focus":ee(eu?"focusout":"blur",Ee);break;case"focusin":ee("focusout",Ee);break}})}function me(){h.forEach(function(p){var S=p.node,k=p.eventType,K=p.handler,H=p.options;S.removeEventListener(k,K,H)}),h=[]}function he(p){var S,k=!1;if(!(!u.state.isEnabled||ye(p)||s)){var K=((S=f)==null?void 0:S.type)==="focus";f=p,E=p.currentTarget,B(),!u.state.isVisible&&_s(p)&&Tt.forEach(function(H){return H(p)}),p.type==="click"&&(u.props.trigger.indexOf("mouseenter")<0||a)&&u.props.hideOnClick!==!1&&u.state.isVisible?k=!0:Pe(p),p.type==="click"&&(a=!k),k&&!K&&Re(p)}}function ge(p){var S=p.target,k=M().contains(S)||w.contains(S);if(!(p.type==="mousemove"&&k)){var K=Oe().concat(w).map(function(H){var te,ce=H._tippy,Ge=(te=ce.popperInstance)==null?void 0:te.state;return Ge?{popperRect:H.getBoundingClientRect(),popperState:Ge,props:n}:null}).filter(Boolean);Xs(K,p)&&(q(),Re(p))}}function V(p){var S=ye(p)||u.props.trigger.indexOf("click")>=0&&a;if(!S){if(u.props.interactive){u.hideWithInteractivity(p);return}Re(p)}}function Ee(p){u.props.trigger.indexOf("focusin")<0&&p.target!==M()||u.props.interactive&&p.relatedTarget&&w.contains(p.relatedTarget)||Re(p)}function ye(p){return Ce.isTouch?D()!==p.type.indexOf("touch")>=0:!1}function _e(){ze();var p=u.props,S=p.popperOptions,k=p.placement,K=p.offset,H=p.getReferenceClientRect,te=p.moveTransition,ce=j()?cr(w).arrow:null,Ge=H?{getBoundingClientRect:H,contextElement:H.contextElement||M()}:e,An={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(bt){var Xe=bt.state;if(j()){var $o=N(),Ft=$o.box;["placement","reference-hidden","escaped"].forEach(function(wt){wt==="placement"?Ft.setAttribute("data-placement",Xe.placement):Xe.attributes.popper["data-popper-"+wt]?Ft.setAttribute("data-"+wt,""):Ft.removeAttribute("data-"+wt)}),Xe.attributes.popper={}}}},Ie=[{name:"offset",options:{offset:K}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!te}},An];j()&&ce&&Ie.push({name:"arrow",options:{element:ce,padding:3}}),Ie.push.apply(Ie,(S==null?void 0:S.modifiers)||[]),u.popperInstance=Ps(Ge,w,Object.assign({},S,{placement:k,onFirstUpdate:g,modifiers:Ie}))}function ze(){u.popperInstance&&(u.popperInstance.destroy(),u.popperInstance=null)}function be(){var p=u.props.appendTo,S,k=M();u.props.interactive&&p===yo||p==="parent"?S=k.parentNode:S=bo(p,[k]),S.contains(w)||S.appendChild(w),u.state.isMounted=!0,_e()}function Oe(){return Nt(w.querySelectorAll("[data-tippy-root]"))}function Pe(p){u.clearDelayTimeouts(),p&&L("onTrigger",[u,p]),J();var S=W(!0),k=P(),K=k[0],H=k[1];Ce.isTouch&&K==="hold"&&H&&(S=H),S?r=setTimeout(function(){u.show()},S):u.show()}function Re(p){if(u.clearDelayTimeouts(),L("onUntrigger",[u,p]),!u.state.isVisible){ie();return}if(!(u.props.trigger.indexOf("mouseenter")>=0&&u.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(p.type)>=0&&a)){var S=W(!1);S?o=setTimeout(function(){u.state.isVisible&&u.hide()},S):i=requestAnimationFrame(function(){u.hide()})}}function Ae(){u.state.isEnabled=!0}function qe(){u.hide(),u.state.isEnabled=!1}function F(){clearTimeout(r),clearTimeout(o),cancelAnimationFrame(i)}function we(p){if(!u.state.isDestroyed){L("onBeforeUpdate",[u,p]),me();var S=u.props,k=ur(e,Object.assign({},S,or(p),{ignoreAttributes:!0}));u.props=k,ve(),S.interactiveDebounce!==k.interactiveDebounce&&(q(),b=nr(ge,k.interactiveDebounce)),S.triggerTarget&&!k.triggerTarget?Ze(S.triggerTarget).forEach(function(K){K.removeAttribute("aria-expanded")}):k.triggerTarget&&e.removeAttribute("aria-expanded"),B(),U(),R&&R(S,k),u.popperInstance&&(_e(),Oe().forEach(function(K){requestAnimationFrame(K._tippy.popperInstance.forceUpdate)})),L("onAfterUpdate",[u,p])}}function Le(p){u.setProps({content:p})}function So(){var p=u.state.isVisible,S=u.state.isDestroyed,k=!u.state.isEnabled,K=Ce.isTouch&&!u.props.touch,H=Gt(u.props.duration,0,xe.duration);if(!(p||S||k||K)&&!M().hasAttribute("disabled")&&(L("onShow",[u],!1),u.props.onShow(u)!==!1)){if(u.state.isVisible=!0,j()&&(w.style.visibility="visible"),U(),J(),u.state.isMounted||(w.style.transition="none"),j()){var te=N(),ce=te.box,Ge=te.content;Xt([ce,Ge],0)}g=function(){var Ie;if(!(!u.state.isVisible||d)){if(d=!0,w.offsetHeight,w.style.transition=u.props.moveTransition,j()&&u.props.animation){var Bt=N(),bt=Bt.box,Xe=Bt.content;Xt([bt,Xe],H),ir([bt,Xe],"visible")}_(),B(),rr(Jt,u),(Ie=u.popperInstance)==null||Ie.forceUpdate(),L("onMount",[u]),u.props.animation&&j()&&ae(H,function(){u.state.isShown=!0,L("onShown",[u])})}},be()}}function Ro(){var p=!u.state.isVisible,S=u.state.isDestroyed,k=!u.state.isEnabled,K=Gt(u.props.duration,1,xe.duration);if(!(p||S||k)&&(L("onHide",[u],!1),u.props.onHide(u)!==!1)){if(u.state.isVisible=!1,u.state.isShown=!1,d=!1,a=!1,j()&&(w.style.visibility="hidden"),q(),ie(),U(!0),j()){var H=N(),te=H.box,ce=H.content;u.props.animation&&(Xt([te,ce],K),ir([te,ce],"hidden"))}_(),B(),u.props.animation?j()&&pe(K,u.unmount):u.unmount()}}function Do(p){I().addEventListener("mousemove",b),rr(Tt,b),b(p)}function jo(){u.state.isVisible&&u.hide(),u.state.isMounted&&(ze(),Oe().forEach(function(p){p._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w),Jt=Jt.filter(function(p){return p!==u}),u.state.isMounted=!1,L("onHidden",[u]))}function Ao(){u.state.isDestroyed||(u.clearDelayTimeouts(),u.unmount(),me(),delete e._tippy,u.state.isDestroyed=!0,L("onDestroy",[u]))}}function yt(e,t){t===void 0&&(t={});var n=xe.plugins.concat(t.plugins||[]);Zs();var r=Object.assign({},t,{plugins:n}),o=qs(e),i=o.reduce(function(a,s){var c=s&&su(s,r);return c&&a.push(c),a},[]);return wo(e)?i[0]:i}yt.defaultProps=xe;yt.setDefaultProps=ou;yt.currentInput=Ce;Object.assign({},go,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});yt.setDefaultProps({animation:!1});function Oo(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 Co=typeof window<"u"&&typeof document<"u";function ln(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function lr(){return Co&&document.createElement("div")}function uu(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function To(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!To(e[n],t[n]))return!1}else return!1;return!0}else return!1}function cu(e){var t=[];return e.forEach(function(n){t.find(function(r){return To(n,r)})||t.push(n)}),t}function lu(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:cu([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var Zt=Co?l.useLayoutEffect:l.useEffect;function fu(e){var t=l.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function fr(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var du={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function o(){t.props.className&&!r()||fr(n,"add",t.props.className)}function i(){r()&&fr(n,"remove",t.props.className)}return{onCreate:o,onBeforeUpdate:i,onAfterUpdate:o}}};function pu(e){function t(n){var r=n.children,o=n.content,i=n.visible,a=n.singleton,s=n.render,c=n.reference,d=n.disabled,f=d===void 0?!1:d,v=n.ignoreAttributes,g=v===void 0?!0:v;n.__source,n.__self;var h=Oo(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),b=i!==void 0,E=a!==void 0,m=l.useState(!1),O=m[0],x=m[1],C=l.useState({}),u=C[0],T=C[1],w=l.useState(),R=w[0],$=w[1],A=fu(function(){return{container:lr(),renders:1}}),P=Object.assign({ignoreAttributes:g},h,{content:A.container});b&&(P.trigger="manual",P.hideOnClick=!1),E&&(f=!0);var D=P,j=P.plugins||[];s&&(D=Object.assign({},P,{plugins:E&&a.data!=null?[].concat(j,[{fn:function(){return{onTrigger:function(W,U){var L=a.data.children.find(function(_){var B=_.instance;return B.reference===U.currentTarget});W.state.$$activeSingletonInstance=L.instance,$(L.content)}}}}]):j,render:function(){return{popper:A.container}}}));var M=[c].concat(r?[r.type]:[]);return Zt(function(){var I=c;c&&c.hasOwnProperty("current")&&(I=c.current);var N=e(I||A.ref||lr(),Object.assign({},D,{plugins:[du].concat(P.plugins||[])}));return A.instance=N,f&&N.disable(),i&&N.show(),E&&a.hook({instance:N,content:o,props:D,setSingletonContent:$}),x(!0),function(){N.destroy(),a==null||a.cleanup(N)}},M),Zt(function(){var I;if(A.renders===1){A.renders++;return}var N=A.instance;N.setProps(lu(N.props,D)),(I=N.popperInstance)==null||I.forceUpdate(),f?N.disable():N.enable(),b&&(i?N.show():N.hide()),E&&a.hook({instance:N,content:o,props:D,setSingletonContent:$})}),Zt(function(){var I;if(s){var N=A.instance;N.setProps({popperOptions:Object.assign({},N.props.popperOptions,{modifiers:[].concat((((I=N.props.popperOptions)==null?void 0:I.modifiers)||[]).filter(function(W){var U=W.name;return U!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(U){var L,_=U.state,B=(L=_.modifiersData)==null?void 0:L.hide;(u.placement!==_.placement||u.referenceHidden!==(B==null?void 0:B.isReferenceHidden)||u.escaped!==(B==null?void 0:B.hasPopperEscaped))&&T({placement:_.placement,referenceHidden:B==null?void 0:B.isReferenceHidden,escaped:B==null?void 0:B.hasPopperEscaped}),_.attributes.popper={}}}])})})}},[u.placement,u.referenceHidden,u.escaped].concat(M)),Z.createElement(Z.Fragment,null,r?l.cloneElement(r,{ref:function(N){A.ref=N,ln(r.ref,N)}}):null,O&&gr.createPortal(s?s(uu(u),R,A.instance):o,A.container))}return t}var vu=function(e,t){return l.forwardRef(function(r,o){var i=r.children,a=Oo(r,["children"]);return Z.createElement(e,Object.assign({},t,a),i?l.cloneElement(i,{ref:function(c){ln(o,c),ln(i.ref,c)}}):null)})},mu=vu(pu(yt),{render:function(){return""}});function jn(e=0){const t=new Date;return t.setDate(t.getDate()-e),t.toISOString().split("T")[0]}const Qt=jn(),en=jn(1),hu=Array.from({length:6},(e,t)=>jn(t+2));function gu({session:e,newChat:t,setSessions:n,setHistoryStatus:r}){const[o,i]=l.useState(localStorage.getItem("chatAI")?JSON.parse(localStorage.getItem("chatAI")):{chats:[],sessions:{}}),[a,s]=l.useState(""),[c,d]=l.useState(null),[f,v]=l.useState({});l.useEffect(()=>{const m={[Qt]:{title:"Today",sessions:[]},[en]:{title:"Yesterday",sessions:[]},last7Days:{title:"Last 7 Days",sessions:[]}};Object.entries(o.sessions).forEach(([O,x])=>{x.id=O,x.date===Qt?m[Qt].sessions.push(x):x.date===en?m[en].sessions.push(x):hu.includes(x.date)&&m.last7Days.sessions.push(x)}),v(m)},[o.sessions]);const g=(m,O)=>{d(m),s(O)};function h(m){if(!a)return null;const O={...o,sessions:{...o.sessions,[m]:{...o.sessions[m],title:a}}};d(null),i(O),localStorage.setItem("chatAI",JSON.stringify(O))}const b=m=>{const O={...o.sessions};delete O[m];const x=(o.chats||[]).filter(u=>u.session!==m),C={...o,chats:x,sessions:O};e===m&&(t(),r(!1)),d(null),i(C),localStorage.setItem("chatAI",JSON.stringify(C))},E=m=>{n(m),r(!1)};return y.jsxs(Ct,{show:!0,onHide:()=>r(!1),backdrop:"static",keyboard:!1,className:"modal-history",children:[y.jsx(Ct.Header,{closeButton:!0,children:y.jsx(Ct.Title,{children:Drupal.t("History")})}),y.jsx(Ct.Body,{className:"flex-grow-1 overflow-auto",children:y.jsx("ul",{className:"chat-history list-unstyled",children:Object.entries(f).map(([m,O])=>y.jsxs("li",{children:[y.jsx("span",{className:"fs-5 fw-semibold",children:O.title}),y.jsx("div",{className:"ms-2",children:O.sessions.map((x,C)=>y.jsxs("div",{className:"item-history d-flex align-items-center justify-content-between rounded-3 fs-5",children:[y.jsx("span",{className:"flex-fill p-2 opacity-75 fw-medium fs-6",onClick:()=>E(x.id),children:x.title}),y.jsxs($s,{id:"basic-nav-dropdown",className:"item-history-dropdown mx-2 rounded-3 bg-white",children:[y.jsx(mu,{placement:"bottom-start",interactive:!0,visible:c===x.id,appendTo:"parent",onClickOutside:()=>d(null),render:u=>y.jsx("div",{className:"d-flex align-items-center justify-content-center p-2 border bg-white rounded shadow",...u,children:y.jsx(Lo.Control,{type:"text",className:"border-0 border-bottom",value:a,onChange:T=>s(T.target.value),onBlur:()=>h(x.id),placeholder:Drupal.t("New name")})}),children:y.jsxs(et,{className:"d-flex align-items-center justify-content-start mx-1 mx-auto w-100 border-0 rounded-0 text-warning fw-medium bg-transparent",onClick:()=>g(x.id,x.title),children:[y.jsx("i",{className:"bi bi-pencil-square me-2 opacity-75"}),Drupal.t("Rename")]})}),y.jsxs(et,{className:"d-flex align-items-center justify-content-start mx-1 mx-auto w-100 border-0 rounded-0 text-danger fw-medium bg-transparent",onClick:()=>b(x.id),children:[y.jsx("i",{className:"bi bi-trash me-2 opacity-75"}),Drupal.t("Delete")]})]})]},C))})]},m))})})]})}function yu({newChat:e,handleSendMessage:t,setHistoryStatus:n}){return y.jsx("div",{className:"mt-3 p-2",children:y.jsxs("div",{className:"d-flex",children:[y.jsxs(et,{variant:"outline-danger",size:"sm",className:"fs-6 me-auto btn-scale",onClick:t,children:[y.jsx("i",{className:"bi bi bi-send-fill"})," ",Drupal.t("Send")]}),y.jsxs(et,{variant:"outline-success",size:"sm",className:"fs-6 mx-2 btn-scale",onClick:e,children:[y.jsx("i",{className:"bi bi bi-pencil-square"})," ",Drupal.t("New chat")]}),y.jsxs(et,{variant:"outline-secondary",size:"sm",className:"fs-6 btn-scale",onClick:()=>n(!0),children:[y.jsx("i",{className:"bi bi bi-hourglass"})," ",Drupal.t("History")]})]})})}const bu=l.memo(yu);var dr,pr;const wu=((pr=(dr=window.drupalSettings)==null?void 0:dr.deepseek)==null?void 0:pr.url_module)||"";function xu(){const{messages:e,loading:t,session:n,voiceChat:r,voiceStatus:o,lang:i,upFile:a,editChatStart:s,editChatStop:c,speakChat:d,copyChat:f,sendMessage:v,upLoad:g,newChat:h,handleScroll:b,regenerateChat:E,changeLang:m,setSessions:O,setUpFile:x,startVoice:C,stopVoice:u}=Io(),[T,w]=l.useState(!1),[R,$]=l.useState(""),A=()=>{$(""),v(R)};return y.jsxs("div",{className:"chat-bot chat-page",children:[y.jsxs("div",{className:"d-flex flex-column h-100 mx-lg-5 p-3 bg-white",children:[y.jsx(Bo,{loading:t,messages:e,regenerateChat:E,urlModule:wu,copyChat:f,editChatStart:s,editChatStop:c,speakChat:d,handleScroll:b}),a.length>0&&y.jsx(Fo,{upFile:a,setUpFile:x}),y.jsx(Wo,{input:R,lang:i,voiceChat:r,setInput:$,upLoad:g,voiceStatus:o,changeLang:m,startVoice:C,stopVoice:u,handleSendMessage:A}),y.jsx(bu,{newChat:h,handleSendMessage:A,setHistoryStatus:w})]}),T&&y.jsx(gu,{session:n,newChat:h,setSessions:O,setHistoryStatus:w})]})}const Eu=l.memo(xu);Ho.createRoot(document.getElementById("chat-frame")).render(y.jsx(Eu,{}));

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc