@connectycube/chat-widget 0.23.0 → 0.24.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.
- package/CHANGELOG.md +6 -0
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/react19/index.es.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.es.js
CHANGED
|
@@ -10340,7 +10340,7 @@ const P0 = (e) => {
|
|
|
10340
10340
|
children: [
|
|
10341
10341
|
t && !d && /* @__PURE__ */ p.jsx("span", { className: `font-semibold ${A ? "mb-2" : ""}`, children: f }),
|
|
10342
10342
|
A ? /* @__PURE__ */ p.jsx(f0, { attachment: A, uploading: e.isLoading }) : /* @__PURE__ */ p.jsx(M0, { message: e.message, id: e._id }),
|
|
10343
|
-
c
|
|
10343
|
+
c ? /* @__PURE__ */ p.jsx(R0, { message: e.message, id: e._id }) : /* @__PURE__ */ p.jsx("div", { className: "mb-4" }),
|
|
10344
10344
|
/* @__PURE__ */ p.jsxs("div", { className: "flex items-center gap-1 text-gray-500 italic text-xs absolute bottom-[3px] right-[11px]", children: [
|
|
10345
10345
|
/* @__PURE__ */ p.jsx("span", { children: v }),
|
|
10346
10346
|
d && /* @__PURE__ */ p.jsx("span", { children: e.read ? /* @__PURE__ */ p.jsx(VI, { size: 14, color: "#727272" }) : /* @__PURE__ */ p.jsx(SI, { size: 14, color: "#727272" }) })
|
package/dist/index.umd.js
CHANGED
|
@@ -47,7 +47,7 @@ object-assign
|
|
|
47
47
|
@license MIT
|
|
48
48
|
*/var Qi,tu;function qv(){if(tu)return Qi;tu=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(d){return i[d]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(d){c[d]=d}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Qi=o()?Object.assign:function(s,i){for(var a,l=n(s),c,d=1;d<arguments.length;d++){a=Object(arguments[d]);for(var A in a)t.call(a,A)&&(l[A]=a[A]);if(e){c=e(a);for(var f=0;f<c.length;f++)r.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},Qi}var Ui,ru;function Ki(){if(ru)return Ui;ru=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ui=e,Ui}var Fi,nu;function ou(){return nu||(nu=1,Fi=Function.call.bind(Object.prototype.hasOwnProperty)),Fi}var ji,su;function Nv(){if(su)return ji;su=1;var e=function(){};if("production".NODE_ENV!=="production"){var t=Ki(),r={},n=ou();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if("production".NODE_ENV!=="production"){for(var d in s)if(n(s,d)){var A;try{if(typeof s[d]!="function"){var f=Error((l||"React class")+": "+a+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}A=s[d](i,d,l,a,null,t)}catch(w){A=w}if(A&&!(A instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof A+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),A instanceof Error&&!(A.message in r)){r[A.message]=!0;var v=c?c():"";e("Failed "+a+" type: "+A.message+(v??""))}}}}return o.resetWarningCache=function(){"production".NODE_ENV!=="production"&&(r={})},ji=o,ji}var Gi,iu;function Lv(){if(iu)return Gi;iu=1;var e=eu(),t=qv(),r=Ki(),n=ou(),o=Nv(),s=function(){};"production".NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return Gi=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function A(D){var K=D&&(c&&D[c]||D[d]);if(typeof K=="function")return K}var f="<<anonymous>>",v={array:b("array"),bigint:b("bigint"),bool:b("boolean"),func:b("function"),number:b("number"),object:b("object"),string:b("string"),symbol:b("symbol"),any:h(),arrayOf:m,element:g(),elementType:u(),instanceOf:C,node:F(),objectOf:B,oneOf:E,oneOfType:k,shape:N,exact:R};function w(D,K){return D===K?D!==0||1/D===1/K:D!==D&&K!==K}function y(D,K){this.message=D,this.data=K&&typeof K=="object"?K:{},this.stack=""}y.prototype=Error.prototype;function I(D){if("production".NODE_ENV!=="production")var K={},W=0;function Z(ae,re,ne,L,U,Y,H){if(L=L||f,Y=Y||ne,H!==r){if(l){var G=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw G.name="Invariant Violation",G}else if("production".NODE_ENV!=="production"&&typeof console<"u"){var se=L+":"+ne;!K[se]&&W<3&&(s("You are manually calling a React.PropTypes validation function for the `"+Y+"` prop on `"+L+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),K[se]=!0,W++)}}return re[ne]==null?ae?re[ne]===null?new y("The "+U+" `"+Y+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new y("The "+U+" `"+Y+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:D(re,ne,L,U,Y)}var $=Z.bind(null,!1);return $.isRequired=Z.bind(null,!0),$}function b(D){function K(W,Z,$,ae,re,ne){var L=W[Z],U=T(L);if(U!==D){var Y=X(L);return new y("Invalid "+ae+" `"+re+"` of type "+("`"+Y+"` supplied to `"+$+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return I(K)}function h(){return I(i)}function m(D){function K(W,Z,$,ae,re){if(typeof D!="function")return new y("Property `"+re+"` of component `"+$+"` has invalid PropType notation inside arrayOf.");var ne=W[Z];if(!Array.isArray(ne)){var L=T(ne);return new y("Invalid "+ae+" `"+re+"` of type "+("`"+L+"` supplied to `"+$+"`, expected an array."))}for(var U=0;U<ne.length;U++){var Y=D(ne,U,$,ae,re+"["+U+"]",r);if(Y instanceof Error)return Y}return null}return I(K)}function g(){function D(K,W,Z,$,ae){var re=K[W];if(!a(re)){var ne=T(re);return new y("Invalid "+$+" `"+ae+"` of type "+("`"+ne+"` supplied to `"+Z+"`, expected a single ReactElement."))}return null}return I(D)}function u(){function D(K,W,Z,$,ae){var re=K[W];if(!e.isValidElementType(re)){var ne=T(re);return new y("Invalid "+$+" `"+ae+"` of type "+("`"+ne+"` supplied to `"+Z+"`, expected a single ReactElement type."))}return null}return I(D)}function C(D){function K(W,Z,$,ae,re){if(!(W[Z]instanceof D)){var ne=D.name||f,L=q(W[Z]);return new y("Invalid "+ae+" `"+re+"` of type "+("`"+L+"` supplied to `"+$+"`, expected ")+("instance of `"+ne+"`."))}return null}return I(K)}function E(D){if(!Array.isArray(D))return"production".NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function K(W,Z,$,ae,re){for(var ne=W[Z],L=0;L<D.length;L++)if(w(ne,D[L]))return null;var U=JSON.stringify(D,function(H,G){var se=X(G);return se==="symbol"?String(G):G});return new y("Invalid "+ae+" `"+re+"` of value `"+String(ne)+"` "+("supplied to `"+$+"`, expected one of "+U+"."))}return I(K)}function B(D){function K(W,Z,$,ae,re){if(typeof D!="function")return new y("Property `"+re+"` of component `"+$+"` has invalid PropType notation inside objectOf.");var ne=W[Z],L=T(ne);if(L!=="object")return new y("Invalid "+ae+" `"+re+"` of type "+("`"+L+"` supplied to `"+$+"`, expected an object."));for(var U in ne)if(n(ne,U)){var Y=D(ne,U,$,ae,re+"."+U,r);if(Y instanceof Error)return Y}return null}return I(K)}function k(D){if(!Array.isArray(D))return"production".NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var K=0;K<D.length;K++){var W=D[K];if(typeof W!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+j(W)+" at index "+K+"."),i}function Z($,ae,re,ne,L){for(var U=[],Y=0;Y<D.length;Y++){var H=D[Y],G=H($,ae,re,ne,L,r);if(G==null)return null;G.data&&n(G.data,"expectedType")&&U.push(G.data.expectedType)}var se=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new y("Invalid "+ne+" `"+L+"` supplied to "+("`"+re+"`"+se+"."))}return I(Z)}function F(){function D(K,W,Z,$,ae){return M(K[W])?null:new y("Invalid "+$+" `"+ae+"` supplied to "+("`"+Z+"`, expected a ReactNode."))}return I(D)}function Q(D,K,W,Z,$){return new y((D||"React class")+": "+K+" type `"+W+"."+Z+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+$+"`.")}function N(D){function K(W,Z,$,ae,re){var ne=W[Z],L=T(ne);if(L!=="object")return new y("Invalid "+ae+" `"+re+"` of type `"+L+"` "+("supplied to `"+$+"`, expected `object`."));for(var U in D){var Y=D[U];if(typeof Y!="function")return Q($,ae,re,U,X(Y));var H=Y(ne,U,$,ae,re+"."+U,r);if(H)return H}return null}return I(K)}function R(D){function K(W,Z,$,ae,re){var ne=W[Z],L=T(ne);if(L!=="object")return new y("Invalid "+ae+" `"+re+"` of type `"+L+"` "+("supplied to `"+$+"`, expected `object`."));var U=t({},W[Z],D);for(var Y in U){var H=D[Y];if(n(D,Y)&&typeof H!="function")return Q($,ae,re,Y,X(H));if(!H)return new y("Invalid "+ae+" `"+re+"` key `"+Y+"` supplied to `"+$+"`.\nBad object: "+JSON.stringify(W[Z],null," ")+`
|
|
49
49
|
Valid keys: `+JSON.stringify(Object.keys(D),null," "));var G=H(ne,Y,$,ae,re+"."+Y,r);if(G)return G}return null}return I(K)}function M(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(M);if(D===null||a(D))return!0;var K=A(D);if(K){var W=K.call(D),Z;if(K!==D.entries){for(;!(Z=W.next()).done;)if(!M(Z.value))return!1}else for(;!(Z=W.next()).done;){var $=Z.value;if($&&!M($[1]))return!1}}else return!1;return!0;default:return!1}}function x(D,K){return D==="symbol"?!0:K?K["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&K instanceof Symbol:!1}function T(D){var K=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":x(K,D)?"symbol":K}function X(D){if(typeof D>"u"||D===null)return""+D;var K=T(D);if(K==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return K}function j(D){var K=X(D);switch(K){case"array":case"object":return"an "+K;case"boolean":case"date":case"regexp":return"a "+K;default:return K}}function q(D){return!D.constructor||!D.constructor.name?f:D.constructor.name}return v.checkPropTypes=o,v.resetWarningCache=o.resetWarningCache,v.PropTypes=v,v},Gi}var zi,au;function Qv(){if(au)return zi;au=1;var e=Ki();function t(){}function r(){}return r.resetWarningCache=t,zi=function(){function n(i,a,l,c,d,A){if(A!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function o(){return n}var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return s.PropTypes=s,s},zi}var Au;function Uv(){if(Au)return Mo.exports;if(Au=1,"production".NODE_ENV!=="production"){var e=eu(),t=!0;Mo.exports=Lv()(e.isElement,t)}else Mo.exports=Qv()();return Mo.exports}var Yi,lu;function cu(){if(lu)return Yi;lu=1;var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,i=(B,k)=>{for(var F in k)t(B,F,{get:k[F],enumerable:!0})},a=(B,k,F,Q)=>{if(k&&typeof k=="object"||typeof k=="function")for(let N of n(k))!s.call(B,N)&&N!==F&&t(B,N,{get:()=>k[N],enumerable:!(Q=r(k,N))||Q.enumerable});return B},l=(B,k,F)=>(F=B!=null?e(o(B)):{},a(!B||!B.__esModule?t(F,"default",{value:B,enumerable:!0}):F,B)),c=B=>a(t({},"__esModule",{value:!0}),B),d={};i(d,{defaultProps:()=>E,propTypes:()=>u}),Yi=c(d);var A=l(Uv());const{string:f,bool:v,number:w,array:y,oneOfType:I,shape:b,object:h,func:m,node:g}=A.default,u={url:I([f,y,h]),playing:v,loop:v,controls:v,volume:w,muted:v,playbackRate:w,width:I([f,w]),height:I([f,w]),style:h,progressInterval:w,playsinline:v,pip:v,stopOnUnmount:v,light:I([v,f,h]),playIcon:g,previewTabIndex:w,previewAriaLabel:f,fallback:g,oEmbedUrl:f,wrapper:I([f,m,b({render:m.isRequired})]),config:b({soundcloud:b({options:h}),youtube:b({playerVars:h,embedOptions:h,onUnstarted:m}),facebook:b({appId:f,version:f,playerId:f,attributes:h}),dailymotion:b({params:h}),vimeo:b({playerOptions:h,title:f}),mux:b({attributes:h,version:f}),file:b({attributes:h,tracks:y,forceVideo:v,forceAudio:v,forceHLS:v,forceSafariHLS:v,forceDisableHls:v,forceDASH:v,forceFLV:v,hlsOptions:h,hlsVersion:f,dashVersion:f,flvVersion:f}),wistia:b({options:h,playerId:f,customControls:y}),mixcloud:b({options:h}),twitch:b({options:h,playerId:f}),vidyard:b({options:h})}),onReady:m,onStart:m,onPlay:m,onPause:m,onBuffer:m,onBufferEnd:m,onEnded:m,onError:m,onDuration:m,onSeek:m,onPlaybackRateChange:m,onPlaybackQualityChange:m,onProgress:m,onClickPreview:m,onEnablePIP:m,onDisablePIP:m},C=()=>{},E={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,previewAriaLabel:"",oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:C},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},mux:{attributes:{},version:"2"},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:C,onStart:C,onPlay:C,onPause:C,onBuffer:C,onBufferEnd:C,onEnded:C,onError:C,onDuration:C,onSeek:C,onPlaybackRateChange:C,onPlaybackQualityChange:C,onProgress:C,onClickPreview:C,onEnablePIP:C,onDisablePIP:C};return Yi}var Wi,uu;function Kv(){if(uu)return Wi;uu=1;var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,i=(m,g,u)=>g in m?t(m,g,{enumerable:!0,configurable:!0,writable:!0,value:u}):m[g]=u,a=(m,g)=>{for(var u in g)t(m,u,{get:g[u],enumerable:!0})},l=(m,g,u,C)=>{if(g&&typeof g=="object"||typeof g=="function")for(let E of n(g))!s.call(m,E)&&E!==u&&t(m,E,{get:()=>g[E],enumerable:!(C=r(g,E))||C.enumerable});return m},c=(m,g,u)=>(u=m!=null?e(o(m)):{},l(!m||!m.__esModule?t(u,"default",{value:m,enumerable:!0}):u,m)),d=m=>l(t({},"__esModule",{value:!0}),m),A=(m,g,u)=>(i(m,typeof g!="symbol"?g+"":g,u),u),f={};a(f,{default:()=>h}),Wi=d(f);var v=c(S),w=c(Hc()),y=cu(),I=et();const b=5e3;class h extends v.Component{constructor(){super(...arguments),A(this,"mounted",!1),A(this,"isReady",!1),A(this,"isPlaying",!1),A(this,"isLoading",!0),A(this,"loadOnReady",null),A(this,"startOnPlay",!0),A(this,"seekOnPlay",null),A(this,"onDurationCalled",!1),A(this,"handlePlayerMount",g=>{if(this.player){this.progress();return}this.player=g,this.player.load(this.props.url),this.progress()}),A(this,"getInternalPlayer",g=>this.player?this.player[g]:null),A(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const g=this.getCurrentTime()||0,u=this.getSecondsLoaded(),C=this.getDuration();if(C){const E={playedSeconds:g,played:g/C};u!==null&&(E.loadedSeconds=u,E.loaded=u/C),(E.playedSeconds!==this.prevPlayed||E.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(E),this.prevPlayed=E.playedSeconds,this.prevLoaded=E.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),A(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:g,playing:u,volume:C,muted:E}=this.props;g(),!E&&C!==null&&this.player.setVolume(C),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):u&&this.player.play(),this.handleDurationCheck()}),A(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:g,onPlay:u,playbackRate:C}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&C!==1&&this.player.setPlaybackRate(C),g(),this.startOnPlay=!1),u(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),A(this,"handlePause",g=>{this.isPlaying=!1,this.isLoading||this.props.onPause(g)}),A(this,"handleEnded",()=>{const{activePlayer:g,loop:u,onEnded:C}=this.props;g.loopOnEnded&&u&&this.seekTo(0),u||(this.isPlaying=!1,C())}),A(this,"handleError",(...g)=>{this.isLoading=!1,this.props.onError(...g)}),A(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const g=this.getDuration();g?this.onDurationCalled||(this.props.onDuration(g),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),A(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(g){if(!this.player)return;const{url:u,playing:C,volume:E,muted:B,playbackRate:k,pip:F,loop:Q,activePlayer:N,disableDeferredLoading:R}=this.props;if(!(0,w.default)(g.url,u)){if(this.isLoading&&!N.forceLoad&&!R&&!(0,I.isMediaStream)(u)){console.warn(`ReactPlayer: the attempt to load ${u} is being deferred until the player has loaded`),this.loadOnReady=u;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(u,this.isReady)}!g.playing&&C&&!this.isPlaying&&this.player.play(),g.playing&&!C&&this.isPlaying&&this.player.pause(),!g.pip&&F&&this.player.enablePIP&&this.player.enablePIP(),g.pip&&!F&&this.player.disablePIP&&this.player.disablePIP(),g.volume!==E&&E!==null&&this.player.setVolume(E),g.muted!==B&&(B?this.player.mute():(this.player.unmute(),E!==null&&setTimeout(()=>this.player.setVolume(E)))),g.playbackRate!==k&&this.player.setPlaybackRate&&this.player.setPlaybackRate(k),g.loop!==Q&&this.player.setLoop&&this.player.setLoop(Q)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(g,u,C){if(!this.isReady){g!==0&&(this.seekOnPlay=g,setTimeout(()=>{this.seekOnPlay=null},b));return}if(u?u==="fraction":g>0&&g<1){const B=this.player.getDuration();if(!B){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(B*g,C);return}this.player.seekTo(g,C)}render(){const g=this.props.activePlayer;return g?v.default.createElement(g,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}return A(h,"displayName","Player"),A(h,"propTypes",y.propTypes),A(h,"defaultProps",y.defaultProps),Wi}var Ji,du;function Fv(){if(du)return Ji;du=1;var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,i=(Q,N,R)=>N in Q?t(Q,N,{enumerable:!0,configurable:!0,writable:!0,value:R}):Q[N]=R,a=(Q,N)=>{for(var R in N)t(Q,R,{get:N[R],enumerable:!0})},l=(Q,N,R,M)=>{if(N&&typeof N=="object"||typeof N=="function")for(let x of n(N))!s.call(Q,x)&&x!==R&&t(Q,x,{get:()=>N[x],enumerable:!(M=r(N,x))||M.enumerable});return Q},c=(Q,N,R)=>(R=Q!=null?e(o(Q)):{},l(!Q||!Q.__esModule?t(R,"default",{value:Q,enumerable:!0}):R,Q)),d=Q=>l(t({},"__esModule",{value:!0}),Q),A=(Q,N,R)=>(i(Q,typeof N!="symbol"?N+"":N,R),R),f={};a(f,{createReactPlayer:()=>F}),Ji=d(f);var v=c(S),w=c(Gc()),y=c(Dv),I=c(Hc()),b=cu(),h=et(),m=c(Kv());const g=(0,h.lazy)(()=>Promise.resolve().then(()=>sV)),u=typeof window<"u"&&window.document&&typeof document<"u",C=typeof Js<"u"&&Js.window&&Js.window.document,E=Object.keys(b.propTypes),B=u||C?v.Suspense:()=>null,k=[],F=(Q,N)=>{var R;return R=class extends v.Component{constructor(){super(...arguments),A(this,"state",{showPreview:!!this.props.light}),A(this,"references",{wrapper:M=>{this.wrapper=M},player:M=>{this.player=M}}),A(this,"handleClickPreview",M=>{this.setState({showPreview:!1}),this.props.onClickPreview(M)}),A(this,"showPreview",()=>{this.setState({showPreview:!0})}),A(this,"getDuration",()=>this.player?this.player.getDuration():null),A(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),A(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),A(this,"getInternalPlayer",(M="player")=>this.player?this.player.getInternalPlayer(M):null),A(this,"seekTo",(M,x,T)=>{if(!this.player)return null;this.player.seekTo(M,x,T)}),A(this,"handleReady",()=>{this.props.onReady(this)}),A(this,"getActivePlayer",(0,y.default)(M=>{for(const x of[...k,...Q])if(x.canPlay(M))return x;return N||null})),A(this,"getConfig",(0,y.default)((M,x)=>{const{config:T}=this.props;return w.default.all([b.defaultProps.config,b.defaultProps.config[x]||{},T,T[x]||{}])})),A(this,"getAttributes",(0,y.default)(M=>(0,h.omit)(this.props,E))),A(this,"renderActivePlayer",M=>{if(!M)return null;const x=this.getActivePlayer(M);if(!x)return null;const T=this.getConfig(M,x.key);return v.default.createElement(m.default,{...this.props,key:x.key,ref:this.references.player,config:T,activePlayer:x.lazyPlayer||x,onReady:this.handleReady})})}shouldComponentUpdate(M,x){return!(0,I.default)(this.props,M)||!(0,I.default)(this.state,x)}componentDidUpdate(M){const{light:x}=this.props;!M.light&&x&&this.setState({showPreview:!0}),M.light&&!x&&this.setState({showPreview:!1})}renderPreview(M){if(!M)return null;const{light:x,playIcon:T,previewTabIndex:X,oEmbedUrl:j,previewAriaLabel:q}=this.props;return v.default.createElement(g,{url:M,light:x,playIcon:T,previewTabIndex:X,previewAriaLabel:q,oEmbedUrl:j,onClick:this.handleClickPreview})}render(){const{url:M,style:x,width:T,height:X,fallback:j,wrapper:q}=this.props,{showPreview:D}=this.state,K=this.getAttributes(M),W=typeof q=="string"?this.references.wrapper:void 0;return v.default.createElement(q,{ref:W,style:{...x,width:T,height:X},...K},v.default.createElement(B,{fallback:j},D?this.renderPreview(M):this.renderActivePlayer(M)))}},A(R,"displayName","ReactPlayer"),A(R,"propTypes",b.propTypes),A(R,"defaultProps",b.defaultProps),A(R,"addCustomPlayer",M=>{k.push(M)}),A(R,"removeCustomPlayers",()=>{k.length=0}),A(R,"canPlay",M=>{for(const x of[...k,...Q])if(x.canPlay(M))return!0;return!1}),A(R,"canEnablePIP",M=>{for(const x of[...k,...Q])if(x.canEnablePIP&&x.canEnablePIP(M))return!0;return!1}),R};return Ji}var Xi,fu;function jv(){if(fu)return Xi;fu=1;var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,i=(y,I)=>{for(var b in I)t(y,b,{get:I[b],enumerable:!0})},a=(y,I,b,h)=>{if(I&&typeof I=="object"||typeof I=="function")for(let m of n(I))!s.call(y,m)&&m!==b&&t(y,m,{get:()=>I[m],enumerable:!(h=r(I,m))||h.enumerable});return y},l=(y,I,b)=>(b=y!=null?e(o(y)):{},a(!y||!y.__esModule?t(b,"default",{value:y,enumerable:!0}):b,y)),c=y=>a(t({},"__esModule",{value:!0}),y),d={};i(d,{default:()=>w}),Xi=c(d);var A=l(Pv()),f=Fv();const v=A.default[A.default.length-1];var w=(0,f.createReactPlayer)(A.default,v);return Xi}var Gv=jv();const zv=ot(Gv),Oo="360px",Yv=({attachment:e,uploading:t})=>{const r=Bn(w=>w.shadowRoot),{type:n,uid:o,url:s}=e,[i,a]=S.useMemo(()=>(n==null?void 0:n.split("/"))??["image",""],[n]),l="m-6 text-gray-700 hover:text-red-600 transition-color duration-300",c=o?o.length>20?`${o==null?void 0:o.slice(0,9)}...${o==null?void 0:o.slice(-8)}`:o:"unknown file",d=`${i}${o==null?void 0:o.replace(/:/g,"")}`,[A,f]=S.useState({maxHeight:Oo,maxWidth:Oo}),v=()=>{const w=r.getElementById(d);if(w){const y=w.children[0],b=y.videoWidth/y.videoHeight<1;f({aspectRatio:b?`${y.videoWidth} / ${y.videoHeight}`:"16 / 9",width:b?"auto":"100%",height:b?"100%":"auto",maxWidth:b?"auto":Oo,maxHeight:b?Oo:"auto"})}};return p.jsxs("div",{className:"relative min-h-[80px] w-full flex items-center justify-center",children:[t&&p.jsx("div",{className:"absolute flex items-center justify-center size-full rounded-md bg-blue-200 opacity-50",children:p.jsx($r,{})}),s?p.jsx(p.Fragment,{children:i==="image"||i===""?p.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:p.jsx("img",{src:s,className:"rounded-md object-cover max-h-[360px]",alt:c},d)},`link:${o}`):i==="video"?p.jsx("div",{className:"rounded-md overflow-hidden",children:p.jsx(zv,{id:d,url:s,playing:!1,controls:!0,width:"100%",height:"100%",style:A,onReady:v},d)}):i==="audio"?p.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:p.jsx(Cv,{size:64,className:l},d)},`link:${o}`):i==="application"&&a==="pdf"?p.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:p.jsx(Ev,{size:64,className:l},`${a}${o}`)},`link:${o}`):p.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",children:p.jsx(xv,{size:64,className:l},`file:${o}`)},`link:${o}`)}):p.jsx(Vv,{size:64,className:"m-6 text-gray-700"},`brokenfile${o}`)]})},Wv="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Jv="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Or=(e,t)=>{for(const r in t)e[r]=t[r];return e},Hi="numeric",Zi="ascii",_i="alpha",Mn="asciinumeric",kn="alphanumeric",$i="domain",gu="emoji",Xv="scheme",Hv="slashscheme",ea="whitespace";function Zv(e,t){return e in t||(t[e]=[]),t[e]}function Dr(e,t,r){t[Hi]&&(t[Mn]=!0,t[kn]=!0),t[Zi]&&(t[Mn]=!0,t[_i]=!0),t[Mn]&&(t[kn]=!0),t[_i]&&(t[kn]=!0),t[kn]&&(t[$i]=!0),t[gu]&&(t[$i]=!0);for(const n in t){const o=Zv(n,r);o.indexOf(e)<0&&o.push(e)}}function _v(e,t){const r={};for(const n in t)t[n].indexOf(e)>=0&&(r[n]=!0);return r}function yt(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}yt.groups={},yt.prototype={accepts(){return!!this.t},go(e){const t=this,r=t.j[e];if(r)return r;for(let n=0;n<t.jr.length;n++){const o=t.jr[n][0],s=t.jr[n][1];if(s&&o.test(e))return s}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,r,n){for(let o=0;o<e.length;o++)this.tt(e[o],t,r,n)},tr(e,t,r,n){n=n||yt.groups;let o;return t&&t.j?o=t:(o=new yt(t),r&&n&&Dr(t,r,n)),this.jr.push([e,o]),o},ts(e,t,r,n){let o=this;const s=e.length;if(!s)return o;for(let i=0;i<s-1;i++)o=o.tt(e[i]);return o.tt(e[s-1],t,r,n)},tt(e,t,r,n){n=n||yt.groups;const o=this;if(t&&t.j)return o.j[e]=t,t;const s=t;let i,a=o.go(e);if(a?(i=new yt,Or(i.j,a.j),i.jr.push.apply(i.jr,a.jr),i.jd=a.jd,i.t=a.t):i=new yt,s){if(n)if(i.t&&typeof i.t=="string"){const l=Or(_v(i.t,n),r);Dr(s,l,n)}else r&&Dr(s,r,n);i.t=s}return o.j[e]=i,i}};const we=(e,t,r,n,o)=>e.ta(t,r,n,o),Ne=(e,t,r,n,o)=>e.tr(t,r,n,o),pu=(e,t,r,n,o)=>e.ts(t,r,n,o),ee=(e,t,r,n,o)=>e.tt(t,r,n,o),rr="WORD",ta="UWORD",hu="ASCIINUMERICAL",mu="ALPHANUMERICAL",On="LOCALHOST",ra="TLD",na="UTLD",Do="SCHEME",tn="SLASH_SCHEME",oa="NUM",sa="WS",ia="NL",Dn="OPENBRACE",Tn="CLOSEBRACE",To="OPENBRACKET",Ro="CLOSEBRACKET",qo="OPENPAREN",No="CLOSEPAREN",Lo="OPENANGLEBRACKET",Qo="CLOSEANGLEBRACKET",Uo="FULLWIDTHLEFTPAREN",Ko="FULLWIDTHRIGHTPAREN",Fo="LEFTCORNERBRACKET",jo="RIGHTCORNERBRACKET",Go="LEFTWHITECORNERBRACKET",zo="RIGHTWHITECORNERBRACKET",Yo="FULLWIDTHLESSTHAN",Wo="FULLWIDTHGREATERTHAN",Jo="AMPERSAND",aa="APOSTROPHE",Xo="ASTERISK",yr="AT",Ho="BACKSLASH",Zo="BACKTICK",_o="CARET",vr="COLON",Aa="COMMA",$o="DOLLAR",Qt="DOT",es="EQUALS",la="EXCLAMATION",Ct="HYPHEN",Rn="PERCENT",ts="PIPE",rs="PLUS",ns="POUND",qn="QUERY",ca="QUOTE",yu="FULLWIDTHMIDDLEDOT",ua="SEMI",Ut="SLASH",Nn="TILDE",os="UNDERSCORE",vu="EMOJI",ss="SYM";var wu=Object.freeze({__proto__:null,WORD:rr,UWORD:ta,ASCIINUMERICAL:hu,ALPHANUMERICAL:mu,LOCALHOST:On,TLD:ra,UTLD:na,SCHEME:Do,SLASH_SCHEME:tn,NUM:oa,WS:sa,NL:ia,OPENBRACE:Dn,CLOSEBRACE:Tn,OPENBRACKET:To,CLOSEBRACKET:Ro,OPENPAREN:qo,CLOSEPAREN:No,OPENANGLEBRACKET:Lo,CLOSEANGLEBRACKET:Qo,FULLWIDTHLEFTPAREN:Uo,FULLWIDTHRIGHTPAREN:Ko,LEFTCORNERBRACKET:Fo,RIGHTCORNERBRACKET:jo,LEFTWHITECORNERBRACKET:Go,RIGHTWHITECORNERBRACKET:zo,FULLWIDTHLESSTHAN:Yo,FULLWIDTHGREATERTHAN:Wo,AMPERSAND:Jo,APOSTROPHE:aa,ASTERISK:Xo,AT:yr,BACKSLASH:Ho,BACKTICK:Zo,CARET:_o,COLON:vr,COMMA:Aa,DOLLAR:$o,DOT:Qt,EQUALS:es,EXCLAMATION:la,HYPHEN:Ct,PERCENT:Rn,PIPE:ts,PLUS:rs,POUND:ns,QUERY:qn,QUOTE:ca,FULLWIDTHMIDDLEDOT:yu,SEMI:ua,SLASH:Ut,TILDE:Nn,UNDERSCORE:os,EMOJI:vu,SYM:ss});const nr=/[a-z]/,Ln=new RegExp("\\p{L}","u"),da=new RegExp("\\p{Emoji}","u"),or=/\d/,fa=/\s/,bu="\r",ga=`
|
|
50
|
-
`,$v="️",ew="",pa="";let is=null,as=null;function tw(e=[]){const t={};yt.groups=t;const r=new yt;is==null&&(is=Cu(Wv)),as==null&&(as=Cu(Jv)),ee(r,"'",aa),ee(r,"{",Dn),ee(r,"}",Tn),ee(r,"[",To),ee(r,"]",Ro),ee(r,"(",qo),ee(r,")",No),ee(r,"<",Lo),ee(r,">",Qo),ee(r,"(",Uo),ee(r,")",Ko),ee(r,"「",Fo),ee(r,"」",jo),ee(r,"『",Go),ee(r,"』",zo),ee(r,"<",Yo),ee(r,">",Wo),ee(r,"&",Jo),ee(r,"*",Xo),ee(r,"@",yr),ee(r,"`",Zo),ee(r,"^",_o),ee(r,":",vr),ee(r,",",Aa),ee(r,"$",$o),ee(r,".",Qt),ee(r,"=",es),ee(r,"!",la),ee(r,"-",Ct),ee(r,"%",Rn),ee(r,"|",ts),ee(r,"+",rs),ee(r,"#",ns),ee(r,"?",qn),ee(r,'"',ca),ee(r,"/",Ut),ee(r,";",ua),ee(r,"~",Nn),ee(r,"_",os),ee(r,"\\",Ho),ee(r,"・",yu);const n=Ne(r,or,oa,{[Hi]:!0});Ne(n,or,n);const o=Ne(n,nr,hu,{[Mn]:!0}),s=Ne(n,Ln,mu,{[kn]:!0}),i=Ne(r,nr,rr,{[Zi]:!0});Ne(i,or,o),Ne(i,nr,i),Ne(o,or,o),Ne(o,nr,o);const a=Ne(r,Ln,ta,{[_i]:!0});Ne(a,nr),Ne(a,or,s),Ne(a,Ln,a),Ne(s,or,s),Ne(s,nr),Ne(s,Ln,s);const l=ee(r,ga,ia,{[ea]:!0}),c=ee(r,bu,sa,{[ea]:!0}),d=Ne(r,fa,sa,{[ea]:!0});ee(r,pa,d),ee(c,ga,l),ee(c,pa,d),Ne(c,fa,d),ee(d,bu),ee(d,ga),Ne(d,fa,d),ee(d,pa,d);const A=Ne(r,da,vu,{[gu]:!0});ee(A,"#"),Ne(A,da,A),ee(A,$v,A);const f=ee(A,ew);ee(f,"#"),Ne(f,da,A);const v=[[nr,i],[or,o]],w=[[nr,null],[Ln,a],[or,s]];for(let y=0;y<is.length;y++)wr(r,is[y],ra,rr,v);for(let y=0;y<as.length;y++)wr(r,as[y],na,ta,w);Dr(ra,{tld:!0,ascii:!0},t),Dr(na,{utld:!0,alpha:!0},t),wr(r,"file",Do,rr,v),wr(r,"mailto",Do,rr,v),wr(r,"http",tn,rr,v),wr(r,"https",tn,rr,v),wr(r,"ftp",tn,rr,v),wr(r,"ftps",tn,rr,v),Dr(Do,{scheme:!0,ascii:!0},t),Dr(tn,{slashscheme:!0,ascii:!0},t),e=e.sort((y,I)=>y[0]>I[0]?1:-1);for(let y=0;y<e.length;y++){const I=e[y][0],h=e[y][1]?{[Xv]:!0}:{[Hv]:!0};I.indexOf("-")>=0?h[$i]=!0:nr.test(I)?or.test(I)?h[Mn]=!0:h[Zi]=!0:h[Hi]=!0,pu(r,I,I,h)}return pu(r,"localhost",On,{ascii:!0}),r.jd=new yt(ss),{start:r,tokens:Or({groups:t},wu)}}function Iu(e,t){const r=rw(t.replace(/[A-Z]/g,a=>a.toLowerCase())),n=r.length,o=[];let s=0,i=0;for(;i<n;){let a=e,l=null,c=0,d=null,A=-1,f=-1;for(;i<n&&(l=a.go(r[i]));)a=l,a.accepts()?(A=0,f=0,d=a):A>=0&&(A+=r[i].length,f++),c+=r[i].length,s+=r[i].length,i++;s-=A,i-=f,c-=A,o.push({t:d.t,v:t.slice(s-c,s),s:s-c,e:s})}return o}function rw(e){const t=[],r=e.length;let n=0;for(;n<r;){let o=e.charCodeAt(n),s,i=o<55296||o>56319||n+1===r||(s=e.charCodeAt(n+1))<56320||s>57343?e[n]:e.slice(n,n+2);t.push(i),n+=i.length}return t}function wr(e,t,r,n,o){let s;const i=t.length;for(let a=0;a<i-1;a++){const l=t[a];e.j[l]?s=e.j[l]:(s=new yt(n),s.jr=o.slice(),e.j[l]=s),e=s}return s=new yt(r),s.jr=o.slice(),e.j[t[i-1]]=s,s}function Cu(e){const t=[],r=[];let n=0,o="0123456789";for(;n<e.length;){let s=0;for(;o.indexOf(e[n+s])>=0;)s++;if(s>0){t.push(r.join(""));for(let i=parseInt(e.substring(n,n+s),10);i>0;i--)r.pop();n+=s}else r.push(e[n]),n++}return t}const rn={defaultProtocol:"http",events:null,format:Eu,formatHref:Eu,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function As(e,t=null){let r=Or({},rn);e&&(r=Or(r,e instanceof As?e.o:e));const n=r.ignoreTags,o=[];for(let s=0;s<n.length;s++)o.push(n[s].toUpperCase());this.o=r,t&&(this.defaultRender=t),this.ignoreTags=o}As.prototype={o:rn,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,r){const n=t!=null;let o=this.o[e];return o&&(typeof o=="object"?(o=r.t in o?o[r.t]:rn[e],typeof o=="function"&&n&&(o=o(t,r))):typeof o=="function"&&n&&(o=o(t,r.t,r)),o)},getObj(e,t,r){let n=this.o[e];return typeof n=="function"&&t!=null&&(n=n(t,r.t,r)),n},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function Eu(e){return e}var xu=Object.freeze({__proto__:null,defaults:rn,Options:As,assign:Or});function Vu(e,t){this.t="token",this.v=e,this.tk=t}Vu.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),r=e.get("truncate",t,this),n=e.get("format",t,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=rn.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,r=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",r,this),o=e.get("tagName",r,t),s=this.toFormattedString(e),i={},a=e.get("className",r,t),l=e.get("target",r,t),c=e.get("rel",r,t),d=e.getObj("attributes",r,t),A=e.getObj("events",r,t);return i.href=n,a&&(i.class=a),l&&(i.target=l),c&&(i.rel=c),d&&Or(i,d),{tagName:o,attributes:i,content:s,eventListeners:A}}};function ls(e,t){class r extends Vu{constructor(o,s){super(o,s),this.t=e}}for(const n in t)r.prototype[n]=t[n];return r.t=e,r}const Su=ls("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Bu=ls("text"),nw=ls("nl"),cs=ls("url",{isLink:!0,toHref(e=rn.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==On&&e[1].t===vr}}),Et=e=>new yt(e);function ow({groups:e}){const t=e.domain.concat([Jo,Xo,yr,Ho,Zo,_o,$o,es,Ct,oa,Rn,ts,rs,ns,Ut,ss,Nn,os]),r=[vr,Aa,Qt,la,Rn,qn,ca,ua,Lo,Qo,Dn,Tn,Ro,To,qo,No,Uo,Ko,Fo,jo,Go,zo,Yo,Wo],n=[Jo,aa,Xo,Ho,Zo,_o,$o,es,Ct,Dn,Tn,Rn,ts,rs,ns,qn,Ut,ss,Nn,os],o=Et(),s=ee(o,Nn);we(s,n,s),we(s,e.domain,s);const i=Et(),a=Et(),l=Et();we(o,e.domain,i),we(o,e.scheme,a),we(o,e.slashscheme,l),we(i,n,s),we(i,e.domain,i);const c=ee(i,yr);ee(s,yr,c),ee(a,yr,c),ee(l,yr,c);const d=ee(s,Qt);we(d,n,s),we(d,e.domain,s);const A=Et();we(c,e.domain,A),we(A,e.domain,A);const f=ee(A,Qt);we(f,e.domain,A);const v=Et(Su);we(f,e.tld,v),we(f,e.utld,v),ee(c,On,v);const w=ee(A,Ct);ee(w,Ct,w),we(w,e.domain,A),we(v,e.domain,A),ee(v,Qt,f),ee(v,Ct,w);const y=ee(v,vr);we(y,e.numeric,Su);const I=ee(i,Ct),b=ee(i,Qt);ee(I,Ct,I),we(I,e.domain,i),we(b,n,s),we(b,e.domain,i);const h=Et(cs);we(b,e.tld,h),we(b,e.utld,h),we(h,e.domain,i),we(h,n,s),ee(h,Qt,b),ee(h,Ct,I),ee(h,yr,c);const m=ee(h,vr),g=Et(cs);we(m,e.numeric,g);const u=Et(cs),C=Et();we(u,t,u),we(u,r,C),we(C,t,u),we(C,r,C),ee(h,Ut,u),ee(g,Ut,u);const E=ee(a,vr),B=ee(l,vr),k=ee(B,Ut),F=ee(k,Ut);we(a,e.domain,i),ee(a,Qt,b),ee(a,Ct,I),we(l,e.domain,i),ee(l,Qt,b),ee(l,Ct,I),we(E,e.domain,u),ee(E,Ut,u),ee(E,qn,u),we(F,e.domain,u),we(F,t,u),ee(F,Ut,u);const Q=[[Dn,Tn],[To,Ro],[qo,No],[Lo,Qo],[Uo,Ko],[Fo,jo],[Go,zo],[Yo,Wo]];for(let N=0;N<Q.length;N++){const[R,M]=Q[N],x=ee(u,R);ee(C,R,x),ee(x,M,u);const T=Et(cs);we(x,t,T);const X=Et();we(x,r),we(T,t,T),we(T,r,X),we(X,t,T),we(X,r,X),ee(T,M,u),ee(X,M,u)}return ee(o,On,h),ee(o,ia,nw),{start:o,tokens:wu}}function sw(e,t,r){let n=r.length,o=0,s=[],i=[];for(;o<n;){let a=e,l=null,c=null,d=0,A=null,f=-1;for(;o<n&&!(l=a.go(r[o].t));)i.push(r[o++]);for(;o<n&&(c=l||a.go(r[o].t));)l=null,a=c,a.accepts()?(f=0,A=a):f>=0&&f++,o++,d++;if(f<0)o-=d,o<n&&(i.push(r[o]),o++);else{i.length>0&&(s.push(ha(Bu,t,i)),i=[]),o-=f,d-=f;const v=A.t,w=r.slice(o-d,o);s.push(ha(v,t,w))}}return i.length>0&&s.push(ha(Bu,t,i)),s}function ha(e,t,r){const n=r[0].s,o=r[r.length-1].e,s=t.slice(n,o);return new e(s,r)}const tt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function iw(){tt.scanner=tw(tt.customSchemes);for(let e=0;e<tt.tokenQueue.length;e++)tt.tokenQueue[e][1]({scanner:tt.scanner});tt.parser=ow(tt.scanner.tokens);for(let e=0;e<tt.pluginQueue.length;e++)tt.pluginQueue[e][1]({scanner:tt.scanner,parser:tt.parser});return tt.initialized=!0,tt}function Pu(e){return tt.initialized||iw(),sw(tt.parser.start,e,Iu(tt.scanner.start,e))}Pu.scan=Iu;function aw(e,t,r){const n=Pu(e),o=[];for(let s=0;s<n.length;s++){const i=n[s];if(i.t==="nl"&&t.get("nl2br")){const a=`__linkify-el-${r.elementId++}`;o.push(V.createElement("br",{key:a}))}else if(!i.isLink||!t.check(i))o.push(i.toString());else{let a=t.render(i);if(!("key"in a.props)){const l=`__linkify-el-${r.elementId++}`,c=xu.assign({key:l},a.props);a=V.cloneElement(a,c)}o.push(a)}}return o}function Mu(e,t,r){if(V.Children.count(e.props.children)===0)return e;const n=[];V.Children.forEach(e.props.children,i=>{typeof i=="string"?n.push.apply(n,aw(i,t,r)):V.isValidElement(i)?typeof i.type=="string"&&t.ignoreTags.indexOf(i.type.toUpperCase())>=0?n.push(i):n.push(Mu(i,t,r)):n.push(i)});const o=`__linkify-el-${r.elementId++}`,s=xu.assign({key:o},e.props);return V.cloneElement(e,s,n)}const Aw=e=>{let t=0;const r=({tagName:l,attributes:c,content:d})=>(c.key=`__linkify-lnk-${t++}`,c.class&&(c.className=c.class,delete c.class),V.createElement(l,c,d)),n={key:"__linkify-wrapper"};for(const l in e)l!=="options"&&l!=="as"&&l!=="tagName"&&l!=="children"&&(n[l]=e[l]);const o=new As(e.options,r),s=e.as||e.tagName||V.Fragment||"span",i=e.children,a=V.createElement(s,n,i);return Mu(a,o,{elementId:0})},lw=({message:e,id:t})=>{const r={target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline"};return p.jsx(Aw,{options:r,children:p.jsx("p",{className:"break-words font-normal",children:e})},`message:${t}`)},cw=({message:e,id:t})=>{const[r,n,o]=Kl(_e(i=>[i.addUrls,i.matchUrlsFromMessage,i.urlPreviews])),s=n(e);return S.useEffect(()=>{s&&r(s)},[s]),p.jsx("div",{className:"flex flex-col gap-2 mb-4",children:s.map((i,a)=>{const l=o.get(i),c=`${t}#${a}`;if(l){const{url:d,title:A,description:f,images:v,favicons:w}=l,y=v[0],I=w[0];return p.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:p.jsxs("div",{className:"flex flex-col p-2 mt-1 bg-white hover:bg-blue-100 rounded-sm transition-color duration-300 border-l-4 border-l-blue-500",children:[p.jsxs("div",{className:"flex flex-col flex-grow overflow-hidden",children:[p.jsxs("p",{className:"text-sm font-bold line-clamp-2",children:[I&&p.jsx("img",{src:I,alt:A,width:"15px",className:"object-contain float-left mt-[2px] mr-[4px]"}),p.jsx("p",{children:A})]}),p.jsx("p",{className:"text-sm line-clamp-5",children:f})]}),y&&p.jsx("div",{className:"mt-2 flex-shrink-0",children:p.jsx("img",{src:y,alt:A,className:"object-cover rounded-xs"})})]})},`linkPreview:${c}`)}return null})})},uw=({message:e,isGroupChat:t,dialogName:r,senderName:n,senderAvatar:o})=>{var I;const{t:s}=Te(),{currentUserId:i,readMessage:a,messageSentTimeString:l}=Fe(),c=_t(b=>b.enableUrlPreview),d=e.sender_id===i,A=(I=e.attachments)==null?void 0:I[0],f=d?s("you"):t?n:r,v=S.useMemo(()=>l(e),[e.date_sent]),[w,y]=sv();return y&&e.read===0&&e.sender_id!==i&&a(e._id,e.sender_id,e.chat_dialog_id||""),p.jsxs("div",{ref:w,className:`flex relative max-w-[90%] text-left whitespace-pre-wrap mb-2 ${d?"self-end flex-row-reverse":"self-start"} ${y?"view":"no"}`,children:[t&&!d&&p.jsx(tr,{name:n,imageUIDOrUrl:o,className:"size-12 ml-2"}),p.jsxs("div",{className:`flex flex-col min-w-[157px] bg-gray-200 rounded-xl pt-2 pb-1 px-2 ml-2 ${d?"mr-2":""}`,children:[t&&!d&&p.jsx("span",{className:`font-semibold ${A?"mb-2":""}`,children:f}),A?p.jsx(Yv,{attachment:A,uploading:e.isLoading}):p.jsx(lw,{message:e.message,id:e._id}),c&&p.jsx(cw,{message:e.message,id:e._id}),p.jsxs("div",{className:"flex items-center gap-1 text-gray-500 italic text-xs absolute bottom-[3px] right-[11px]",children:[p.jsx("span",{children:v}),d&&p.jsx("span",{children:e.read?p.jsx(iv,{size:14,color:"#727272"}):p.jsx(av,{size:14,color:"#727272"})})]})]})]})};function dw(e){return $e({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"19",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"5",cy:"12",r:"1"},child:[]}]})(e)}function fw(e){return $e({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"8.5",cy:"7",r:"4"},child:[]},{tag:"line",attr:{x1:"23",y1:"11",x2:"17",y2:"11"},child:[]}]})(e)}function gw(e){return $e({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"8.5",cy:"7",r:"4"},child:[]},{tag:"line",attr:{x1:"20",y1:"8",x2:"20",y2:"14"},child:[]},{tag:"line",attr:{x1:"23",y1:"11",x2:"17",y2:"11"},child:[]}]})(e)}function ku(e){return $e({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"},child:[]}]})(e)}function pw(e){return $e({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M341.334 128v234.666C341.334 409.604 302.938 448 256 448c-46.937 0-85.333-38.396-85.333-85.334V117.334C170.667 87.469 194.135 64 224 64c29.864 0 53.333 23.469 53.333 53.334v245.333c0 11.729-9.605 21.333-21.334 21.333s-21.333-9.604-21.333-21.333V160h-32v202.667C202.667 392.531 226.135 416 256 416c29.865 0 53.334-23.469 53.334-53.333V117.334C309.334 70.401 270.938 32 224 32s-85.334 38.401-85.334 85.334v245.332C138.667 427.729 190.938 480 256 480c65.062 0 117.334-52.271 117.334-117.334V128h-32z"},child:[]}]})(e)}function me(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Qn({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=hw({defaultProp:t,onChange:r}),s=e!==void 0,i=s?e:n,a=It(r),l=V.useCallback(c=>{if(s){const A=typeof c=="function"?c(e):c;A!==e&&a(A)}else o(c)},[s,e,o,a]);return[i,l]}function hw({defaultProp:e,onChange:t}){const r=V.useState(e),[n]=r,o=V.useRef(n),s=It(t);return V.useEffect(()=>{o.current!==n&&(s(n),o.current=n)},[n,o,s]),r}function Ou(e){const t=e+"CollectionProvider",[r,n]=Nt(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:I,children:b}=y,h=S.useRef(null),m=S.useRef(new Map).current;return p.jsx(o,{scope:I,itemMap:m,collectionRef:h,children:b})};i.displayName=t;const a=e+"CollectionSlot",l=en(a),c=S.forwardRef((y,I)=>{const{scope:b,children:h}=y,m=s(a,b),g=je(I,m.collectionRef);return p.jsx(l,{ref:g,children:h})});c.displayName=a;const d=e+"CollectionItemSlot",A="data-radix-collection-item",f=en(d),v=S.forwardRef((y,I)=>{const{scope:b,children:h,...m}=y,g=S.useRef(null),u=je(I,g),C=s(d,b);return S.useEffect(()=>(C.itemMap.set(g,{ref:g,...m}),()=>void C.itemMap.delete(g))),p.jsx(f,{[A]:"",ref:u,children:h})});v.displayName=d;function w(y){const I=s(e+"CollectionConsumer",y);return S.useCallback(()=>{const h=I.collectionRef.current;if(!h)return[];const m=Array.from(h.querySelectorAll(`[${A}]`));return Array.from(I.itemMap.values()).sort((C,E)=>m.indexOf(C.ref.current)-m.indexOf(E.ref.current))},[I.collectionRef,I.itemMap])}return[{Provider:i,Slot:c,ItemSlot:v},w,n]}var mw=V.createContext(void 0);function ma(e){const t=V.useContext(mw);return e||t||"ltr"}function yw(e,t=globalThis==null?void 0:globalThis.document){const r=It(e);V.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var vw="DismissableLayer",ya="dismissableLayer.update",ww="dismissableLayer.pointerDownOutside",bw="dismissableLayer.focusOutside",Du,Tu=V.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),va=V.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=V.useContext(Tu),[d,A]=V.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=V.useState({}),w=je(t,E=>A(E)),y=Array.from(c.layers),[I]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(I),h=d?y.indexOf(d):-1,m=c.layersWithOutsidePointerEventsDisabled.size>0,g=h>=b,u=Ew(E=>{const B=E.target,k=[...c.branches].some(F=>F.contains(B));!g||k||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},f),C=xw(E=>{const B=E.target;[...c.branches].some(F=>F.contains(B))||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},f);return yw(E=>{h===c.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),V.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Du=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ru(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Du)}},[d,f,r,c]),V.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ru())},[d,c]),V.useEffect(()=>{const E=()=>v({});return document.addEventListener(ya,E),()=>document.removeEventListener(ya,E)},[]),p.jsx(Be.div,{...l,ref:w,style:{pointerEvents:m?g?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,C.onFocusCapture),onBlurCapture:me(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,u.onPointerDownCapture)})});va.displayName=vw;var Iw="DismissableLayerBranch",Cw=V.forwardRef((e,t)=>{const r=V.useContext(Tu),n=V.useRef(null),o=je(t,n);return V.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),p.jsx(Be.div,{...e,ref:o})});Cw.displayName=Iw;function Ew(e,t=globalThis==null?void 0:globalThis.document){const r=It(e),n=V.useRef(!1),o=V.useRef(()=>{});return V.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){qu(ww,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function xw(e,t=globalThis==null?void 0:globalThis.document){const r=It(e),n=V.useRef(!1);return V.useEffect(()=>{const o=s=>{s.target&&!n.current&&qu(bw,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ru(){const e=new CustomEvent(ya);document.dispatchEvent(e)}function qu(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Dc(o,s):o.dispatchEvent(s)}var wa=0;function Nu(){V.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Lu()),document.body.insertAdjacentElement("beforeend",e[1]??Lu()),wa++,()=>{wa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wa--}},[])}function Lu(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ba="focusScope.autoFocusOnMount",Ia="focusScope.autoFocusOnUnmount",Qu={bubbles:!1,cancelable:!0},Vw="FocusScope",Ca=V.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=V.useState(null),c=It(o),d=It(s),A=V.useRef(null),f=je(t,y=>l(y)),v=V.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V.useEffect(()=>{if(n){let y=function(m){if(v.paused||!a)return;const g=m.target;a.contains(g)?A.current=g:br(A.current,{select:!0})},I=function(m){if(v.paused||!a)return;const g=m.relatedTarget;g!==null&&(a.contains(g)||br(A.current,{select:!0}))},b=function(m){if(document.activeElement===document.body)for(const u of m)u.removedNodes.length>0&&br(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",I);const h=new MutationObserver(b);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",I),h.disconnect()}}},[n,a,v.paused]),V.useEffect(()=>{if(a){Fu.add(v);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(ba,Qu);a.addEventListener(ba,c),a.dispatchEvent(b),b.defaultPrevented||(Sw(Ow(Uu(a)),{select:!0}),document.activeElement===y&&br(a))}return()=>{a.removeEventListener(ba,c),setTimeout(()=>{const b=new CustomEvent(Ia,Qu);a.addEventListener(Ia,d),a.dispatchEvent(b),b.defaultPrevented||br(y??document.body,{select:!0}),a.removeEventListener(Ia,d),Fu.remove(v)},0)}}},[a,c,d,v]);const w=V.useCallback(y=>{if(!r&&!n||v.paused)return;const I=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(I&&b){const h=y.currentTarget,[m,g]=Bw(h);m&&g?!y.shiftKey&&b===g?(y.preventDefault(),r&&br(m,{select:!0})):y.shiftKey&&b===m&&(y.preventDefault(),r&&br(g,{select:!0})):b===h&&y.preventDefault()}},[r,n,v.paused]);return p.jsx(Be.div,{tabIndex:-1,...i,ref:f,onKeyDown:w})});Ca.displayName=Vw;function Sw(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(br(n,{select:t}),document.activeElement!==r)return}function Bw(e){const t=Uu(e),r=Ku(t,e),n=Ku(t.reverse(),e);return[r,n]}function Uu(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ku(e,t){for(const r of e)if(!Pw(r,{upTo:t}))return r}function Pw(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mw(e){return e instanceof HTMLInputElement&&"select"in e}function br(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Mw(e)&&t&&e.select()}}var Fu=kw();function kw(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ju(e,t),e.unshift(t)},remove(t){var r;e=ju(e,t),(r=e[0])==null||r.resume()}}}function ju(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ow(e){return e.filter(t=>t.tagName!=="A")}var Dw=V[" useId ".trim().toString()]||(()=>{}),Tw=0;function Tr(e){const[t,r]=V.useState(Dw());return Lt(()=>{r(n=>n??String(Tw++))},[e]),e||(t?`radix-${t}`:"")}const Rw=["top","right","bottom","left"],Ir=Math.min,vt=Math.max,us=Math.round,ds=Math.floor,Kt=e=>({x:e,y:e}),qw={left:"right",right:"left",bottom:"top",top:"bottom"},Nw={start:"end",end:"start"};function Ea(e,t,r){return vt(e,Ir(t,r))}function sr(e,t){return typeof e=="function"?e(t):e}function ir(e){return e.split("-")[0]}function nn(e){return e.split("-")[1]}function xa(e){return e==="x"?"y":"x"}function Va(e){return e==="y"?"height":"width"}function Cr(e){return["top","bottom"].includes(ir(e))?"y":"x"}function Sa(e){return xa(Cr(e))}function Lw(e,t,r){r===void 0&&(r=!1);const n=nn(e),o=Sa(e),s=Va(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=fs(i)),[i,fs(i)]}function Qw(e){const t=fs(e);return[Ba(e),t,Ba(t)]}function Ba(e){return e.replace(/start|end/g,t=>Nw[t])}function Uw(e,t,r){const n=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?s:i;default:return[]}}function Kw(e,t,r,n){const o=nn(e);let s=Uw(ir(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ba)))),s}function fs(e){return e.replace(/left|right|bottom|top/g,t=>qw[t])}function Fw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gu(e){return typeof e!="number"?Fw(e):{top:e,right:e,bottom:e,left:e}}function gs(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function zu(e,t,r){let{reference:n,floating:o}=e;const s=Cr(t),i=Sa(t),a=Va(i),l=ir(t),c=s==="y",d=n.x+n.width/2-o.width/2,A=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2;let v;switch(l){case"top":v={x:d,y:n.y-o.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:A};break;case"left":v={x:n.x-o.width,y:A};break;default:v={x:n.x,y:n.y}}switch(nn(t)){case"start":v[i]-=f*(r&&c?-1:1);break;case"end":v[i]+=f*(r&&c?-1:1);break}return v}const jw=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:A}=zu(c,n,l),f=n,v={},w=0;for(let y=0;y<a.length;y++){const{name:I,fn:b}=a[y],{x:h,y:m,data:g,reset:u}=await b({x:d,y:A,initialPlacement:n,placement:f,strategy:o,middlewareData:v,rects:c,platform:i,elements:{reference:e,floating:t}});d=h??d,A=m??A,v={...v,[I]:{...v[I],...g}},u&&w<=50&&(w++,typeof u=="object"&&(u.placement&&(f=u.placement),u.rects&&(c=u.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):u.rects),{x:d,y:A}=zu(c,f,l)),y=-1)}return{x:d,y:A,placement:f,strategy:o,middlewareData:v}};async function Un(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:A="floating",altBoundary:f=!1,padding:v=0}=sr(t,e),w=Gu(v),I=a[f?A==="floating"?"reference":"floating":A],b=gs(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(I)))==null||r?I:I.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),h=A==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,m=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),g=await(s.isElement==null?void 0:s.isElement(m))?await(s.getScale==null?void 0:s.getScale(m))||{x:1,y:1}:{x:1,y:1},u=gs(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:h,offsetParent:m,strategy:l}):h);return{top:(b.top-u.top+w.top)/g.y,bottom:(u.bottom-b.bottom+w.bottom)/g.y,left:(b.left-u.left+w.left)/g.x,right:(u.right-b.right+w.right)/g.x}}const Gw=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=sr(e,t)||{};if(c==null)return{};const A=Gu(d),f={x:r,y:n},v=Sa(o),w=Va(v),y=await i.getDimensions(c),I=v==="y",b=I?"top":"left",h=I?"bottom":"right",m=I?"clientHeight":"clientWidth",g=s.reference[w]+s.reference[v]-f[v]-s.floating[w],u=f[v]-s.reference[v],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let E=C?C[m]:0;(!E||!await(i.isElement==null?void 0:i.isElement(C)))&&(E=a.floating[m]||s.floating[w]);const B=g/2-u/2,k=E/2-y[w]/2-1,F=Ir(A[b],k),Q=Ir(A[h],k),N=F,R=E-y[w]-Q,M=E/2-y[w]/2+B,x=Ea(N,M,R),T=!l.arrow&&nn(o)!=null&&M!==x&&s.reference[w]/2-(M<N?F:Q)-y[w]/2<0,X=T?M<N?M-N:M-R:0;return{[v]:f[v]+X,data:{[v]:x,centerOffset:M-x-X,...T&&{alignmentOffset:X}},reset:T}}}),zw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:A=!0,fallbackPlacements:f,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...I}=sr(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=ir(o),h=Cr(a),m=ir(a)===a,g=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=f||(m||!y?[fs(a)]:Qw(a)),C=w!=="none";!f&&C&&u.push(...Kw(a,y,w,g));const E=[a,...u],B=await Un(t,I),k=[];let F=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&k.push(B[b]),A){const M=Lw(o,i,g);k.push(B[M[0]],B[M[1]])}if(F=[...F,{placement:o,overflows:k}],!k.every(M=>M<=0)){var Q,N;const M=(((Q=s.flip)==null?void 0:Q.index)||0)+1,x=E[M];if(x)return{data:{index:M,overflows:F},reset:{placement:x}};let T=(N=F.filter(X=>X.overflows[0]<=0).sort((X,j)=>X.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!T)switch(v){case"bestFit":{var R;const X=(R=F.filter(j=>{if(C){const q=Cr(j.placement);return q===h||q==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(q=>q>0).reduce((q,D)=>q+D,0)]).sort((j,q)=>j[1]-q[1])[0])==null?void 0:R[0];X&&(T=X);break}case"initialPlacement":T=a;break}if(o!==T)return{reset:{placement:T}}}return{}}}};function Yu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wu(e){return Rw.some(t=>e[t]>=0)}const Yw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=sr(e,t);switch(n){case"referenceHidden":{const s=await Un(t,{...o,elementContext:"reference"}),i=Yu(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Wu(i)}}}case"escaped":{const s=await Un(t,{...o,altBoundary:!0}),i=Yu(s,r.floating);return{data:{escapedOffsets:i,escaped:Wu(i)}}}default:return{}}}}};async function Ww(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=ir(r),a=nn(r),l=Cr(r)==="y",c=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,A=sr(t,e);let{mainAxis:f,crossAxis:v,alignmentAxis:w}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:A.mainAxis||0,crossAxis:A.crossAxis||0,alignmentAxis:A.alignmentAxis};return a&&typeof w=="number"&&(v=a==="end"?w*-1:w),l?{x:v*d,y:f*c}:{x:f*c,y:v*d}}const Jw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Ww(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Xw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:I=>{let{x:b,y:h}=I;return{x:b,y:h}}},...l}=sr(e,t),c={x:r,y:n},d=await Un(t,l),A=Cr(ir(o)),f=xa(A);let v=c[f],w=c[A];if(s){const I=f==="y"?"top":"left",b=f==="y"?"bottom":"right",h=v+d[I],m=v-d[b];v=Ea(h,v,m)}if(i){const I=A==="y"?"top":"left",b=A==="y"?"bottom":"right",h=w+d[I],m=w-d[b];w=Ea(h,w,m)}const y=a.fn({...t,[f]:v,[A]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[f]:s,[A]:i}}}}}},Hw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=sr(e,t),d={x:r,y:n},A=Cr(o),f=xa(A);let v=d[f],w=d[A];const y=sr(a,t),I=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const m=f==="y"?"height":"width",g=s.reference[f]-s.floating[m]+I.mainAxis,u=s.reference[f]+s.reference[m]-I.mainAxis;v<g?v=g:v>u&&(v=u)}if(c){var b,h;const m=f==="y"?"width":"height",g=["top","left"].includes(ir(o)),u=s.reference[A]-s.floating[m]+(g&&((b=i.offset)==null?void 0:b[A])||0)+(g?0:I.crossAxis),C=s.reference[A]+s.reference[m]+(g?0:((h=i.offset)==null?void 0:h[A])||0)-(g?I.crossAxis:0);w<u?w=u:w>C&&(w=C)}return{[f]:v,[A]:w}}}},Zw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=sr(e,t),d=await Un(t,c),A=ir(o),f=nn(o),v=Cr(o)==="y",{width:w,height:y}=s.floating;let I,b;A==="top"||A==="bottom"?(I=A,b=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(b=A,I=f==="end"?"top":"bottom");const h=y-d.top-d.bottom,m=w-d.left-d.right,g=Ir(y-d[I],h),u=Ir(w-d[b],m),C=!t.middlewareData.shift;let E=g,B=u;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(B=m),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=h),C&&!f){const F=vt(d.left,0),Q=vt(d.right,0),N=vt(d.top,0),R=vt(d.bottom,0);v?B=w-2*(F!==0||Q!==0?F+Q:vt(d.left,d.right)):E=y-2*(N!==0||R!==0?N+R:vt(d.top,d.bottom))}await l({...t,availableWidth:B,availableHeight:E});const k=await i.getDimensions(a.floating);return w!==k.width||y!==k.height?{reset:{rects:!0}}:{}}}};function ps(){return typeof window<"u"}function on(e){return Ju(e)?(e.nodeName||"").toLowerCase():"#document"}function wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=(Ju(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ju(e){return ps()?e instanceof Node||e instanceof wt(e).Node:!1}function Pt(e){return ps()?e instanceof Element||e instanceof wt(e).Element:!1}function jt(e){return ps()?e instanceof HTMLElement||e instanceof wt(e).HTMLElement:!1}function Xu(e){return!ps()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wt(e).ShadowRoot}function Kn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Mt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function _w(e){return["table","td","th"].includes(on(e))}function hs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Pa(e){const t=Ma(),r=Pt(e)?Mt(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function $w(e){let t=Er(e);for(;jt(t)&&!sn(t);){if(Pa(t))return t;if(hs(t))return null;t=Er(t)}return null}function Ma(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sn(e){return["html","body","#document"].includes(on(e))}function Mt(e){return wt(e).getComputedStyle(e)}function ms(e){return Pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Er(e){if(on(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xu(e)&&e.host||Ft(e);return Xu(t)?t.host:t}function Hu(e){const t=Er(e);return sn(t)?e.ownerDocument?e.ownerDocument.body:e.body:jt(t)&&Kn(t)?t:Hu(t)}function Fn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Hu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=wt(o);if(s){const a=ka(i);return t.concat(i,i.visualViewport||[],Kn(o)?o:[],a&&r?Fn(a):[])}return t.concat(o,Fn(o,[],r))}function ka(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zu(e){const t=Mt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=jt(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=us(r)!==s||us(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Oa(e){return Pt(e)?e:e.contextElement}function an(e){const t=Oa(e);if(!jt(t))return Kt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Zu(t);let i=(s?us(r.width):r.width)/n,a=(s?us(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const eb=Kt(0);function _u(e){const t=wt(e);return!Ma()||!t.visualViewport?eb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tb(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==wt(e)?!1:t}function Rr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Oa(e);let i=Kt(1);t&&(n?Pt(n)&&(i=an(n)):i=an(e));const a=tb(s,r,n)?_u(s):Kt(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,A=o.height/i.y;if(s){const f=wt(s),v=n&&Pt(n)?wt(n):n;let w=f,y=ka(w);for(;y&&n&&v!==w;){const I=an(y),b=y.getBoundingClientRect(),h=Mt(y),m=b.left+(y.clientLeft+parseFloat(h.paddingLeft))*I.x,g=b.top+(y.clientTop+parseFloat(h.paddingTop))*I.y;l*=I.x,c*=I.y,d*=I.x,A*=I.y,l+=m,c+=g,w=wt(y),y=ka(w)}}return gs({width:d,height:A,x:l,y:c})}function Da(e,t){const r=ms(e).scrollLeft;return t?t.left+r:Rr(Ft(e)).left+r}function $u(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Da(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function rb(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Ft(n),a=t?hs(t.floating):!1;if(n===i||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Kt(1);const d=Kt(0),A=jt(n);if((A||!A&&!s)&&((on(n)!=="body"||Kn(i))&&(l=ms(n)),jt(n))){const v=Rr(n);c=an(n),d.x=v.x+n.clientLeft,d.y=v.y+n.clientTop}const f=i&&!A&&!s?$u(i,l,!0):Kt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function nb(e){return Array.from(e.getClientRects())}function ob(e){const t=Ft(e),r=ms(e),n=e.ownerDocument.body,o=vt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=vt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Da(e);const a=-r.scrollTop;return Mt(n).direction==="rtl"&&(i+=vt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}function sb(e,t){const r=wt(e),n=Ft(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Ma();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function ib(e,t){const r=Rr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=jt(e)?an(e):Kt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:i,height:a,x:l,y:c}}function ed(e,t,r){let n;if(t==="viewport")n=sb(e,r);else if(t==="document")n=ob(Ft(e));else if(Pt(t))n=ib(t,r);else{const o=_u(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return gs(n)}function td(e,t){const r=Er(e);return r===t||!Pt(r)||sn(r)?!1:Mt(r).position==="fixed"||td(r,t)}function ab(e,t){const r=t.get(e);if(r)return r;let n=Fn(e,[],!1).filter(a=>Pt(a)&&on(a)!=="body"),o=null;const s=Mt(e).position==="fixed";let i=s?Er(e):e;for(;Pt(i)&&!sn(i);){const a=Mt(i),l=Pa(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Kn(i)&&!l&&td(e,i))?n=n.filter(d=>d!==i):o=a,i=Er(i)}return t.set(e,n),n}function Ab(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?hs(t)?[]:ab(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((c,d)=>{const A=ed(t,d,o);return c.top=vt(A.top,c.top),c.right=Ir(A.right,c.right),c.bottom=Ir(A.bottom,c.bottom),c.left=vt(A.left,c.left),c},ed(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lb(e){const{width:t,height:r}=Zu(e);return{width:t,height:r}}function cb(e,t,r){const n=jt(t),o=Ft(t),s=r==="fixed",i=Rr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Kt(0);if(n||!n&&!s)if((on(t)!=="body"||Kn(o))&&(a=ms(t)),n){const f=Rr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Da(o));const c=o&&!n&&!s?$u(o,a):Kt(0),d=i.left+a.scrollLeft-l.x-c.x,A=i.top+a.scrollTop-l.y-c.y;return{x:d,y:A,width:i.width,height:i.height}}function Ta(e){return Mt(e).position==="static"}function rd(e,t){if(!jt(e)||Mt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ft(e)===r&&(r=r.ownerDocument.body),r}function nd(e,t){const r=wt(e);if(hs(e))return r;if(!jt(e)){let o=Er(e);for(;o&&!sn(o);){if(Pt(o)&&!Ta(o))return o;o=Er(o)}return r}let n=rd(e,t);for(;n&&_w(n)&&Ta(n);)n=rd(n,t);return n&&sn(n)&&Ta(n)&&!Pa(n)?r:n||$w(e)||r}const ub=async function(e){const t=this.getOffsetParent||nd,r=this.getDimensions,n=await r(e.floating);return{reference:cb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function db(e){return Mt(e).direction==="rtl"}const fb={convertOffsetParentRelativeRectToViewportRelativeRect:rb,getDocumentElement:Ft,getClippingRect:Ab,getOffsetParent:nd,getElementRects:ub,getClientRects:nb,getDimensions:lb,getScale:an,isElement:Pt,isRTL:db};function od(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gb(e,t){let r=null,n;const o=Ft(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:A,width:f,height:v}=c;if(a||t(),!f||!v)return;const w=ds(A),y=ds(o.clientWidth-(d+f)),I=ds(o.clientHeight-(A+v)),b=ds(d),m={rootMargin:-w+"px "+-y+"px "+-I+"px "+-b+"px",threshold:vt(0,Ir(1,l))||1};let g=!0;function u(C){const E=C[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!od(c,e.getBoundingClientRect())&&i(),g=!1}try{r=new IntersectionObserver(u,{...m,root:o.ownerDocument})}catch{r=new IntersectionObserver(u,m)}r.observe(e)}return i(!0),s}function pb(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Oa(e),d=o||s?[...c?Fn(c):[],...Fn(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const A=c&&a?gb(c,r):null;let f=-1,v=null;i&&(v=new ResizeObserver(b=>{let[h]=b;h&&h.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var m;(m=v)==null||m.observe(t)})),r()}),c&&!l&&v.observe(c),v.observe(t));let w,y=l?Rr(e):null;l&&I();function I(){const b=Rr(e);y&&!od(y,b)&&r(),y=b,w=requestAnimationFrame(I)}return r(),()=>{var b;d.forEach(h=>{o&&h.removeEventListener("scroll",r),s&&h.removeEventListener("resize",r)}),A==null||A(),(b=v)==null||b.disconnect(),v=null,l&&cancelAnimationFrame(w)}}const hb=Jw,mb=Xw,yb=zw,vb=Zw,wb=Yw,sd=Gw,bb=Hw,Ib=(e,t,r)=>{const n=new Map,o={platform:fb,...r},s={...o.platform,_c:n};return jw(e,t,{...o,platform:s})};var ys=typeof document<"u"?S.useLayoutEffect:S.useEffect;function vs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!vs(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!vs(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function id(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ad(e,t){const r=id(e);return Math.round(t*r)/r}function Ra(e){const t=V.useRef(e);return ys(()=>{t.current=e}),t}function Cb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,A]=V.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=V.useState(n);vs(f,n)||v(n);const[w,y]=V.useState(null),[I,b]=V.useState(null),h=V.useCallback(j=>{j!==C.current&&(C.current=j,y(j))},[]),m=V.useCallback(j=>{j!==E.current&&(E.current=j,b(j))},[]),g=s||w,u=i||I,C=V.useRef(null),E=V.useRef(null),B=V.useRef(d),k=l!=null,F=Ra(l),Q=Ra(o),N=Ra(c),R=V.useCallback(()=>{if(!C.current||!E.current)return;const j={placement:t,strategy:r,middleware:f};Q.current&&(j.platform=Q.current),Ib(C.current,E.current,j).then(q=>{const D={...q,isPositioned:N.current!==!1};M.current&&!vs(B.current,D)&&(B.current=D,RA.flushSync(()=>{A(D)}))})},[f,t,r,Q,N]);ys(()=>{c===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,A(j=>({...j,isPositioned:!1})))},[c]);const M=V.useRef(!1);ys(()=>(M.current=!0,()=>{M.current=!1}),[]),ys(()=>{if(g&&(C.current=g),u&&(E.current=u),g&&u){if(F.current)return F.current(g,u,R);R()}},[g,u,R,F,k]);const x=V.useMemo(()=>({reference:C,floating:E,setReference:h,setFloating:m}),[h,m]),T=V.useMemo(()=>({reference:g,floating:u}),[g,u]),X=V.useMemo(()=>{const j={position:r,left:0,top:0};if(!T.floating)return j;const q=ad(T.floating,d.x),D=ad(T.floating,d.y);return a?{...j,transform:"translate("+q+"px, "+D+"px)",...id(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:q,top:D}},[r,a,T.floating,d.x,d.y]);return V.useMemo(()=>({...d,update:R,refs:x,elements:T,floatingStyles:X}),[d,R,x,T,X])}const Eb=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?sd({element:n.current,padding:o}).fn(r):{}:n?sd({element:n,padding:o}).fn(r):{}}}},xb=(e,t)=>({...hb(e),options:[e,t]}),Vb=(e,t)=>({...mb(e),options:[e,t]}),Sb=(e,t)=>({...bb(e),options:[e,t]}),Bb=(e,t)=>({...yb(e),options:[e,t]}),Pb=(e,t)=>({...vb(e),options:[e,t]}),Mb=(e,t)=>({...wb(e),options:[e,t]}),kb=(e,t)=>({...Eb(e),options:[e,t]});var Ob="Arrow",Ad=V.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return p.jsx(Be.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ad.displayName=Ob;var Db=Ad;function ld(e){const[t,r]=V.useState(void 0);return Lt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var qa="Popper",[cd,ud]=Nt(qa),[Tb,dd]=cd(qa),fd=e=>{const{__scopePopper:t,children:r}=e,[n,o]=V.useState(null);return p.jsx(Tb,{scope:t,anchor:n,onAnchorChange:o,children:r})};fd.displayName=qa;var gd="PopperAnchor",pd=V.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=dd(gd,r),i=V.useRef(null),a=je(t,i);return V.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:p.jsx(Be.div,{...o,ref:a})});pd.displayName=gd;var Na="PopperContent",[Rb,qb]=cd(Na),hd=V.forwardRef((e,t)=>{var ne,L,U,Y,H,G;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:A="partial",hideWhenDetached:f=!1,updatePositionStrategy:v="optimized",onPlaced:w,...y}=e,I=dd(Na,r),[b,h]=V.useState(null),m=je(t,se=>h(se)),[g,u]=V.useState(null),C=ld(g),E=(C==null?void 0:C.width)??0,B=(C==null?void 0:C.height)??0,k=n+(s!=="center"?"-"+s:""),F=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Q=Array.isArray(c)?c:[c],N=Q.length>0,R={padding:F,boundary:Q.filter(Lb),altBoundary:N},{refs:M,floatingStyles:x,placement:T,isPositioned:X,middlewareData:j}=Cb({strategy:"fixed",placement:k,whileElementsMounted:(...se)=>pb(...se,{animationFrame:v==="always"}),elements:{reference:I.anchor},middleware:[xb({mainAxis:o+B,alignmentAxis:i}),l&&Vb({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?Sb():void 0,...R}),l&&Bb({...R}),Pb({...R,apply:({elements:se,rects:ge,availableWidth:Se,availableHeight:ye})=>{const{width:Ce,height:ze}=ge.reference,qe=se.floating.style;qe.setProperty("--radix-popper-available-width",`${Se}px`),qe.setProperty("--radix-popper-available-height",`${ye}px`),qe.setProperty("--radix-popper-anchor-width",`${Ce}px`),qe.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),g&&kb({element:g,padding:a}),Qb({arrowWidth:E,arrowHeight:B}),f&&Mb({strategy:"referenceHidden",...R})]}),[q,D]=vd(T),K=It(w);Lt(()=>{X&&(K==null||K())},[X,K]);const W=(ne=j.arrow)==null?void 0:ne.x,Z=(L=j.arrow)==null?void 0:L.y,$=((U=j.arrow)==null?void 0:U.centerOffset)!==0,[ae,re]=V.useState();return Lt(()=>{b&&re(window.getComputedStyle(b).zIndex)},[b]),p.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...x,transform:X?x.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Y=j.transformOrigin)==null?void 0:Y.x,(H=j.transformOrigin)==null?void 0:H.y].join(" "),...((G=j.hide)==null?void 0:G.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Rb,{scope:r,placedSide:q,onArrowChange:u,arrowX:W,arrowY:Z,shouldHideArrow:$,children:p.jsx(Be.div,{"data-side":q,"data-align":D,...y,ref:m,style:{...y.style,animation:X?void 0:"none"}})})})});hd.displayName=Na;var md="PopperArrow",Nb={top:"bottom",right:"left",bottom:"top",left:"right"},yd=V.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=qb(md,n),i=Nb[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Db,{...o,ref:r,style:{...o.style,display:"block"}})})});yd.displayName=md;function Lb(e){return e!==null}var Qb=e=>({name:"transformOrigin",options:e,fn(t){var I,b,h;const{placement:r,rects:n,middlewareData:o}=t,i=((I=o.arrow)==null?void 0:I.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=vd(r),A={start:"0%",center:"50%",end:"100%"}[d],f=(((b=o.arrow)==null?void 0:b.x)??0)+a/2,v=(((h=o.arrow)==null?void 0:h.y)??0)+l/2;let w="",y="";return c==="bottom"?(w=i?A:`${f}px`,y=`${-l}px`):c==="top"?(w=i?A:`${f}px`,y=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,y=i?A:`${v}px`):c==="left"&&(w=`${n.floating.width+l}px`,y=i?A:`${v}px`),{data:{x:w,y}}}});function vd(e){const[t,r="center"]=e.split("-");return[t,r]}var Ub=fd,Kb=pd,Fb=hd,jb=yd,Gb="Portal",La=V.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,s]=V.useState(!1);Lt(()=>s(!0),[]);const i=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?no.createPortal(p.jsx(Be.div,{...n,ref:t}),i):null});La.displayName=Gb;function zb(e,t){return V.useReducer((r,n)=>t[r][n]??r,e)}var ar=e=>{const{present:t,children:r}=e,n=Yb(t),o=typeof r=="function"?r({present:n.isPresent}):V.Children.only(r),s=je(n.ref,Wb(o));return typeof r=="function"||n.isPresent?V.cloneElement(o,{ref:s}):null};ar.displayName="Presence";function Yb(e){const[t,r]=V.useState(),n=V.useRef({}),o=V.useRef(e),s=V.useRef("none"),i=e?"mounted":"unmounted",[a,l]=zb(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V.useEffect(()=>{const c=ws(n.current);s.current=a==="mounted"?c:"none"},[a]),Lt(()=>{const c=n.current,d=o.current;if(d!==e){const f=s.current,v=ws(c);e?l("MOUNT"):v==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&f!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Lt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,A=v=>{const y=ws(n.current).includes(v.animationName);if(v.target===t&&y&&(l("ANIMATION_END"),!o.current)){const I=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=I)})}},f=v=>{v.target===t&&(s.current=ws(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",A),t.addEventListener("animationend",A),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",A),t.removeEventListener("animationend",A)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:V.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function Wb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Qa="rovingFocusGroup.onEntryFocus",Jb={bubbles:!1,cancelable:!0},bs="RovingFocusGroup",[Ua,wd,Xb]=Ou(bs),[Hb,Is]=Nt(bs,[Xb]),[Zb,_b]=Hb(bs),bd=V.forwardRef((e,t)=>p.jsx(Ua.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ua.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx($b,{...e,ref:t})})}));bd.displayName=bs;var $b=V.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...A}=e,f=V.useRef(null),v=je(t,f),w=ma(s),[y=null,I]=Qn({prop:i,defaultProp:a,onChange:l}),[b,h]=V.useState(!1),m=It(c),g=wd(r),u=V.useRef(!1),[C,E]=V.useState(0);return V.useEffect(()=>{const B=f.current;if(B)return B.addEventListener(Qa,m),()=>B.removeEventListener(Qa,m)},[m]),p.jsx(Zb,{scope:r,orientation:n,dir:w,loop:o,currentTabStopId:y,onItemFocus:V.useCallback(B=>I(B),[I]),onItemShiftTab:V.useCallback(()=>h(!0),[]),onFocusableItemAdd:V.useCallback(()=>E(B=>B+1),[]),onFocusableItemRemove:V.useCallback(()=>E(B=>B-1),[]),children:p.jsx(Be.div,{tabIndex:b||C===0?-1:0,"data-orientation":n,...A,ref:v,style:{outline:"none",...e.style},onMouseDown:me(e.onMouseDown,()=>{u.current=!0}),onFocus:me(e.onFocus,B=>{const k=!u.current;if(B.target===B.currentTarget&&k&&!b){const F=new CustomEvent(Qa,Jb);if(B.currentTarget.dispatchEvent(F),!F.defaultPrevented){const Q=g().filter(T=>T.focusable),N=Q.find(T=>T.active),R=Q.find(T=>T.id===y),x=[N,R,...Q].filter(Boolean).map(T=>T.ref.current);Ed(x,d)}}u.current=!1}),onBlur:me(e.onBlur,()=>h(!1))})})}),Id="RovingFocusGroupItem",Cd=V.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,...i}=e,a=Tr(),l=s||a,c=_b(Id,r),d=c.currentTabStopId===l,A=wd(r),{onFocusableItemAdd:f,onFocusableItemRemove:v}=c;return V.useEffect(()=>{if(n)return f(),()=>v()},[n,f,v]),p.jsx(Ua.ItemSlot,{scope:r,id:l,focusable:n,active:o,children:p.jsx(Be.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:me(e.onMouseDown,w=>{n?c.onItemFocus(l):w.preventDefault()}),onFocus:me(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:me(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const y=rI(w,c.orientation,c.dir);if(y!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let b=A().filter(h=>h.focusable).map(h=>h.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const h=b.indexOf(w.currentTarget);b=c.loop?nI(b,h+1):b.slice(h+1)}setTimeout(()=>Ed(b))}})})})});Cd.displayName=Id;var eI={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tI(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rI(e,t,r){const n=tI(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return eI[n]}function Ed(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function nI(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var xd=bd,Vd=Cd,oI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},An=new WeakMap,Cs=new WeakMap,Es={},Ka=0,Sd=function(e){return e&&(e.host||Sd(e.parentNode))},sI=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Sd(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},iI=function(e,t,r,n){var o=sI(t,Array.isArray(e)?e:[e]);Es[r]||(Es[r]=new WeakMap);var s=Es[r],i=[],a=new Set,l=new Set(o),c=function(A){!A||a.has(A)||(a.add(A),c(A.parentNode))};o.forEach(c);var d=function(A){!A||l.has(A)||Array.prototype.forEach.call(A.children,function(f){if(a.has(f))d(f);else try{var v=f.getAttribute(n),w=v!==null&&v!=="false",y=(An.get(f)||0)+1,I=(s.get(f)||0)+1;An.set(f,y),s.set(f,I),i.push(f),y===1&&w&&Cs.set(f,!0),I===1&&f.setAttribute(r,"true"),w||f.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return d(t),a.clear(),Ka++,function(){i.forEach(function(A){var f=An.get(A)-1,v=s.get(A)-1;An.set(A,f),s.set(A,v),f||(Cs.has(A)||A.removeAttribute(n),Cs.delete(A)),v||A.removeAttribute(r)}),Ka--,Ka||(An=new WeakMap,An=new WeakMap,Cs=new WeakMap,Es={})}},Bd=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=oI(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),iI(n,o,r,"aria-hidden")):function(){return null}},Gt=function(){return Gt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Gt.apply(this,arguments)};function Pd(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function aI(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var xs="right-scroll-bar-position",Vs="width-before-scroll-bar",AI="with-scroll-bars-hidden",lI="--removed-body-scroll-bar-size";function Fa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function cI(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var uI=typeof window<"u"?V.useLayoutEffect:V.useEffect,Md=new WeakMap;function dI(e,t){var r=cI(null,function(n){return e.forEach(function(o){return Fa(o,n)})});return uI(function(){var n=Md.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(a){s.has(a)||Fa(a,null)}),s.forEach(function(a){o.has(a)||Fa(a,i)})}Md.set(r,e)},[e]),r}function fI(e){return e}function gI(e,t){t===void 0&&(t=fI);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(s),i=r}var l=function(){var d=i;i=[],d.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),r}}}};return o}function pI(e){e===void 0&&(e={});var t=gI(null);return t.options=Gt({async:!0,ssr:!1},e),t}var kd=function(e){var t=e.sideCar,r=Pd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return V.createElement(n,Gt({},r))};kd.isSideCarExport=!0;function hI(e,t){return e.useMedium(t),kd}var Od=pI(),ja=function(){},Ss=V.forwardRef(function(e,t){var r=V.useRef(null),n=V.useState({onScrollCapture:ja,onWheelCapture:ja,onTouchMoveCapture:ja}),o=n[0],s=n[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,A=e.shards,f=e.sideCar,v=e.noIsolation,w=e.inert,y=e.allowPinchZoom,I=e.as,b=I===void 0?"div":I,h=e.gapMode,m=Pd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=f,u=dI([r,t]),C=Gt(Gt({},m),o);return V.createElement(V.Fragment,null,d&&V.createElement(g,{sideCar:Od,removeScrollBar:c,shards:A,noIsolation:v,inert:w,setCallbacks:s,allowPinchZoom:!!y,lockRef:r,gapMode:h}),i?V.cloneElement(V.Children.only(a),Gt(Gt({},C),{ref:u})):V.createElement(b,Gt({},C,{className:l,ref:u}),a))});Ss.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ss.classNames={fullWidth:Vs,zeroRight:xs};var mI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function yI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mI();return t&&e.setAttribute("nonce",t),e}function vI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bI=function(){var e=0,t=null;return{add:function(r){e==0&&(t=yI())&&(vI(t,r),wI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},II=function(){var e=bI();return function(t,r){V.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Dd=function(){var e=II(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},CI={left:0,top:0,right:0,gap:0},Ga=function(e){return parseInt(e||"",10)||0},EI=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ga(r),Ga(n),Ga(o)]},xI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return CI;var t=EI(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},VI=Dd(),ln="data-scroll-locked",SI=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
50
|
+
`,$v="️",ew="",pa="";let is=null,as=null;function tw(e=[]){const t={};yt.groups=t;const r=new yt;is==null&&(is=Cu(Wv)),as==null&&(as=Cu(Jv)),ee(r,"'",aa),ee(r,"{",Dn),ee(r,"}",Tn),ee(r,"[",To),ee(r,"]",Ro),ee(r,"(",qo),ee(r,")",No),ee(r,"<",Lo),ee(r,">",Qo),ee(r,"(",Uo),ee(r,")",Ko),ee(r,"「",Fo),ee(r,"」",jo),ee(r,"『",Go),ee(r,"』",zo),ee(r,"<",Yo),ee(r,">",Wo),ee(r,"&",Jo),ee(r,"*",Xo),ee(r,"@",yr),ee(r,"`",Zo),ee(r,"^",_o),ee(r,":",vr),ee(r,",",Aa),ee(r,"$",$o),ee(r,".",Qt),ee(r,"=",es),ee(r,"!",la),ee(r,"-",Ct),ee(r,"%",Rn),ee(r,"|",ts),ee(r,"+",rs),ee(r,"#",ns),ee(r,"?",qn),ee(r,'"',ca),ee(r,"/",Ut),ee(r,";",ua),ee(r,"~",Nn),ee(r,"_",os),ee(r,"\\",Ho),ee(r,"・",yu);const n=Ne(r,or,oa,{[Hi]:!0});Ne(n,or,n);const o=Ne(n,nr,hu,{[Mn]:!0}),s=Ne(n,Ln,mu,{[kn]:!0}),i=Ne(r,nr,rr,{[Zi]:!0});Ne(i,or,o),Ne(i,nr,i),Ne(o,or,o),Ne(o,nr,o);const a=Ne(r,Ln,ta,{[_i]:!0});Ne(a,nr),Ne(a,or,s),Ne(a,Ln,a),Ne(s,or,s),Ne(s,nr),Ne(s,Ln,s);const l=ee(r,ga,ia,{[ea]:!0}),c=ee(r,bu,sa,{[ea]:!0}),d=Ne(r,fa,sa,{[ea]:!0});ee(r,pa,d),ee(c,ga,l),ee(c,pa,d),Ne(c,fa,d),ee(d,bu),ee(d,ga),Ne(d,fa,d),ee(d,pa,d);const A=Ne(r,da,vu,{[gu]:!0});ee(A,"#"),Ne(A,da,A),ee(A,$v,A);const f=ee(A,ew);ee(f,"#"),Ne(f,da,A);const v=[[nr,i],[or,o]],w=[[nr,null],[Ln,a],[or,s]];for(let y=0;y<is.length;y++)wr(r,is[y],ra,rr,v);for(let y=0;y<as.length;y++)wr(r,as[y],na,ta,w);Dr(ra,{tld:!0,ascii:!0},t),Dr(na,{utld:!0,alpha:!0},t),wr(r,"file",Do,rr,v),wr(r,"mailto",Do,rr,v),wr(r,"http",tn,rr,v),wr(r,"https",tn,rr,v),wr(r,"ftp",tn,rr,v),wr(r,"ftps",tn,rr,v),Dr(Do,{scheme:!0,ascii:!0},t),Dr(tn,{slashscheme:!0,ascii:!0},t),e=e.sort((y,I)=>y[0]>I[0]?1:-1);for(let y=0;y<e.length;y++){const I=e[y][0],h=e[y][1]?{[Xv]:!0}:{[Hv]:!0};I.indexOf("-")>=0?h[$i]=!0:nr.test(I)?or.test(I)?h[Mn]=!0:h[Zi]=!0:h[Hi]=!0,pu(r,I,I,h)}return pu(r,"localhost",On,{ascii:!0}),r.jd=new yt(ss),{start:r,tokens:Or({groups:t},wu)}}function Iu(e,t){const r=rw(t.replace(/[A-Z]/g,a=>a.toLowerCase())),n=r.length,o=[];let s=0,i=0;for(;i<n;){let a=e,l=null,c=0,d=null,A=-1,f=-1;for(;i<n&&(l=a.go(r[i]));)a=l,a.accepts()?(A=0,f=0,d=a):A>=0&&(A+=r[i].length,f++),c+=r[i].length,s+=r[i].length,i++;s-=A,i-=f,c-=A,o.push({t:d.t,v:t.slice(s-c,s),s:s-c,e:s})}return o}function rw(e){const t=[],r=e.length;let n=0;for(;n<r;){let o=e.charCodeAt(n),s,i=o<55296||o>56319||n+1===r||(s=e.charCodeAt(n+1))<56320||s>57343?e[n]:e.slice(n,n+2);t.push(i),n+=i.length}return t}function wr(e,t,r,n,o){let s;const i=t.length;for(let a=0;a<i-1;a++){const l=t[a];e.j[l]?s=e.j[l]:(s=new yt(n),s.jr=o.slice(),e.j[l]=s),e=s}return s=new yt(r),s.jr=o.slice(),e.j[t[i-1]]=s,s}function Cu(e){const t=[],r=[];let n=0,o="0123456789";for(;n<e.length;){let s=0;for(;o.indexOf(e[n+s])>=0;)s++;if(s>0){t.push(r.join(""));for(let i=parseInt(e.substring(n,n+s),10);i>0;i--)r.pop();n+=s}else r.push(e[n]),n++}return t}const rn={defaultProtocol:"http",events:null,format:Eu,formatHref:Eu,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function As(e,t=null){let r=Or({},rn);e&&(r=Or(r,e instanceof As?e.o:e));const n=r.ignoreTags,o=[];for(let s=0;s<n.length;s++)o.push(n[s].toUpperCase());this.o=r,t&&(this.defaultRender=t),this.ignoreTags=o}As.prototype={o:rn,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,r){const n=t!=null;let o=this.o[e];return o&&(typeof o=="object"?(o=r.t in o?o[r.t]:rn[e],typeof o=="function"&&n&&(o=o(t,r))):typeof o=="function"&&n&&(o=o(t,r.t,r)),o)},getObj(e,t,r){let n=this.o[e];return typeof n=="function"&&t!=null&&(n=n(t,r.t,r)),n},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function Eu(e){return e}var xu=Object.freeze({__proto__:null,defaults:rn,Options:As,assign:Or});function Vu(e,t){this.t="token",this.v=e,this.tk=t}Vu.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),r=e.get("truncate",t,this),n=e.get("format",t,this);return r&&n.length>r?n.substring(0,r)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=rn.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,r=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",r,this),o=e.get("tagName",r,t),s=this.toFormattedString(e),i={},a=e.get("className",r,t),l=e.get("target",r,t),c=e.get("rel",r,t),d=e.getObj("attributes",r,t),A=e.getObj("events",r,t);return i.href=n,a&&(i.class=a),l&&(i.target=l),c&&(i.rel=c),d&&Or(i,d),{tagName:o,attributes:i,content:s,eventListeners:A}}};function ls(e,t){class r extends Vu{constructor(o,s){super(o,s),this.t=e}}for(const n in t)r.prototype[n]=t[n];return r.t=e,r}const Su=ls("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Bu=ls("text"),nw=ls("nl"),cs=ls("url",{isLink:!0,toHref(e=rn.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==On&&e[1].t===vr}}),Et=e=>new yt(e);function ow({groups:e}){const t=e.domain.concat([Jo,Xo,yr,Ho,Zo,_o,$o,es,Ct,oa,Rn,ts,rs,ns,Ut,ss,Nn,os]),r=[vr,Aa,Qt,la,Rn,qn,ca,ua,Lo,Qo,Dn,Tn,Ro,To,qo,No,Uo,Ko,Fo,jo,Go,zo,Yo,Wo],n=[Jo,aa,Xo,Ho,Zo,_o,$o,es,Ct,Dn,Tn,Rn,ts,rs,ns,qn,Ut,ss,Nn,os],o=Et(),s=ee(o,Nn);we(s,n,s),we(s,e.domain,s);const i=Et(),a=Et(),l=Et();we(o,e.domain,i),we(o,e.scheme,a),we(o,e.slashscheme,l),we(i,n,s),we(i,e.domain,i);const c=ee(i,yr);ee(s,yr,c),ee(a,yr,c),ee(l,yr,c);const d=ee(s,Qt);we(d,n,s),we(d,e.domain,s);const A=Et();we(c,e.domain,A),we(A,e.domain,A);const f=ee(A,Qt);we(f,e.domain,A);const v=Et(Su);we(f,e.tld,v),we(f,e.utld,v),ee(c,On,v);const w=ee(A,Ct);ee(w,Ct,w),we(w,e.domain,A),we(v,e.domain,A),ee(v,Qt,f),ee(v,Ct,w);const y=ee(v,vr);we(y,e.numeric,Su);const I=ee(i,Ct),b=ee(i,Qt);ee(I,Ct,I),we(I,e.domain,i),we(b,n,s),we(b,e.domain,i);const h=Et(cs);we(b,e.tld,h),we(b,e.utld,h),we(h,e.domain,i),we(h,n,s),ee(h,Qt,b),ee(h,Ct,I),ee(h,yr,c);const m=ee(h,vr),g=Et(cs);we(m,e.numeric,g);const u=Et(cs),C=Et();we(u,t,u),we(u,r,C),we(C,t,u),we(C,r,C),ee(h,Ut,u),ee(g,Ut,u);const E=ee(a,vr),B=ee(l,vr),k=ee(B,Ut),F=ee(k,Ut);we(a,e.domain,i),ee(a,Qt,b),ee(a,Ct,I),we(l,e.domain,i),ee(l,Qt,b),ee(l,Ct,I),we(E,e.domain,u),ee(E,Ut,u),ee(E,qn,u),we(F,e.domain,u),we(F,t,u),ee(F,Ut,u);const Q=[[Dn,Tn],[To,Ro],[qo,No],[Lo,Qo],[Uo,Ko],[Fo,jo],[Go,zo],[Yo,Wo]];for(let N=0;N<Q.length;N++){const[R,M]=Q[N],x=ee(u,R);ee(C,R,x),ee(x,M,u);const T=Et(cs);we(x,t,T);const X=Et();we(x,r),we(T,t,T),we(T,r,X),we(X,t,T),we(X,r,X),ee(T,M,u),ee(X,M,u)}return ee(o,On,h),ee(o,ia,nw),{start:o,tokens:wu}}function sw(e,t,r){let n=r.length,o=0,s=[],i=[];for(;o<n;){let a=e,l=null,c=null,d=0,A=null,f=-1;for(;o<n&&!(l=a.go(r[o].t));)i.push(r[o++]);for(;o<n&&(c=l||a.go(r[o].t));)l=null,a=c,a.accepts()?(f=0,A=a):f>=0&&f++,o++,d++;if(f<0)o-=d,o<n&&(i.push(r[o]),o++);else{i.length>0&&(s.push(ha(Bu,t,i)),i=[]),o-=f,d-=f;const v=A.t,w=r.slice(o-d,o);s.push(ha(v,t,w))}}return i.length>0&&s.push(ha(Bu,t,i)),s}function ha(e,t,r){const n=r[0].s,o=r[r.length-1].e,s=t.slice(n,o);return new e(s,r)}const tt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function iw(){tt.scanner=tw(tt.customSchemes);for(let e=0;e<tt.tokenQueue.length;e++)tt.tokenQueue[e][1]({scanner:tt.scanner});tt.parser=ow(tt.scanner.tokens);for(let e=0;e<tt.pluginQueue.length;e++)tt.pluginQueue[e][1]({scanner:tt.scanner,parser:tt.parser});return tt.initialized=!0,tt}function Pu(e){return tt.initialized||iw(),sw(tt.parser.start,e,Iu(tt.scanner.start,e))}Pu.scan=Iu;function aw(e,t,r){const n=Pu(e),o=[];for(let s=0;s<n.length;s++){const i=n[s];if(i.t==="nl"&&t.get("nl2br")){const a=`__linkify-el-${r.elementId++}`;o.push(V.createElement("br",{key:a}))}else if(!i.isLink||!t.check(i))o.push(i.toString());else{let a=t.render(i);if(!("key"in a.props)){const l=`__linkify-el-${r.elementId++}`,c=xu.assign({key:l},a.props);a=V.cloneElement(a,c)}o.push(a)}}return o}function Mu(e,t,r){if(V.Children.count(e.props.children)===0)return e;const n=[];V.Children.forEach(e.props.children,i=>{typeof i=="string"?n.push.apply(n,aw(i,t,r)):V.isValidElement(i)?typeof i.type=="string"&&t.ignoreTags.indexOf(i.type.toUpperCase())>=0?n.push(i):n.push(Mu(i,t,r)):n.push(i)});const o=`__linkify-el-${r.elementId++}`,s=xu.assign({key:o},e.props);return V.cloneElement(e,s,n)}const Aw=e=>{let t=0;const r=({tagName:l,attributes:c,content:d})=>(c.key=`__linkify-lnk-${t++}`,c.class&&(c.className=c.class,delete c.class),V.createElement(l,c,d)),n={key:"__linkify-wrapper"};for(const l in e)l!=="options"&&l!=="as"&&l!=="tagName"&&l!=="children"&&(n[l]=e[l]);const o=new As(e.options,r),s=e.as||e.tagName||V.Fragment||"span",i=e.children,a=V.createElement(s,n,i);return Mu(a,o,{elementId:0})},lw=({message:e,id:t})=>{const r={target:"_blank",rel:"noopener noreferrer",className:"text-blue-500 underline"};return p.jsx(Aw,{options:r,children:p.jsx("p",{className:"break-words font-normal",children:e})},`message:${t}`)},cw=({message:e,id:t})=>{const[r,n,o]=Kl(_e(i=>[i.addUrls,i.matchUrlsFromMessage,i.urlPreviews])),s=n(e);return S.useEffect(()=>{s&&r(s)},[s]),p.jsx("div",{className:"flex flex-col gap-2 mb-4",children:s.map((i,a)=>{const l=o.get(i),c=`${t}#${a}`;if(l){const{url:d,title:A,description:f,images:v,favicons:w}=l,y=v[0],I=w[0];return p.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:p.jsxs("div",{className:"flex flex-col p-2 mt-1 bg-white hover:bg-blue-100 rounded-sm transition-color duration-300 border-l-4 border-l-blue-500",children:[p.jsxs("div",{className:"flex flex-col flex-grow overflow-hidden",children:[p.jsxs("p",{className:"text-sm font-bold line-clamp-2",children:[I&&p.jsx("img",{src:I,alt:A,width:"15px",className:"object-contain float-left mt-[2px] mr-[4px]"}),p.jsx("p",{children:A})]}),p.jsx("p",{className:"text-sm line-clamp-5",children:f})]}),y&&p.jsx("div",{className:"mt-2 flex-shrink-0",children:p.jsx("img",{src:y,alt:A,className:"object-cover rounded-xs"})})]})},`linkPreview:${c}`)}return null})})},uw=({message:e,isGroupChat:t,dialogName:r,senderName:n,senderAvatar:o})=>{var I;const{t:s}=Te(),{currentUserId:i,readMessage:a,messageSentTimeString:l}=Fe(),c=_t(b=>b.enableUrlPreview),d=e.sender_id===i,A=(I=e.attachments)==null?void 0:I[0],f=d?s("you"):t?n:r,v=S.useMemo(()=>l(e),[e.date_sent]),[w,y]=sv();return y&&e.read===0&&e.sender_id!==i&&a(e._id,e.sender_id,e.chat_dialog_id||""),p.jsxs("div",{ref:w,className:`flex relative max-w-[90%] text-left whitespace-pre-wrap mb-2 ${d?"self-end flex-row-reverse":"self-start"} ${y?"view":"no"}`,children:[t&&!d&&p.jsx(tr,{name:n,imageUIDOrUrl:o,className:"size-12 ml-2"}),p.jsxs("div",{className:`flex flex-col min-w-[157px] bg-gray-200 rounded-xl pt-2 pb-1 px-2 ml-2 ${d?"mr-2":""}`,children:[t&&!d&&p.jsx("span",{className:`font-semibold ${A?"mb-2":""}`,children:f}),A?p.jsx(Yv,{attachment:A,uploading:e.isLoading}):p.jsx(lw,{message:e.message,id:e._id}),c?p.jsx(cw,{message:e.message,id:e._id}):p.jsx("div",{className:"mb-4"}),p.jsxs("div",{className:"flex items-center gap-1 text-gray-500 italic text-xs absolute bottom-[3px] right-[11px]",children:[p.jsx("span",{children:v}),d&&p.jsx("span",{children:e.read?p.jsx(iv,{size:14,color:"#727272"}):p.jsx(av,{size:14,color:"#727272"})})]})]})]})};function dw(e){return $e({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"19",cy:"12",r:"1"},child:[]},{tag:"circle",attr:{cx:"5",cy:"12",r:"1"},child:[]}]})(e)}function fw(e){return $e({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"8.5",cy:"7",r:"4"},child:[]},{tag:"line",attr:{x1:"23",y1:"11",x2:"17",y2:"11"},child:[]}]})(e)}function gw(e){return $e({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},child:[]},{tag:"circle",attr:{cx:"8.5",cy:"7",r:"4"},child:[]},{tag:"line",attr:{x1:"20",y1:"8",x2:"20",y2:"14"},child:[]},{tag:"line",attr:{x1:"23",y1:"11",x2:"17",y2:"11"},child:[]}]})(e)}function ku(e){return $e({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"},child:[]}]})(e)}function pw(e){return $e({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M341.334 128v234.666C341.334 409.604 302.938 448 256 448c-46.937 0-85.333-38.396-85.333-85.334V117.334C170.667 87.469 194.135 64 224 64c29.864 0 53.333 23.469 53.333 53.334v245.333c0 11.729-9.605 21.333-21.334 21.333s-21.333-9.604-21.333-21.333V160h-32v202.667C202.667 392.531 226.135 416 256 416c29.865 0 53.334-23.469 53.334-53.333V117.334C309.334 70.401 270.938 32 224 32s-85.334 38.401-85.334 85.334v245.332C138.667 427.729 190.938 480 256 480c65.062 0 117.334-52.271 117.334-117.334V128h-32z"},child:[]}]})(e)}function me(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Qn({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=hw({defaultProp:t,onChange:r}),s=e!==void 0,i=s?e:n,a=It(r),l=V.useCallback(c=>{if(s){const A=typeof c=="function"?c(e):c;A!==e&&a(A)}else o(c)},[s,e,o,a]);return[i,l]}function hw({defaultProp:e,onChange:t}){const r=V.useState(e),[n]=r,o=V.useRef(n),s=It(t);return V.useEffect(()=>{o.current!==n&&(s(n),o.current=n)},[n,o,s]),r}function Ou(e){const t=e+"CollectionProvider",[r,n]=Nt(t),[o,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:I,children:b}=y,h=S.useRef(null),m=S.useRef(new Map).current;return p.jsx(o,{scope:I,itemMap:m,collectionRef:h,children:b})};i.displayName=t;const a=e+"CollectionSlot",l=en(a),c=S.forwardRef((y,I)=>{const{scope:b,children:h}=y,m=s(a,b),g=je(I,m.collectionRef);return p.jsx(l,{ref:g,children:h})});c.displayName=a;const d=e+"CollectionItemSlot",A="data-radix-collection-item",f=en(d),v=S.forwardRef((y,I)=>{const{scope:b,children:h,...m}=y,g=S.useRef(null),u=je(I,g),C=s(d,b);return S.useEffect(()=>(C.itemMap.set(g,{ref:g,...m}),()=>void C.itemMap.delete(g))),p.jsx(f,{[A]:"",ref:u,children:h})});v.displayName=d;function w(y){const I=s(e+"CollectionConsumer",y);return S.useCallback(()=>{const h=I.collectionRef.current;if(!h)return[];const m=Array.from(h.querySelectorAll(`[${A}]`));return Array.from(I.itemMap.values()).sort((C,E)=>m.indexOf(C.ref.current)-m.indexOf(E.ref.current))},[I.collectionRef,I.itemMap])}return[{Provider:i,Slot:c,ItemSlot:v},w,n]}var mw=V.createContext(void 0);function ma(e){const t=V.useContext(mw);return e||t||"ltr"}function yw(e,t=globalThis==null?void 0:globalThis.document){const r=It(e);V.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var vw="DismissableLayer",ya="dismissableLayer.update",ww="dismissableLayer.pointerDownOutside",bw="dismissableLayer.focusOutside",Du,Tu=V.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),va=V.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=V.useContext(Tu),[d,A]=V.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,v]=V.useState({}),w=je(t,E=>A(E)),y=Array.from(c.layers),[I]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(I),h=d?y.indexOf(d):-1,m=c.layersWithOutsidePointerEventsDisabled.size>0,g=h>=b,u=Ew(E=>{const B=E.target,k=[...c.branches].some(F=>F.contains(B));!g||k||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},f),C=xw(E=>{const B=E.target;[...c.branches].some(F=>F.contains(B))||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},f);return yw(E=>{h===c.layers.size-1&&(n==null||n(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),V.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Du=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Ru(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Du)}},[d,f,r,c]),V.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Ru())},[d,c]),V.useEffect(()=>{const E=()=>v({});return document.addEventListener(ya,E),()=>document.removeEventListener(ya,E)},[]),p.jsx(Be.div,{...l,ref:w,style:{pointerEvents:m?g?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,C.onFocusCapture),onBlurCapture:me(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,u.onPointerDownCapture)})});va.displayName=vw;var Iw="DismissableLayerBranch",Cw=V.forwardRef((e,t)=>{const r=V.useContext(Tu),n=V.useRef(null),o=je(t,n);return V.useEffect(()=>{const s=n.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),p.jsx(Be.div,{...e,ref:o})});Cw.displayName=Iw;function Ew(e,t=globalThis==null?void 0:globalThis.document){const r=It(e),n=V.useRef(!1),o=V.useRef(()=>{});return V.useEffect(()=>{const s=a=>{if(a.target&&!n.current){let l=function(){qu(ww,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function xw(e,t=globalThis==null?void 0:globalThis.document){const r=It(e),n=V.useRef(!1);return V.useEffect(()=>{const o=s=>{s.target&&!n.current&&qu(bw,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ru(){const e=new CustomEvent(ya);document.dispatchEvent(e)}function qu(e,t,r,{discrete:n}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Dc(o,s):o.dispatchEvent(s)}var wa=0;function Nu(){V.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Lu()),document.body.insertAdjacentElement("beforeend",e[1]??Lu()),wa++,()=>{wa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wa--}},[])}function Lu(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ba="focusScope.autoFocusOnMount",Ia="focusScope.autoFocusOnUnmount",Qu={bubbles:!1,cancelable:!0},Vw="FocusScope",Ca=V.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=V.useState(null),c=It(o),d=It(s),A=V.useRef(null),f=je(t,y=>l(y)),v=V.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V.useEffect(()=>{if(n){let y=function(m){if(v.paused||!a)return;const g=m.target;a.contains(g)?A.current=g:br(A.current,{select:!0})},I=function(m){if(v.paused||!a)return;const g=m.relatedTarget;g!==null&&(a.contains(g)||br(A.current,{select:!0}))},b=function(m){if(document.activeElement===document.body)for(const u of m)u.removedNodes.length>0&&br(a)};document.addEventListener("focusin",y),document.addEventListener("focusout",I);const h=new MutationObserver(b);return a&&h.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",I),h.disconnect()}}},[n,a,v.paused]),V.useEffect(()=>{if(a){Fu.add(v);const y=document.activeElement;if(!a.contains(y)){const b=new CustomEvent(ba,Qu);a.addEventListener(ba,c),a.dispatchEvent(b),b.defaultPrevented||(Sw(Ow(Uu(a)),{select:!0}),document.activeElement===y&&br(a))}return()=>{a.removeEventListener(ba,c),setTimeout(()=>{const b=new CustomEvent(Ia,Qu);a.addEventListener(Ia,d),a.dispatchEvent(b),b.defaultPrevented||br(y??document.body,{select:!0}),a.removeEventListener(Ia,d),Fu.remove(v)},0)}}},[a,c,d,v]);const w=V.useCallback(y=>{if(!r&&!n||v.paused)return;const I=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,b=document.activeElement;if(I&&b){const h=y.currentTarget,[m,g]=Bw(h);m&&g?!y.shiftKey&&b===g?(y.preventDefault(),r&&br(m,{select:!0})):y.shiftKey&&b===m&&(y.preventDefault(),r&&br(g,{select:!0})):b===h&&y.preventDefault()}},[r,n,v.paused]);return p.jsx(Be.div,{tabIndex:-1,...i,ref:f,onKeyDown:w})});Ca.displayName=Vw;function Sw(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(br(n,{select:t}),document.activeElement!==r)return}function Bw(e){const t=Uu(e),r=Ku(t,e),n=Ku(t.reverse(),e);return[r,n]}function Uu(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ku(e,t){for(const r of e)if(!Pw(r,{upTo:t}))return r}function Pw(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mw(e){return e instanceof HTMLInputElement&&"select"in e}function br(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Mw(e)&&t&&e.select()}}var Fu=kw();function kw(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=ju(e,t),e.unshift(t)},remove(t){var r;e=ju(e,t),(r=e[0])==null||r.resume()}}}function ju(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ow(e){return e.filter(t=>t.tagName!=="A")}var Dw=V[" useId ".trim().toString()]||(()=>{}),Tw=0;function Tr(e){const[t,r]=V.useState(Dw());return Lt(()=>{r(n=>n??String(Tw++))},[e]),e||(t?`radix-${t}`:"")}const Rw=["top","right","bottom","left"],Ir=Math.min,vt=Math.max,us=Math.round,ds=Math.floor,Kt=e=>({x:e,y:e}),qw={left:"right",right:"left",bottom:"top",top:"bottom"},Nw={start:"end",end:"start"};function Ea(e,t,r){return vt(e,Ir(t,r))}function sr(e,t){return typeof e=="function"?e(t):e}function ir(e){return e.split("-")[0]}function nn(e){return e.split("-")[1]}function xa(e){return e==="x"?"y":"x"}function Va(e){return e==="y"?"height":"width"}function Cr(e){return["top","bottom"].includes(ir(e))?"y":"x"}function Sa(e){return xa(Cr(e))}function Lw(e,t,r){r===void 0&&(r=!1);const n=nn(e),o=Sa(e),s=Va(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=fs(i)),[i,fs(i)]}function Qw(e){const t=fs(e);return[Ba(e),t,Ba(t)]}function Ba(e){return e.replace(/start|end/g,t=>Nw[t])}function Uw(e,t,r){const n=["left","right"],o=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?s:i;default:return[]}}function Kw(e,t,r,n){const o=nn(e);let s=Uw(ir(e),r==="start",n);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Ba)))),s}function fs(e){return e.replace(/left|right|bottom|top/g,t=>qw[t])}function Fw(e){return{top:0,right:0,bottom:0,left:0,...e}}function Gu(e){return typeof e!="number"?Fw(e):{top:e,right:e,bottom:e,left:e}}function gs(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function zu(e,t,r){let{reference:n,floating:o}=e;const s=Cr(t),i=Sa(t),a=Va(i),l=ir(t),c=s==="y",d=n.x+n.width/2-o.width/2,A=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2;let v;switch(l){case"top":v={x:d,y:n.y-o.height};break;case"bottom":v={x:d,y:n.y+n.height};break;case"right":v={x:n.x+n.width,y:A};break;case"left":v={x:n.x-o.width,y:A};break;default:v={x:n.x,y:n.y}}switch(nn(t)){case"start":v[i]-=f*(r&&c?-1:1);break;case"end":v[i]+=f*(r&&c?-1:1);break}return v}const jw=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:i}=r,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:A}=zu(c,n,l),f=n,v={},w=0;for(let y=0;y<a.length;y++){const{name:I,fn:b}=a[y],{x:h,y:m,data:g,reset:u}=await b({x:d,y:A,initialPlacement:n,placement:f,strategy:o,middlewareData:v,rects:c,platform:i,elements:{reference:e,floating:t}});d=h??d,A=m??A,v={...v,[I]:{...v[I],...g}},u&&w<=50&&(w++,typeof u=="object"&&(u.placement&&(f=u.placement),u.rects&&(c=u.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):u.rects),{x:d,y:A}=zu(c,f,l)),y=-1)}return{x:d,y:A,placement:f,strategy:o,middlewareData:v}};async function Un(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:A="floating",altBoundary:f=!1,padding:v=0}=sr(t,e),w=Gu(v),I=a[f?A==="floating"?"reference":"floating":A],b=gs(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(I)))==null||r?I:I.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),h=A==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,m=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),g=await(s.isElement==null?void 0:s.isElement(m))?await(s.getScale==null?void 0:s.getScale(m))||{x:1,y:1}:{x:1,y:1},u=gs(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:h,offsetParent:m,strategy:l}):h);return{top:(b.top-u.top+w.top)/g.y,bottom:(u.bottom-b.bottom+w.bottom)/g.y,left:(b.left-u.left+w.left)/g.x,right:(u.right-b.right+w.right)/g.x}}const Gw=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=sr(e,t)||{};if(c==null)return{};const A=Gu(d),f={x:r,y:n},v=Sa(o),w=Va(v),y=await i.getDimensions(c),I=v==="y",b=I?"top":"left",h=I?"bottom":"right",m=I?"clientHeight":"clientWidth",g=s.reference[w]+s.reference[v]-f[v]-s.floating[w],u=f[v]-s.reference[v],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let E=C?C[m]:0;(!E||!await(i.isElement==null?void 0:i.isElement(C)))&&(E=a.floating[m]||s.floating[w]);const B=g/2-u/2,k=E/2-y[w]/2-1,F=Ir(A[b],k),Q=Ir(A[h],k),N=F,R=E-y[w]-Q,M=E/2-y[w]/2+B,x=Ea(N,M,R),T=!l.arrow&&nn(o)!=null&&M!==x&&s.reference[w]/2-(M<N?F:Q)-y[w]/2<0,X=T?M<N?M-N:M-R:0;return{[v]:f[v]+X,data:{[v]:x,centerOffset:M-x-X,...T&&{alignmentOffset:X}},reset:T}}}),zw=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:A=!0,fallbackPlacements:f,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...I}=sr(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const b=ir(o),h=Cr(a),m=ir(a)===a,g=await(l.isRTL==null?void 0:l.isRTL(c.floating)),u=f||(m||!y?[fs(a)]:Qw(a)),C=w!=="none";!f&&C&&u.push(...Kw(a,y,w,g));const E=[a,...u],B=await Un(t,I),k=[];let F=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&k.push(B[b]),A){const M=Lw(o,i,g);k.push(B[M[0]],B[M[1]])}if(F=[...F,{placement:o,overflows:k}],!k.every(M=>M<=0)){var Q,N;const M=(((Q=s.flip)==null?void 0:Q.index)||0)+1,x=E[M];if(x)return{data:{index:M,overflows:F},reset:{placement:x}};let T=(N=F.filter(X=>X.overflows[0]<=0).sort((X,j)=>X.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!T)switch(v){case"bestFit":{var R;const X=(R=F.filter(j=>{if(C){const q=Cr(j.placement);return q===h||q==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(q=>q>0).reduce((q,D)=>q+D,0)]).sort((j,q)=>j[1]-q[1])[0])==null?void 0:R[0];X&&(T=X);break}case"initialPlacement":T=a;break}if(o!==T)return{reset:{placement:T}}}return{}}}};function Yu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wu(e){return Rw.some(t=>e[t]>=0)}const Yw=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=sr(e,t);switch(n){case"referenceHidden":{const s=await Un(t,{...o,elementContext:"reference"}),i=Yu(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Wu(i)}}}case"escaped":{const s=await Un(t,{...o,altBoundary:!0}),i=Yu(s,r.floating);return{data:{escapedOffsets:i,escaped:Wu(i)}}}default:return{}}}}};async function Ww(e,t){const{placement:r,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=ir(r),a=nn(r),l=Cr(r)==="y",c=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,A=sr(t,e);let{mainAxis:f,crossAxis:v,alignmentAxis:w}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:A.mainAxis||0,crossAxis:A.crossAxis||0,alignmentAxis:A.alignmentAxis};return a&&typeof w=="number"&&(v=a==="end"?w*-1:w),l?{x:v*d,y:f*c}:{x:f*c,y:v*d}}const Jw=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await Ww(t,e);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Xw=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:I=>{let{x:b,y:h}=I;return{x:b,y:h}}},...l}=sr(e,t),c={x:r,y:n},d=await Un(t,l),A=Cr(ir(o)),f=xa(A);let v=c[f],w=c[A];if(s){const I=f==="y"?"top":"left",b=f==="y"?"bottom":"right",h=v+d[I],m=v-d[b];v=Ea(h,v,m)}if(i){const I=A==="y"?"top":"left",b=A==="y"?"bottom":"right",h=w+d[I],m=w-d[b];w=Ea(h,w,m)}const y=a.fn({...t,[f]:v,[A]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[f]:s,[A]:i}}}}}},Hw=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=sr(e,t),d={x:r,y:n},A=Cr(o),f=xa(A);let v=d[f],w=d[A];const y=sr(a,t),I=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const m=f==="y"?"height":"width",g=s.reference[f]-s.floating[m]+I.mainAxis,u=s.reference[f]+s.reference[m]-I.mainAxis;v<g?v=g:v>u&&(v=u)}if(c){var b,h;const m=f==="y"?"width":"height",g=["top","left"].includes(ir(o)),u=s.reference[A]-s.floating[m]+(g&&((b=i.offset)==null?void 0:b[A])||0)+(g?0:I.crossAxis),C=s.reference[A]+s.reference[m]+(g?0:((h=i.offset)==null?void 0:h[A])||0)-(g?I.crossAxis:0);w<u?w=u:w>C&&(w=C)}return{[f]:v,[A]:w}}}},Zw=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=sr(e,t),d=await Un(t,c),A=ir(o),f=nn(o),v=Cr(o)==="y",{width:w,height:y}=s.floating;let I,b;A==="top"||A==="bottom"?(I=A,b=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(b=A,I=f==="end"?"top":"bottom");const h=y-d.top-d.bottom,m=w-d.left-d.right,g=Ir(y-d[I],h),u=Ir(w-d[b],m),C=!t.middlewareData.shift;let E=g,B=u;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(B=m),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(E=h),C&&!f){const F=vt(d.left,0),Q=vt(d.right,0),N=vt(d.top,0),R=vt(d.bottom,0);v?B=w-2*(F!==0||Q!==0?F+Q:vt(d.left,d.right)):E=y-2*(N!==0||R!==0?N+R:vt(d.top,d.bottom))}await l({...t,availableWidth:B,availableHeight:E});const k=await i.getDimensions(a.floating);return w!==k.width||y!==k.height?{reset:{rects:!0}}:{}}}};function ps(){return typeof window<"u"}function on(e){return Ju(e)?(e.nodeName||"").toLowerCase():"#document"}function wt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){var t;return(t=(Ju(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ju(e){return ps()?e instanceof Node||e instanceof wt(e).Node:!1}function Pt(e){return ps()?e instanceof Element||e instanceof wt(e).Element:!1}function jt(e){return ps()?e instanceof HTMLElement||e instanceof wt(e).HTMLElement:!1}function Xu(e){return!ps()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof wt(e).ShadowRoot}function Kn(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Mt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function _w(e){return["table","td","th"].includes(on(e))}function hs(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Pa(e){const t=Ma(),r=Pt(e)?Mt(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function $w(e){let t=Er(e);for(;jt(t)&&!sn(t);){if(Pa(t))return t;if(hs(t))return null;t=Er(t)}return null}function Ma(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function sn(e){return["html","body","#document"].includes(on(e))}function Mt(e){return wt(e).getComputedStyle(e)}function ms(e){return Pt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Er(e){if(on(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Xu(e)&&e.host||Ft(e);return Xu(t)?t.host:t}function Hu(e){const t=Er(e);return sn(t)?e.ownerDocument?e.ownerDocument.body:e.body:jt(t)&&Kn(t)?t:Hu(t)}function Fn(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Hu(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),i=wt(o);if(s){const a=ka(i);return t.concat(i,i.visualViewport||[],Kn(o)?o:[],a&&r?Fn(a):[])}return t.concat(o,Fn(o,[],r))}function ka(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zu(e){const t=Mt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=jt(e),s=o?e.offsetWidth:r,i=o?e.offsetHeight:n,a=us(r)!==s||us(n)!==i;return a&&(r=s,n=i),{width:r,height:n,$:a}}function Oa(e){return Pt(e)?e:e.contextElement}function an(e){const t=Oa(e);if(!jt(t))return Kt(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:s}=Zu(t);let i=(s?us(r.width):r.width)/n,a=(s?us(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const eb=Kt(0);function _u(e){const t=wt(e);return!Ma()||!t.visualViewport?eb:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tb(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==wt(e)?!1:t}function Rr(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=Oa(e);let i=Kt(1);t&&(n?Pt(n)&&(i=an(n)):i=an(e));const a=tb(s,r,n)?_u(s):Kt(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,A=o.height/i.y;if(s){const f=wt(s),v=n&&Pt(n)?wt(n):n;let w=f,y=ka(w);for(;y&&n&&v!==w;){const I=an(y),b=y.getBoundingClientRect(),h=Mt(y),m=b.left+(y.clientLeft+parseFloat(h.paddingLeft))*I.x,g=b.top+(y.clientTop+parseFloat(h.paddingTop))*I.y;l*=I.x,c*=I.y,d*=I.x,A*=I.y,l+=m,c+=g,w=wt(y),y=ka(w)}}return gs({width:d,height:A,x:l,y:c})}function Da(e,t){const r=ms(e).scrollLeft;return t?t.left+r:Rr(Ft(e)).left+r}function $u(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:Da(e,n)),s=n.top+t.scrollTop;return{x:o,y:s}}function rb(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const s=o==="fixed",i=Ft(n),a=t?hs(t.floating):!1;if(n===i||a&&s)return r;let l={scrollLeft:0,scrollTop:0},c=Kt(1);const d=Kt(0),A=jt(n);if((A||!A&&!s)&&((on(n)!=="body"||Kn(i))&&(l=ms(n)),jt(n))){const v=Rr(n);c=an(n),d.x=v.x+n.clientLeft,d.y=v.y+n.clientTop}const f=i&&!A&&!s?$u(i,l,!0):Kt(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:r.y*c.y-l.scrollTop*c.y+d.y+f.y}}function nb(e){return Array.from(e.getClientRects())}function ob(e){const t=Ft(e),r=ms(e),n=e.ownerDocument.body,o=vt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),s=vt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Da(e);const a=-r.scrollTop;return Mt(n).direction==="rtl"&&(i+=vt(t.clientWidth,n.clientWidth)-o),{width:o,height:s,x:i,y:a}}function sb(e,t){const r=wt(e),n=Ft(e),o=r.visualViewport;let s=n.clientWidth,i=n.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const c=Ma();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:s,height:i,x:a,y:l}}function ib(e,t){const r=Rr(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,s=jt(e)?an(e):Kt(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=n*s.y;return{width:i,height:a,x:l,y:c}}function ed(e,t,r){let n;if(t==="viewport")n=sb(e,r);else if(t==="document")n=ob(Ft(e));else if(Pt(t))n=ib(t,r);else{const o=_u(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return gs(n)}function td(e,t){const r=Er(e);return r===t||!Pt(r)||sn(r)?!1:Mt(r).position==="fixed"||td(r,t)}function ab(e,t){const r=t.get(e);if(r)return r;let n=Fn(e,[],!1).filter(a=>Pt(a)&&on(a)!=="body"),o=null;const s=Mt(e).position==="fixed";let i=s?Er(e):e;for(;Pt(i)&&!sn(i);){const a=Mt(i),l=Pa(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Kn(i)&&!l&&td(e,i))?n=n.filter(d=>d!==i):o=a,i=Er(i)}return t.set(e,n),n}function Ab(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?hs(t)?[]:ab(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((c,d)=>{const A=ed(t,d,o);return c.top=vt(A.top,c.top),c.right=Ir(A.right,c.right),c.bottom=Ir(A.bottom,c.bottom),c.left=vt(A.left,c.left),c},ed(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function lb(e){const{width:t,height:r}=Zu(e);return{width:t,height:r}}function cb(e,t,r){const n=jt(t),o=Ft(t),s=r==="fixed",i=Rr(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Kt(0);if(n||!n&&!s)if((on(t)!=="body"||Kn(o))&&(a=ms(t)),n){const f=Rr(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Da(o));const c=o&&!n&&!s?$u(o,a):Kt(0),d=i.left+a.scrollLeft-l.x-c.x,A=i.top+a.scrollTop-l.y-c.y;return{x:d,y:A,width:i.width,height:i.height}}function Ta(e){return Mt(e).position==="static"}function rd(e,t){if(!jt(e)||Mt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ft(e)===r&&(r=r.ownerDocument.body),r}function nd(e,t){const r=wt(e);if(hs(e))return r;if(!jt(e)){let o=Er(e);for(;o&&!sn(o);){if(Pt(o)&&!Ta(o))return o;o=Er(o)}return r}let n=rd(e,t);for(;n&&_w(n)&&Ta(n);)n=rd(n,t);return n&&sn(n)&&Ta(n)&&!Pa(n)?r:n||$w(e)||r}const ub=async function(e){const t=this.getOffsetParent||nd,r=this.getDimensions,n=await r(e.floating);return{reference:cb(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function db(e){return Mt(e).direction==="rtl"}const fb={convertOffsetParentRelativeRectToViewportRelativeRect:rb,getDocumentElement:Ft,getClippingRect:Ab,getOffsetParent:nd,getElementRects:ub,getClientRects:nb,getDimensions:lb,getScale:an,isElement:Pt,isRTL:db};function od(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gb(e,t){let r=null,n;const o=Ft(e);function s(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:A,width:f,height:v}=c;if(a||t(),!f||!v)return;const w=ds(A),y=ds(o.clientWidth-(d+f)),I=ds(o.clientHeight-(A+v)),b=ds(d),m={rootMargin:-w+"px "+-y+"px "+-I+"px "+-b+"px",threshold:vt(0,Ir(1,l))||1};let g=!0;function u(C){const E=C[0].intersectionRatio;if(E!==l){if(!g)return i();E?i(!1,E):n=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!od(c,e.getBoundingClientRect())&&i(),g=!1}try{r=new IntersectionObserver(u,{...m,root:o.ownerDocument})}catch{r=new IntersectionObserver(u,m)}r.observe(e)}return i(!0),s}function pb(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Oa(e),d=o||s?[...c?Fn(c):[],...Fn(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),s&&b.addEventListener("resize",r)});const A=c&&a?gb(c,r):null;let f=-1,v=null;i&&(v=new ResizeObserver(b=>{let[h]=b;h&&h.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var m;(m=v)==null||m.observe(t)})),r()}),c&&!l&&v.observe(c),v.observe(t));let w,y=l?Rr(e):null;l&&I();function I(){const b=Rr(e);y&&!od(y,b)&&r(),y=b,w=requestAnimationFrame(I)}return r(),()=>{var b;d.forEach(h=>{o&&h.removeEventListener("scroll",r),s&&h.removeEventListener("resize",r)}),A==null||A(),(b=v)==null||b.disconnect(),v=null,l&&cancelAnimationFrame(w)}}const hb=Jw,mb=Xw,yb=zw,vb=Zw,wb=Yw,sd=Gw,bb=Hw,Ib=(e,t,r)=>{const n=new Map,o={platform:fb,...r},s={...o.platform,_c:n};return jw(e,t,{...o,platform:s})};var ys=typeof document<"u"?S.useLayoutEffect:S.useEffect;function vs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!vs(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const s=o[n];if(!(s==="_owner"&&e.$$typeof)&&!vs(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function id(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ad(e,t){const r=id(e);return Math.round(t*r)/r}function Ra(e){const t=V.useRef(e);return ys(()=>{t.current=e}),t}function Cb(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,A]=V.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,v]=V.useState(n);vs(f,n)||v(n);const[w,y]=V.useState(null),[I,b]=V.useState(null),h=V.useCallback(j=>{j!==C.current&&(C.current=j,y(j))},[]),m=V.useCallback(j=>{j!==E.current&&(E.current=j,b(j))},[]),g=s||w,u=i||I,C=V.useRef(null),E=V.useRef(null),B=V.useRef(d),k=l!=null,F=Ra(l),Q=Ra(o),N=Ra(c),R=V.useCallback(()=>{if(!C.current||!E.current)return;const j={placement:t,strategy:r,middleware:f};Q.current&&(j.platform=Q.current),Ib(C.current,E.current,j).then(q=>{const D={...q,isPositioned:N.current!==!1};M.current&&!vs(B.current,D)&&(B.current=D,RA.flushSync(()=>{A(D)}))})},[f,t,r,Q,N]);ys(()=>{c===!1&&B.current.isPositioned&&(B.current.isPositioned=!1,A(j=>({...j,isPositioned:!1})))},[c]);const M=V.useRef(!1);ys(()=>(M.current=!0,()=>{M.current=!1}),[]),ys(()=>{if(g&&(C.current=g),u&&(E.current=u),g&&u){if(F.current)return F.current(g,u,R);R()}},[g,u,R,F,k]);const x=V.useMemo(()=>({reference:C,floating:E,setReference:h,setFloating:m}),[h,m]),T=V.useMemo(()=>({reference:g,floating:u}),[g,u]),X=V.useMemo(()=>{const j={position:r,left:0,top:0};if(!T.floating)return j;const q=ad(T.floating,d.x),D=ad(T.floating,d.y);return a?{...j,transform:"translate("+q+"px, "+D+"px)",...id(T.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:q,top:D}},[r,a,T.floating,d.x,d.y]);return V.useMemo(()=>({...d,update:R,refs:x,elements:T,floatingStyles:X}),[d,R,x,T,X])}const Eb=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?sd({element:n.current,padding:o}).fn(r):{}:n?sd({element:n,padding:o}).fn(r):{}}}},xb=(e,t)=>({...hb(e),options:[e,t]}),Vb=(e,t)=>({...mb(e),options:[e,t]}),Sb=(e,t)=>({...bb(e),options:[e,t]}),Bb=(e,t)=>({...yb(e),options:[e,t]}),Pb=(e,t)=>({...vb(e),options:[e,t]}),Mb=(e,t)=>({...wb(e),options:[e,t]}),kb=(e,t)=>({...Eb(e),options:[e,t]});var Ob="Arrow",Ad=V.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...s}=e;return p.jsx(Be.svg,{...s,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ad.displayName=Ob;var Db=Ad;function ld(e){const[t,r]=V.useState(void 0);return Lt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var qa="Popper",[cd,ud]=Nt(qa),[Tb,dd]=cd(qa),fd=e=>{const{__scopePopper:t,children:r}=e,[n,o]=V.useState(null);return p.jsx(Tb,{scope:t,anchor:n,onAnchorChange:o,children:r})};fd.displayName=qa;var gd="PopperAnchor",pd=V.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,s=dd(gd,r),i=V.useRef(null),a=je(t,i);return V.useEffect(()=>{s.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:p.jsx(Be.div,{...o,ref:a})});pd.displayName=gd;var Na="PopperContent",[Rb,qb]=cd(Na),hd=V.forwardRef((e,t)=>{var ne,L,U,Y,H,G;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:A="partial",hideWhenDetached:f=!1,updatePositionStrategy:v="optimized",onPlaced:w,...y}=e,I=dd(Na,r),[b,h]=V.useState(null),m=je(t,se=>h(se)),[g,u]=V.useState(null),C=ld(g),E=(C==null?void 0:C.width)??0,B=(C==null?void 0:C.height)??0,k=n+(s!=="center"?"-"+s:""),F=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},Q=Array.isArray(c)?c:[c],N=Q.length>0,R={padding:F,boundary:Q.filter(Lb),altBoundary:N},{refs:M,floatingStyles:x,placement:T,isPositioned:X,middlewareData:j}=Cb({strategy:"fixed",placement:k,whileElementsMounted:(...se)=>pb(...se,{animationFrame:v==="always"}),elements:{reference:I.anchor},middleware:[xb({mainAxis:o+B,alignmentAxis:i}),l&&Vb({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?Sb():void 0,...R}),l&&Bb({...R}),Pb({...R,apply:({elements:se,rects:ge,availableWidth:Se,availableHeight:ye})=>{const{width:Ce,height:ze}=ge.reference,qe=se.floating.style;qe.setProperty("--radix-popper-available-width",`${Se}px`),qe.setProperty("--radix-popper-available-height",`${ye}px`),qe.setProperty("--radix-popper-anchor-width",`${Ce}px`),qe.setProperty("--radix-popper-anchor-height",`${ze}px`)}}),g&&kb({element:g,padding:a}),Qb({arrowWidth:E,arrowHeight:B}),f&&Mb({strategy:"referenceHidden",...R})]}),[q,D]=vd(T),K=It(w);Lt(()=>{X&&(K==null||K())},[X,K]);const W=(ne=j.arrow)==null?void 0:ne.x,Z=(L=j.arrow)==null?void 0:L.y,$=((U=j.arrow)==null?void 0:U.centerOffset)!==0,[ae,re]=V.useState();return Lt(()=>{b&&re(window.getComputedStyle(b).zIndex)},[b]),p.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...x,transform:X?x.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[(Y=j.transformOrigin)==null?void 0:Y.x,(H=j.transformOrigin)==null?void 0:H.y].join(" "),...((G=j.hide)==null?void 0:G.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Rb,{scope:r,placedSide:q,onArrowChange:u,arrowX:W,arrowY:Z,shouldHideArrow:$,children:p.jsx(Be.div,{"data-side":q,"data-align":D,...y,ref:m,style:{...y.style,animation:X?void 0:"none"}})})})});hd.displayName=Na;var md="PopperArrow",Nb={top:"bottom",right:"left",bottom:"top",left:"right"},yd=V.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,s=qb(md,n),i=Nb[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Db,{...o,ref:r,style:{...o.style,display:"block"}})})});yd.displayName=md;function Lb(e){return e!==null}var Qb=e=>({name:"transformOrigin",options:e,fn(t){var I,b,h;const{placement:r,rects:n,middlewareData:o}=t,i=((I=o.arrow)==null?void 0:I.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=vd(r),A={start:"0%",center:"50%",end:"100%"}[d],f=(((b=o.arrow)==null?void 0:b.x)??0)+a/2,v=(((h=o.arrow)==null?void 0:h.y)??0)+l/2;let w="",y="";return c==="bottom"?(w=i?A:`${f}px`,y=`${-l}px`):c==="top"?(w=i?A:`${f}px`,y=`${n.floating.height+l}px`):c==="right"?(w=`${-l}px`,y=i?A:`${v}px`):c==="left"&&(w=`${n.floating.width+l}px`,y=i?A:`${v}px`),{data:{x:w,y}}}});function vd(e){const[t,r="center"]=e.split("-");return[t,r]}var Ub=fd,Kb=pd,Fb=hd,jb=yd,Gb="Portal",La=V.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,s]=V.useState(!1);Lt(()=>s(!0),[]);const i=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?no.createPortal(p.jsx(Be.div,{...n,ref:t}),i):null});La.displayName=Gb;function zb(e,t){return V.useReducer((r,n)=>t[r][n]??r,e)}var ar=e=>{const{present:t,children:r}=e,n=Yb(t),o=typeof r=="function"?r({present:n.isPresent}):V.Children.only(r),s=je(n.ref,Wb(o));return typeof r=="function"||n.isPresent?V.cloneElement(o,{ref:s}):null};ar.displayName="Presence";function Yb(e){const[t,r]=V.useState(),n=V.useRef({}),o=V.useRef(e),s=V.useRef("none"),i=e?"mounted":"unmounted",[a,l]=zb(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V.useEffect(()=>{const c=ws(n.current);s.current=a==="mounted"?c:"none"},[a]),Lt(()=>{const c=n.current,d=o.current;if(d!==e){const f=s.current,v=ws(c);e?l("MOUNT"):v==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&f!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Lt(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,A=v=>{const y=ws(n.current).includes(v.animationName);if(v.target===t&&y&&(l("ANIMATION_END"),!o.current)){const I=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=I)})}},f=v=>{v.target===t&&(s.current=ws(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",A),t.addEventListener("animationend",A),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",A),t.removeEventListener("animationend",A)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:V.useCallback(c=>{c&&(n.current=getComputedStyle(c)),r(c)},[])}}function ws(e){return(e==null?void 0:e.animationName)||"none"}function Wb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Qa="rovingFocusGroup.onEntryFocus",Jb={bubbles:!1,cancelable:!0},bs="RovingFocusGroup",[Ua,wd,Xb]=Ou(bs),[Hb,Is]=Nt(bs,[Xb]),[Zb,_b]=Hb(bs),bd=V.forwardRef((e,t)=>p.jsx(Ua.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ua.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx($b,{...e,ref:t})})}));bd.displayName=bs;var $b=V.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...A}=e,f=V.useRef(null),v=je(t,f),w=ma(s),[y=null,I]=Qn({prop:i,defaultProp:a,onChange:l}),[b,h]=V.useState(!1),m=It(c),g=wd(r),u=V.useRef(!1),[C,E]=V.useState(0);return V.useEffect(()=>{const B=f.current;if(B)return B.addEventListener(Qa,m),()=>B.removeEventListener(Qa,m)},[m]),p.jsx(Zb,{scope:r,orientation:n,dir:w,loop:o,currentTabStopId:y,onItemFocus:V.useCallback(B=>I(B),[I]),onItemShiftTab:V.useCallback(()=>h(!0),[]),onFocusableItemAdd:V.useCallback(()=>E(B=>B+1),[]),onFocusableItemRemove:V.useCallback(()=>E(B=>B-1),[]),children:p.jsx(Be.div,{tabIndex:b||C===0?-1:0,"data-orientation":n,...A,ref:v,style:{outline:"none",...e.style},onMouseDown:me(e.onMouseDown,()=>{u.current=!0}),onFocus:me(e.onFocus,B=>{const k=!u.current;if(B.target===B.currentTarget&&k&&!b){const F=new CustomEvent(Qa,Jb);if(B.currentTarget.dispatchEvent(F),!F.defaultPrevented){const Q=g().filter(T=>T.focusable),N=Q.find(T=>T.active),R=Q.find(T=>T.id===y),x=[N,R,...Q].filter(Boolean).map(T=>T.ref.current);Ed(x,d)}}u.current=!1}),onBlur:me(e.onBlur,()=>h(!1))})})}),Id="RovingFocusGroupItem",Cd=V.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:s,...i}=e,a=Tr(),l=s||a,c=_b(Id,r),d=c.currentTabStopId===l,A=wd(r),{onFocusableItemAdd:f,onFocusableItemRemove:v}=c;return V.useEffect(()=>{if(n)return f(),()=>v()},[n,f,v]),p.jsx(Ua.ItemSlot,{scope:r,id:l,focusable:n,active:o,children:p.jsx(Be.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:me(e.onMouseDown,w=>{n?c.onItemFocus(l):w.preventDefault()}),onFocus:me(e.onFocus,()=>c.onItemFocus(l)),onKeyDown:me(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const y=rI(w,c.orientation,c.dir);if(y!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let b=A().filter(h=>h.focusable).map(h=>h.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const h=b.indexOf(w.currentTarget);b=c.loop?nI(b,h+1):b.slice(h+1)}setTimeout(()=>Ed(b))}})})})});Cd.displayName=Id;var eI={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tI(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rI(e,t,r){const n=tI(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return eI[n]}function Ed(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function nI(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var xd=bd,Vd=Cd,oI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},An=new WeakMap,Cs=new WeakMap,Es={},Ka=0,Sd=function(e){return e&&(e.host||Sd(e.parentNode))},sI=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Sd(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},iI=function(e,t,r,n){var o=sI(t,Array.isArray(e)?e:[e]);Es[r]||(Es[r]=new WeakMap);var s=Es[r],i=[],a=new Set,l=new Set(o),c=function(A){!A||a.has(A)||(a.add(A),c(A.parentNode))};o.forEach(c);var d=function(A){!A||l.has(A)||Array.prototype.forEach.call(A.children,function(f){if(a.has(f))d(f);else try{var v=f.getAttribute(n),w=v!==null&&v!=="false",y=(An.get(f)||0)+1,I=(s.get(f)||0)+1;An.set(f,y),s.set(f,I),i.push(f),y===1&&w&&Cs.set(f,!0),I===1&&f.setAttribute(r,"true"),w||f.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",f,b)}})};return d(t),a.clear(),Ka++,function(){i.forEach(function(A){var f=An.get(A)-1,v=s.get(A)-1;An.set(A,f),s.set(A,v),f||(Cs.has(A)||A.removeAttribute(n),Cs.delete(A)),v||A.removeAttribute(r)}),Ka--,Ka||(An=new WeakMap,An=new WeakMap,Cs=new WeakMap,Es={})}},Bd=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=oI(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),iI(n,o,r,"aria-hidden")):function(){return null}},Gt=function(){return Gt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},Gt.apply(this,arguments)};function Pd(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function aI(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,s;n<o;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var xs="right-scroll-bar-position",Vs="width-before-scroll-bar",AI="with-scroll-bars-hidden",lI="--removed-body-scroll-bar-size";function Fa(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function cI(e,t){var r=S.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var uI=typeof window<"u"?V.useLayoutEffect:V.useEffect,Md=new WeakMap;function dI(e,t){var r=cI(null,function(n){return e.forEach(function(o){return Fa(o,n)})});return uI(function(){var n=Md.get(r);if(n){var o=new Set(n),s=new Set(e),i=r.current;o.forEach(function(a){s.has(a)||Fa(a,null)}),s.forEach(function(a){o.has(a)||Fa(a,i)})}Md.set(r,e)},[e]),r}function fI(e){return e}function gI(e,t){t===void 0&&(t=fI);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var i=t(s,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(n=!0;r.length;){var i=r;r=[],i.forEach(s)}r={push:function(a){return s(a)},filter:function(){return r}}},assignMedium:function(s){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(s),i=r}var l=function(){var d=i;i=[],d.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),r}}}};return o}function pI(e){e===void 0&&(e={});var t=gI(null);return t.options=Gt({async:!0,ssr:!1},e),t}var kd=function(e){var t=e.sideCar,r=Pd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return V.createElement(n,Gt({},r))};kd.isSideCarExport=!0;function hI(e,t){return e.useMedium(t),kd}var Od=pI(),ja=function(){},Ss=V.forwardRef(function(e,t){var r=V.useRef(null),n=V.useState({onScrollCapture:ja,onWheelCapture:ja,onTouchMoveCapture:ja}),o=n[0],s=n[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,A=e.shards,f=e.sideCar,v=e.noIsolation,w=e.inert,y=e.allowPinchZoom,I=e.as,b=I===void 0?"div":I,h=e.gapMode,m=Pd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),g=f,u=dI([r,t]),C=Gt(Gt({},m),o);return V.createElement(V.Fragment,null,d&&V.createElement(g,{sideCar:Od,removeScrollBar:c,shards:A,noIsolation:v,inert:w,setCallbacks:s,allowPinchZoom:!!y,lockRef:r,gapMode:h}),i?V.cloneElement(V.Children.only(a),Gt(Gt({},C),{ref:u})):V.createElement(b,Gt({},C,{className:l,ref:u}),a))});Ss.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ss.classNames={fullWidth:Vs,zeroRight:xs};var mI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function yI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mI();return t&&e.setAttribute("nonce",t),e}function vI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bI=function(){var e=0,t=null;return{add:function(r){e==0&&(t=yI())&&(vI(t,r),wI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},II=function(){var e=bI();return function(t,r){V.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Dd=function(){var e=II(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},CI={left:0,top:0,right:0,gap:0},Ga=function(e){return parseInt(e||"",10)||0},EI=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ga(r),Ga(n),Ga(o)]},xI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return CI;var t=EI(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},VI=Dd(),ln="data-scroll-locked",SI=function(e,t,r,n){var o=e.left,s=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
51
51
|
.`.concat(AI,` {
|
|
52
52
|
overflow: hidden `).concat(n,`;
|
|
53
53
|
padding-right: `).concat(a,"px ").concat(n,`;
|
package/dist/react19/index.es.js
CHANGED
|
@@ -9991,7 +9991,7 @@ const c0 = (e) => {
|
|
|
9991
9991
|
children: [
|
|
9992
9992
|
t && !d && /* @__PURE__ */ p.jsx("span", { className: `font-semibold ${A ? "mb-2" : ""}`, children: g }),
|
|
9993
9993
|
A ? /* @__PURE__ */ p.jsx(JI, { attachment: A, uploading: e.isLoading }) : /* @__PURE__ */ p.jsx(u0, { message: e.message, id: e._id }),
|
|
9994
|
-
c
|
|
9994
|
+
c ? /* @__PURE__ */ p.jsx(d0, { message: e.message, id: e._id }) : /* @__PURE__ */ p.jsx("div", { className: "mb-4" }),
|
|
9995
9995
|
/* @__PURE__ */ p.jsxs("div", { className: "flex items-center gap-1 text-gray-500 italic text-xs absolute bottom-[3px] right-[11px]", children: [
|
|
9996
9996
|
/* @__PURE__ */ p.jsx("span", { children: v }),
|
|
9997
9997
|
d && /* @__PURE__ */ p.jsx("span", { children: e.read ? /* @__PURE__ */ p.jsx(iI, { size: 14, color: "#727272" }) : /* @__PURE__ */ p.jsx(AI, { size: 14, color: "#727272" }) })
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@connectycube/chat-widget",
|
|
3
3
|
"description": "A React component that seamlessly integrates ConnectyCube's real-time chat capabilities into your web applications. This widget offers an out-of-the-box solution for embedding chat features—such as instant messaging, user presence, and file sharing—without the overhead of building a complete chat system from scratch.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.24.0",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"homepage": "https://github.com/ConnectyCube/connectycube-chat-widget#readme",
|
|
7
7
|
"bugs": {
|