@connectycube/react-ui-kit 0.0.19 → 0.0.20
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/configs/dependencies.json +6 -0
- package/configs/imports.json +2 -0
- package/dist/index.cjs +1 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -35
- package/dist/index.js.map +1 -1
- package/dist/types/components/attachment.d.ts +3 -3
- package/dist/types/components/attachment.d.ts.map +1 -1
- package/dist/types/components/avatar.d.ts +1 -0
- package/dist/types/components/avatar.d.ts.map +1 -1
- package/dist/types/components/badge.d.ts +1 -1
- package/dist/types/components/button.d.ts +2 -2
- package/dist/types/components/call-message.d.ts +17 -0
- package/dist/types/components/call-message.d.ts.map +1 -0
- package/dist/types/components/chat-message.d.ts +30 -0
- package/dist/types/components/chat-message.d.ts.map +1 -0
- package/dist/types/components/dialog-item.d.ts.map +1 -1
- package/dist/types/components/linkify-text.d.ts +6 -1
- package/dist/types/components/linkify-text.d.ts.map +1 -1
- package/dist/types/components/switch.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/gen/components/attachment.jsx +21 -19
- package/gen/components/avatar.jsx +14 -2
- package/gen/components/call-message.jsx +62 -0
- package/gen/components/chat-message.jsx +120 -0
- package/gen/components/dialog-item.jsx +4 -1
- package/gen/components/linkify-text.jsx +41 -2
- package/gen/components/switch.jsx +0 -2
- package/gen/index.js +4 -0
- package/package.json +11 -10
- package/src/components/attachment.tsx +25 -26
- package/src/components/avatar.tsx +3 -1
- package/src/components/call-message.tsx +75 -0
- package/src/components/chat-message.tsx +138 -0
- package/src/components/connectycube-ui/attachment.tsx +269 -0
- package/src/components/connectycube-ui/chat-message.tsx +138 -0
- package/src/components/connectycube-ui/link-preview.tsx +149 -0
- package/src/components/dialog-item.tsx +4 -1
- package/src/components/linkify-text.tsx +44 -3
- package/src/components/switch.tsx +0 -2
- package/src/index.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import*as r from"react";import o,{forwardRef as i,createElement as a,memo as s,useRef as l,useState as c,useImperativeHandle as u,useCallback as d,useEffect as f,useMemo as m,useLayoutEffect as p}from"react";import*as h from"react-dom";import g from"react-dom";
|
|
2
|
-
/**
|
|
3
|
-
* @license lucide-react v0.555.0 - ISC
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the ISC license.
|
|
6
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/const y=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},b=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),v=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
|
|
8
|
-
/**
|
|
9
|
-
* @license lucide-react v0.555.0 - ISC
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the ISC license.
|
|
12
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/
|
|
14
|
-
var w={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
15
|
-
/**
|
|
16
|
-
* @license lucide-react v0.555.0 - ISC
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the ISC license.
|
|
19
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/const x=i(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...l},c)=>a("svg",{ref:c,...w,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:b("lucide",o),...!i&&!v(l)&&{"aria-hidden":"true"},...l},[...s.map(([e,t])=>a(e,t)),...Array.isArray(i)?i:[i]])),k=(e,t)=>{const n=i(({className:n,...r},o)=>{return a(x,{ref:o,iconNode:t,className:b(`lucide-${i=y(e),i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var i});return n.displayName=y(e),n},N=k("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),E=k("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]),P=k("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),C=k("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),S=k("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]),M=k("file-x-corner",[["path",{d:"M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5",key:"1jo35a"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m15 17 5 5",key:"36xl1x"}],["path",{d:"m20 17-5 5",key:"vdz27y"}]]),O=k("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]),R=k("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),T=k("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),L=k("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]),A=k("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),D=k("minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),z=k("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]),W=k("picture-in-picture-2",[["path",{d:"M21 9V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h4",key:"daa4of"}],["rect",{width:"10",height:"7",x:"12",y:"13",rx:"2",key:"1nb8gs"}]]),_=k("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),j=k("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),I=k("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);
|
|
21
|
-
/**
|
|
22
|
-
* @license lucide-react v0.555.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/function H(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=H(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function F(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=H(e))&&(r&&(r+=" "),r+=t);return r}const $=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),G="-",B=[],V=e=>{const t=U(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return q(e);const n=e.split(G),r=""===n[0]&&n.length>1?1:0;return Y(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],o=n[e];return t?o?((e,t)=>{const n=new Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(o,t):t:o||B}return n[e]||B}}},Y=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const n=Y(e,t+1,o);if(n)return n}const i=n.validators;if(null===i)return;const a=0===t?e.join(G):e.slice(t).join(G),s=i.length;for(let e=0;e<s;e++){const t=i[e];if(t.validator(a))return t.classGroupId}},q=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),U=e=>{const{theme:t,classGroups:n}=e;return X(n,t)},X=(e,t)=>{const n=$();for(const r in e){const o=e[r];K(o,n,r,t)}return n},K=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const o=e[i];Q(o,t,n,r)}},Q=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?ee(e,t,n,r):J(e,t,n,r):Z(e,t,n)},Z=(e,t,n)=>{(""===e?t:te(t,e)).classGroupId=n},J=(e,t,n,r)=>{ne(e)?K(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},ee=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let e=0;e<i;e++){const[i,a]=o[e];K(a,te(t,i),n,r)}},te=(e,t)=>{let n=e;const r=t.split(G),o=r.length;for(let e=0;e<o;e++){const t=r[e];let o=n.nextPart.get(t);o||(o=$(),n.nextPart.set(t,o)),n=o}return n},ne=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,re=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(o,i)=>{n[o]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(o(e,t),t):void 0},set(e,t){e in n?n[e]=t:o(e,t)}}},oe=[],ie=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ae=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,i=0;const a=e.length;for(let s=0;s<a;s++){const a=e[s];if(0===r&&0===o){if(":"===a){t.push(e.slice(i,s)),i=s+1;continue}if("/"===a){n=s;continue}}"["===a?r++:"]"===a?r--:"("===a?o++:")"===a&&o--}const s=0===t.length?e:e.slice(i);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return ie(t,c,l,n&&n>i?n-i:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):ie(oe,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},se=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let o=0;o<e.length;o++){const i=e[o],a="["===i[0],s=t.has(i);a||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(i)):r.push(i)}return r.length>0&&(r.sort(),n.push(...r)),n}},le=/\s+/,ce=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ce(e[r]))&&(n&&(n+=" "),n+=t);return n},ue=(e,...t)=>{let n,r,o,i;const a=e=>{const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(le);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:m}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!m,h=r(p?f.substring(0,m):f);if(!h){if(!p){l=t+(l.length>0?" "+l:l);continue}if(h=r(f),!h){l=t+(l.length>0?" "+l:l);continue}p=!1}const g=0===u.length?"":1===u.length?u[0]:i(u).join(":"),y=d?g+"!":g,b=y+h;if(a.indexOf(b)>-1)continue;a.push(b);const v=o(h,p);for(let e=0;e<v.length;++e){const t=v[e];a.push(y+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return o(e,i),i};return i=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:re(e.cacheSize),parseClassName:ae(e),sortModifiers:se(e),...V(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)},(...e)=>i(((...e)=>{let t,n,r=0,o="";for(;r<e.length;)(t=e[r++])&&(n=ce(t))&&(o&&(o+=" "),o+=n);return o})(...e))},de=[],fe=e=>{const t=t=>t[e]||de;return t.isThemeGetter=!0,t},me=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,pe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,he=/^\d+\/\d+$/,ge=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ye=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,be=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,we=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xe=e=>he.test(e),ke=e=>!!e&&!Number.isNaN(Number(e)),Ne=e=>!!e&&Number.isInteger(Number(e)),Ee=e=>e.endsWith("%")&&ke(e.slice(0,-1)),Pe=e=>ge.test(e),Ce=()=>!0,Se=e=>ye.test(e)&&!be.test(e),Me=()=>!1,Oe=e=>ve.test(e),Re=e=>we.test(e),Te=e=>!Ae(e)&&!Ie(e),Le=e=>Ye(e,Ke,Me),Ae=e=>me.test(e),De=e=>Ye(e,Qe,Se),ze=e=>Ye(e,Ze,ke),We=e=>Ye(e,Ue,Me),_e=e=>Ye(e,Xe,Re),je=e=>Ye(e,et,Oe),Ie=e=>pe.test(e),He=e=>qe(e,Qe),Fe=e=>qe(e,Je),$e=e=>qe(e,Ue),Ge=e=>qe(e,Ke),Be=e=>qe(e,Xe),Ve=e=>qe(e,et,!0),Ye=(e,t,n)=>{const r=me.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},qe=(e,t,n=!1)=>{const r=pe.exec(e);return!!r&&(r[1]?t(r[1]):n)},Ue=e=>"position"===e||"percentage"===e,Xe=e=>"image"===e||"url"===e,Ke=e=>"length"===e||"size"===e||"bg-size"===e,Qe=e=>"length"===e,Ze=e=>"number"===e,Je=e=>"family-name"===e,et=e=>"shadow"===e,tt=ue(()=>{const e=fe("color"),t=fe("font"),n=fe("text"),r=fe("font-weight"),o=fe("tracking"),i=fe("leading"),a=fe("breakpoint"),s=fe("container"),l=fe("spacing"),c=fe("radius"),u=fe("shadow"),d=fe("inset-shadow"),f=fe("text-shadow"),m=fe("drop-shadow"),p=fe("blur"),h=fe("perspective"),g=fe("aspect"),y=fe("ease"),b=fe("animate"),v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Ie,Ae],w=()=>[Ie,Ae,l],x=()=>[xe,"full","auto",...w()],k=()=>[Ne,"none","subgrid",Ie,Ae],N=()=>["auto",{span:["full",Ne,Ie,Ae]},Ne,Ie,Ae],E=()=>[Ne,"auto",Ie,Ae],P=()=>["auto","min","max","fr",Ie,Ae],C=()=>["auto",...w()],S=()=>[xe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...w()],M=()=>[e,Ie,Ae],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",$e,We,{position:[Ie,Ae]}],R=()=>["auto","cover","contain",Ge,Le,{size:[Ie,Ae]}],T=()=>[Ee,He,De],L=()=>["","none","full",c,Ie,Ae],A=()=>["",ke,He,De],D=()=>[ke,Ee,$e,We],z=()=>["","none",p,Ie,Ae],W=()=>["none",ke,Ie,Ae],_=()=>["none",ke,Ie,Ae],j=()=>[ke,Ie,Ae],I=()=>[xe,"full",...w()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Pe],breakpoint:[Pe],color:[Ce],container:[Pe],"drop-shadow":[Pe],ease:["in","out","in-out"],font:[Te],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Pe],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Pe],shadow:[Pe],spacing:["px",ke],text:[Pe],"text-shadow":[Pe],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xe,Ae,Ie,g]}],container:["container"],columns:[{columns:[ke,Ae,Ie,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:v()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:x()}],"inset-x":[{"inset-x":x()}],"inset-y":[{"inset-y":x()}],start:[{start:x()}],end:[{end:x()}],top:[{top:x()}],right:[{right:x()}],bottom:[{bottom:x()}],left:[{left:x()}],visibility:["visible","invisible","collapse"],z:[{z:[Ne,"auto",Ie,Ae]}],basis:[{basis:[xe,"full","auto",s,...w()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,xe,"auto","initial","none",Ae]}],grow:[{grow:["",ke,Ie,Ae]}],shrink:[{shrink:["",ke,Ie,Ae]}],order:[{order:[Ne,"first","last","none",Ie,Ae]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":P()}],"auto-rows":[{"auto-rows":P()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":w()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":w()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[s,"screen",...S()]}],"min-w":[{"min-w":[s,"screen","none",...S()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",n,He,De]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ie,ze]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ee,Ae]}],"font-family":[{font:[Fe,Ae,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Ie,Ae]}],"line-clamp":[{"line-clamp":[ke,"none",Ie,ze]}],leading:[{leading:[i,...w()]}],"list-image":[{"list-image":["none",Ie,Ae]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Ae]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",Ie,De]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[ke,"auto",Ie,Ae]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:w()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie,Ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie,Ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:R()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ne,Ie,Ae],radial:["",Ie,Ae],conic:[Ne,Ie,Ae]},Be,_e]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:A()}],"border-w-x":[{"border-x":A()}],"border-w-y":[{"border-y":A()}],"border-w-s":[{"border-s":A()}],"border-w-e":[{"border-e":A()}],"border-w-t":[{"border-t":A()}],"border-w-r":[{"border-r":A()}],"border-w-b":[{"border-b":A()}],"border-w-l":[{"border-l":A()}],"divide-x":[{"divide-x":A()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":A()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[ke,Ie,Ae]}],"outline-w":[{outline:["",ke,He,De]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",u,Ve,je]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",d,Ve,je]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:A()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ke,De]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":A()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",f,Ve,je]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ke,Ie,Ae]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":D()}],"mask-image-linear-to-pos":[{"mask-linear-to":D()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":D()}],"mask-image-t-to-pos":[{"mask-t-to":D()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":D()}],"mask-image-r-to-pos":[{"mask-r-to":D()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":D()}],"mask-image-b-to-pos":[{"mask-b-to":D()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":D()}],"mask-image-l-to-pos":[{"mask-l-to":D()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":D()}],"mask-image-x-to-pos":[{"mask-x-to":D()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":D()}],"mask-image-y-to-pos":[{"mask-y-to":D()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Ie,Ae]}],"mask-image-radial-from-pos":[{"mask-radial-from":D()}],"mask-image-radial-to-pos":[{"mask-radial-to":D()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":D()}],"mask-image-conic-to-pos":[{"mask-conic-to":D()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Ae]}],filter:[{filter:["","none",Ie,Ae]}],blur:[{blur:z()}],brightness:[{brightness:[ke,Ie,Ae]}],contrast:[{contrast:[ke,Ie,Ae]}],"drop-shadow":[{"drop-shadow":["","none",m,Ve,je]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",ke,Ie,Ae]}],"hue-rotate":[{"hue-rotate":[ke,Ie,Ae]}],invert:[{invert:["",ke,Ie,Ae]}],saturate:[{saturate:[ke,Ie,Ae]}],sepia:[{sepia:["",ke,Ie,Ae]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Ae]}],"backdrop-blur":[{"backdrop-blur":z()}],"backdrop-brightness":[{"backdrop-brightness":[ke,Ie,Ae]}],"backdrop-contrast":[{"backdrop-contrast":[ke,Ie,Ae]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,Ie,Ae]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,Ie,Ae]}],"backdrop-invert":[{"backdrop-invert":["",ke,Ie,Ae]}],"backdrop-opacity":[{"backdrop-opacity":[ke,Ie,Ae]}],"backdrop-saturate":[{"backdrop-saturate":[ke,Ie,Ae]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,Ie,Ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ie,Ae]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",Ie,Ae]}],ease:[{ease:["linear","initial",y,Ie,Ae]}],delay:[{delay:[ke,Ie,Ae]}],animate:[{animate:["none",b,Ie,Ae]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,Ie,Ae]}],"perspective-origin":[{"perspective-origin":v()}],rotate:[{rotate:W()}],"rotate-x":[{"rotate-x":W()}],"rotate-y":[{"rotate-y":W()}],"rotate-z":[{"rotate-z":W()}],scale:[{scale:_()}],"scale-x":[{"scale-x":_()}],"scale-y":[{"scale-y":_()}],"scale-z":[{"scale-z":_()}],"scale-3d":["scale-3d"],skew:[{skew:j()}],"skew-x":[{"skew-x":j()}],"skew-y":[{"skew-y":j()}],transform:[{transform:[Ie,Ae,"","none","gpu","cpu"]}],"transform-origin":[{origin:v()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:I()}],"translate-x":[{"translate-x":I()}],"translate-y":[{"translate-y":I()}],"translate-z":[{"translate-z":I()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie,Ae]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie,Ae]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[ke,He,De,ze]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function nt(...e){return tt(F(e))}function rt(e=8){return(Date.now()/Math.random()).toString(36).replace(".","").slice(0,e)}function ot(e){return"string"==typeof e&&e.length>0?`${e[0]?.toUpperCase()}${e.slice(1)}`:""}function it({loading:t=!1,layout:n="flow",type:r="default",...o}){if(!t)return null;const i=e("circle"===r?T:L,{strokeWidth:2.5,...o,className:nt("animate-spin text-ring","flow"===n&&"mx-auto",o?.className)});switch(n){case"absolute":return e("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:i});case"centered":return e("div",{className:"flex items-center justify-center size-full",children:i});case"overlay":return e("div",{className:"flex items-center justify-center size-full absolute bg-muted/50",children:i});default:return i}}it.displayName="Spinner";const at=i(function({url:n,uploading:r=!1,children:o,...i},a){return t("a",{ref:a,target:"_blank",rel:"noopener noreferrer",...i,href:n,className:nt("group relative min-h-12 min-w-12 w-full flex items-center justify-center rounded-md overflow-hidden bg-ring/10 hover:bg-ring/20 transition-color duration-300 ease-out cursor-pointer",i?.className),children:[o,e(it,{loading:r,layout:"overlay"})]})});at.displayName="AttachmentLink";const st=i(function({uid:n,url:r,uploading:o=!1,containerProps:i,...a},s){const l=`attachment_audio_${n||rt()}`;return t("div",{...i,className:nt("relative min-h-12 min-w-12 w-full rounded-md overflow-hidden",i?.className),children:[e("audio",{ref:s,src:r,id:l,controls:!0,...a}),e(it,{loading:o,layout:"overlay"})]})});const lt=i(function({uid:n,url:r,maxSize:o=360,uploading:i=!1,onReady:a=()=>{},containerProps:s,...d},f){const m=`attachment_video_${n||rt()}`,p=`${o}px`,h=l(null),[g,y]=c({maxHeight:p,maxWidth:p});return u(f,()=>h.current,[]),t("div",{...s,className:nt("relative min-h-20 w-full rounded-md overflow-hidden",s?.className),children:[e("video",{id:m,ref:h,src:r,controls:!0,preload:"metadata",style:g,...d,onCanPlay:e=>{const t=h.current;if(t){const{videoWidth:n,videoHeight:r}=t,i=n/r||1,s=i<1?p:`${Math.round(o/i)}px`,l=i<1?`${Math.round(o*i)}px`:p;y({height:s,width:l,maxHeight:s,maxWidth:l}),d.onCanPlay?.(e),a()}},className:nt("size-full",d?.className)}),e(it,{loading:i,layout:"overlay"})]})});lt.displayName="AttachmentVideo";const ct=i(function({uid:t,url:n,uploading:r=!1,onReady:o=()=>{},linkProps:i,...a},s){const l=`attachment_image_${t||rt()}`;return e(at,{href:n,uploading:r,...i,children:e("img",{ref:s,src:n,id:l,alt:"attachment",...a,className:nt("rounded-md object-cover min-h-12 min-w-12 max-h-[360px] group-hover:scale-103 transition-transform duration-300 ease-out",a?.className),onLoad:e=>{a.onLoad?.(e),o()}})})});function ut({url:n,name:r,uploading:o=!1,iconElement:i,linkProps:a,...s}){const l=`attachment_file_${s.id||rt()}`;return t(at,{href:n,uploading:o,...a,className:nt("flex-row gap-2 px-2",a?.className),children:[i||e(O,{id:l,...s,className:nt("size-6 shrink-0 text-foreground/85 group-hover:text-foreground duration-300 ease-out",s?.className)}),r&&e("span",{className:"font-medium line-clamp-1 break-all text-foreground/85 group-hover:text-foreground duration-300 ease-out",children:r})]})}function dt({name:n="Unknown file",uploading:r=!1,iconElement:o,containerProps:i,...a}){const s=`attachment_failed_${a.id||rt()}`;return t("div",{...i,className:nt("relative min-h-12 min-w-12 w-full flex flex-row items-center justify-center gap-2 px-2 bg-red-600/10 rounded-md overflow-hidden",i?.className),children:[o||e(M,{id:s,...a,className:nt("size-6 shrink-0 text-red-600",a?.className)}),e("span",{className:"font-medium line-clamp-1 break-all text-red-600",children:n}),e(it,{loading:r,layout:"overlay"})]})}ct.displayName="AttachmentImage",ut.displayName="AttachmentFile",dt.displayName="AttachmentFailed";const ft=s(function({mimeType:t,...n}){const[r=""]=t?.split("/")||[];if(!n.url)return e(dt,{...n});switch(r){case"image":return e(ct,{...n});case"video":return e(lt,{...n});case"audio":return e(st,{...n});default:return e(ut,{name:t,...n})}});function mt(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function pt(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>(...e)=>t.current?.(...e),[])}var ht=globalThis?.document?r.useLayoutEffect:()=>{};function gt(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function yt(...e){return t=>{let n=!1;const r=e.map(e=>{const r=gt(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():gt(e[t],null)}}}}function bt(...e){return r.useCallback(yt(...e),e)}var vt=Symbol.for("react.lazy"),wt=r[" use ".trim().toString()];function xt(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===vt&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function kt(t){const n=Et(t),o=r.forwardRef((t,o)=>{let{children:i,...a}=t;xt(i)&&"function"==typeof wt&&(i=wt(i._payload));const s=r.Children.toArray(i),l=s.find(Ct);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}var Nt=kt("Slot");function Et(e){const t=r.forwardRef((e,t)=>{let{children:n,...o}=e;if(xt(n)&&"function"==typeof wt&&(n=wt(n._payload)),r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?yt(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pt=Symbol("radix.slottable");function Ct(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Pt}var St,Mt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=kt(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),Ot={exports:{}},Rt={};var Tt,Lt,At={};
|
|
27
|
-
/**
|
|
28
|
-
* @license React
|
|
29
|
-
* use-sync-external-store-shim.development.js
|
|
30
|
-
*
|
|
31
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the MIT license found in the
|
|
34
|
-
* LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/var Dt=(Lt||(Lt=1,"production"===process.env.NODE_ENV?Ot.exports=function(){if(St)return Rt;St=1;var e=o,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,r=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var o=t(),l=n({inst:{value:o,getSnapshot:t}}),c=l[0].inst,u=l[1];return i(function(){c.value=o,c.getSnapshot=t,s(c)&&u({inst:c})},[e,o,t]),r(function(){return s(c)&&u({inst:c}),e(function(){s(c)&&u({inst:c})})},[e]),a(o),o};return Rt.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,Rt}():Ot.exports=(Tt||(Tt=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=o,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useState,i=t.useEffect,a=t.useLayoutEffect,s=t.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(o,u){l||void 0===t.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var f=u();n(d,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var m=(f=r({inst:{value:d,getSnapshot:u}}))[0].inst,p=f[1];return a(function(){m.value=d,m.getSnapshot=u,e(m)&&p({inst:m})},[o,d,u]),i(function(){return e(m)&&p({inst:m}),o(function(){e(m)&&p({inst:m})})},[o]),s(d),d};At.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),At)),Ot.exports);function zt(){return()=>{}}var Wt="Avatar",[_t]=function(t,n=[]){let o=[];const i=()=>{const e=o.map(e=>r.createContext(e));return function(n){const o=n?.[t]||e;return r.useMemo(()=>({[`__scope${t}`]:{...n,[t]:o}}),[n,o])}};return i.scopeName=t,[function(n,i){const a=r.createContext(i);a.displayName=n+"Context";const s=o.length;o=[...o,i];const l=n=>{const{scope:o,children:i,...l}=n,c=o?.[t]?.[s]||a,u=r.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:u,children:i})};return l.displayName=n+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||a,c=r.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},mt(i,...n)]}(Wt),[jt,It]=_t(Wt),Ht=r.forwardRef((t,n)=>{const{__scopeAvatar:o,...i}=t,[a,s]=r.useState("idle");return e(jt,{scope:o,imageLoadingStatus:a,onImageLoadingStatusChange:s,children:e(Mt.span,{...i,ref:n})})});Ht.displayName=Wt;var Ft="AvatarImage",$t=r.forwardRef((t,n)=>{const{__scopeAvatar:o,src:i,onLoadingStatusChange:a=()=>{},...s}=t,l=It(Ft,o),c=function(e,{referrerPolicy:t,crossOrigin:n}){const o=Dt.useSyncExternalStore(zt,()=>!0,()=>!1),i=r.useRef(null),a=o?(i.current||(i.current=new window.Image),i.current):null,[s,l]=r.useState(()=>Vt(a,e));return ht(()=>{l(Vt(a,e))},[a,e]),ht(()=>{const e=e=>()=>{l(e)};if(!a)return;const r=e("loaded"),o=e("error");return a.addEventListener("load",r),a.addEventListener("error",o),t&&(a.referrerPolicy=t),"string"==typeof n&&(a.crossOrigin=n),()=>{a.removeEventListener("load",r),a.removeEventListener("error",o)}},[a,n,t]),s}(i,s),u=pt(e=>{a(e),l.onImageLoadingStatusChange(e)});return ht(()=>{"idle"!==c&&u(c)},[c,u]),"loaded"===c?e(Mt.img,{...s,ref:n,src:i}):null});$t.displayName=Ft;var Gt="AvatarFallback",Bt=r.forwardRef((t,n)=>{const{__scopeAvatar:o,delayMs:i,...a}=t,s=It(Gt,o),[l,c]=r.useState(void 0===i);return r.useEffect(()=>{if(void 0!==i){const e=window.setTimeout(()=>c(!0),i);return()=>window.clearTimeout(e)}},[i]),l&&"loaded"!==s.imageLoadingStatus?e(Mt.span,{...a,ref:n}):null});function Vt(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}Bt.displayName=Gt;var Yt=Ht,qt=$t,Ut=Bt;function Xt({status:t,...n}){switch(t){case"available":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...n,className:nt("rounded-full size-4.5 text-green-600 bg-white",n?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"})});case"busy":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...n,className:nt("rounded-full size-4.5 text-red-600 bg-white",n?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M4.5 7.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1z"})});case"away":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...n,className:nt("rounded-full size-4.5 text-yellow-500 bg-white",n?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"})});case"unknown":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...n,className:nt("rounded-full size-4.5 text-gray-500 bg-white",n?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247m2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z"})});default:return null}}function Kt({badge:n=!0,status:r,label:o,badgeProps:i,labelProps:a,...s}){const l=ot(o||r);return t("div",{...s,className:nt("flex items-center gap-2",s?.className),children:[n&&e(Xt,{status:r,...i}),e("span",{...a,children:l})]})}Xt.displayName="PresenceBadge",Kt.displayName="Presence";const Qt=s(i(function({src:n,name:r="NA",online:o,presence:i,className:a,onlineProps:s,presenceProps:l,imageProps:c,fallbackProps:u,...d},f){const m=function(e){const t=e?.trim().split(/\s+/).filter(Boolean)??[];return(t.length>1?`${t[0]?.[0]}${t[1]?.[0]}`:t[0]?.slice(0,2)??"NA").toUpperCase()}(r);return t(Yt,{ref:f,...d,className:nt("relative flex size-8 shrink-0 rounded-full",a),children:[e(qt,{...c,src:n,className:nt("aspect-square size-full rounded-full overflow-hidden object-cover",c?.className)}),e(Ut,{...u,className:nt("bg-muted size-full rounded-full flex items-center justify-center",u?.className),children:m}),o&&e("div",{...s,className:nt("absolute top-0 right-0 rounded-full border-2 bg-green-600 border-green-200 size-3.5",s?.className)}),e(Xt,{status:i,...l,className:nt("absolute bottom-0 right-0",l?.className)})]})}));Qt.displayName="Avatar";const Zt=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Jt=F,en=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Jt(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=Zt(t)||Zt(r);return o[e][a]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n})?[...e,n,r]:e},[]);return Jt(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)},tn=en("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});const nn=i(function({className:t,variant:n,asChild:r=!1,...o},i){return e(r?Nt:"span",{ref:i,...o,className:nt(tn({variant:n}),t)})});nn.displayName="Badge";const rn=en("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});const on=i(function({asChild:t=!1,variant:n,size:r,className:o,...i},a){return e(t?Nt:"button",{ref:a,...i,className:nt(rn({variant:n,size:r,className:o}),"transition-all ease-in-out duration-300")})});on.displayName="Button";const an=6048e5,sn=43200,ln=Symbol.for("constructDateFrom");function cn(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&ln in e?e[ln](t):e instanceof Date?new e.constructor(t):new Date(t)}function un(e,t){return cn(t||e,e)}let dn={};function fn(){return dn}function mn(e,t){const n=fn(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=un(e,t?.in),i=o.getDay(),a=(i<r?7:0)+i-r;return o.setDate(o.getDate()-a),o.setHours(0,0,0,0),o}function pn(e,t){return mn(e,{...t,weekStartsOn:1})}function hn(e,t){const n=un(e,t?.in),r=n.getFullYear(),o=cn(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=pn(o),a=cn(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=pn(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function gn(e){const t=un(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function yn(e,...t){const n=cn.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function bn(e,t){const n=un(e,t?.in);return n.setHours(0,0,0,0),n}function vn(e,t,n){const[r,o]=yn(n?.in,e,t),i=bn(r),a=bn(o),s=+i-gn(i),l=+a-gn(a);return Math.round((s-l)/864e5)}function wn(e,t){const n=+un(e)-+un(t);return n<0?-1:n>0?1:n}function xn(e){return cn(e,Date.now())}function kn(e){return!(!((t=e)instanceof Date||"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t))&&"number"!=typeof e||isNaN(+un(e)));var t}function Nn(e,t){const n=un(e,t?.in);return+function(e,t){const n=un(e,t?.in);return n.setHours(23,59,59,999),n}(n,t)===+function(e,t){const n=un(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(n,t)}function En(e,t,n){const[r,o,i]=yn(n?.in,e,e,t),a=wn(o,i),s=Math.abs(function(e,t,n){const[r,o]=yn(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}(o,i));if(s<1)return 0;1===o.getMonth()&&o.getDate()>27&&o.setDate(30),o.setMonth(o.getMonth()-a*s);let l=wn(o,i)===-a;Nn(r)&&1===s&&1===wn(r,i)&&(l=!1);const c=a*(s-+l);return 0===c?0:c}function Pn(e,t,n){const r=function(e,t){return+un(e)-+un(t)}(e,t)/1e3;return(o=n?.roundingMethod,e=>{const t=(o?Math[o]:Math.trunc)(e);return 0===t?0:t})(r);var o}const Cn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Sn(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Mn={date:Sn({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Sn({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Sn({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},On={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Rn(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const Tn={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:Rn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Rn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Rn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Rn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Rn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function Ln(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(s,e=>e.test(a)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(s,e=>e.test(a));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(a.length)}}}function An(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;return{value:a,rest:t.slice(o.length)}}}const Dn={ordinalNumber:An({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Ln({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Ln({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},zn={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Cn[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:Mn,formatRelative:(e,t,n,r)=>On[e],localize:Tn,match:Dn,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Wn(e,t){const n=un(e,t?.in),r=vn(n,function(e,t){const n=un(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}(n));return r+1}function _n(e,t){const n=un(e,t?.in),r=+pn(n)-+function(e,t){const n=hn(e,t),r=cn(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),pn(r)}(n);return Math.round(r/an)+1}function jn(e,t){const n=un(e,t?.in),r=n.getFullYear(),o=fn(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=cn(t?.in||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=mn(a,t),l=cn(t?.in||e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const c=mn(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function In(e,t){const n=un(e,t?.in),r=+mn(n,t)-+function(e,t){const n=fn(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=jn(e,t),i=cn(t?.in||e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),mn(i,t)}(n,t);return Math.round(r/an)+1}function Hn(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const Fn={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Hn("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):Hn(n+1,2)},d:(e,t)=>Hn(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>Hn(e.getHours()%12||12,t.length),H:(e,t)=>Hn(e.getHours(),t.length),m:(e,t)=>Hn(e.getMinutes(),t.length),s:(e,t)=>Hn(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return Hn(Math.trunc(r*Math.pow(10,n-3)),t.length)}},$n="midnight",Gn="noon",Bn="morning",Vn="afternoon",Yn="evening",qn="night",Un={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return Fn.y(e,t)},Y:function(e,t,n,r){const o=jn(e,r),i=o>0?o:1-o;if("YY"===t){return Hn(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):Hn(i,t.length)},R:function(e,t){return Hn(hn(e),t.length)},u:function(e,t){return Hn(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Hn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Hn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Fn.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Hn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=In(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):Hn(o,t.length)},I:function(e,t,n){const r=_n(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):Hn(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):Fn.d(e,t)},D:function(e,t,n){const r=Wn(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):Hn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return Hn(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return Hn(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return Hn(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?Gn:0===r?$n:r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?Yn:r>=12?Vn:r>=4?Bn:qn,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return Fn.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):Fn.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):Hn(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):Hn(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Fn.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Fn.s(e,t)},S:function(e,t){return Fn.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return Kn(r);case"XXXX":case"XX":return Qn(r);default:return Qn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Kn(r);case"xxxx":case"xx":return Qn(r);default:return Qn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Xn(r,":");default:return"GMT"+Qn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Xn(r,":");default:return"GMT"+Qn(r,":")}},t:function(e,t,n){return Hn(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return Hn(+e,t.length)}};function Xn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+Hn(i,2)}function Kn(e,t){if(e%60==0){return(e>0?"-":"+")+Hn(Math.abs(e)/60,2)}return Qn(e,t)}function Qn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+Hn(Math.trunc(r/60),2)+t+Hn(r%60,2)}const Zn=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},Jn=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},er={p:Jn,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Zn(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Zn(r,t)).replace("{{time}}",Jn(o,t))}},tr=/^D+$/,nr=/^Y+$/,rr=["D","DD","YY","YYYY"];const or=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ir=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ar=/^'([^]*?)'?$/,sr=/''/g,lr=/[a-zA-Z]/;function cr(e,t,n){const r=fn(),o=n?.locale??r.locale??zn,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=un(e,n?.in);if(!kn(s))throw new RangeError("Invalid time value");let l=t.match(ir).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,er[t])(e,o.formatLong)}return e}).join("").match(or).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:ur(e)};if(Un[t])return{isToken:!0,value:e};if(t.match(lr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:i,weekStartsOn:a,locale:o};return l.map(r=>{if(!r.isToken)return r.value;const i=r.value;(!n?.useAdditionalWeekYearTokens&&function(e){return nr.test(e)}(i)||!n?.useAdditionalDayOfYearTokens&&function(e){return tr.test(e)}(i))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),rr.includes(e))throw new RangeError(r)}(i,t,String(e));return(0,Un[i[0]])(s,i,o.localize,c)}).join("")}function ur(e){const t=e.match(ar);return t?t[1].replace(sr,"'"):e}function dr(e,t){return function(e,t,n){const r=fn(),o=n?.locale??r.locale??zn,i=wn(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n?.addSuffix,comparison:i}),[s,l]=yn(n?.in,...i>0?[t,e]:[e,t]),c=Pn(l,s),u=(gn(l)-gn(s))/1e3,d=Math.round((c-u)/60);let f;if(d<2)return n?.includeSeconds?c<5?o.formatDistance("lessThanXSeconds",5,a):c<10?o.formatDistance("lessThanXSeconds",10,a):c<20?o.formatDistance("lessThanXSeconds",20,a):c<40?o.formatDistance("halfAMinute",0,a):c<60?o.formatDistance("lessThanXMinutes",1,a):o.formatDistance("xMinutes",1,a):0===d?o.formatDistance("lessThanXMinutes",1,a):o.formatDistance("xMinutes",d,a);if(d<45)return o.formatDistance("xMinutes",d,a);if(d<90)return o.formatDistance("aboutXHours",1,a);if(d<1440){const e=Math.round(d/60);return o.formatDistance("aboutXHours",e,a)}if(d<2520)return o.formatDistance("xDays",1,a);if(d<sn){const e=Math.round(d/1440);return o.formatDistance("xDays",e,a)}if(d<86400)return f=Math.round(d/sn),o.formatDistance("aboutXMonths",f,a);if(f=En(l,s),f<12){const e=Math.round(d/sn);return o.formatDistance("xMonths",e,a)}{const e=f%12,t=Math.trunc(f/12);return e<3?o.formatDistance("aboutXYears",t,a):e<9?o.formatDistance("overXYears",t,a):o.formatDistance("almostXYears",t+1,a)}}(e,xn(e),t)}function fr(e,t,n){const[r,o]=yn(n?.in,e,t);return+mn(r,n)===+mn(o,n)}function mr(e,t){return function(e,t,n){const[r,o]=yn(n?.in,e,t);return+bn(r)===+bn(o)}(cn(e,e),xn(e))}const pr={lessThanXSeconds:{one:"λιγότερο από ένα δευτερόλεπτο",other:"λιγότερο από {{count}} δευτερόλεπτα"},xSeconds:{one:"1 δευτερόλεπτο",other:"{{count}} δευτερόλεπτα"},halfAMinute:"μισό λεπτό",lessThanXMinutes:{one:"λιγότερο από ένα λεπτό",other:"λιγότερο από {{count}} λεπτά"},xMinutes:{one:"1 λεπτό",other:"{{count}} λεπτά"},aboutXHours:{one:"περίπου 1 ώρα",other:"περίπου {{count}} ώρες"},xHours:{one:"1 ώρα",other:"{{count}} ώρες"},xDays:{one:"1 ημέρα",other:"{{count}} ημέρες"},aboutXWeeks:{one:"περίπου 1 εβδομάδα",other:"περίπου {{count}} εβδομάδες"},xWeeks:{one:"1 εβδομάδα",other:"{{count}} εβδομάδες"},aboutXMonths:{one:"περίπου 1 μήνας",other:"περίπου {{count}} μήνες"},xMonths:{one:"1 μήνας",other:"{{count}} μήνες"},aboutXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"},xYears:{one:"1 χρόνο",other:"{{count}} χρόνια"},overXYears:{one:"πάνω από 1 χρόνο",other:"πάνω από {{count}} χρόνια"},almostXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"}},hr={date:Sn({formats:{full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},defaultWidth:"full"}),time:Sn({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Sn({formats:{full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},gr={lastWeek:e=>6===e.getDay()?"'το προηγούμενο' eeee 'στις' p":"'την προηγούμενη' eeee 'στις' p",yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},yr={ordinalNumber:(e,t)=>{const n=Number(e),r=t?.unit;let o;return o="year"===r||"month"===r?"ος":"week"===r||"dayOfYear"===r||"day"===r||"hour"===r||"date"===r?"η":"ο",n+o},era:Rn({values:{narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},defaultWidth:"wide"}),quarter:Rn({values:{narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Rn({values:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},defaultWidth:"wide",formattingValues:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},defaultFormattingWidth:"wide"}),day:Rn({values:{narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},defaultWidth:"wide"}),dayPeriod:Rn({values:{narrow:{am:"πμ",pm:"μμ",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},abbreviated:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},wide:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"}},defaultWidth:"wide"})},br={ordinalNumber:An({matchPattern:/^(\d+)(ος|η|ο)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:{narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^π/i,/^(μ|κ)/i]},defaultParseWidth:"any"}),quarter:Ln({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^τ[1234]/i,wide:/^[1234]ο? τρ(ί|ι)μηνο/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:{narrow:/^[ιφμαμιιασονδ]/i,abbreviated:/^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,wide:/^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ι/i,/^φ/i,/^μ/i,/^α/i,/^μ/i,/^ι/i,/^ι/i,/^α/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i],any:[/^ια/i,/^φ/i,/^μ[άα]ρ/i,/^απ/i,/^μ[άα][ιΐ]/i,/^ιο[ύυ]ν/i,/^ιο[ύυ]λ/i,/^α[ύυ]/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i]},defaultParseWidth:"any"}),day:Ln({matchPatterns:{narrow:/^[κδτπσ]/i,short:/^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,abbreviated:/^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,wide:/^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^κ/i,/^δ/i,/^τ/i,/^τ/i,/^π/i,/^π/i,/^σ/i],any:[/^κ/i,/^δ/i,/^τρ/i,/^τε/i,/^π[εέ]/i,/^π[αά]/i,/^σ/i]},defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:{narrow:/^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,any:/^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^πμ|π\.\s?μ\./i,pm:/^μμ|μ\.\s?μ\./i,midnight:/^μεσάν/i,noon:/^μεσημ(έ|ε)/i,morning:/πρω(ί|ι)/i,afternoon:/απ(ό|ο)γευμα/i,evening:/βρ(ά|α)δυ/i,night:/ν(ύ|υ)χτα/i}},defaultParseWidth:"any"})},vr={code:"el",formatDistance:(e,t,n)=>{let r;const o=pr[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?"σε "+r:r+" πριν":r},formatLong:hr,formatRelative:(e,t)=>{const n=gr[e];return"function"==typeof n?n(t):n},localize:yr,match:br,options:{weekStartsOn:1,firstWeekContainsDate:4}};function wr(e,t){if(void 0!==e.one&&1===t)return e.one;const n=t%10,r=t%100;return 1===n&&11!==r?e.singularNominative.replace("{{count}}",String(t)):n>=2&&n<=4&&(r<10||r>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function xr(e){return(t,n)=>n&&n.addSuffix?n.comparison&&n.comparison>0?e.future?wr(e.future,t):"за "+wr(e.regular,t):e.past?wr(e.past,t):wr(e.regular,t)+" тому":wr(e.regular,t)}const kr={lessThanXSeconds:xr({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:xr({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:(e,t)=>t&&t.addSuffix?t.comparison&&t.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини",lessThanXMinutes:xr({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:xr({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:xr({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:xr({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:xr({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:xr({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:xr({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:xr({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:xr({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:xr({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:xr({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:xr({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:xr({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},Nr={date:Sn({formats:{full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},defaultWidth:"full"}),time:Sn({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:Sn({formats:{full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Er=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function Pr(e){return"'у "+Er[e]+" о' p"}const Cr={lastWeek:(e,t,n)=>{const r=un(e),o=r.getDay();return fr(r,t,n)?Pr(o):function(e){const t=Er[e];switch(e){case 0:case 3:case 5:case 6:return"'у минулу "+t+" о' p";case 1:case 2:case 4:return"'у минулий "+t+" о' p"}}(o)},yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:(e,t,n)=>{const r=un(e),o=r.getDay();return fr(r,t,n)?Pr(o):function(e){const t=Er[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступну "+t+" о' p";case 1:case 2:case 4:return"'у наступний "+t+" о' p"}}(o)},other:"P"},Sr={ordinalNumber:(e,t)=>{const n=String(t?.unit),r=Number(e);let o;return o="date"===n?3===r||23===r?"-є":"-е":"minute"===n||"second"===n||"hour"===n?"-а":"-й",r+o},era:Rn({values:{narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},defaultWidth:"wide"}),quarter:Rn({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:Rn({values:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},defaultFormattingWidth:"wide"}),day:Rn({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},defaultWidth:"wide"}),dayPeriod:Rn({values:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},defaultFormattingWidth:"wide"})},Mr={ordinalNumber:An({matchPattern:/^(\d+)(-?(е|й|є|а|я))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:{narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:Ln({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:{narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},defaultParseWidth:"any"}),day:Ln({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:{narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},Or={code:"uk",formatDistance:(e,t,n)=>(n=n||{},kr[e](t,n)),formatLong:Nr,formatRelative:(e,t,n,r)=>{const o=Cr[e];return"function"==typeof o?o(t,n,r):o},localize:Sr,match:Mr,options:{weekStartsOn:1,firstWeekContainsDate:1}},Rr={en:zn,el:vr,ua:Or};function Tr(e,t="en",n=!1){const r=Rr[t]??zn;if(n)return dr(e,{locale:r,addSuffix:!0});return mr(e)?cr(e,"p",{locale:r}):(e=>{const t=vn(new Date,e);return t>=0&&t<=6})(e)?cr(e,"eeee",{locale:r}):cr(e,"P",{locale:r})}const Lr=s(i(function({date:t,language:n,distanceToNow:r,...o},i){return t?e("span",{ref:i,...o,className:nt("text-xs text-muted-foreground",o?.className),children:Tr(t,n,r)}):null}));Lr.displayName="FormattedDate";const Ar=({status:t,...n})=>{switch(t){case"wait":return e(C,{...n,className:nt("text-gray-500 size-4",n?.className)});case"sent":return e(P,{...n,className:nt("text-gray-500 size-4",n?.className)});case"read":return e(E,{...n,className:nt("text-gray-500 size-4",n?.className)});case"lost":return e(N,{...n,className:nt("text-red-500 size-4",n?.className)});default:return null}};Ar.displayName="StatusSent";const Dr=s(i(function({index:n=-1,isPrivateDialog:r,selected:o,onSelect:i=()=>{},name:a,photo:s,userOnline:l,userPresence:c,hasGroupIcon:u,lastSentStatus:d,lastSentDate:f,lastSenderName:m,lastMessage:p,typingStatusText:h,draft:g,draftLabel:y="Draft",unreadCount:b=0,language:v="en",divider:w="bottom",avatarProps:x,contentProps:k,headerProps:N,headerLeftProps:E,groupIconProps:P,nameProps:C,headerRightProps:S,statusSentIconProps:M,formattedDateProps:O,footerProps:R,lastMessageProps:T,draftLabelProps:L,lastSenderNameProps:A,unreadBadgeProps:D,dividerProps:z,...W},_){const I=s||x?.src,H=a||x?.name,F=!!r&&(l||x?.online),$=r?c||x?.presence:void 0,G="top"===w||"both"===w&&0===n,B="bottom"===w||"both"===w;return t("div",{ref:_,...W,onClick:i,className:nt("flex items-start gap-2 px-2 flex-1 cursor-pointer","transition-colors duration-200 ease-linear",""+(o?"border-l-[0.25em] pl-1 border-l-ring bg-ring/20":"hover:bg-ring/5"),W?.className),children:[e(Qt,{src:I,name:H,online:F,presence:$,...x,className:nt("size-13 my-2 "+(s?"bg-ring/10":"bg-ring/30"),x?.className)}),t("div",{...k,className:nt("relative self-stretch flex-1 flex-col text-foreground",k?.className),children:[t("div",{...N,className:nt("flex items-center justify-between gap-1",N?.className),children:[t("div",{...E,className:nt("flex items-center gap-1",E?.className),children:[!r&&u&&e(j,{...P,className:nt("text-muted-foreground size-4 min-w-4",P?.className)}),e("span",{...C,className:nt("font-medium text-left line-clamp-1",C?.className),children:a})]}),t("div",{...S,className:nt("flex items-center gap-1",S?.className),children:[e(Ar,{status:d,...M}),e(Lr,{date:f,language:v,...O})]})]}),t("div",{...R,className:nt("flex items-start justify-between gap-1",R?.className),children:[e("span",{...T,className:nt("text-sm text-left text-muted-foreground line-clamp-2",T?.className),children:h||t("span",g?{children:[e("span",{...L,className:nt("text-red-500 font-medium",L?.className),children:`${y}: `}),g]}:{children:[m&&e("span",{...A,className:nt("font-semibold",A?.className),children:`${m}: `}),p]})}),b>0&&e(nn,{...D,className:nt("bg-ring text-background text-xs rounded-full p-1 h-6 min-w-6 mt-0.5",D?.className),children:b})]}),G&&e("div",{...z,className:nt("absolute -top-px left-0 right-0 border-t",z?.className)}),B&&e("div",{className:"absolute bottom-0 left-0 right-0 border-b"})]})]})}));Dr.displayName="DialogItem";const zr=i(function({active:t,onDismiss:n,disableClickOutside:r=!1,disableEscKeyPress:o=!1,disabled:i,...a},s){const c=l(null);u(s,()=>c.current,[]);const m=d(e=>{!r&&t&&e.target===c.current&&n()},[r,t,n]),p=d(e=>{!o&&t&&"Escape"===e.key&&n()},[o,t,n]);return f(()=>{if(!o&&t)return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[o,t,p]),i||!t?null:e("div",{ref:c,"aria-hidden":!0,...a,onClick:m,onTouchStart:m,className:nt("fixed top-0 left-0 size-full bg-black/20",a?.className)})});zr.displayName="DismissLayer";var Wr=r.forwardRef((t,n)=>e(Mt.label,{...t,ref:n,onMouseDown:e=>{e.target.closest("button, input, select, textarea")||(t.onMouseDown?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())}}));Wr.displayName="Label";var _r=Wr;const jr=i(function({...t},n){return e(_r,{ref:n,...t,className:nt("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t?.className)})});jr.displayName="Label";const Ir=(e,t,n,r,o)=>{const i=Array.from(e||[]).filter(Boolean);if(0===i.length)return;const a=((e,t)=>{if(0===e.length)return!1;const n="string"==typeof t?t.split(/\s*,\s*|\s+/).map(e=>e.toLowerCase().trim()):null;return null!==n&&0!==n.length&&e.every(e=>{const{type:t,size:r}=e;if("string"!=typeof t||"number"!=typeof r||r<=0||0===t.length)return!1;const o=t.toLowerCase(),[i,a]=o.split("/");return n.some(e=>e.startsWith("*")||e===o||i&&e.endsWith("/*")&&e.startsWith(i)||e.startsWith(".")&&e.slice(1)===a)})})(i,t);a?r(n?i:i[0]?[i[0]]:[]):o()};const Hr=i(function({onSelectFile:n=()=>{},onInvalidFile:r=()=>{},multiple:o=!1,accept:i="*/*",iconElement:a,labelProps:s,iconProps:l,...c},u){return t(jr,{...s,htmlFor:"file-uploader",className:nt("group p-2 rounded-full hover:bg-ring/10 transition-all duration-200 ease-in-out cursor-pointer",s?.className),children:[a||e(z,{...l,className:nt("text-foreground group-hover:scale-110 transition-all duration-200 ease-in-out",l?.className)}),e("input",{ref:u,id:"file-uploader",type:"file",multiple:o,accept:i,onChange:e=>{Ir(e.currentTarget.files,i,o,n,r),e.currentTarget.value=""},...c,className:nt("hidden",c?.className)})]})});Hr.displayName="FilePickerInput";const Fr=i(function({onSelectFile:n=()=>{},onInvalidFile:r=()=>{},multiple:o=!1,accept:i="*/*",children:a,iconElement:s,placeholder:l,dropZoneProps:u,placeholderContainerProps:d,iconProps:f,placeholderProps:m,...p},h){const[g,y]=c(!1),b=e=>{e.preventDefault(),e.stopPropagation()};return t("div",{ref:h,onDragEnter:e=>{b(e),e.dataTransfer.items&&e.dataTransfer.items.length>0&&y(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||y(!1)},onDragOver:b,...p,className:nt("relative size-full min-h-0",p?.className),children:[a,e("div",{onDrop:e=>{b(e),y(!1),Ir(e.dataTransfer.files,i,o,n,r),e.dataTransfer.clearData()},...u,className:nt("absolute top-0 left-0 size-full","flex items-center justify-center","transition-all duration-300 ease-out","border-2 border-dashed border-ring bg-ring/25 rounded-md",g?"opacity-100 pointer-events-auto visible scale-100":"opacity-0 pointer-events-none invisible scale-98",u?.className),children:t("div",{...d,className:nt("bg-muted flex flex-row items-center gap-2 rounded-full py-2 px-4 transition-all",g?"scale-100":"scale-90",d?.className),children:[s||e(S,{absoluteStrokeWidth:!0,...f,className:nt("text-ring size-6",f?.className)}),e("span",{...m,className:nt("text-ring text-md font-bold",m?.className),children:l||"Drop files here"})]})})]})});Fr.displayName="FilePickerDropzone";const $r=i(function(t,n){return e("input",{ref:n,...t,className:nt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t?.className)})});$r.displayName="Input";const Gr=e=>{if(0===e.length)return e;const t=document.createElement("div");return t.innerHTML=e,t.textContent.trim()};const Br=s(i(function({thin:n=!1,title:r="",description:o="",icon:i,iconFallbackElement:a,image:s,onReady:l=()=>{},titleContainerProps:u,iconProps:f,iconFallbackProps:m,titleProps:p,descriptionProps:h,imageContainerProps:g,imageProps:y,...b},v){const[w,x]=c(i),[k,N]=c(s),E=d(e=>{y?.onLoad?.(e),l()},[l,y]),P=d(e=>{f?.onError?.(e),x(void 0)},[f]),C=d(e=>{y?.onError?.(e),N(void 0)},[y]);return t("a",{ref:v,target:"_blank",rel:"noopener noreferrer",...b,className:nt("transition-color duration-300 ease-out","grid items-start gap-2 p-2 mt-1 overflow-hidden rounded border-l-4 border-l-ring bg-white hover:bg-ring/20",n?"grid-cols-3":"grid-cols-1",b?.className),children:[t("div",{...u,className:nt("flex items-start gap-2",n?"col-span-3":"col-span-1",u?.className),children:[w?e("img",{alt:"icon",src:w,...f,onError:P,className:nt("size-5",f?.className)}):a||e(R,{...m,className:nt("size-5",m?.className)}),e("span",{...p,className:nt("text-sm font-bold",n?"line-clamp-1":"line-clamp-2",p?.className),children:Gr(r)})]}),o&&e("span",{...h,className:nt("text-sm line-clamp-5",n?k?"col-span-2":"col-span-3":"col-span-1",h?.className),children:Gr(o)}),k&&e("div",{...g,className:nt("flex items-center justify-center",g?.className),children:e("img",{alt:"banner",src:k,...y,onLoad:E,onError:C,className:nt("rounded max-w-full object-contain",n?"max-h-25":"max-h-60",y?.className)})})]})}));Br.displayName="LinkPreview";const Vr="numeric",Yr="ascii",qr="alpha",Ur="asciinumeric",Xr="alphanumeric",Kr="domain",Qr="emoji",Zr="scheme",Jr="slashscheme",eo="whitespace";function to(e,t){return e in t||(t[e]=[]),t[e]}function no(e,t,n){t[Vr]&&(t[Ur]=!0,t[Xr]=!0),t[Yr]&&(t[Ur]=!0,t[qr]=!0),t[Ur]&&(t[Xr]=!0),t[qr]&&(t[Xr]=!0),t[Xr]&&(t[Kr]=!0),t[Qr]&&(t[Kr]=!0);for(const r in t){const t=to(r,n);t.indexOf(e)<0&&t.push(e)}}function ro(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}ro.groups={},ro.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){const r=t.jr[n][0],o=t.jr[n][1];if(o&&r.test(e))return o}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let o=0;o<e.length;o++)this.tt(e[o],t,n,r)},tr(e,t,n,r){let o;return r=r||ro.groups,t&&t.j?o=t:(o=new ro(t),n&&r&&no(t,n,r)),this.jr.push([e,o]),o},ts(e,t,n,r){let o=this;const i=e.length;if(!i)return o;for(let t=0;t<i-1;t++)o=o.tt(e[t]);return o.tt(e[i-1],t,n,r)},tt(e,t,n,r){r=r||ro.groups;const o=this;if(t&&t.j)return o.j[e]=t,t;const i=t;let a,s=o.go(e);if(s?(a=new ro,Object.assign(a.j,s.j),a.jr.push.apply(a.jr,s.jr),a.jd=s.jd,a.t=s.t):a=new ro,i){if(r)if(a.t&&"string"==typeof a.t){const e=Object.assign(function(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(a.t,r),n);no(i,e,r)}else n&&no(i,n,r);a.t=i}return o.j[e]=a,a}};const oo=(e,t,n,r,o)=>e.ta(t,n,r,o),io=(e,t,n,r,o)=>e.tr(t,n,r,o),ao=(e,t,n,r,o)=>e.ts(t,n,r,o),so=(e,t,n,r,o)=>e.tt(t,n,r,o),lo="WORD",co="UWORD",uo="ASCIINUMERICAL",fo="ALPHANUMERICAL",mo="LOCALHOST",po="TLD",ho="UTLD",go="SCHEME",yo="SLASH_SCHEME",bo="NUM",vo="WS",wo="NL",xo="OPENBRACE",ko="CLOSEBRACE",No="OPENBRACKET",Eo="CLOSEBRACKET",Po="OPENPAREN",Co="CLOSEPAREN",So="OPENANGLEBRACKET",Mo="CLOSEANGLEBRACKET",Oo="FULLWIDTHLEFTPAREN",Ro="FULLWIDTHRIGHTPAREN",To="LEFTCORNERBRACKET",Lo="RIGHTCORNERBRACKET",Ao="LEFTWHITECORNERBRACKET",Do="RIGHTWHITECORNERBRACKET",zo="FULLWIDTHLESSTHAN",Wo="FULLWIDTHGREATERTHAN",_o="AMPERSAND",jo="APOSTROPHE",Io="ASTERISK",Ho="AT",Fo="BACKSLASH",$o="BACKTICK",Go="CARET",Bo="COLON",Vo="COMMA",Yo="DOLLAR",qo="DOT",Uo="EQUALS",Xo="EXCLAMATION",Ko="HYPHEN",Qo="PERCENT",Zo="PIPE",Jo="PLUS",ei="POUND",ti="QUERY",ni="QUOTE",ri="FULLWIDTHMIDDLEDOT",oi="SEMI",ii="SLASH",ai="TILDE",si="UNDERSCORE",li="EMOJI",ci="SYM";var ui=Object.freeze({__proto__:null,ALPHANUMERICAL:fo,AMPERSAND:_o,APOSTROPHE:jo,ASCIINUMERICAL:uo,ASTERISK:Io,AT:Ho,BACKSLASH:Fo,BACKTICK:$o,CARET:Go,CLOSEANGLEBRACKET:Mo,CLOSEBRACE:ko,CLOSEBRACKET:Eo,CLOSEPAREN:Co,COLON:Bo,COMMA:Vo,DOLLAR:Yo,DOT:qo,EMOJI:li,EQUALS:Uo,EXCLAMATION:Xo,FULLWIDTHGREATERTHAN:Wo,FULLWIDTHLEFTPAREN:Oo,FULLWIDTHLESSTHAN:zo,FULLWIDTHMIDDLEDOT:ri,FULLWIDTHRIGHTPAREN:Ro,HYPHEN:Ko,LEFTCORNERBRACKET:To,LEFTWHITECORNERBRACKET:Ao,LOCALHOST:mo,NL:wo,NUM:bo,OPENANGLEBRACKET:So,OPENBRACE:xo,OPENBRACKET:No,OPENPAREN:Po,PERCENT:Qo,PIPE:Zo,PLUS:Jo,POUND:ei,QUERY:ti,QUOTE:ni,RIGHTCORNERBRACKET:Lo,RIGHTWHITECORNERBRACKET:Do,SCHEME:go,SEMI:oi,SLASH:ii,SLASH_SCHEME:yo,SYM:ci,TILDE:ai,TLD:po,UNDERSCORE:si,UTLD:ho,UWORD:co,WORD:lo,WS:vo});const di=/[a-z]/,fi=/\p{L}/u,mi=/\p{Emoji}/u,pi=/\d/,hi=/\s/;let gi=null,yi=null;function bi(e,t){const n=function(e){const t=[],n=e.length;let r=0;for(;r<n;){let o,i=e.charCodeAt(r),a=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(a),r+=a.length}return t}(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,o=[];let i=0,a=0;for(;a<r;){let s=e,l=null,c=0,u=null,d=-1,f=-1;for(;a<r&&(l=s.go(n[a]));)s=l,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[a].length,f++),c+=n[a].length,i+=n[a].length,a++;i-=d,a-=f,c-=d,o.push({t:u.t,v:t.slice(i-c,i),s:i-c,e:i})}return o}function vi(e,t,n,r,o){let i;const a=t.length;for(let n=0;n<a-1;n++){const a=t[n];e.j[a]?i=e.j[a]:(i=new ro(r),i.jr=o.slice(),e.j[a]=i),e=i}return i=new ro(n),i.jr=o.slice(),e.j[t[a-1]]=i,i}function wi(e){const t=[],n=[];let r=0;for(;r<e.length;){let o=0;for(;"0123456789".indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+o),10);t>0;t--)n.pop();r+=o}else n.push(e[r]),r++}return t}const xi={defaultProtocol:"http",events:null,format:Ni,formatHref:Ni,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function ki(e,t=null){let n=Object.assign({},xi);e&&(n=Object.assign(n,e instanceof ki?e.o:e));const r=n.ignoreTags,o=[];for(let e=0;e<r.length;e++)o.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}function Ni(e){return e}function Ei(e,t){this.t="token",this.v=e,this.tk=t}function Pi(e,t){class n extends Ei{constructor(t,n){super(t,n),this.t=e}}for(const e in t)n.prototype[e]=t[e];return n.t=e,n}ki.prototype={o:xi,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=null!=t;let o=this.o[e];return o?("object"==typeof o?(o=n.t in o?o[n.t]:xi[e],"function"==typeof o&&r&&(o=o(t,n))):"function"==typeof o&&r&&(o=o(t,n.t,n)),o):o},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},Ei.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},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=xi.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,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),i=this.toFormattedString(e),a={},s=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return a.href=r,s&&(a.class=s),l&&(a.target=l),c&&(a.rel=c),u&&Object.assign(a,u),{tagName:o,attributes:a,content:i,eventListeners:d}}};const Ci=Pi("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Si=Pi("text"),Mi=Pi("nl"),Oi=Pi("url",{isLink:!0,toHref(e=xi.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==mo&&e[1].t===Bo}}),Ri=e=>new ro(e);function Ti(e,t,n){const r=n[0].s,o=n[n.length-1].e;return new e(t.slice(r,o),n)}const Li={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Ai(){Li.scanner=function(e=[]){const t={};ro.groups=t;const n=new ro;null==gi&&(gi=wi("aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==yi&&(yi=wi("ελ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")),so(n,"'",jo),so(n,"{",xo),so(n,"}",ko),so(n,"[",No),so(n,"]",Eo),so(n,"(",Po),so(n,")",Co),so(n,"<",So),so(n,">",Mo),so(n,"(",Oo),so(n,")",Ro),so(n,"「",To),so(n,"」",Lo),so(n,"『",Ao),so(n,"』",Do),so(n,"<",zo),so(n,">",Wo),so(n,"&",_o),so(n,"*",Io),so(n,"@",Ho),so(n,"`",$o),so(n,"^",Go),so(n,":",Bo),so(n,",",Vo),so(n,"$",Yo),so(n,".",qo),so(n,"=",Uo),so(n,"!",Xo),so(n,"-",Ko),so(n,"%",Qo),so(n,"|",Zo),so(n,"+",Jo),so(n,"#",ei),so(n,"?",ti),so(n,'"',ni),so(n,"/",ii),so(n,";",oi),so(n,"~",ai),so(n,"_",si),so(n,"\\",Fo),so(n,"・",ri);const r=io(n,pi,bo,{[Vr]:!0});io(r,pi,r);const o=io(r,di,uo,{[Ur]:!0}),i=io(r,fi,fo,{[Xr]:!0}),a=io(n,di,lo,{[Yr]:!0});io(a,pi,o),io(a,di,a),io(o,pi,o),io(o,di,o);const s=io(n,fi,co,{[qr]:!0});io(s,di),io(s,pi,i),io(s,fi,s),io(i,pi,i),io(i,di),io(i,fi,i);const l=so(n,"\n",wo,{[eo]:!0}),c=so(n,"\r",vo,{[eo]:!0}),u=io(n,hi,vo,{[eo]:!0});so(n,"",u),so(c,"\n",l),so(c,"",u),io(c,hi,u),so(u,"\r"),so(u,"\n"),io(u,hi,u),so(u,"",u);const d=io(n,mi,li,{[Qr]:!0});so(d,"#"),io(d,mi,d),so(d,"️",d);const f=so(d,"");so(f,"#"),io(f,mi,d);const m=[[di,a],[pi,o]],p=[[di,null],[fi,s],[pi,i]];for(let e=0;e<gi.length;e++)vi(n,gi[e],po,lo,m);for(let e=0;e<yi.length;e++)vi(n,yi[e],ho,co,p);no(po,{tld:!0,ascii:!0},t),no(ho,{utld:!0,alpha:!0},t),vi(n,"file",go,lo,m),vi(n,"mailto",go,lo,m),vi(n,"http",yo,lo,m),vi(n,"https",yo,lo,m),vi(n,"ftp",yo,lo,m),vi(n,"ftps",yo,lo,m),no(go,{scheme:!0,ascii:!0},t),no(yo,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){const r=e[t][0],o=e[t][1]?{[Zr]:!0}:{[Jr]:!0};r.indexOf("-")>=0?o[Kr]=!0:di.test(r)?pi.test(r)?o[Ur]=!0:o[Yr]=!0:o[Vr]=!0,ao(n,r,r,o)}return ao(n,"localhost",mo,{ascii:!0}),n.jd=new ro(ci),{start:n,tokens:Object.assign({groups:t},ui)}}(Li.customSchemes);for(let e=0;e<Li.tokenQueue.length;e++)Li.tokenQueue[e][1]({scanner:Li.scanner});Li.parser=function({groups:e}){const t=e.domain.concat([_o,Io,Ho,Fo,$o,Go,Yo,Uo,Ko,bo,Qo,Zo,Jo,ei,ii,ci,ai,si]),n=[jo,Bo,Vo,qo,Xo,Qo,ti,ni,oi,So,Mo,xo,ko,Eo,No,Po,Co,Oo,Ro,To,Lo,Ao,Do,zo,Wo],r=[_o,jo,Io,Fo,$o,Go,Yo,Uo,Ko,xo,ko,Qo,Zo,Jo,ei,ti,ii,ci,ai,si],o=Ri(),i=so(o,ai);oo(i,r,i),oo(i,e.domain,i);const a=Ri(),s=Ri(),l=Ri();oo(o,e.domain,a),oo(o,e.scheme,s),oo(o,e.slashscheme,l),oo(a,r,i),oo(a,e.domain,a);const c=so(a,Ho);so(i,Ho,c),so(s,Ho,c),so(l,Ho,c);const u=so(i,qo);oo(u,r,i),oo(u,e.domain,i);const d=Ri();oo(c,e.domain,d),oo(d,e.domain,d);const f=so(d,qo);oo(f,e.domain,d);const m=Ri(Ci);oo(f,e.tld,m),oo(f,e.utld,m),so(c,mo,m);const p=so(d,Ko);so(p,Ko,p),oo(p,e.domain,d),oo(m,e.domain,d),so(m,qo,f),so(m,Ko,p);const h=so(m,Bo);oo(h,e.numeric,Ci);const g=so(a,Ko),y=so(a,qo);so(g,Ko,g),oo(g,e.domain,a),oo(y,r,i),oo(y,e.domain,a);const b=Ri(Oi);oo(y,e.tld,b),oo(y,e.utld,b),oo(b,e.domain,a),oo(b,r,i),so(b,qo,y),so(b,Ko,g),so(b,Ho,c);const v=so(b,Bo),w=Ri(Oi);oo(v,e.numeric,w);const x=Ri(Oi),k=Ri();oo(x,t,x),oo(x,n,k),oo(k,t,x),oo(k,n,k),so(b,ii,x),so(w,ii,x);const N=so(s,Bo),E=so(l,Bo),P=so(E,ii),C=so(P,ii);oo(s,e.domain,a),so(s,qo,y),so(s,Ko,g),oo(l,e.domain,a),so(l,qo,y),so(l,Ko,g),oo(N,e.domain,x),so(N,ii,x),so(N,ti,x),oo(C,e.domain,x),oo(C,t,x),so(C,ii,x);const S=[[xo,ko],[No,Eo],[Po,Co],[So,Mo],[Oo,Ro],[To,Lo],[Ao,Do],[zo,Wo]];for(let e=0;e<S.length;e++){const[r,o]=S[e],i=so(x,r);so(k,r,i),so(i,o,x);const a=Ri(Oi);oo(i,t,a);const s=Ri();oo(i,n),oo(a,t,a),oo(a,n,s),oo(s,t,a),oo(s,n,s),so(a,o,x),so(s,o,x)}return so(o,mo,b),so(o,wo,Mi),{start:o,tokens:ui}}(Li.scanner.tokens);for(let e=0;e<Li.pluginQueue.length;e++)Li.pluginQueue[e][1]({scanner:Li.scanner,parser:Li.parser});return Li.initialized=!0,Li}function Di(e){return Li.initialized||Ai(),function(e,t,n){let r=n.length,o=0,i=[],a=[];for(;o<r;){let s=e,l=null,c=null,u=0,d=null,f=-1;for(;o<r&&!(l=s.go(n[o].t));)a.push(n[o++]);for(;o<r&&(c=l||s.go(n[o].t));)l=null,s=c,s.accepts()?(f=0,d=s):f>=0&&f++,o++,u++;if(f<0)o-=u,o<r&&(a.push(n[o]),o++);else{a.length>0&&(i.push(Ti(Si,t,a)),a=[]),o-=f,u-=f;const e=d.t,r=n.slice(o-u,o);i.push(Ti(e,t,r))}}return a.length>0&&i.push(Ti(Si,t,a)),i}(Li.parser.start,e,bi(Li.scanner.start,e))}function zi(e,t,n){if(0===r.Children.count(e.props.children))return e;const o=[];r.Children.forEach(e.props.children,e=>{"string"==typeof e?o.push.apply(o,function(e,t,n){const o=Di(e),i=[];for(let e=0;e<o.length;e++){const a=o[e];if("nl"===a.t&&t.get("nl2br")){const e="__linkify-el-"+n.elementId++;i.push(r.createElement("br",{key:e}))}else if(a.isLink&&t.check(a)){let e=t.render(a);if(!("key"in e.props)){const t="__linkify-el-"+n.elementId++,o=Object.assign({key:t},e.props);e=r.cloneElement(e,o)}i.push(e)}else i.push(a.toString())}return i}(e,t,n)):r.isValidElement(e)?"string"==typeof e.type&&t.ignoreTags.indexOf(e.type.toUpperCase())>=0?o.push(e):o.push(zi(e,t,n)):o.push(e)});const i="__linkify-el-"+n.elementId++,a=Object.assign({key:i},e.props);return r.cloneElement(e,a,o)}Di.scan=bi;const Wi=e=>{let t=0;const n={key:"__linkify-wrapper"};for(const t in e)"options"!==t&&"as"!==t&&"tagName"!==t&&"children"!==t&&(n[t]=e[t]);const o=new ki(e.options,({tagName:e,attributes:n,content:o})=>(n.key="__linkify-lnk-"+t++,n.class&&(n.className=n.class,delete n.class),r.createElement(e,n,o))),i=e.as||e.tagName||r.Fragment||"span",a=e.children;return zi(r.createElement(i,n,a),o,{elementId:0})},_i={target:"_blank",rel:"noopener noreferrer"};const ji=s(i(function({text:t,linkifyProps:n,...r},o){const i=m(()=>({..._i,...n,className:nt("text-blue-500 hover:text-blue-600 hover:underline",n?.className)}),[n]);return e("p",{ref:o,...r,className:nt("wrap-break-word text-base",r?.className),children:e(Wi,{options:i,children:t})})}));ji.displayName="LinkifyText";const Ii=i(function({title:t,titles:n=[],rowProps:r,...o},i){const a="string"==typeof t?[t,...n]:n;return e("div",{ref:i,...o,className:nt("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",o?.className),children:a.map((t,n)=>e("div",{...r,className:nt("text-center",r?.className),children:t},`placeholder-text-${n}`))})});Ii.displayName="PlaceholderText";const Hi=i(function({onSearch:n=()=>{},onCancel:r=()=>{},hasSearchIcon:o=!0,hasCancelIcon:i=!0,searchIconProps:a,cancelIconProps:s,containerProps:l,...u},d){const[f,m]=c("");return t("div",{...l,className:nt("group relative",l?.className),children:[o&&e(_,{...a,className:nt("absolute top-1/2 left-2 transform -translate-y-1/2 size-5 text-muted-foreground group-focus-within:text-ring",a?.className)}),e($r,{ref:d,name:"search",placeholder:u?.placeholder||"Search...",value:f,onChange:e=>{const t=e.target.value;m(t),n(t.toLowerCase())},...u,className:nt("placeholder:text-muted-foreground focus-visible:ring-ring/50 focus-visible:ring flex",o?"pl-10":"pl-3",i?"pr-10":"pr-3",u?.className)}),i&&e(I,{onClick:()=>{m(""),r()},...s,className:nt("absolute top-1/2 right-2 transform -translate-y-1/2 size-5 text-muted-foreground cursor-pointer hover:text-ring transition-all duration-300 ease-in-out",f.length>0?"opacity-100 scale-100":"opacity-0 scale-75 pointer-events-none",s?.className)})]})});function Fi(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function $i(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Gi(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?yt(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}Hi.displayName="Search";var Bi=Symbol("radix.slottable");function Vi(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Bi}var Yi=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=Gi(t),o=r.forwardRef((t,o)=>{const{children:i,...a}=t,s=r.Children.toArray(i),l=s.find(Vi);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{});var qi,Ui="dismissableLayer.update",Xi="dismissableLayer.pointerDownOutside",Ki="dismissableLayer.focusOutside",Qi=r.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zi=r.forwardRef((t,n)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,onDismiss:c,...u}=t,d=r.useContext(Qi),[f,m]=r.useState(null),p=f?.ownerDocument??globalThis?.document,[,h]=r.useState({}),g=bt(n,e=>m(e)),y=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(b),w=f?y.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,k=w>=v,N=function(e,t=globalThis?.document){const n=pt(e),o=r.useRef(!1),i=r.useRef(()=>{});return r.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let r=function(){ea(Xi,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=r,t.addEventListener("click",i.current,{once:!0})):r()}else t.removeEventListener("click",i.current);o.current=!1},r=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(r),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,n=[...d.branches].some(e=>e.contains(t));k&&!n&&(a?.(e),l?.(e),e.defaultPrevented||c?.())},p),E=function(e,t=globalThis?.document){const n=pt(e),o=r.useRef(!1);return r.useEffect(()=>{const e=e=>{if(e.target&&!o.current){ea(Ki,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...d.branches].some(e=>e.contains(t))||(s?.(e),l?.(e),e.defaultPrevented||c?.())},p);return function(e,t=globalThis?.document){const n=pt(e);r.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{w===d.layers.size-1&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},p),r.useEffect(()=>{if(f)return o&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(qi=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),Ji(),()=>{o&&1===d.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=qi)}},[f,p,o,d]),r.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),Ji())},[f,d]),r.useEffect(()=>{const e=()=>h({});return document.addEventListener(Ui,e),()=>document.removeEventListener(Ui,e)},[]),e(Yi.div,{...u,ref:g,style:{pointerEvents:x?k?"auto":"none":void 0,...t.style},onFocusCapture:Fi(t.onFocusCapture,E.onFocusCapture),onBlurCapture:Fi(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Fi(t.onPointerDownCapture,N.onPointerDownCapture)})});Zi.displayName="DismissableLayer";function Ji(){const e=new CustomEvent(Ui);document.dispatchEvent(e)}function ea(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?function(e,t){e&&h.flushSync(()=>e.dispatchEvent(t))}(o,i):o.dispatchEvent(i)}r.forwardRef((t,n)=>{const o=r.useContext(Qi),i=r.useRef(null),a=bt(n,i);return r.useEffect(()=>{const e=i.current;if(e)return o.branches.add(e),()=>{o.branches.delete(e)}},[o.branches]),e(Yi.div,{...t,ref:a})}).displayName="DismissableLayerBranch";var ta=r[" useId ".trim().toString()]||(()=>{}),na=0;const ra=["top","right","bottom","left"],oa=Math.min,ia=Math.max,aa=Math.round,sa=Math.floor,la=e=>({x:e,y:e}),ca={left:"right",right:"left",bottom:"top",top:"bottom"},ua={start:"end",end:"start"};function da(e,t,n){return ia(e,oa(t,n))}function fa(e,t){return"function"==typeof e?e(t):e}function ma(e){return e.split("-")[0]}function pa(e){return e.split("-")[1]}function ha(e){return"x"===e?"y":"x"}function ga(e){return"y"===e?"height":"width"}const ya=new Set(["top","bottom"]);function ba(e){return ya.has(ma(e))?"y":"x"}function va(e){return ha(ba(e))}function wa(e){return e.replace(/start|end/g,e=>ua[e])}const xa=["left","right"],ka=["right","left"],Na=["top","bottom"],Ea=["bottom","top"];function Pa(e,t,n,r){const o=pa(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?ka:xa:t?xa:ka;case"left":case"right":return t?Na:Ea;default:return[]}}(ma(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(wa)))),i}function Ca(e){return e.replace(/left|right|bottom|top/g,e=>ca[e])}function Sa(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ma(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Oa(e,t,n){let{reference:r,floating:o}=e;const i=ba(t),a=va(t),s=ga(a),l=ma(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let m;switch(l){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-o.width,y:d};break;default:m={x:r.x,y:r.y}}switch(pa(t)){case"start":m[a]-=f*(n&&c?-1:1);break;case"end":m[a]+=f*(n&&c?-1:1)}return m}async function Ra(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=fa(t,e),p=Sa(m),h=s[f?"floating"===d?"reference":"floating":d],g=Ma(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=Ma(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+p.top)/v.y,bottom:(w.bottom-g.bottom+p.bottom)/v.y,left:(g.left-w.left+p.left)/v.x,right:(w.right-g.right+p.right)/v.x}}function Ta(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function La(e){return ra.some(t=>e[t]>=0)}const Aa=new Set(["left","top"]);function Da(){return"undefined"!=typeof window}function za(e){return ja(e)?(e.nodeName||"").toLowerCase():"#document"}function Wa(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function _a(e){var t;return null==(t=(ja(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ja(e){return!!Da()&&(e instanceof Node||e instanceof Wa(e).Node)}function Ia(e){return!!Da()&&(e instanceof Element||e instanceof Wa(e).Element)}function Ha(e){return!!Da()&&(e instanceof HTMLElement||e instanceof Wa(e).HTMLElement)}function Fa(e){return!(!Da()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Wa(e).ShadowRoot)}const $a=new Set(["inline","contents"]);function Ga(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ts(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!$a.has(o)}const Ba=new Set(["table","td","th"]);function Va(e){return Ba.has(za(e))}const Ya=[":popover-open",":modal"];function qa(e){return Ya.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ua=["transform","translate","scale","rotate","perspective"],Xa=["transform","translate","scale","rotate","perspective","filter"],Ka=["paint","layout","strict","content"];function Qa(e){const t=Za(),n=Ia(e)?ts(e):e;return Ua.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Xa.some(e=>(n.willChange||"").includes(e))||Ka.some(e=>(n.contain||"").includes(e))}function Za(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ja=new Set(["html","body","#document"]);function es(e){return Ja.has(za(e))}function ts(e){return Wa(e).getComputedStyle(e)}function ns(e){return Ia(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rs(e){if("html"===za(e))return e;const t=e.assignedSlot||e.parentNode||Fa(e)&&e.host||_a(e);return Fa(t)?t.host:t}function os(e){const t=rs(e);return es(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ha(t)&&Ga(t)?t:os(t)}function is(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=os(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Wa(o);if(i){const e=as(a);return t.concat(a,a.visualViewport||[],Ga(o)?o:[],e&&n?is(e):[])}return t.concat(o,is(o,[],n))}function as(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ss(e){const t=ts(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ha(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=aa(n)!==i||aa(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function ls(e){return Ia(e)?e:e.contextElement}function cs(e){const t=ls(e);if(!Ha(t))return la(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ss(t);let a=(i?aa(n.width):n.width)/r,s=(i?aa(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const us=la(0);function ds(e){const t=Wa(e);return Za()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:us}function fs(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=ls(e);let a=la(1);t&&(r?Ia(r)&&(a=cs(r)):a=cs(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Wa(e))&&t}(i,n,r)?ds(i):la(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Wa(i),t=r&&Ia(r)?Wa(r):r;let n=e,o=as(n);for(;o&&r&&t!==n;){const e=cs(o),t=o.getBoundingClientRect(),r=ts(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Wa(o),o=as(n)}}return Ma({width:u,height:d,x:l,y:c})}function ms(e,t){const n=ns(e).scrollLeft;return t?t.left+n:fs(_a(e)).left+n}function ps(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ms(e,n),y:n.top+t.scrollTop}}const hs=new Set(["absolute","fixed"]);function gs(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Wa(e),r=_a(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Za();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=ms(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=_a(e),n=ns(e),r=e.ownerDocument.body,o=ia(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ia(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ms(e);const s=-n.scrollTop;return"rtl"===ts(r).direction&&(a+=ia(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(_a(e));else if(Ia(t))r=function(e,t){const n=fs(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ha(e)?cs(e):la(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ds(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ma(r)}function ys(e,t){const n=rs(e);return!(n===t||!Ia(n)||es(n))&&("fixed"===ts(n).position||ys(n,t))}function bs(e,t,n){const r=Ha(t),o=_a(t),i="fixed"===n,a=fs(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=la(0);function c(){l.x=ms(o)}if(r||!r&&!i)if(("body"!==za(t)||Ga(o))&&(s=ns(t)),r){const e=fs(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?la(0):ps(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function vs(e){return"static"===ts(e).position}function ws(e,t){if(!Ha(e)||"fixed"===ts(e).position)return null;if(t)return t(e);let n=e.offsetParent;return _a(e)===n&&(n=n.ownerDocument.body),n}function xs(e,t){const n=Wa(e);if(qa(e))return n;if(!Ha(e)){let t=rs(e);for(;t&&!es(t);){if(Ia(t)&&!vs(t))return t;t=rs(t)}return n}let r=ws(e,t);for(;r&&Va(r)&&vs(r);)r=ws(r,t);return r&&es(r)&&vs(r)&&!Qa(r)?n:r||function(e){let t=rs(e);for(;Ha(t)&&!es(t);){if(Qa(t))return t;if(qa(t))return null;t=rs(t)}return null}(e)||n}const ks={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=_a(r),s=!!t&&qa(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=la(1);const u=la(0),d=Ha(r);if((d||!d&&!i)&&(("body"!==za(r)||Ga(a))&&(l=ns(r)),Ha(r))){const e=fs(r);c=cs(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?la(0):ps(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:_a,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?qa(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=is(e,[],!1).filter(e=>Ia(e)&&"body"!==za(e)),o=null;const i="fixed"===ts(e).position;let a=i?rs(e):e;for(;Ia(a)&&!es(a);){const t=ts(a),n=Qa(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&hs.has(o.position)||Ga(a)&&!n&&ys(e,a))?r=r.filter(e=>e!==a):o=t,a=rs(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce((e,n)=>{const r=gs(t,n,o);return e.top=ia(r.top,e.top),e.right=oa(r.right,e.right),e.bottom=oa(r.bottom,e.bottom),e.left=ia(r.left,e.left),e},gs(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:xs,getElementRects:async function(e){const t=this.getOffsetParent||xs,n=this.getDimensions,r=await n(e.floating);return{reference:bs(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ss(e);return{width:t,height:n}},getScale:cs,isElement:Ia,isRTL:function(e){return"rtl"===ts(e).direction}};function Ns(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Es(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=ls(e),u=o||i?[...c?is(c):[],...is(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=_a(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:m}=c;if(s||t(),!f||!m)return;const p={rootMargin:-sa(d)+"px "+-sa(o.clientWidth-(u+f))+"px "+-sa(o.clientHeight-(d+m))+"px "+-sa(u)+"px",threshold:ia(0,oa(1,l))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Ns(c,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),i}(c,n):null;let f,m=-1,p=null;a&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h=l?fs(e):null;return l&&function t(){const r=fs(e);h&&!Ns(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(f)}}const Ps=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=ma(n),s=pa(n),l="y"===ba(n),c=Aa.has(a)?-1:1,u=i&&l?-1:1,d=fa(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof p&&(m="end"===s?-1*p:p),l?{x:m*u,y:f*c}:{x:f*c,y:m*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Cs=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=fa(e,t),c={x:n,y:r},u=await Ra(t,l),d=ba(ma(o)),f=ha(d);let m=c[f],p=c[d];if(i){const e="y"===f?"bottom":"right";m=da(m+u["y"===f?"top":"left"],m,m-u[e])}if(a){const e="y"===d?"bottom":"right";p=da(p+u["y"===d?"top":"left"],p,p-u[e])}const h=s.fn({...t,[f]:m,[d]:p});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:a}}}}}},Ss=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...g}=fa(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=ma(o),b=ba(s),v=ma(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(v||!h?[Ca(s)]:function(e){const t=Ca(e);return[wa(e),t,wa(t)]}(s)),k="none"!==p;!f&&k&&x.push(...Pa(s,h,p,w));const N=[s,...x],E=await Ra(t,g),P=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&P.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=pa(e),o=va(e),i=ga(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ca(a)),[a,Ca(a)]}(o,a,w);P.push(E[e[0]],E[e[1]])}if(C=[...C,{placement:o,overflows:P}],!P.every(e=>e<=0)){var S,M;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=N[e];if(t){if(!("alignment"===d&&b!==ba(t))||C.every(e=>ba(e.placement)!==b||e.overflows[0]>0))return{data:{index:e,overflows:C},reset:{placement:t}}}let n=null==(M=C.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:M.placement;if(!n)switch(m){case"bestFit":{var O;const e=null==(O=C.filter(e=>{if(k){const t=ba(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Ms=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=fa(e,t),u=await Ra(t,c),d=ma(o),f=pa(o),m="y"===ba(o),{width:p,height:h}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const b=h-u.top-u.bottom,v=p-u.left-u.right,w=oa(h-u[g],b),x=oa(p-u[y],v),k=!t.middlewareData.shift;let N=w,E=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(N=b),k&&!f){const e=ia(u.left,0),t=ia(u.right,0),n=ia(u.top,0),r=ia(u.bottom,0);m?E=p-2*(0!==e||0!==t?e+t:ia(u.left,u.right)):N=h-2*(0!==n||0!==r?n+r:ia(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:N});const P=await a.getDimensions(s.floating);return p!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}},Os=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=fa(e,t);switch(r){case"referenceHidden":{const e=Ta(await Ra(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:La(e)}}}case"escaped":{const e=Ta(await Ra(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:La(e)}}}default:return{}}}}},Rs=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=fa(e,t)||{};if(null==c)return{};const d=Sa(u),f={x:n,y:r},m=va(o),p=ga(m),h=await a.getDimensions(c),g="y"===m,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[m]-f[m]-i.floating[p],x=f[m]-i.reference[m],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let N=k?k[v]:0;N&&await(null==a.isElement?void 0:a.isElement(k))||(N=s.floating[v]||i.floating[p]);const E=w/2-x/2,P=N/2-h[p]/2-1,C=oa(d[y],P),S=oa(d[b],P),M=C,O=N-h[p]-S,R=N/2-h[p]/2+E,T=da(M,R,O),L=!l.arrow&&null!=pa(o)&&R!==T&&i.reference[p]/2-(R<M?C:S)-h[p]/2<0,A=L?R<M?R-M:R-O:0;return{[m]:f[m]+A,data:{[m]:T,centerOffset:R-T-A,...L&&{alignmentOffset:A}},reset:L}}}),Ts=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=fa(e,t),u={x:n,y:r},d=ba(o),f=ha(d);let m=u[f],p=u[d];const h=fa(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;m<t?m=t:m>n&&(m=n)}if(c){var y,b;const e="y"===f?"width":"height",t=Aa.has(ma(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);p<n?p=n:p>r&&(p=r)}return{[f]:m,[d]:p}}}},Ls=(e,t,n)=>{const r=new Map,o={platform:ks,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Oa(c,r,l),f=r,m={},p=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:y,data:b,reset:v}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,m={...m,[i]:{...m[i],...b}},v&&p<=50&&(p++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:u,y:d}=Oa(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:i})};var As="undefined"!=typeof document?p:function(){};function Ds(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Ds(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Ds(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function zs(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ws(e,t){const n=zs(e);return Math.round(t*n)/n}function _s(e){const t=r.useRef(e);return As(()=>{t.current=e}),t}const js=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Rs({element:n.current,padding:r}).fn(t):{}:n?Rs({element:n,padding:r}).fn(t):{};var o}}),Is=(e,t)=>({...Cs(e),options:[e,t]}),Hs=(e,t)=>({...Ts(e),options:[e,t]}),Fs=(e,t)=>({...Ss(e),options:[e,t]}),$s=(e,t)=>({...Ms(e),options:[e,t]}),Gs=(e,t)=>({...Os(e),options:[e,t]}),Bs=(e,t)=>({...js(e),options:[e,t]});function Vs(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?yt(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ys=Symbol("radix.slottable");function qs(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Ys}var Us=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=Vs(t),o=r.forwardRef((t,o)=>{const{children:i,...a}=t,s=r.Children.toArray(i),l=s.find(qs);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),Xs=r.forwardRef((t,n)=>{const{children:r,width:o=10,height:i=5,...a}=t;return e(Us.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:e("polygon",{points:"0,0 30,0 15,10"})})});Xs.displayName="Arrow";var Ks=Xs;function Qs(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Zs(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?yt(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Js=Symbol("radix.slottable");function el(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Js}var tl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=Zs(t),o=r.forwardRef((t,o)=>{const{children:i,...a}=t,s=r.Children.toArray(i),l=s.find(el);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{});function nl(e){const[t,n]=r.useState(void 0);return ht(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}var rl="Popper",[ol,il]=function(t,n=[]){let o=[];const i=()=>{const e=o.map(e=>r.createContext(e));return function(n){const o=n?.[t]||e;return r.useMemo(()=>({[`__scope${t}`]:{...n,[t]:o}}),[n,o])}};return i.scopeName=t,[function(n,i){const a=r.createContext(i),s=o.length;o=[...o,i];const l=n=>{const{scope:o,children:i,...l}=n,c=o?.[t]?.[s]||a,u=r.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:u,children:i})};return l.displayName=n+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||a,c=r.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},Qs(i,...n)]}(rl),[al,sl]=ol(rl),ll=t=>{const{__scopePopper:n,children:o}=t,[i,a]=r.useState(null);return e(al,{scope:n,anchor:i,onAnchorChange:a,children:o})};ll.displayName=rl;var cl="PopperAnchor",ul=r.forwardRef((t,n)=>{const{__scopePopper:o,virtualRef:i,...a}=t,s=sl(cl,o),l=r.useRef(null),c=bt(n,l),u=r.useRef(null);return r.useEffect(()=>{const e=u.current;u.current=i?.current||l.current,e!==u.current&&s.onAnchorChange(u.current)}),i?null:e(tl.div,{...a,ref:c})});ul.displayName=cl;var dl="PopperContent",[fl,ml]=ol(dl),pl=r.forwardRef((t,n)=>{const{__scopePopper:o,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:g="optimized",onPlaced:y,...b}=t,v=sl(dl,o),[w,x]=r.useState(null),k=bt(n,e=>x(e)),[N,E]=r.useState(null),P=nl(N),C=P?.width??0,S=P?.height??0,M=i+("center"!==s?"-"+s:""),O="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},R=Array.isArray(d)?d:[d],T=R.length>0,L={padding:O,boundary:R.filter(bl),altBoundary:T},{refs:A,floatingStyles:D,placement:z,isPositioned:W,middlewareData:_}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=r.useState(o);Ds(m,o)||p(o);const[g,y]=r.useState(null),[b,v]=r.useState(null),w=r.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),x=r.useCallback(e=>{e!==P.current&&(P.current=e,v(e))},[]),k=a||g,N=s||b,E=r.useRef(null),P=r.useRef(null),C=r.useRef(d),S=null!=c,M=_s(c),O=_s(i),R=_s(u),T=r.useCallback(()=>{if(!E.current||!P.current)return;const e={placement:t,strategy:n,middleware:m};O.current&&(e.platform=O.current),Ls(E.current,P.current,e).then(e=>{const t={...e,isPositioned:!1!==R.current};L.current&&!Ds(C.current,t)&&(C.current=t,h.flushSync(()=>{f(t)}))})},[m,t,n,O,R]);As(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);const L=r.useRef(!1);As(()=>(L.current=!0,()=>{L.current=!1}),[]),As(()=>{if(k&&(E.current=k),N&&(P.current=N),k&&N){if(M.current)return M.current(k,N,T);T()}},[k,N,T,M,S]);const A=r.useMemo(()=>({reference:E,floating:P,setReference:w,setFloating:x}),[w,x]),D=r.useMemo(()=>({reference:k,floating:N}),[k,N]),z=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=Ws(D.floating,d.x),r=Ws(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...zs(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,D.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:T,refs:A,elements:D,floatingStyles:z}),[d,T,A,D,z])}({strategy:"fixed",placement:M,whileElementsMounted:(...e)=>Es(...e,{animationFrame:"always"===g}),elements:{reference:v.anchor},middleware:[(j={mainAxis:a+S,alignmentAxis:l},{...Ps(j),options:[j,I]}),u&&Is({mainAxis:!0,crossAxis:!1,limiter:"partial"===m?Hs():void 0,...L}),u&&Fs({...L}),$s({...L,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),N&&Bs({element:N,padding:c}),vl({arrowWidth:C,arrowHeight:S}),p&&Gs({strategy:"referenceHidden",...L})]});var j,I;const[H,F]=wl(z),$=pt(y);ht(()=>{W&&$?.()},[W,$]);const G=_.arrow?.x,B=_.arrow?.y,V=0!==_.arrow?.centerOffset,[Y,q]=r.useState();return ht(()=>{w&&q(window.getComputedStyle(w).zIndex)},[w]),e("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:W?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[_.transformOrigin?.x,_.transformOrigin?.y].join(" "),..._.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e(fl,{scope:o,placedSide:H,onArrowChange:E,arrowX:G,arrowY:B,shouldHideArrow:V,children:e(tl.div,{"data-side":H,"data-align":F,...b,ref:k,style:{...b.style,animation:W?void 0:"none"}})})})});pl.displayName=dl;var hl="PopperArrow",gl={top:"bottom",right:"left",bottom:"top",left:"right"},yl=r.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=ml(hl,r),a=gl[i.placedSide];return e("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:e(Ks,{...o,ref:n,style:{...o.style,display:"block"}})})});function bl(e){return null!==e}yl.displayName=hl;var vl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=wl(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+s/2;let m="",p="";return"bottom"===l?(m=i?u:`${d}px`,p=-s+"px"):"top"===l?(m=i?u:`${d}px`,p=`${r.floating.height+s}px`):"right"===l?(m=-s+"px",p=i?u:`${f}px`):"left"===l&&(m=`${r.floating.width+s}px`,p=i?u:`${f}px`),{data:{x:m,y:p}}}});function wl(e){const[t,n="center"]=e.split("-");return[t,n]}var xl=ll,kl=ul,Nl=pl,El=yl;function Pl(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?yt(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Cl=Symbol("radix.slottable");function Sl(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Cl}var Ml=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=Pl(t),o=r.forwardRef((t,o)=>{const{children:i,...a}=t,s=r.Children.toArray(i),l=s.find(Sl);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),Ol=r.forwardRef((t,n)=>{const{container:o,...i}=t,[a,s]=r.useState(!1);ht(()=>s(!0),[]);const l=o||a&&globalThis?.document?.body;return l?g.createPortal(e(Ml.div,{...i,ref:n}),l):null});Ol.displayName="Portal";var Rl=e=>{const{present:t,children:n}=e,o=function(e){const[t,n]=r.useState(),o=r.useRef(null),i=r.useRef(e),a=r.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return r.useReducer((e,n)=>t[e][n]??e,e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect(()=>{const e=Tl(o.current);a.current="mounted"===l?e:"none"},[l]),ht(()=>{const t=o.current,n=i.current;if(n!==e){const r=a.current,o=Tl(t);if(e)c("MOUNT");else if("none"===o||"none"===t?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,c]),ht(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,r=r=>{const a=Tl(o.current).includes(CSS.escape(r.animationName));if(r.target===t&&a&&(c("ANIMATION_END"),!i.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=Tl(o.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",r),t.addEventListener("animationend",r),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",r),t.removeEventListener("animationend",r)}}c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:r.useCallback(e=>{o.current=e?getComputedStyle(e):null,n(e)},[])}}(t),i="function"==typeof n?n({present:o.isPresent}):r.Children.only(n),a=bt(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?r.cloneElement(i,{ref:a}):null};function Tl(e){return e?.animationName||"none"}function Ll(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?yt(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}Rl.displayName="Presence";var Al=Symbol("radix.slottable");function Dl(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Al}var zl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=Ll(t),o=r.forwardRef((t,o)=>{const{children:i,...a}=t,s=r.Children.toArray(i),l=s.find(Dl);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),Wl=r[" useInsertionEffect ".trim().toString()]||ht;function _l({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[i,a,s]=function({defaultProp:e,onChange:t}){const[n,o]=r.useState(e),i=r.useRef(n),a=r.useRef(t);return Wl(()=>{a.current=t},[t]),r.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,o,a]}({defaultProp:t,onChange:n}),l=void 0!==e,c=l?e:i;{const t=r.useRef(void 0!==e);r.useEffect(()=>{const e=t.current;if(e!==l){const t=e?"controlled":"uncontrolled",n=l?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=l},[l,o])}const u=r.useCallback(t=>{if(l){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&s.current?.(n)}else a(t)},[l,e,a,s]);return[c,u]}function jl(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?yt(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Il=Symbol("radix.slottable");function Hl(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Il}var Fl=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=jl(t),o=r.forwardRef((t,o)=>{const{children:i,...a}=t,s=r.Children.toArray(i),l=s.find(Hl);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),$l=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Gl=r.forwardRef((t,n)=>e(Fl.span,{...t,ref:n,style:{...$l,...t.style}}));Gl.displayName="VisuallyHidden";var Bl=Gl,[Vl]=function(t,n=[]){let o=[];const i=()=>{const e=o.map(e=>r.createContext(e));return function(n){const o=n?.[t]||e;return r.useMemo(()=>({[`__scope${t}`]:{...n,[t]:o}}),[n,o])}};return i.scopeName=t,[function(n,i){const a=r.createContext(i),s=o.length;o=[...o,i];const l=n=>{const{scope:o,children:i,...l}=n,c=o?.[t]?.[s]||a,u=r.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:u,children:i})};return l.displayName=n+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||a,c=r.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},$i(i,...n)]}("Tooltip",[il]),Yl=il(),ql="TooltipProvider",Ul=700,Xl="tooltip.open",[Kl,Ql]=Vl(ql),Zl=t=>{const{__scopeTooltip:n,delayDuration:o=Ul,skipDelayDuration:i=300,disableHoverableContent:a=!1,children:s}=t,l=r.useRef(!0),c=r.useRef(!1),u=r.useRef(0);return r.useEffect(()=>{const e=u.current;return()=>window.clearTimeout(e)},[]),e(Kl,{scope:n,isOpenDelayedRef:l,delayDuration:o,onOpen:r.useCallback(()=>{window.clearTimeout(u.current),l.current=!1},[]),onClose:r.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.current=!0,i)},[i]),isPointerInTransitRef:c,onPointerInTransitChange:r.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:s})};Zl.displayName=ql;var Jl="Tooltip",[ec,tc]=Vl(Jl),nc=t=>{const{__scopeTooltip:n,children:o,open:i,defaultOpen:a,onOpenChange:s,disableHoverableContent:l,delayDuration:c}=t,u=Ql(Jl,t.__scopeTooltip),d=Yl(n),[f,m]=r.useState(null),p=function(e){const[t,n]=r.useState(ta());return ht(()=>{n(e=>e??String(na++))},[e]),t?`radix-${t}`:""}(),h=r.useRef(0),g=l??u.disableHoverableContent,y=c??u.delayDuration,b=r.useRef(!1),[v,w]=_l({prop:i,defaultProp:a??!1,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(Xl))):u.onClose(),s?.(e)},caller:Jl}),x=r.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),k=r.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,w(!0)},[w]),N=r.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),E=r.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,w(!0),h.current=0},y)},[y,w]);return r.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),e(xl,{...d,children:e(ec,{scope:n,contentId:p,open:v,stateAttribute:x,trigger:f,onTriggerChange:m,onTriggerEnter:r.useCallback(()=>{u.isOpenDelayedRef.current?E():k()},[u.isOpenDelayedRef,E,k]),onTriggerLeave:r.useCallback(()=>{g?N():(window.clearTimeout(h.current),h.current=0)},[N,g]),onOpen:k,onClose:N,disableHoverableContent:g,children:o})})};nc.displayName=Jl;var rc="TooltipTrigger",oc=r.forwardRef((t,n)=>{const{__scopeTooltip:o,...i}=t,a=tc(rc,o),s=Ql(rc,o),l=Yl(o),c=bt(n,r.useRef(null),a.onTriggerChange),u=r.useRef(!1),d=r.useRef(!1),f=r.useCallback(()=>u.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),e(kl,{asChild:!0,...l,children:e(zl.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:Fi(t.onPointerMove,e=>{"touch"!==e.pointerType&&(d.current||s.isPointerInTransitRef.current||(a.onTriggerEnter(),d.current=!0))}),onPointerLeave:Fi(t.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:Fi(t.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Fi(t.onFocus,()=>{u.current||a.onOpen()}),onBlur:Fi(t.onBlur,a.onClose),onClick:Fi(t.onClick,a.onClose)})})});oc.displayName=rc;var ic="TooltipPortal",[ac,sc]=Vl(ic,{forceMount:void 0}),lc=t=>{const{__scopeTooltip:n,forceMount:r,children:o,container:i}=t,a=tc(ic,n);return e(ac,{scope:n,forceMount:r,children:e(Rl,{present:r||a.open,children:e(Ol,{asChild:!0,container:i,children:o})})})};lc.displayName=ic;var cc="TooltipContent",uc=r.forwardRef((t,n)=>{const r=sc(cc,t.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...a}=t,s=tc(cc,t.__scopeTooltip);return e(Rl,{present:o||s.open,children:s.disableHoverableContent?e(hc,{side:i,...a,ref:n}):e(dc,{side:i,...a,ref:n})})}),dc=r.forwardRef((t,n)=>{const o=tc(cc,t.__scopeTooltip),i=Ql(cc,t.__scopeTooltip),a=r.useRef(null),s=bt(n,a),[l,c]=r.useState(null),{trigger:u,onClose:d}=o,f=a.current,{onPointerInTransitChange:m}=i,p=r.useCallback(()=>{c(null),m(!1)},[m]),h=r.useCallback((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...o,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);c(i),m(!0)},[m]);return r.useEffect(()=>()=>p(),[p]),r.useEffect(()=>{if(u&&f){const e=e=>h(e,f),t=e=>h(e,u);return u.addEventListener("pointerleave",e),f.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),f.removeEventListener("pointerleave",t)}}},[u,f,h,p]),r.useEffect(()=>{if(l){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=u?.contains(t)||f?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],s=t[i],l=a.x,c=a.y,u=s.x,d=s.y;c>r!=d>r&&n<(u-l)*(r-c)/(d-c)+l&&(o=!o)}return o}(n,l);r?p():o&&(p(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,f,l,d,p]),e(hc,{...t,ref:s})}),[fc,mc]=Vl(Jl,{isInside:!1}),pc=function(t){const r=({children:t})=>e(n,{children:t});return r.displayName=`${t}.Slottable`,r.__radixId=Al,r}("TooltipContent"),hc=r.forwardRef((n,o)=>{const{__scopeTooltip:i,children:a,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:c,...u}=n,d=tc(cc,i),f=Yl(i),{onClose:m}=d;return r.useEffect(()=>(document.addEventListener(Xl,m),()=>document.removeEventListener(Xl,m)),[m]),r.useEffect(()=>{if(d.trigger){const e=e=>{const t=e.target;t?.contains(d.trigger)&&m()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,m]),e(Zi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:m,children:t(Nl,{"data-state":d.stateAttribute,...f,...u,ref:o,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[e(pc,{children:a}),e(fc,{scope:i,isInside:!0,children:e(Bl,{id:d.contentId,role:"tooltip",children:s||a})})]})})});uc.displayName=cc;var gc="TooltipArrow",yc=r.forwardRef((t,n)=>{const{__scopeTooltip:r,...o}=t,i=Yl(r);return mc(gc,r).isInside?null:e(El,{...i,...o,ref:n})});yc.displayName=gc;var bc=Zl,vc=nc,wc=oc,xc=lc,kc=uc,Nc=yc;const Ec=i(function({status:n="unknown",statusColorConfig:r={unknown:"bg-gray-500 border-gray-600"},statusProps:o,tooltipProviderProps:i,tooltipProps:a,tooltipTriggerProps:s,tooltipPortalProps:l,tooltipContentProps:c,tooltipArrowProps:u,tooltip:d,disabled:f,className:m,...p},h){return f?null:e("div",{ref:h,...p,className:nt("absolute top-0 left-0",m),children:e(bc,{...i,children:t(vc,{...a,children:[e(wc,{asChild:!0,...s,children:e("div",{...o,className:nt("rounded-full size-4 border border-primary-foreground",r[n],o?.className)})}),e(xc,{...l,children:t(kc,{...c,className:nt("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",c?.className),children:[e("span",{children:d||n||"unknown"}),e(Nc,{...u,className:nt("bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]",u?.className)})]})})]})})})});Ec.displayName="StatusIndicator";const Pc=i(function({id:t,stream:n,mirror:r,className:o,muted:i,...a},s){const c=l(null),d=m(()=>t??`stream-${rt()}`,[t]),p="boolean"==typeof i&&i,h=r?"scale-x-[-1]":"";return u(s,()=>c.current),f(()=>{if(c.current&&n){c.current.srcObject=n;const e=()=>{try{c.current?.play()}catch(e){console.error("Error playing video:",e)}};c.current.onloadedmetadata=()=>{queueMicrotask(e)}}},[n]),n?e("video",{ref:c,id:d,autoPlay:!0,playsInline:!0,muted:p,...a,className:nt("size-full object-contain",h,o)}):null});Pc.displayName="StreamView";const Cc=i(function({muted:t,mirror:n,...r},o){return e(Pc,{ref:o,muted:"boolean"!=typeof t||t,mirror:"boolean"!=typeof n||n,...r})});Cc.displayName="LocalStreamView";const Sc=i(function({muted:t,mirror:n,...r},o){return e(Pc,{ref:o,muted:"boolean"==typeof t&&t,mirror:"boolean"==typeof n&&n,...r})});Sc.displayName="RemoteStreamView";const Mc=i(function({element:n,pipElement:r,navElement:o,hideIconElement:i,showIconElement:a,fullscreenButtonProps:s,fullscreenButtonIconProps:m,pipProps:p,pipButtonProps:h,pipButtonIconProps:g,...y},b){const v=l(null),[w,x]=c(!1),[k,N]=c(!1),E=d(async()=>{const e=v.current;if(e)try{document.fullscreenElement?(await document.exitFullscreen(),x(!1),N(!1)):(await e.requestFullscreen(),x(!0),N(!0))}catch(e){console.error("Fullscreen error:",e)}},[]),P=d(()=>{r&&N(e=>!e)},[r]);return u(b,()=>Object.assign(v.current,{isFullscreen:w,isPictureInPicture:k,toggleFullscreen:E,togglePictureInPicture:P}),[w,k,E,P]),f(()=>{const e=()=>{x(!!document.fullscreenElement),N(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),t("div",{ref:v,...y,className:nt("relative flex items-center justify-center size-full",y?.className),children:[n,e("button",{onClick:E,...s,className:nt("absolute top-2 right-2 p-1 rounded-md bg-black/50 text-white hover:bg-black/80 z-10 shadow-xs shadow-white/25",s?.className),children:w?i||e(D,{...m}):a||e(A,{...m})}),t("div",{className:"absolute size-full p-2 flex flex-col justify-end items-center",children:[w&&r&&t("div",{className:"relative size-full flex items-end justify-end",children:[k&&e("div",{...p,className:nt("max-w-1/4 max-h-1/4 aspect-4/3 overflow-hidden rounded-md shadow-md shadow-white/25",p?.className),children:r}),e("button",{onClick:P,...h,className:nt("absolute bottom-2 right-2 p-1 rounded-md bg-black/50 text-white hover:bg-black/80 z-10 shadow-xs shadow-white/25",h?.className),children:e(W,{...g})})]}),w&&o]})]})});function Oc(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Rc(e){const t=r.forwardRef((e,t)=>{const{children:n,...o}=e;if(r.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,n.props);return n.type!==r.Fragment&&(i.ref=t?yt(t,e):e),r.cloneElement(n,i)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}Mc.displayName="FullscreenStreamView";var Tc=Symbol("radix.slottable");function Lc(e){return r.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Tc}var Ac=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const o=function(t){const n=Rc(t),o=r.forwardRef((t,o)=>{const{children:i,...a}=t,s=r.Children.toArray(i),l=s.find(Lc);if(l){const t=l.props.children,i=s.map(e=>e===l?r.Children.count(t)>1?r.Children.only(null):r.isValidElement(t)?t.props.children:null:e);return e(n,{...a,ref:o,children:r.isValidElement(t)?r.cloneElement(t,void 0,i):null})}return e(n,{...a,ref:o,children:i})});return o.displayName=`${t}.Slot`,o}(`Primitive.${n}`),i=r.forwardRef((t,r)=>{const{asChild:i,...a}=t,s=i?o:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),e(s,{...a,ref:r})});return i.displayName=`Primitive.${n}`,{...t,[n]:i}},{}),Dc="Switch",[zc]=function(t,n=[]){let o=[];const i=()=>{const e=o.map(e=>r.createContext(e));return function(n){const o=n?.[t]||e;return r.useMemo(()=>({[`__scope${t}`]:{...n,[t]:o}}),[n,o])}};return i.scopeName=t,[function(n,i){const a=r.createContext(i),s=o.length;o=[...o,i];const l=n=>{const{scope:o,children:i,...l}=n,c=o?.[t]?.[s]||a,u=r.useMemo(()=>l,Object.values(l));return e(c.Provider,{value:u,children:i})};return l.displayName=n+"Provider",[l,function(e,o){const l=o?.[t]?.[s]||a,c=r.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${e}\` must be used within \`${n}\``)}]},Oc(i,...n)]}(Dc),[Wc,_c]=zc(Dc),jc=r.forwardRef((n,o)=>{const{__scopeSwitch:i,name:a,checked:s,defaultChecked:l,required:c,disabled:u,value:d="on",onCheckedChange:f,form:m,...p}=n,[h,g]=r.useState(null),y=bt(o,e=>g(e)),b=r.useRef(!1),v=!h||(m||!!h.closest("form")),[w,x]=_l({prop:s,defaultProp:l??!1,onChange:f,caller:Dc});return t(Wc,{scope:i,checked:w,disabled:u,children:[e(Ac.button,{type:"button",role:"switch","aria-checked":w,"aria-required":c,"data-state":$c(w),"data-disabled":u?"":void 0,disabled:u,value:d,...p,ref:y,onClick:Fi(n.onClick,e=>{x(e=>!e),v&&(b.current=e.isPropagationStopped(),b.current||e.stopPropagation())})}),v&&e(Fc,{control:h,bubbles:!b.current,name:a,value:d,checked:w,required:c,disabled:u,form:m,style:{transform:"translateX(-100%)"}})]})});jc.displayName=Dc;var Ic="SwitchThumb",Hc=r.forwardRef((t,n)=>{const{__scopeSwitch:r,...o}=t,i=_c(Ic,r);return e(Ac.span,{"data-state":$c(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:n})});Hc.displayName=Ic;var Fc=r.forwardRef(({__scopeSwitch:t,control:n,checked:o,bubbles:i=!0,...a},s)=>{const l=r.useRef(null),c=bt(l,s),u=function(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(o),d=nl(n);return r.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(u!==o&&n){const t=new Event("click",{bubbles:i});n.call(e,o),e.dispatchEvent(t)}},[u,o,i]),e("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function $c(e){return e?"checked":"unchecked"}Fc.displayName="SwitchBubbleInput";var Gc=jc,Bc=Hc;function Vc(t){return e(Gc,{...t,className:nt("peer data-[state=checked]:bg-ring data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15em] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring disabled:cursor-not-allowed disabled:opacity-50",t?.className),children:e(Bc,{className:nt("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}export{ft as Attachment,st as AttachmentAudio,dt as AttachmentFailed,ut as AttachmentFile,ct as AttachmentImage,at as AttachmentLink,lt as AttachmentVideo,Qt as Avatar,nn as Badge,on as Button,Dr as DialogItem,zr as DismissLayer,Fr as FilePickerDropzone,Hr as FilePickerInput,Lr as FormattedDate,Mc as FullscreenStreamView,$r as Input,jr as Label,Br as LinkPreview,ji as LinkifyText,Cc as LocalStreamView,Ii as PlaceholderText,Kt as Presence,Xt as PresenceBadge,Sc as RemoteStreamView,Hi as Search,it as Spinner,Ec as StatusIndicator,Ar as StatusSent,Pc as StreamView,Vc as Switch,ot as capitalize,nt as cn,rt as getRandomString};
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{forwardRef as a,memo as n,useRef as r,useState as i,useImperativeHandle as o,useMemo as s,useEffect as l,createElement as c,useCallback as d}from"react";import*as u from"@radix-ui/react-alert-dialog";import{Slot as m}from"@radix-ui/react-slot";import{cva as f}from"class-variance-authority";import{clsx as h}from"clsx";import{twMerge as g}from"tailwind-merge";import{LoaderCircle as p,Loader as v,FileXCorner as b,File as y,Phone as w,PhoneIncoming as N,PhoneOutgoing as x,PhoneMissed as P,Globe as k,Ban as M,CheckCheck as W,Check as z,Clock as S,Users as C,Paperclip as G,FilePlusCorner as D,Search as T,X as E,Minimize as j,Maximize as A,PictureInPicture2 as F}from"lucide-react";import*as L from"@radix-ui/react-avatar";import{formatDistanceToNow as I,format as $,isToday as X,differenceInCalendarDays as B}from"date-fns";import{useInView as O}from"react-intersection-observer";import _ from"linkify-react";import{Root as V}from"@radix-ui/react-label";import*as q from"@radix-ui/react-tooltip";import*as H from"@radix-ui/react-switch";function R(...e){return g(h(e))}function Y(e=8){return(Date.now()/Math.random()).toString(36).replace(".","").slice(0,e)}function J(e){return"string"==typeof e&&e.length>0?`${e[0]?.toUpperCase()}${e.slice(1)}`:""}const U=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=size-])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});const Q=a(function({asChild:t=!1,variant:a,size:n,className:r,...i},o){return e(t?m:"button",{ref:o,...i,className:R(U({variant:a,size:n,className:r}),"transition-all ease-in-out duration-300")})});Q.displayName="Button";const K=a(function({title:a="",description:n="",cancelTitle:r="Cancel",actionTitle:i="Confirm",onCancel:o=()=>{},onConfirm:s=()=>{},rootProps:l,triggerElement:c,triggerProps:d,portalProps:m,overlayProps:f,contentProps:h,headerProps:g,titleProps:p,descriptionProps:v,footerProps:b,cancelProps:y,cancelButtonProps:w,actionProps:N,actionButtonProps:x,...P},k){return e("div",{ref:k,...P,children:t(u.Root,{...l,children:[e(u.Trigger,{asChild:!0,...d,children:c}),t(u.Portal,{...m,children:[e(u.Overlay,{...f,className:R("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",f?.className)}),t(u.Content,{...h,className:R("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2em)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",h?.className),children:[t("div",{...g,className:R("flex flex-col gap-2 text-center sm:text-left",g?.className),children:[e(u.Title,{...p,className:R("text-lg font-semibold",p?.className),children:a}),e(u.Description,{...v,className:R("text-muted-foreground text-sm",v?.className),children:n})]}),t("div",{...b,className:R("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",b?.className),children:[e(u.Cancel,{...y,onClick:o,children:e(Q,{variant:"outline",...w,children:r})}),e(u.Action,{...N,onClick:s,children:e(Q,{...x,children:i})})]})]})]})]})})});function Z({loading:t=!1,layout:a="flow",type:n="default",...r}){if(!t)return null;const i=e("circle"===n?p:v,{strokeWidth:2.5,...r,className:R("animate-spin text-ring","flow"===a&&"mx-auto",r?.className)});switch(a){case"absolute":return e("div",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",children:i});case"centered":return e("div",{className:"flex items-center justify-center size-full",children:i});case"overlay":return e("div",{className:"flex items-center justify-center size-full absolute bg-muted/50",children:i});default:return i}}K.displayName="AlertDialog",Z.displayName="Spinner";const ee=a(function({url:a,pending:n=!1,children:r,...i},o){return t("a",{ref:o,target:"_blank",rel:"noopener noreferrer",...i,href:a,className:R("group relative min-h-8 min-w-8 w-full flex items-center justify-center rounded-md overflow-hidden bg-ring/10 hover:bg-ring/20 transition-color duration-300 ease-out cursor-pointer",i?.className),children:[r,e(Z,{loading:n,layout:"overlay"})]})});ee.displayName="AttachmentLink";const te=a(function({uid:a,url:n,pending:r=!1,containerProps:i,...o},s){const l=`attachment_audio_${a||Y()}`;return t("div",{...i,className:R("relative min-h-8 min-w-8 w-full rounded-md overflow-hidden",i?.className),children:[e("audio",{ref:s,src:n,id:l,controls:!0,...o}),e(Z,{loading:r,layout:"overlay"})]})});const ae=a(function({uid:a,url:n,maxSize:s=360,pending:l=!1,onReady:c=()=>{},containerProps:d,...u},m){const f=`attachment_video_${a||Y()}`,h=`${s}px`,g=r(null),[p,v]=i({maxHeight:h,maxWidth:h});return o(m,()=>g.current,[]),t("div",{...d,className:R("relative min-h-20 w-full rounded-md overflow-hidden",d?.className),children:[e("video",{id:f,ref:g,src:n,controls:!0,preload:"metadata",style:p,...u,onCanPlay:e=>{const t=g.current;if(t){const{videoWidth:a,videoHeight:n}=t,r=a/n||1,i=r<1?h:`${Math.round(s/r)}px`,o=r<1?`${Math.round(s*r)}px`:h;v({height:i,width:o,maxHeight:i,maxWidth:o}),u.onCanPlay?.(e),c()}},className:R("size-full",u?.className)}),e(Z,{loading:l,layout:"overlay"})]})});ae.displayName="AttachmentVideo";const ne=a(function({uid:t,url:a,pending:n=!1,onReady:r=()=>{},linkProps:i,...o},s){const l=`attachment_image_${t||Y()}`;return e(ee,{href:a,pending:n,...i,children:e("img",{ref:s,src:a,id:l,alt:"attachment",...o,className:R("rounded-md object-cover min-h-8 min-w-8 max-h-[360px] group-hover:scale-102 transition-transform duration-300 ease-out",o?.className),onLoad:e=>{o.onLoad?.(e),r()}})})});function re({url:a,name:n,pending:r=!1,iconElement:i,linkProps:o,...s}){const l=`attachment_file_${s.id||Y()}`;return t(ee,{href:a,pending:r,...o,className:R("flex-row gap-1.5 p-2 hover:shadow",o?.className),children:[i||e(y,{id:l,...s,className:R("size-5 shrink-0 text-foreground/80 group-hover:text-foreground duration-300 ease-out",s?.className)}),n&&e("span",{className:"font-medium line-clamp-1 break-all text-foreground/80 group-hover:text-foreground duration-300 ease-out",children:n})]})}function ie({name:a="Unknown file",pending:n=!1,iconElement:r,containerProps:i,...o}){const s=`attachment_failed_${o.id||Y()}`;return t("div",{...i,className:R("relative min-h-8 min-w-8 w-full flex flex-row items-center justify-center gap-2 px-2 bg-red-600/10 rounded-md overflow-hidden",i?.className),children:[r||e(b,{id:s,...o,className:R("size-6 shrink-0 text-red-600",o?.className)}),e("span",{className:"font-medium line-clamp-1 break-all text-red-600",children:a}),e(Z,{loading:n,layout:"overlay"})]})}ne.displayName="AttachmentImage",re.displayName="AttachmentFile",ie.displayName="AttachmentFailed";const oe=n(function({mimeType:t,...a}){const[n=""]=t?.split("/")||[];if(!a.url)return e(ie,{...a});switch(n){case"image":return e(ne,{...a});case"video":return e(ae,{...a});case"audio":return e(te,{...a});default:return e(re,{name:t,...a})}});function se({status:t,...a}){switch(t){case"available":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:R("rounded-full size-4.5 text-green-600 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"})});case"busy":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:R("rounded-full size-4.5 text-red-600 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M4.5 7.5a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1z"})});case"away":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:R("rounded-full size-4.5 text-yellow-500 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 3.5a.5.5 0 0 0-1 0V9a.5.5 0 0 0 .252.434l3.5 2a.5.5 0 0 0 .496-.868L8 8.71z"})});case"unknown":return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...a,className:R("rounded-full size-4.5 text-gray-500 bg-white",a?.className),children:e("path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247m2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z"})});default:return null}}function le({badge:a=!0,status:n,label:r,badgeProps:i,labelProps:o,...s}){const l=J(r||n);return t("div",{...s,className:R("flex items-center gap-2",s?.className),children:[a&&e(se,{status:n,...i}),e("span",{...o,children:l})]})}oe.displayName="Attachment",se.displayName="PresenceBadge",le.displayName="Presence";const ce=n(a(function({src:a,name:n="NA",fallbackIconElement:r,online:i,presence:o,className:s,onlineProps:l,presenceProps:c,imageProps:d,fallbackProps:u,...m},f){const h=function(e){const t=e?.trim().split(/\s+/).filter(Boolean)??[];return(t.length>1?`${t[0]?.[0]}${t[1]?.[0]}`:t[0]?.slice(0,2)??"NA").toUpperCase()}(n);return t(L.Root,{ref:f,...m,className:R("relative flex size-8 shrink-0 rounded-full",s),children:[e(L.Image,{...d,src:a,className:R("aspect-square size-full rounded-full overflow-hidden object-cover",d?.className)}),e(L.Fallback,{...u,className:R("bg-muted size-full rounded-full flex items-center justify-center",u?.className),children:r||h}),i&&e("div",{...l,className:R("absolute top-0 right-0 rounded-full border-2 bg-green-600 border-green-200 size-3.5",l?.className)}),e(se,{status:o,...c,className:R("absolute bottom-0 right-0",c?.className)})]})}));ce.displayName="Avatar";const de=f("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});const ue=a(function({className:t,variant:a,asChild:n=!1,...r},i){return e(n?m:"span",{ref:i,...r,className:R(de({variant:a}),t)})});function me(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}function fe(e){return(t,a)=>{let n;if("formatting"===(a?.context?String(a.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,r=a?.width?String(a.width):t;n=e.formattingValues[r]||e.formattingValues[t]}else{const t=e.defaultWidth,r=a?.width?String(a.width):e.defaultWidth;n=e.values[r]||e.values[t]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function he(e){return(t,a={})=>{const n=a.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;const o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a;return}(s,e=>e.test(o)):function(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a;return}(s,e=>e.test(o));let c;c=e.valueCallback?e.valueCallback(l):l,c=a.valueCallback?a.valueCallback(c):c;return{value:c,rest:t.slice(o.length)}}}function ge(e){return(t,a={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],i=t.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=a.valueCallback?a.valueCallback(o):o;return{value:o,rest:t.slice(r.length)}}}ue.displayName="Badge";const pe=Symbol.for("constructDateFrom");function ve(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&pe in e?e[pe](t):e instanceof Date?new e.constructor(t):new Date(t)}let be={};function ye(){return be}function we(e,t){return ve(t||e,e)}function Ne(e,t){const a=ye(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,r=we(e,t?.in),i=r.getDay(),o=(i<n?7:0)+i-n;return r.setDate(r.getDate()-o),r.setHours(0,0,0,0),r}function xe(e,t,a){const[n,r]=function(e,...t){const a=ve.bind(null,e||t.find(e=>"object"==typeof e));return t.map(a)}(a?.in,e,t);return+Ne(n,a)===+Ne(r,a)}const Pe={lessThanXSeconds:{one:"λιγότερο από ένα δευτερόλεπτο",other:"λιγότερο από {{count}} δευτερόλεπτα"},xSeconds:{one:"1 δευτερόλεπτο",other:"{{count}} δευτερόλεπτα"},halfAMinute:"μισό λεπτό",lessThanXMinutes:{one:"λιγότερο από ένα λεπτό",other:"λιγότερο από {{count}} λεπτά"},xMinutes:{one:"1 λεπτό",other:"{{count}} λεπτά"},aboutXHours:{one:"περίπου 1 ώρα",other:"περίπου {{count}} ώρες"},xHours:{one:"1 ώρα",other:"{{count}} ώρες"},xDays:{one:"1 ημέρα",other:"{{count}} ημέρες"},aboutXWeeks:{one:"περίπου 1 εβδομάδα",other:"περίπου {{count}} εβδομάδες"},xWeeks:{one:"1 εβδομάδα",other:"{{count}} εβδομάδες"},aboutXMonths:{one:"περίπου 1 μήνας",other:"περίπου {{count}} μήνες"},xMonths:{one:"1 μήνας",other:"{{count}} μήνες"},aboutXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"},xYears:{one:"1 χρόνο",other:"{{count}} χρόνια"},overXYears:{one:"πάνω από 1 χρόνο",other:"πάνω από {{count}} χρόνια"},almostXYears:{one:"περίπου 1 χρόνο",other:"περίπου {{count}} χρόνια"}},ke={date:me({formats:{full:"EEEE, d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"d/M/yy"},defaultWidth:"full"}),time:me({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:me({formats:{full:"{{date}} - {{time}}",long:"{{date}} - {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Me={lastWeek:e=>6===e.getDay()?"'το προηγούμενο' eeee 'στις' p":"'την προηγούμενη' eeee 'στις' p",yesterday:"'χθες στις' p",today:"'σήμερα στις' p",tomorrow:"'αύριο στις' p",nextWeek:"eeee 'στις' p",other:"P"},We={code:"el",formatDistance:(e,t,a)=>{let n;const r=Pe[e];return n="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",String(t)),a?.addSuffix?a.comparison&&a.comparison>0?"σε "+n:n+" πριν":n},formatLong:ke,formatRelative:(e,t)=>{const a=Me[e];return"function"==typeof a?a(t):a},localize:{ordinalNumber:(e,t)=>{const a=Number(e),n=t?.unit;let r;return r="year"===n||"month"===n?"ος":"week"===n||"dayOfYear"===n||"day"===n||"hour"===n||"date"===n?"η":"ο",a+r},era:fe({values:{narrow:["πΧ","μΧ"],abbreviated:["π.Χ.","μ.Χ."],wide:["προ Χριστού","μετά Χριστόν"]},defaultWidth:"wide"}),quarter:fe({values:{narrow:["1","2","3","4"],abbreviated:["Τ1","Τ2","Τ3","Τ4"],wide:["1ο τρίμηνο","2ο τρίμηνο","3ο τρίμηνο","4ο τρίμηνο"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μάρ","Απρ","Μάι","Ιούν","Ιούλ","Αύγ","Σεπ","Οκτ","Νοέ","Δεκ"],wide:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"]},defaultWidth:"wide",formattingValues:{narrow:["Ι","Φ","Μ","Α","Μ","Ι","Ι","Α","Σ","Ο","Ν","Δ"],abbreviated:["Ιαν","Φεβ","Μαρ","Απρ","Μαΐ","Ιουν","Ιουλ","Αυγ","Σεπ","Οκτ","Νοε","Δεκ"],wide:["Ιανουαρίου","Φεβρουαρίου","Μαρτίου","Απριλίου","Μαΐου","Ιουνίου","Ιουλίου","Αυγούστου","Σεπτεμβρίου","Οκτωβρίου","Νοεμβρίου","Δεκεμβρίου"]},defaultFormattingWidth:"wide"}),day:fe({values:{narrow:["Κ","Δ","T","Τ","Π","Π","Σ"],short:["Κυ","Δε","Τρ","Τε","Πέ","Πα","Σά"],abbreviated:["Κυρ","Δευ","Τρί","Τετ","Πέμ","Παρ","Σάβ"],wide:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},defaultWidth:"wide"}),dayPeriod:fe({values:{narrow:{am:"πμ",pm:"μμ",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},abbreviated:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"},wide:{am:"π.μ.",pm:"μ.μ.",midnight:"μεσάνυχτα",noon:"μεσημέρι",morning:"πρωί",afternoon:"απόγευμα",evening:"βράδυ",night:"νύχτα"}},defaultWidth:"wide"})},match:{ordinalNumber:ge({matchPattern:/^(\d+)(ος|η|ο)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:{narrow:/^(πΧ|μΧ)/i,abbreviated:/^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,wide:/^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^π/i,/^(μ|κ)/i]},defaultParseWidth:"any"}),quarter:he({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^τ[1234]/i,wide:/^[1234]ο? τρ(ί|ι)μηνο/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:{narrow:/^[ιφμαμιιασονδ]/i,abbreviated:/^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,wide:/^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^ι/i,/^φ/i,/^μ/i,/^α/i,/^μ/i,/^ι/i,/^ι/i,/^α/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i],any:[/^ια/i,/^φ/i,/^μ[άα]ρ/i,/^απ/i,/^μ[άα][ιΐ]/i,/^ιο[ύυ]ν/i,/^ιο[ύυ]λ/i,/^α[ύυ]/i,/^σ/i,/^ο/i,/^ν/i,/^δ/i]},defaultParseWidth:"any"}),day:he({matchPatterns:{narrow:/^[κδτπσ]/i,short:/^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,abbreviated:/^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,wide:/^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^κ/i,/^δ/i,/^τ/i,/^τ/i,/^π/i,/^π/i,/^σ/i],any:[/^κ/i,/^δ/i,/^τρ/i,/^τε/i,/^π[εέ]/i,/^π[αά]/i,/^σ/i]},defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:{narrow:/^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,any:/^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^πμ|π\.\s?μ\./i,pm:/^μμ|μ\.\s?μ\./i,midnight:/^μεσάν/i,noon:/^μεσημ(έ|ε)/i,morning:/πρω(ί|ι)/i,afternoon:/απ(ό|ο)γευμα/i,evening:/βρ(ά|α)δυ/i,night:/ν(ύ|υ)χτα/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:4}},ze={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Se={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ce={ordinalNumber:(e,t)=>{const a=Number(e),n=a%100;if(n>20||n<10)switch(n%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},era:fe({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:fe({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:fe({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:fe({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},Ge={ordinalNumber:ge({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:he({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:he({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},De={code:"en-US",formatDistance:(e,t,a)=>{let n;const r=ze[e];return n="string"==typeof r?r:1===t?r.one:r.other.replace("{{count}}",t.toString()),a?.addSuffix?a.comparison&&a.comparison>0?"in "+n:n+" ago":n},formatLong:{date:me({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:me({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:me({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(e,t,a,n)=>Se[e],localize:Ce,match:Ge,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Te(e,t){if(void 0!==e.one&&1===t)return e.one;const a=t%10,n=t%100;return 1===a&&11!==n?e.singularNominative.replace("{{count}}",String(t)):a>=2&&a<=4&&(n<10||n>20)?e.singularGenitive.replace("{{count}}",String(t)):e.pluralGenitive.replace("{{count}}",String(t))}function Ee(e){return(t,a)=>a&&a.addSuffix?a.comparison&&a.comparison>0?e.future?Te(e.future,t):"за "+Te(e.regular,t):e.past?Te(e.past,t):Te(e.regular,t)+" тому":Te(e.regular,t)}const je={lessThanXSeconds:Ee({regular:{one:"менше секунди",singularNominative:"менше {{count}} секунди",singularGenitive:"менше {{count}} секунд",pluralGenitive:"менше {{count}} секунд"},future:{one:"менше, ніж за секунду",singularNominative:"менше, ніж за {{count}} секунду",singularGenitive:"менше, ніж за {{count}} секунди",pluralGenitive:"менше, ніж за {{count}} секунд"}}),xSeconds:Ee({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунди",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду тому",singularGenitive:"{{count}} секунди тому",pluralGenitive:"{{count}} секунд тому"},future:{singularNominative:"за {{count}} секунду",singularGenitive:"за {{count}} секунди",pluralGenitive:"за {{count}} секунд"}}),halfAMinute:(e,t)=>t&&t.addSuffix?t.comparison&&t.comparison>0?"за півхвилини":"півхвилини тому":"півхвилини",lessThanXMinutes:Ee({regular:{one:"менше хвилини",singularNominative:"менше {{count}} хвилини",singularGenitive:"менше {{count}} хвилин",pluralGenitive:"менше {{count}} хвилин"},future:{one:"менше, ніж за хвилину",singularNominative:"менше, ніж за {{count}} хвилину",singularGenitive:"менше, ніж за {{count}} хвилини",pluralGenitive:"менше, ніж за {{count}} хвилин"}}),xMinutes:Ee({regular:{singularNominative:"{{count}} хвилина",singularGenitive:"{{count}} хвилини",pluralGenitive:"{{count}} хвилин"},past:{singularNominative:"{{count}} хвилину тому",singularGenitive:"{{count}} хвилини тому",pluralGenitive:"{{count}} хвилин тому"},future:{singularNominative:"за {{count}} хвилину",singularGenitive:"за {{count}} хвилини",pluralGenitive:"за {{count}} хвилин"}}),aboutXHours:Ee({regular:{singularNominative:"близько {{count}} години",singularGenitive:"близько {{count}} годин",pluralGenitive:"близько {{count}} годин"},future:{singularNominative:"приблизно за {{count}} годину",singularGenitive:"приблизно за {{count}} години",pluralGenitive:"приблизно за {{count}} годин"}}),xHours:Ee({regular:{singularNominative:"{{count}} годину",singularGenitive:"{{count}} години",pluralGenitive:"{{count}} годин"}}),xDays:Ee({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} днi",pluralGenitive:"{{count}} днів"}}),aboutXWeeks:Ee({regular:{singularNominative:"близько {{count}} тижня",singularGenitive:"близько {{count}} тижнів",pluralGenitive:"близько {{count}} тижнів"},future:{singularNominative:"приблизно за {{count}} тиждень",singularGenitive:"приблизно за {{count}} тижні",pluralGenitive:"приблизно за {{count}} тижнів"}}),xWeeks:Ee({regular:{singularNominative:"{{count}} тиждень",singularGenitive:"{{count}} тижні",pluralGenitive:"{{count}} тижнів"}}),aboutXMonths:Ee({regular:{singularNominative:"близько {{count}} місяця",singularGenitive:"близько {{count}} місяців",pluralGenitive:"близько {{count}} місяців"},future:{singularNominative:"приблизно за {{count}} місяць",singularGenitive:"приблизно за {{count}} місяці",pluralGenitive:"приблизно за {{count}} місяців"}}),xMonths:Ee({regular:{singularNominative:"{{count}} місяць",singularGenitive:"{{count}} місяці",pluralGenitive:"{{count}} місяців"}}),aboutXYears:Ee({regular:{singularNominative:"близько {{count}} року",singularGenitive:"близько {{count}} років",pluralGenitive:"близько {{count}} років"},future:{singularNominative:"приблизно за {{count}} рік",singularGenitive:"приблизно за {{count}} роки",pluralGenitive:"приблизно за {{count}} років"}}),xYears:Ee({regular:{singularNominative:"{{count}} рік",singularGenitive:"{{count}} роки",pluralGenitive:"{{count}} років"}}),overXYears:Ee({regular:{singularNominative:"більше {{count}} року",singularGenitive:"більше {{count}} років",pluralGenitive:"більше {{count}} років"},future:{singularNominative:"більше, ніж за {{count}} рік",singularGenitive:"більше, ніж за {{count}} роки",pluralGenitive:"більше, ніж за {{count}} років"}}),almostXYears:Ee({regular:{singularNominative:"майже {{count}} рік",singularGenitive:"майже {{count}} роки",pluralGenitive:"майже {{count}} років"},future:{singularNominative:"майже за {{count}} рік",singularGenitive:"майже за {{count}} роки",pluralGenitive:"майже за {{count}} років"}})},Ae={date:me({formats:{full:"EEEE, do MMMM y 'р.'",long:"do MMMM y 'р.'",medium:"d MMM y 'р.'",short:"dd.MM.y"},defaultWidth:"full"}),time:me({formats:{full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},defaultWidth:"full"}),dateTime:me({formats:{full:"{{date}} 'о' {{time}}",long:"{{date}} 'о' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Fe=["неділю","понеділок","вівторок","середу","четвер","п’ятницю","суботу"];function Le(e){return"'у "+Fe[e]+" о' p"}const Ie={lastWeek:(e,t,a)=>{const n=we(e),r=n.getDay();return xe(n,t,a)?Le(r):function(e){const t=Fe[e];switch(e){case 0:case 3:case 5:case 6:return"'у минулу "+t+" о' p";case 1:case 2:case 4:return"'у минулий "+t+" о' p"}}(r)},yesterday:"'вчора о' p",today:"'сьогодні о' p",tomorrow:"'завтра о' p",nextWeek:(e,t,a)=>{const n=we(e),r=n.getDay();return xe(n,t,a)?Le(r):function(e){const t=Fe[e];switch(e){case 0:case 3:case 5:case 6:return"'у наступну "+t+" о' p";case 1:case 2:case 4:return"'у наступний "+t+" о' p"}}(r)},other:"P"},$e={code:"uk",formatDistance:(e,t,a)=>(a=a||{},je[e](t,a)),formatLong:Ae,formatRelative:(e,t,a,n)=>{const r=Ie[e];return"function"==typeof r?r(t,a,n):r},localize:{ordinalNumber:(e,t)=>{const a=String(t?.unit),n=Number(e);let r;return r="date"===a?3===n||23===n?"-є":"-е":"minute"===a||"second"===a||"hour"===a?"-а":"-й",n+r},era:fe({values:{narrow:["до н.е.","н.е."],abbreviated:["до н. е.","н. е."],wide:["до нашої ери","нашої ери"]},defaultWidth:"wide"}),quarter:fe({values:{narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січень","лютий","березень","квітень","травень","червень","липень","серпень","вересень","жовтень","листопад","грудень"]},defaultWidth:"wide",formattingValues:{narrow:["С","Л","Б","К","Т","Ч","Л","С","В","Ж","Л","Г"],abbreviated:["січ.","лют.","берез.","квіт.","трав.","черв.","лип.","серп.","верес.","жовт.","листоп.","груд."],wide:["січня","лютого","березня","квітня","травня","червня","липня","серпня","вересня","жовтня","листопада","грудня"]},defaultFormattingWidth:"wide"}),day:fe({values:{narrow:["Н","П","В","С","Ч","П","С"],short:["нд","пн","вт","ср","чт","пт","сб"],abbreviated:["нед","пон","вів","сер","чтв","птн","суб"],wide:["неділя","понеділок","вівторок","середа","четвер","п’ятниця","субота"]},defaultWidth:"wide"}),dayPeriod:fe({values:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранок",afternoon:"день",evening:"веч.",night:"ніч"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранок",afternoon:"день",evening:"вечір",night:"ніч"}},defaultWidth:"any",formattingValues:{narrow:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},abbreviated:{am:"ДП",pm:"ПП",midnight:"півн.",noon:"пол.",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"},wide:{am:"ДП",pm:"ПП",midnight:"північ",noon:"полудень",morning:"ранку",afternoon:"дня",evening:"веч.",night:"ночі"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:ge({matchPattern:/^(\d+)(-?(е|й|є|а|я))?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:{narrow:/^((до )?н\.?\s?е\.?)/i,abbreviated:/^((до )?н\.?\s?е\.?)/i,wide:/^(до нашої ери|нашої ери|наша ера)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^д/i,/^н/i]},defaultParseWidth:"any"}),quarter:he({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^[1234](-?[иі]?й?)? кв.?/i,wide:/^[1234](-?[иі]?й?)? квартал/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:{narrow:/^[слбктчвжг]/i,abbreviated:/^(січ|лют|бер(ез)?|квіт|трав|черв|лип|серп|вер(ес)?|жовт|лис(топ)?|груд)\.?/i,wide:/^(січень|січня|лютий|лютого|березень|березня|квітень|квітня|травень|травня|червня|червень|липень|липня|серпень|серпня|вересень|вересня|жовтень|жовтня|листопад[а]?|грудень|грудня)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^с/i,/^л/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^л/i,/^с/i,/^в/i,/^ж/i,/^л/i,/^г/i],any:[/^сі/i,/^лю/i,/^б/i,/^к/i,/^т/i,/^ч/i,/^лип/i,/^се/i,/^в/i,/^ж/i,/^лис/i,/^г/i]},defaultParseWidth:"any"}),day:he({matchPatterns:{narrow:/^[нпвсч]/i,short:/^(нд|пн|вт|ср|чт|пт|сб)\.?/i,abbreviated:/^(нед|пон|вів|сер|че?тв|птн?|суб)\.?/i,wide:/^(неділ[яі]|понеділ[ок][ка]|вівтор[ок][ка]|серед[аи]|четвер(га)?|п\W*?ятниц[яі]|субот[аи])/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^н/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^н/i,/^п[он]/i,/^в/i,/^с[ер]/i,/^ч/i,/^п\W*?[ят]/i,/^с[уб]/i]},defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:{narrow:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,abbreviated:/^([дп]п|півн\.?|пол\.?|ранок|ранку|день|дня|веч\.?|ніч|ночі)/i,wide:/^([дп]п|північ|полудень|ранок|ранку|день|дня|вечір|вечора|ніч|ночі)/i},defaultMatchWidth:"wide",parsePatterns:{any:{am:/^дп/i,pm:/^пп/i,midnight:/^півн/i,noon:/^пол/i,morning:/^р/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},Xe={en:De,el:We,ua:$e};function Be(e,t="en",a=!1){const n=Xe[t]??De;if(a)return I(e,{locale:n,addSuffix:!0});return X(e)?$(e,"p",{locale:n}):(e=>{const t=B(new Date,e);return t>=0&&t<=6})(e)?$(e,"eeee",{locale:n}):$(e,"P",{locale:n})}const Oe=n(a(function({date:t,language:a,distanceToNow:n,...r},i){return t?e("span",{ref:i,...r,className:R("text-xs text-muted-foreground",r?.className),children:Be(t,a,n)}):null}));function _e(e){const t=Math.floor(e/3600),a=Math.floor(e%3600/60),n=e%60,r=e=>String(e).padStart(2,"0");return t>0?`${t}:${r(a)}:${r(n)}`:`${r(a)}:${r(n)}`}Oe.displayName="FormattedDate";const Ve=n(a(function({signal:a,info:n,duration:r=0,fromMe:i=!1,isLast:o=!1,iconElement:s,iconProps:l,infoProps:c,formattedDateProps:d,...u},m){const f="hungUp"===a?w:i?"reject"===a?N:x:P;return t("div",{ref:m,...u,className:R("flex items-center justify-center gap-2 rounded-full w-fit bg-ring/20 mx-auto px-3 py-1.5",o?"my-2":"mt-2",u?.className),children:[s||e(f,{...l,className:R("size-4","hungUp"===a?"text-green-500":"text-red-500",l?.className)}),e("span",{...c,className:R("text-sm mb-px",c?.className),children:`${n}${r?` - ${_e(r)}`:""}`}),e(Oe,{distanceToNow:!0,...d})]})}));Ve.displayName="CallMessage";const qe={target:"_blank",rel:"noopener noreferrer"},He=["w-full","w-3/4","w-1/2"];const Re=n(a(function({text:t,pending:a=!1,onReady:n=()=>{},linkifyProps:i,skeletonContainerProps:o,skeletonLineProps:d,skeletonLinesClassNames:u=He,...m},f){const h=r(a),g=s(()=>({...qe,...i,className:R("text-blue-500 hover:text-blue-600 hover:underline",i?.className)}),[i]);return l(()=>{h.current&&!a&&n(),h.current=a},[a,n]),a?e("div",{...o,className:R("flex items-start flex-col size-full",o?.className),children:u.map((e,t)=>c("span",{...d,key:`${e}_${t}`,className:R("bg-muted-foreground animate-pulse rounded-md my-1 h-4",d?.className,e)}))}):e("p",{ref:f,...m,className:R("wrap-break-word text-base",m?.className),children:e(_,{options:g,children:t})})}));Re.displayName="LinkifyText";const Ye=e=>{if(0===e.length)return e;const t=document.createElement("div");return t.innerHTML=e,t.textContent.trim()};const Je=n(a(function({thin:a=!1,title:n="",description:r="",icon:o,iconFallbackElement:s,image:l,onReady:c=()=>{},titleContainerProps:u,iconProps:m,iconFallbackProps:f,titleProps:h,descriptionProps:g,imageContainerProps:p,imageProps:v,...b},y){const[w,N]=i(o),[x,P]=i(l),M=d(e=>{v?.onLoad?.(e),c()},[c,v]),W=d(e=>{m?.onError?.(e),N(void 0)},[m]),z=d(e=>{v?.onError?.(e),P(void 0)},[v]);return t("a",{ref:y,target:"_blank",rel:"noopener noreferrer",...b,className:R("transition-color duration-300 ease-out","grid items-start gap-2 p-2 mt-1 overflow-hidden rounded border-l-4 border-l-ring bg-white hover:bg-ring/20",a?"grid-cols-3":"grid-cols-1",b?.className),children:[t("div",{...u,className:R("flex items-start gap-2",a?"col-span-3":"col-span-1",u?.className),children:[w?e("img",{alt:"icon",src:w,...m,onError:W,className:R("size-5",m?.className)}):s||e(k,{...f,className:R("size-5",f?.className)}),e("span",{...h,className:R("text-sm font-bold",a?"line-clamp-1":"line-clamp-2",h?.className),children:Ye(n)})]}),r&&e("span",{...g,className:R("text-sm line-clamp-5",a?x?"col-span-2":"col-span-3":"col-span-1",g?.className),children:Ye(r)}),x&&e("div",{...p,className:R("flex items-center justify-center",p?.className),children:e("img",{alt:"banner",src:x,...v,onLoad:M,onError:z,className:R("rounded max-w-full object-contain",a?"max-h-25":"max-h-60",v?.className)})})]})}));Je.displayName="LinkPreview";const Ue=({status:t,...a})=>{switch(t){case"wait":return e(S,{...a,className:R("text-gray-500 size-4",a?.className)});case"sent":return e(z,{...a,className:R("text-gray-500 size-4",a?.className)});case"read":return e(W,{...a,className:R("text-gray-500 size-4",a?.className)});case"lost":return e(M,{...a,className:R("text-red-500 size-4",a?.className)});default:return null}};Ue.displayName="StatusSent";const Qe=n(a(function({isLast:a,fromMe:n,sameSenderAbove:i,title:s,senderName:c,senderAvatar:u,attachmentElement:m,linkifyTextElement:f,linkPreviewElement:h,onView:g=()=>{},avatarProps:p,bubbleProps:v,titleProps:b,formattedDateProps:y,statusSentProps:w,attachmentProps:N,linkifyTextProps:x,linkPreviewProps:P,children:k,...M},W){const[z,S]=O(),C=r(null),G=d(e=>{C.current=e,z(e)},[z]),D=Boolean((p||u)&&!i),T=Boolean((p||u)&&i),E=T||Boolean(n&&i);return l(()=>{S&&g()},[S,g]),o(W,()=>C.current,[]),t("div",{ref:G,...M,className:R("flex relative text-left whitespace-pre-wrap",n?"self-end flex-row-reverse ml-12":"self-start mr-12",a&&"mb-2",E?"mt-1":"mt-2",S&&"view",M?.className),children:[D&&e(ce,{name:c,src:u,imageProps:{className:"bg-ring/30"},fallbackProps:{className:"bg-ring/30"},...p,className:R("mt-1 mr-1",p?.className)}),t("div",{className:R("relative flex flex-col min-w-42 max-w-120 rounded-xl px-2 pt-2 pb-6",n?"bg-blue-200":"bg-gray-200",T&&"ml-9",v?.className),children:[(s||c)&&e("span",{...b,className:R("font-semibold",s&&"mb-1 py-1.5 text-xs text-muted-foreground italic border-b",b?.className),children:s||c}),k,m||(N?e(oe,{...N}):null),f||(x?e(Re,{...x}):null),h||(P?e(Je,{...P}):null),t("div",{className:"absolute bottom-1 right-2 flex items-center gap-1 italic",children:[e(Oe,{distanceToNow:!0,...y}),e(Ue,{...w})]})]})]})}));const Ke=n(a(function({index:a=-1,isPrivateDialog:n,selected:r,onSelect:i=()=>{},name:o,photo:s,userOnline:l,userPresence:c,hasGroupIcon:d,lastSentStatus:u,lastSentDate:m,lastSenderName:f,lastMessage:h,typingStatusText:g,draft:p,draftLabel:v="Draft",unreadCount:b=0,language:y="en",divider:w="bottom",avatarProps:N,contentProps:x,headerProps:P,headerLeftProps:k,groupIconProps:M,nameProps:W,headerRightProps:z,statusSentIconProps:S,formattedDateProps:G,footerProps:D,lastMessageProps:T,draftLabelProps:E,lastSenderNameProps:j,unreadBadgeProps:A,dividerProps:F,...L},I){const $=s||N?.src,X=o||N?.name,B=!!n&&(l||N?.online),O=n?c||N?.presence:void 0,_="top"===w||"both"===w&&0===a,V="bottom"===w||"both"===w;return t("div",{ref:I,...L,onClick:i,className:R("flex items-start gap-2 px-2 flex-1 cursor-pointer","transition-colors duration-200 ease-linear",""+(r?"border-l-[0.25em] pl-1 border-l-ring bg-ring/20":"hover:bg-ring/5"),L?.className),children:[e(ce,{src:$,name:X,online:B,presence:O,...N,className:R("size-13 my-2 "+(s?"bg-ring/10":"bg-ring/30"),N?.className)}),t("div",{...x,className:R("relative self-stretch flex-1 flex-col text-foreground",x?.className),children:[t("div",{...P,className:R("flex items-center justify-between gap-1",P?.className),children:[t("div",{...k,className:R("flex items-center gap-1",k?.className),children:[!n&&d&&e(C,{...M,className:R("text-muted-foreground size-4 min-w-4",M?.className)}),e("span",{...W,className:R("font-medium text-left line-clamp-1",W?.className),children:o})]}),t("div",{...z,className:R("flex items-center gap-1",z?.className),children:[e(Ue,{status:u,...S}),e(Oe,{date:m,language:y,...G})]})]}),t("div",{...D,className:R("flex items-start justify-between gap-1",D?.className),children:[e("span",{...T,className:R("text-sm text-left text-muted-foreground break-all line-clamp-2",T?.className),children:g||t("span",p?{children:[e("span",{...E,className:R("text-red-500 font-medium",E?.className),children:`${v}: `}),p]}:{children:[f&&e("span",{...j,className:R("font-semibold",j?.className),children:`${f}: `}),h]})}),b>0&&e(ue,{...A,className:R("bg-ring text-background text-xs rounded-full p-1 h-6 min-w-6 mt-0.5",A?.className),children:b})]}),_&&e("div",{...F,className:R("absolute -top-px left-0 right-0 border-t",F?.className)}),V&&e("div",{className:"absolute bottom-0 left-0 right-0 border-b"})]})]})}));Ke.displayName="DialogItem";const Ze=a(function({active:t,onDismiss:a,disableClickOutside:n=!1,disableEscKeyPress:i=!1,disabled:s,...c},u){const m=r(null);o(u,()=>m.current,[]);const f=d(e=>{!n&&t&&e.target===m.current&&a()},[n,t,a]),h=d(e=>{!i&&t&&"Escape"===e.key&&a()},[i,t,a]);return l(()=>{if(!i&&t)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[i,t,h]),s||!t?null:e("div",{ref:m,"aria-hidden":!0,...c,onClick:f,onTouchStart:f,className:R("fixed top-0 left-0 size-full bg-black/20",c?.className)})});Ze.displayName="DismissLayer";const et=a(function({...t},a){return e(V,{ref:a,...t,className:R("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t?.className)})});et.displayName="Label";const tt=(e,t,a,n,r)=>{const i=Array.from(e||[]).filter(Boolean);if(0===i.length)return;const o=((e,t)=>{if(0===e.length)return!1;const a="string"==typeof t?t.split(/\s*,\s*|\s+/).map(e=>e.toLowerCase().trim()):null;return null!==a&&0!==a.length&&e.every(e=>{const{type:t,size:n}=e;if("string"!=typeof t||"number"!=typeof n||n<=0||0===t.length)return!1;const r=t.toLowerCase(),[i,o]=r.split("/");return a.some(e=>e.startsWith("*")||e===r||i&&e.endsWith("/*")&&e.startsWith(i)||e.startsWith(".")&&e.slice(1)===o)})})(i,t);o?n(a?i:i[0]?[i[0]]:[]):r()};const at=a(function({onSelectFile:a=()=>{},onInvalidFile:n=()=>{},multiple:r=!1,accept:i="*/*",iconElement:o,labelProps:s,iconProps:l,...c},d){return t(et,{...s,htmlFor:"file-uploader",className:R("group p-2 rounded-full hover:bg-ring/10 transition-all duration-200 ease-in-out cursor-pointer",s?.className),children:[o||e(G,{...l,className:R("text-foreground group-hover:scale-110 transition-all duration-200 ease-in-out",l?.className)}),e("input",{ref:d,id:"file-uploader",type:"file",multiple:r,accept:i,onChange:e=>{tt(e.currentTarget.files,i,r,a,n),e.currentTarget.value=""},...c,className:R("hidden",c?.className)})]})});at.displayName="FilePickerInput";const nt=a(function({onSelectFile:a=()=>{},onInvalidFile:n=()=>{},multiple:r=!1,accept:o="*/*",children:s,iconElement:l,placeholder:c,dropZoneProps:d,placeholderContainerProps:u,iconProps:m,placeholderProps:f,...h},g){const[p,v]=i(!1),b=e=>{e.preventDefault(),e.stopPropagation()};return t("div",{ref:g,onDragEnter:e=>{b(e),e.dataTransfer.items&&e.dataTransfer.items.length>0&&v(!0)},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||v(!1)},onDragOver:b,...h,className:R("relative size-full min-h-0",h?.className),children:[s,e("div",{onDrop:e=>{b(e),v(!1),tt(e.dataTransfer.files,o,r,a,n),e.dataTransfer.clearData()},...d,className:R("absolute top-0 left-0 size-full","flex items-center justify-center","transition-all duration-300 ease-out","border-2 border-dashed border-ring bg-ring/25 rounded-md",p?"opacity-100 pointer-events-auto visible scale-100":"opacity-0 pointer-events-none invisible scale-98",d?.className),children:t("div",{...u,className:R("bg-muted flex flex-row items-center gap-2 rounded-full py-2 px-4 transition-all",p?"scale-100":"scale-90",u?.className),children:[l||e(D,{absoluteStrokeWidth:!0,...m,className:R("text-ring size-6",m?.className)}),e("span",{...f,className:R("text-ring text-md font-bold",f?.className),children:c||"Drop files here"})]})})]})});nt.displayName="FilePickerDropzone";const rt=a(function(t,a){return e("input",{ref:a,...t,className:R("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t?.className)})});rt.displayName="Input";const it=a(function({title:t,titles:a=[],rowProps:n,...r},i){const o="string"==typeof t?[t,...a]:a;return e("div",{ref:i,...r,className:R("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",r?.className),children:o.map((t,a)=>e("div",{...n,className:R("text-center",n?.className),children:t},`placeholder-text-${a}`))})});it.displayName="PlaceholderText";const ot=a(function({onSearch:a=()=>{},onCancel:n=()=>{},hasSearchIcon:r=!0,hasCancelIcon:o=!0,searchIconProps:s,cancelIconProps:l,containerProps:c,...d},u){const[m,f]=i("");return t("div",{...c,className:R("group relative",c?.className),children:[r&&e(T,{...s,className:R("absolute top-1/2 left-2 transform -translate-y-1/2 size-5 text-muted-foreground group-focus-within:text-ring",s?.className)}),e(rt,{ref:u,name:"search",placeholder:d?.placeholder||"Search...",value:m,onChange:e=>{const t=e.target.value;f(t),a(t.toLowerCase())},...d,className:R("placeholder:text-muted-foreground focus-visible:ring-ring/50 focus-visible:ring flex",r?"pl-10":"pl-3",o?"pr-10":"pr-3",d?.className)}),o&&e(E,{onClick:()=>{f(""),n()},...l,className:R("absolute top-1/2 right-2 transform -translate-y-1/2 size-5 text-muted-foreground cursor-pointer hover:text-ring transition-all duration-300 ease-in-out",m.length>0?"opacity-100 scale-100":"opacity-0 scale-75 pointer-events-none",l?.className)})]})});ot.displayName="Search";const st=a(function({status:a="unknown",statusColorConfig:n={unknown:"bg-gray-500 border-gray-600"},statusProps:r,tooltipProviderProps:i,tooltipProps:o,tooltipTriggerProps:s,tooltipPortalProps:l,tooltipContentProps:c,tooltipArrowProps:d,tooltip:u,disabled:m,className:f,...h},g){return m?null:e("div",{ref:g,...h,className:R("absolute top-0 left-0",f),children:e(q.Provider,{...i,children:t(q.Root,{...o,children:[e(q.Trigger,{asChild:!0,...s,children:e("div",{...r,className:R("rounded-full size-4 border border-primary-foreground",n[a],r?.className)})}),e(q.Portal,{...l,children:t(q.Content,{...c,className:R("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",c?.className),children:[e("span",{children:u||a||"unknown"}),e(q.Arrow,{...d,className:R("bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px]",d?.className)})]})})]})})})});st.displayName="StatusIndicator";const lt=a(function({id:t,stream:a,mirror:n,className:i,muted:c,...d},u){const m=r(null),f=s(()=>t??`stream-${Y()}`,[t]),h="boolean"==typeof c&&c,g=n?"scale-x-[-1]":"";return o(u,()=>m.current),l(()=>{if(m.current&&a){m.current.srcObject=a;const e=()=>{try{m.current?.play()}catch(e){console.error("Error playing video:",e)}};m.current.onloadedmetadata=()=>{queueMicrotask(e)}}},[a]),a?e("video",{ref:m,id:f,autoPlay:!0,playsInline:!0,muted:h,...d,className:R("size-full object-contain",g,i)}):null});lt.displayName="StreamView";const ct=a(function({muted:t,mirror:a,...n},r){return e(lt,{ref:r,muted:"boolean"!=typeof t||t,mirror:"boolean"!=typeof a||a,...n})});ct.displayName="LocalStreamView";const dt=a(function({muted:t,mirror:a,...n},r){return e(lt,{ref:r,muted:"boolean"==typeof t&&t,mirror:"boolean"==typeof a&&a,...n})});dt.displayName="RemoteStreamView";const ut=a(function({element:a,pipElement:n,navElement:s,hideIconElement:c,showIconElement:u,fullscreenButtonProps:m,fullscreenButtonIconProps:f,pipProps:h,pipButtonProps:g,pipButtonIconProps:p,...v},b){const y=r(null),[w,N]=i(!1),[x,P]=i(!1),k=d(async()=>{const e=y.current;if(e)try{document.fullscreenElement?(await document.exitFullscreen(),N(!1),P(!1)):(await e.requestFullscreen(),N(!0),P(!0))}catch(e){console.error("Fullscreen error:",e)}},[]),M=d(()=>{n&&P(e=>!e)},[n]);return o(b,()=>Object.assign(y.current,{isFullscreen:w,isPictureInPicture:x,toggleFullscreen:k,togglePictureInPicture:M}),[w,x,k,M]),l(()=>{const e=()=>{N(!!document.fullscreenElement),P(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),t("div",{ref:y,...v,className:R("relative flex items-center justify-center size-full",v?.className),children:[a,e("button",{onClick:k,...m,className:R("absolute top-2 right-2 p-1 rounded-md bg-black/50 text-white hover:bg-black/80 z-10 shadow-xs shadow-white/25",m?.className),children:w?c||e(j,{...f}):u||e(A,{...f})}),t("div",{className:"absolute size-full p-2 flex flex-col justify-end items-center",children:[w&&n&&t("div",{className:"relative size-full flex items-end justify-end",children:[x&&e("div",{...h,className:R("max-w-1/4 max-h-1/4 aspect-4/3 overflow-hidden rounded-md shadow-md shadow-white/25",h?.className),children:n}),e("button",{onClick:M,...g,className:R("absolute bottom-2 right-2 p-1 rounded-md bg-black/50 text-white hover:bg-black/80 z-10 shadow-xs shadow-white/25",g?.className),children:e(F,{...p})})]}),w&&s]})]})});function mt(t){return e(H.Root,{...t,className:R("peer data-[state=checked]:bg-ring data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15em] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring disabled:cursor-not-allowed disabled:opacity-50",t?.className),children:e(H.Thumb,{className:R("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}ut.displayName="FullscreenStreamView";export{K as AlertDialog,oe as Attachment,te as AttachmentAudio,ie as AttachmentFailed,re as AttachmentFile,ne as AttachmentImage,ee as AttachmentLink,ae as AttachmentVideo,ce as Avatar,ue as Badge,Q as Button,Ve as CallMessage,Qe as ChatMessage,Ke as DialogItem,Ze as DismissLayer,nt as FilePickerDropzone,at as FilePickerInput,Oe as FormattedDate,ut as FullscreenStreamView,rt as Input,et as Label,Je as LinkPreview,Re as LinkifyText,ct as LocalStreamView,it as PlaceholderText,le as Presence,se as PresenceBadge,dt as RemoteStreamView,ot as Search,Z as Spinner,st as StatusIndicator,Ue as StatusSent,lt as StreamView,mt as Switch,J as capitalize,R as cn,Y as getRandomString};
|
|
36
2
|
//# sourceMappingURL=index.js.map
|