gentiq 0.7.8 → 0.7.9

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.
Files changed (68) hide show
  1. package/dist/{_basePickBy-BCEawhX8.js → _basePickBy-DhpX2nQZ.js} +2 -2
  2. package/dist/{_baseUniq-D9OQdH3p.js → _baseUniq-CTHIGvjX.js} +1 -1
  3. package/dist/{arc-0PRgpdEc.js → arc-CxpGLjUE.js} +1 -1
  4. package/dist/architecture-PBZL5I3N-4gvj7JtW.js +6 -0
  5. package/dist/{architectureDiagram-2XIMDMQ5-929ZD2bt.js → architectureDiagram-2XIMDMQ5-BbIZtQBU.js} +4 -4
  6. package/dist/{blockDiagram-WCTKOSBZ--GJH64wv.js → blockDiagram-WCTKOSBZ-BmQHAsps.js} +5 -5
  7. package/dist/{c4Diagram-IC4MRINW-Ch0RcdQb.js → c4Diagram-IC4MRINW-CsKNoYey.js} +2 -2
  8. package/dist/{channel-CCHOctXa.js → channel-DgO5lMa4.js} +1 -1
  9. package/dist/{chunk-4BX2VUAB-C9W7BxP6.js → chunk-4BX2VUAB-D6Ou2C3G.js} +1 -1
  10. package/dist/{chunk-55IACEB6-CXL6w2to.js → chunk-55IACEB6-BBL_SO_g.js} +1 -1
  11. package/dist/{chunk-FMBD7UC4-fJFC2OwL.js → chunk-FMBD7UC4-zWJrZOUq.js} +1 -1
  12. package/dist/{chunk-JSJVCQXG-BV-w7tDn.js → chunk-JSJVCQXG-BEezxJts.js} +1 -1
  13. package/dist/{chunk-KX2RTZJC-DQpfZrFK.js → chunk-KX2RTZJC--7Pwy-rL.js} +1 -1
  14. package/dist/{chunk-NQ4KR5QH-B5gXyz9J.js → chunk-NQ4KR5QH-OSTqDDP1.js} +3 -3
  15. package/dist/{chunk-QZHKN3VN-C7EFcxO4.js → chunk-QZHKN3VN-6A9hILgX.js} +1 -1
  16. package/dist/{chunk-WL4C6EOR-1pYYGlpd.js → chunk-WL4C6EOR-Djm4b_lW.js} +5 -5
  17. package/dist/{classDiagram-VBA2DB6C-2RCsJ56k.js → classDiagram-VBA2DB6C-DrkTgoyv.js} +2 -2
  18. package/dist/{classDiagram-v2-RAHNMMFH-2RCsJ56k.js → classDiagram-v2-RAHNMMFH-DrkTgoyv.js} +2 -2
  19. package/dist/{clone-CRL-DQ-2.js → clone-D5Mf1ZLM.js} +1 -1
  20. package/dist/{code-block-IT6T5CEO-CfZ94ArT.js → code-block-IT6T5CEO-C1Rj757-.js} +1 -1
  21. package/dist/{cose-bilkent-S5V4N54A-B-sGhKcO.js → cose-bilkent-S5V4N54A-DtZHOKHe.js} +2 -2
  22. package/dist/{dagre-KLK3FWXG-CZwxWGaA.js → dagre-KLK3FWXG-8R_aZdF2.js} +6 -6
  23. package/dist/{diagram-E7M64L7V-DYlK--DI.js → diagram-E7M64L7V-CzoukMbY.js} +4 -4
  24. package/dist/{diagram-IFDJBPK2-CWuPsGxf.js → diagram-IFDJBPK2-DHcveS0N.js} +3 -3
  25. package/dist/{diagram-P4PSJMXO-BVxp8oW4.js → diagram-P4PSJMXO-CLCo2Fv7.js} +3 -3
  26. package/dist/{erDiagram-INFDFZHY-CU6tgWKQ.js → erDiagram-INFDFZHY-D4IrR9B2.js} +4 -4
  27. package/dist/{flowDiagram-PKNHOUZH-e8mWAxWj.js → flowDiagram-PKNHOUZH-CU222zxT.js} +6 -6
  28. package/dist/{ganttDiagram-A5KZAMGK-B8Ml6g0s.js → ganttDiagram-A5KZAMGK-DbAbTm_e.js} +3 -3
  29. package/dist/gentiq.es.js +1 -1
  30. package/dist/gentiq.umd.js +1 -1
  31. package/dist/gitGraph-HDMCJU4V-DipIySw_.js +6 -0
  32. package/dist/{gitGraphDiagram-K3NZZRJ6-BnDBi8zv.js → gitGraphDiagram-K3NZZRJ6-BcVDL-m6.js} +4 -4
  33. package/dist/{graph-Bhh2Eap7.js → graph-w2NBM8q_.js} +2 -2
  34. package/dist/{index-T6VDMirs.js → index-B3O_cIUd.js} +3 -3
  35. package/dist/info-3K5VOQVL-hAaL0Sy1.js +6 -0
  36. package/dist/{infoDiagram-LFFYTUFH-BZQbsZlL.js → infoDiagram-LFFYTUFH-BMMxLTZj.js} +2 -2
  37. package/dist/{ishikawaDiagram-PHBUUO56-JTvoPTXx.js → ishikawaDiagram-PHBUUO56-KwDJsghG.js} +1 -1
  38. package/dist/{journeyDiagram-4ABVD52K-B2UHnZVT.js → journeyDiagram-4ABVD52K-CcEu8Dkv.js} +4 -4
  39. package/dist/{kanban-definition-K7BYSVSG-DdDntgU3.js → kanban-definition-K7BYSVSG-Dw7N5HiY.js} +2 -2
  40. package/dist/{layout-CJd44DzS.js → layout-BtTLEOsJ.js} +4 -4
  41. package/dist/{linear-CFtW7vpl.js → linear-D9q01mVm.js} +1 -1
  42. package/dist/mermaid-VLURNSYL-B3gNn58V.js +4 -0
  43. package/dist/{mermaid-parser.core-Cmp_RhEZ.js → mermaid-parser.core-BoFPbm5X.js} +12 -12
  44. package/dist/{mermaid.core-DmIrnhd0.js → mermaid.core-DBSALQXb.js} +33 -33
  45. package/dist/{mindmap-definition-YRQLILUH-1P0t5wCJ.js → mindmap-definition-YRQLILUH-BMpeDR_4.js} +3 -3
  46. package/dist/packet-RMMSAZCW-sLXqJzq3.js +6 -0
  47. package/dist/pie-UPGHQEXC-w_6HuOzY.js +6 -0
  48. package/dist/{pieDiagram-SKSYHLDU-BK4hsBSL.js → pieDiagram-SKSYHLDU-BFs38iS-.js} +4 -4
  49. package/dist/{quadrantDiagram-337W2JSQ-B13HBIN9.js → quadrantDiagram-337W2JSQ-BBsvX74s.js} +2 -2
  50. package/dist/radar-KQ55EAFF-Bn5uSFa7.js +6 -0
  51. package/dist/{requirementDiagram-Z7DCOOCP-C3UGMyTm.js → requirementDiagram-Z7DCOOCP-Cryck6c9.js} +3 -3
  52. package/dist/{sankeyDiagram-WA2Y5GQK-BLmt-Iu1.js → sankeyDiagram-WA2Y5GQK-4H8dZw47.js} +1 -1
  53. package/dist/{sequenceDiagram-2WXFIKYE-CWkwiR5F.js → sequenceDiagram-2WXFIKYE-L5SrMYa5.js} +3 -3
  54. package/dist/{stateDiagram-RAJIS63D-C35aKBWj.js → stateDiagram-RAJIS63D-AWPWbQmt.js} +4 -4
  55. package/dist/{stateDiagram-v2-FVOUBMTO-D48nJ58u.js → stateDiagram-v2-FVOUBMTO-DFTammho.js} +2 -2
  56. package/dist/{timeline-definition-YZTLITO2-nUR53S4y.js → timeline-definition-YZTLITO2-BUuxfO-a.js} +2 -2
  57. package/dist/treemap-KZPCXAKY-40AiHJTx.js +6 -0
  58. package/dist/{vennDiagram-LZ73GAT5-CA-kXGc9.js → vennDiagram-LZ73GAT5-B-l-eIZo.js} +1 -1
  59. package/dist/{xychartDiagram-JWTSCODW-DZisW110.js → xychartDiagram-JWTSCODW-DqXK6H3B.js} +2 -2
  60. package/package.json +1 -1
  61. package/dist/architecture-PBZL5I3N-Cf_-VVAF.js +0 -6
  62. package/dist/gitGraph-HDMCJU4V-CRZfAosU.js +0 -6
  63. package/dist/info-3K5VOQVL-CtHJxf3S.js +0 -6
  64. package/dist/mermaid-VLURNSYL-D9TbYl7_.js +0 -4
  65. package/dist/packet-RMMSAZCW-C6KE1znP.js +0 -6
  66. package/dist/pie-UPGHQEXC-DwYCRHsx.js +0 -6
  67. package/dist/radar-KQ55EAFF-Cp5UR-7_.js +0 -6
  68. package/dist/treemap-KZPCXAKY-H2hz3QNv.js +0 -6
@@ -1,4 +1,4 @@
1
- (function(gn,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],F):(gn=typeof globalThis<"u"?globalThis:gn||self,F(gn.Gentiq={},gn.jsxRuntime,gn.React,gn.ReactDOM,gn.ReactRouterDOM))})(this,(function(gn,F,ne,UQ,_i){"use strict";var Fy,Ly,Ry,My,Oy,Py,$y,jy,Xg,qy,Gy,zy,Uy,Hy,Yy,Wy,Ky,Zy,Vy,Jy,Xy,e0,t0,n0,a0,r0,i0,o0,s0,c0,l0,u0,d0,p0,m0,A0,g0,h0,f0,b0,y0,w0,k0,v0,_0,C0,E0,eh,x0,B0,I0,Md,S0,D0,Q0,T0;function qH(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const re=qH(ne),jC=qH(UQ);var rh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},a8e={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r8e=class{#e=a8e;#t=!1;setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,process.env.NODE_ENV!=="production"&&(this.#t=!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Sm=new r8e;function i8e(e){setTimeout(e,0)}var Dm=typeof window>"u"||"Deno"in globalThis;function ho(){}function o8e(e,t){return typeof e=="function"?e(t):e}function HQ(e){return typeof e=="number"&&e>=0&&e!==1/0}function GH(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pd(e,t){return typeof e=="function"?e(t):e}function Hs(e,t){return typeof e=="function"?e(t):e}function zH(e,t){const{type:n="all",exact:a,fetchStatus:r,predicate:i,queryKey:o,stale:s}=e;if(o){if(a){if(t.queryHash!==YQ(o,t.options))return!1}else if(!F0(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||r&&r!==t.state.fetchStatus||i&&!i(t))}function UH(e,t){const{exact:n,status:a,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Qm(t.options.mutationKey)!==Qm(i))return!1}else if(!F0(t.options.mutationKey,i))return!1}return!(a&&t.state.status!==a||r&&!r(t))}function YQ(e,t){return(t?.queryKeyHashFn||Qm)(e)}function Qm(e){return JSON.stringify(e,(t,n)=>KQ(n)?Object.keys(n).sort().reduce((a,r)=>(a[r]=n[r],a),{}):n)}function F0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>F0(e[n],t[n])):!1}var s8e=Object.prototype.hasOwnProperty;function WQ(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=HH(e)&&HH(t);if(!a&&!(KQ(e)&&KQ(t)))return t;const i=(a?e:Object.keys(e)).length,o=a?t:Object.keys(t),s=o.length,l=a?new Array(s):{};let u=0;for(let d=0;d<s;d++){const p=a?d:o[d],m=e[p],A=t[p];if(m===A){l[p]=m,(a?d<i:s8e.call(e,p))&&u++;continue}if(m===null||A===null||typeof m!="object"||typeof A!="object"){l[p]=A;continue}const g=WQ(m,A,n+1);l[p]=g,g===m&&u++}return i===s&&u===i?e:l}function qC(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function HH(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function KQ(e){if(!YH(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!YH(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function YH(e){return Object.prototype.toString.call(e)==="[object Object]"}function c8e(e){return new Promise(t=>{Sm.setTimeout(t,e)})}function ZQ(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return WQ(e,t)}catch(a){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${a}`),a}return WQ(e,t)}return t}function l8e(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function u8e(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var GC=Symbol();function WH(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===GC&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===GC?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function VQ(e,t){return typeof e=="function"?e(...t):!!e}function d8e(e,t,n){let a=!1,r;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),a||(a=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)}),e}var p8e=class extends rh{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Dm&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},JQ=new p8e;function XQ(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});n.status="pending",n.catch(()=>{});function a(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{a({status:"fulfilled",value:r}),e(r)},n.reject=r=>{a({status:"rejected",reason:r}),t(r)},n}var m8e=i8e;function A8e(){let e=[],t=0,n=s=>{s()},a=s=>{s()},r=m8e;const i=s=>{t?e.push(s):r(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&r(()=>{a(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{a=s},setScheduler:s=>{r=s}}}var Gr=A8e(),g8e=class extends rh{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Dm&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},zC=new g8e;function h8e(e){return Math.min(1e3*2**e,3e4)}function KH(e){return(e??"online")==="online"?zC.isOnline():!0}var e4=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function ZH(e){let t=!1,n=0,a;const r=XQ(),i=()=>r.status!=="pending",o=h=>{if(!i()){const f=new e4(h);m(f),e.onCancel?.(f)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>JQ.isFocused()&&(e.networkMode==="always"||zC.isOnline())&&e.canRun(),d=()=>KH(e.networkMode)&&e.canRun(),p=h=>{i()||(a?.(),r.resolve(h))},m=h=>{i()||(a?.(),r.reject(h))},A=()=>new Promise(h=>{a=f=>{(i()||u())&&h(f)},e.onPause?.()}).then(()=>{a=void 0,i()||e.onContinue?.()}),g=()=>{if(i())return;let h;const f=n===0?e.initialPromise:void 0;try{h=f??e.fn()}catch(b){h=Promise.reject(b)}Promise.resolve(h).then(p).catch(b=>{if(i())return;const y=e.retry??(Dm?0:3),w=e.retryDelay??h8e,k=typeof w=="function"?w(n,b):w,C=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,b);if(t||!C){m(b);return}n++,e.onFail?.(n,b),c8e(k).then(()=>u()?void 0:A()).then(()=>{t?m(b):g()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(a?.(),r),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?g():A().then(g),r)}}var VH=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),HQ(this.gcTime)&&(this.#e=Sm.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Dm?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Sm.clearTimeout(this.#e),this.#e=void 0)}},f8e=class extends VH{#e;#t;#n;#r;#a;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=eY(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=eY(this.options);t.data!==void 0&&(this.setState(XH(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=ZQ(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(ho).catch(ho):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Hs(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===GC||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pd(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!GH(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(l=>l.options.queryFn);s&&this.setOptions(s.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,a=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},r=()=>{const s=WH(this.options,t),u=(()=>{const d={client:this.#r,queryKey:this.queryKey,meta:this.meta};return a(d),d})();return this.#s=!1,this.options.persister?this.options.persister(s,u,this):s(u)},o=(()=>{const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:r};return a(s),s})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#a=ZH({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof e4&&s.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(s,l)=>{this.#o({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#a.start();if(s===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#n.config.onSuccess?.(s,this),this.#n.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof e4){if(s.silent)return this.#a.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#o({type:"error",error:s}),this.#n.config.onError?.(s,this),this.#n.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...JH(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...XH(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const r=e.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Gr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function JH(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KH(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function XH(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function eY(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var tY=class extends rh{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#s=XQ(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#i;#s;#o;#g;#p;#m;#l;#u;#c;#A=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),nY(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return t4(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return t4(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#k(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hs(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#t.setOptions(this.options),t._defaulted&&!qC(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&aY(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||Hs(this.options.enabled,this.#t)!==Hs(t.enabled,this.#t)||Pd(this.options.staleTime,this.#t)!==Pd(t.staleTime,this.#t))&&this.#h();const r=this.#f();a&&(this.#t!==n||Hs(this.options.enabled,this.#t)!==Hs(t.enabled,this.#t)||r!==this.#c)&&this.#b(r)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return y8e(this,n)&&(this.#r=n,this.#i=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){this.#A.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(e){this.#v();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ho)),t}#h(){this.#w();const e=Pd(this.options.staleTime,this.#t);if(Dm||this.#r.isStale||!HQ(e))return;const n=GH(this.#r.dataUpdatedAt,e)+1;this.#l=Sm.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#f(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#b(e){this.#k(),this.#c=e,!(Dm||Hs(this.options.enabled,this.#t)===!1||!HQ(this.#c)||this.#c===0)&&(this.#u=Sm.setInterval(()=>{(this.options.refetchIntervalInBackground||JQ.isFocused())&&this.#d()},this.#c))}#y(){this.#h(),this.#b(this.#f())}#w(){this.#l&&(Sm.clearTimeout(this.#l),this.#l=void 0)}#k(){this.#u&&(Sm.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,a=this.options,r=this.#r,i=this.#a,o=this.#i,l=e!==n?e.state:this.#n,{state:u}=e;let d={...u},p=!1,m;if(t._optimisticResults){const x=this.hasListeners(),S=!x&&nY(e,t),I=x&&aY(e,n,t,a);(S||I)&&(d={...d,...JH(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:A,errorUpdatedAt:g,status:h}=d;m=d.data;let f=!1;if(t.placeholderData!==void 0&&m===void 0&&h==="pending"){let x;r?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(x=r.data,f=!0):x=typeof t.placeholderData=="function"?t.placeholderData(this.#m?.state.data,this.#m):t.placeholderData,x!==void 0&&(h="success",m=ZQ(r?.data,x,t),p=!0)}if(t.select&&m!==void 0&&!f)if(r&&m===i?.data&&t.select===this.#g)m=this.#p;else try{this.#g=t.select,m=t.select(m),m=ZQ(r?.data,m,t),this.#p=m,this.#o=null}catch(x){this.#o=x}this.#o&&(A=this.#o,m=this.#p,g=Date.now(),h="error");const b=d.fetchStatus==="fetching",y=h==="pending",w=h==="error",k=y&&b,C=m!==void 0,_={status:h,fetchStatus:d.fetchStatus,isPending:y,isSuccess:h==="success",isError:w,isInitialLoading:k,isLoading:k,data:m,dataUpdatedAt:d.dataUpdatedAt,error:A,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:w&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:w&&C,isStale:n4(e,t),refetch:this.refetch,promise:this.#s,isEnabled:Hs(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const x=_.data!==void 0,S=_.status==="error"&&!x,I=R=>{S?R.reject(_.error):x&&R.resolve(_.data)},D=()=>{const R=this.#s=_.promise=XQ();I(R)},Q=this.#s;switch(Q.status){case"pending":e.queryHash===n.queryHash&&I(Q);break;case"fulfilled":(S||_.data!==Q.value)&&D();break;case"rejected":(!S||_.error!==Q.reason)&&D();break}}return _}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#i=this.options,this.#a.data!==void 0&&(this.#m=this.#t),qC(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,r=typeof a=="function"?a():a;if(r==="all"||!r&&!this.#A.size)return!0;const i=new Set(r??this.#A);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(o=>{const s=o;return this.#r[s]!==e[s]&&i.has(s)})};this.#_({listeners:n()})}#v(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#_(e){Gr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function b8e(e,t){return Hs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function nY(e,t){return b8e(e,t)||e.state.data!==void 0&&t4(e,t,t.refetchOnMount)}function t4(e,t,n){if(Hs(t.enabled,e)!==!1&&Pd(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&n4(e,t)}return!1}function aY(e,t,n,a){return(e!==t||Hs(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&n4(e,n)}function n4(e,t){return Hs(t.enabled,e)!==!1&&e.isStaleByTime(Pd(t.staleTime,e))}function y8e(e,t){return!qC(e.getCurrentResult(),t)}function UC(e){return{onFetch:(t,n)=>{const a=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let d=!1;const p=g=>{d8e(g,()=>t.signal,()=>d=!0)},m=WH(t.options,t.fetchOptions),A=async(g,h,f)=>{if(d)return Promise.reject();if(h==null&&g.pages.length)return Promise.resolve(g);const y=(()=>{const E={client:t.client,queryKey:t.queryKey,pageParam:h,direction:f?"backward":"forward",meta:t.options.meta};return p(E),E})(),w=await m(y),{maxPages:k}=t.options,C=f?u8e:l8e;return{pages:C(g.pages,w,k),pageParams:C(g.pageParams,h,k)}};if(r&&i.length){const g=r==="backward",h=g?rY:a4,f={pages:i,pageParams:o},b=h(a,f);s=await A(f,b,g)}else{const g=e??i.length;do{const h=l===0?o[0]??a.initialPageParam:a4(a,s);if(l>0&&h==null)break;s=await A(s,h),l++}while(l<g)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function a4(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function rY(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function w8e(e,t){return t?a4(e,t)!=null:!1}function k8e(e,t){return!t||!e.getPreviousPageParam?!1:rY(e,t)!=null}var v8e=class extends tY{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:UC()})}getOptimisticResult(e){return e.behavior=UC(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,a=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:o,isRefetchError:s}=a,l=n.fetchMeta?.fetchMore?.direction,u=o&&l==="forward",d=r&&l==="forward",p=o&&l==="backward",m=r&&l==="backward";return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:w8e(t,n.data),hasPreviousPage:k8e(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:s&&!u&&!p,isRefetching:i&&!d&&!m}}},_8e=class extends VH{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||iY(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#a({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ZH({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,o)=>{this.#a({type:"failed",failureCount:i,error:o})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",r=!this.#r.canStart();try{if(a)t();else{this.#a({type:"pending",variables:e,isPaused:r}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#a({type:"pending",context:o,variables:e,isPaused:r})}const i=await this.#r.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#a({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Gr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function iY(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var C8e=class extends rh{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new _8e({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=HC(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=HC(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=HC(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(r=>r.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=HC(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Gr.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>UH(t,n))}findAll(e={}){return this.getAll().filter(t=>UH(e,t))}notify(e){Gr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Gr.batch(()=>Promise.all(e.map(t=>t.continue().catch(ho))))}};function HC(e){return e.options.scope?.id}var E8e=class extends rh{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),qC(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Qm(n.mutationKey)!==Qm(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#i(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#a(){const t=this.#n?.state??iY();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#i(t){Gr.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,a=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,a,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(t.data,null,n,a,r)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,a,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(void 0,t.error,n,a,r)}catch(i){Promise.reject(i)}}}this.listeners.forEach(n=>{n(this.#t)})})}},x8e=class extends rh{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,r=t.queryHash??YQ(a,t);let i=this.get(r);return i||(i=new f8e({client:e,queryKey:a,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Gr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>zH(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>zH(e,n)):t}notify(e){Gr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Gr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Gr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},B8e=class{#e;#t;#n;#r;#a;#i;#s;#o;constructor(e={}){this.#e=e.queryCache||new x8e,this.#t=e.mutationCache||new C8e,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=JQ.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=zC.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(a.queryHash)?.state.data,o=o8e(t,i);if(o!==void 0)return this.#e.build(this,a).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Gr.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Gr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Gr.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=Gr.batch(()=>this.#e.findAll(e).map(r=>r.cancel(n)));return Promise.all(a).then(ho).catch(ho)}invalidateQueries(e,t={}){return Gr.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=Gr.batch(()=>this.#e.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,n);return n.throwOnError||(i=i.catch(ho)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(a).then(ho)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ho).catch(ho)}fetchInfiniteQuery(e){return e.behavior=UC(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ho).catch(ho)}ensureInfiniteQueryData(e){return e.behavior=UC(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zC.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Qm(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{F0(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(Qm(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{F0(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=YQ(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===GC&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},oY=re.createContext(void 0),mu=e=>{const t=re.useContext(oY);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},I8e=({client:e,children:t})=>(re.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),F.jsx(oY.Provider,{value:e,children:t})),sY=re.createContext(!1),S8e=()=>re.useContext(sY);sY.Provider;function D8e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Q8e=re.createContext(D8e()),T8e=()=>re.useContext(Q8e),N8e=(e,t,n)=>{const a=n?.state.error&&typeof e.throwOnError=="function"?VQ(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},F8e=e=>{re.useEffect(()=>{e.clearReset()},[e])},L8e=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(r&&e.data===void 0||VQ(n,[e.error,a])),R8e=e=>{if(e.suspense){const n=r=>r==="static"?r:Math.max(r??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...r)=>n(a(...r)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},M8e=(e,t)=>e.isLoading&&e.isFetching&&!t,O8e=(e,t)=>e?.suspense&&t.isPending,cY=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function lY(e,t,n){if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const a=S8e(),r=T8e(),i=mu(),o=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const s=i.getQueryCache().get(o.queryHash);process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=a?"isRestoring":"optimistic",R8e(o),N8e(o,r,s),F8e(r);const l=!i.getQueryCache().get(o.queryHash),[u]=re.useState(()=>new t(i,o)),d=u.getOptimisticResult(o),p=!a&&e.subscribed!==!1;if(re.useSyncExternalStore(re.useCallback(m=>{const A=p?u.subscribe(Gr.batchCalls(m)):ho;return u.updateResult(),A},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),re.useEffect(()=>{u.setOptions(o)},[o,u]),O8e(o,d))throw cY(o,u,r);if(L8e({result:d,errorResetBoundary:r,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!Dm&&M8e(d,a)&&(l?cY(o,u,r):s?.promise)?.catch(ho).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function Tm(e,t){return lY(e,tY)}function Au(e,t){const n=mu(),[a]=re.useState(()=>new E8e(n,e));re.useEffect(()=>{a.setOptions(e)},[a,e]);const r=re.useSyncExternalStore(re.useCallback(o=>a.subscribe(Gr.batchCalls(o)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),i=re.useCallback((o,s)=>{a.mutate(o,s).catch(ho)},[a]);if(r.error&&VQ(a.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}function P8e(e,t){return lY(e,v8e)}const xn=e=>typeof e=="string",L0=()=>{let e,t;const n=new Promise((a,r)=>{e=a,t=r});return n.resolve=e,n.reject=t,n},uY=e=>e==null?"":""+e,$8e=(e,t,n)=>{e.forEach(a=>{t[a]&&(n[a]=t[a])})},j8e=/###/g,dY=e=>e&&e.indexOf("###")>-1?e.replace(j8e,"."):e,pY=e=>!e||xn(e),R0=(e,t,n)=>{const a=xn(t)?t.split("."):t;let r=0;for(;r<a.length-1;){if(pY(e))return{};const i=dY(a[r]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++r}return pY(e)?{}:{obj:e,k:dY(a[r])}},mY=(e,t,n)=>{const{obj:a,k:r}=R0(e,t,Object);if(a!==void 0||t.length===1){a[r]=n;return}let i=t[t.length-1],o=t.slice(0,t.length-1),s=R0(e,o,Object);for(;s.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),s=R0(e,o,Object),s?.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},q8e=(e,t,n,a)=>{const{obj:r,k:i}=R0(e,t,Object);r[i]=r[i]||[],r[i].push(n)},YC=(e,t)=>{const{obj:n,k:a}=R0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,a))return n[a]},G8e=(e,t,n)=>{const a=YC(e,n);return a!==void 0?a:YC(t,n)},AY=(e,t,n)=>{for(const a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?xn(e[a])||e[a]instanceof String||xn(t[a])||t[a]instanceof String?n&&(e[a]=t[a]):AY(e[a],t[a],n):e[a]=t[a]);return e},Nm=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var z8e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const U8e=e=>xn(e)?e.replace(/[&<>"'\/]/g,t=>z8e[t]):e;class H8e{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}}const Y8e=[" ",",","?","!",";"],W8e=new H8e(20),K8e=(e,t,n)=>{t=t||"",n=n||"";const a=Y8e.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(a.length===0)return!0;const r=W8e.getRegExp(`(${a.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!r.test(e);if(!i){const o=e.indexOf(n);o>0&&!r.test(e.substring(0,o))&&(i=!0)}return i},r4=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const a=t.split(n);let r=e;for(let i=0;i<a.length;){if(!r||typeof r!="object")return;let o,s="";for(let l=i;l<a.length;++l)if(l!==i&&(s+=n),s+=a[l],o=r[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<a.length-1)continue;i+=l-i+1;break}r=o}return r},M0=e=>e?.replace(/_/g,"-"),Z8e={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class WC{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Z8e,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,a,r){return r&&!this.debug?null:(xn(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new WC(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new WC(this.logger,t)}}var dl=new WC;class KC{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const r=this.observers[a].get(n)||0;this.observers[a].set(n,r+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([r,i])=>{for(let o=0;o<i;o++)r(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,i])=>{for(let o=0;o<i;o++)r.apply(r,[t,...n])})}}class gY extends KC{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,a,r={}){const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],a&&(Array.isArray(a)?s.push(...a):xn(a)&&i?s.push(...a.split(i)):s.push(a)));const l=YC(this.data,s);return!l&&!n&&!a&&t.indexOf(".")>-1&&(t=s[0],n=s[1],a=s.slice(2).join(".")),l||!o||!xn(a)?l:r4(this.data?.[t]?.[n],a,i)}addResource(t,n,a,r,i={silent:!1}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];a&&(s=s.concat(o?a.split(o):a)),t.indexOf(".")>-1&&(s=t.split("."),r=n,n=s[1]),this.addNamespaces(n),mY(this.data,s,r),i.silent||this.emit("added",t,n,a,r)}addResources(t,n,a,r={silent:!1}){for(const i in a)(xn(a[i])||Array.isArray(a[i]))&&this.addResource(t,n,i,a[i],{silent:!0});r.silent||this.emit("added",t,n,a)}addResourceBundle(t,n,a,r,i,o={silent:!1,skipCopy:!1}){let s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),r=a,a=n,n=s[1]),this.addNamespaces(n);let l=YC(this.data,s)||{};o.skipCopy||(a=JSON.parse(JSON.stringify(a))),r?AY(l,a,i):l={...l,...a},mY(this.data,s,l),o.silent||this.emit("added",t,n,a)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var hY={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,a,r){return e.forEach(i=>{t=this.processors[i]?.process(t,n,a,r)??t}),t}};const fY=Symbol("i18next/PATH_KEY");function V8e(){const e=[],t=Object.create(null);let n;return t.get=(a,r)=>(n?.revoke?.(),r===fY?e:(e.push(r),n=Proxy.revocable(a,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function O0(e,t){const{[fY]:n}=e(V8e()),a=t?.keySeparator??".",r=t?.nsSeparator??":";if(n.length>1&&r){const i=t?.ns;if((i?Array.isArray(i)?i:[i]:[]).includes(n[0]))return`${n[0]}${r}${n.slice(1).join(a)}`}return n.join(a)}const bY={},i4=e=>!xn(e)&&typeof e!="boolean"&&typeof e!="number";class ZC extends KC{constructor(t,n={}){super(),$8e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=dl.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const a={...n};if(t==null)return!1;const r=this.resolve(t,a);if(r?.res===void 0)return!1;const i=i4(r.res);return!(a.returnObjects===!1&&i)}extractFromKey(t,n){let a=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=a&&t.indexOf(a)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!K8e(t,a,r);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:xn(i)?[i]:i};const u=t.split(a);(a!==r||a===r&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(r)}return{key:t,namespaces:xn(i)?[i]:i}}translate(t,n,a){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";typeof t=="function"&&(t=O0(t,{...this.options,...r})),Array.isArray(t)||(t=[String(t)]),t=t.map(R=>typeof R=="function"?O0(R,{...this.options,...r}):String(R));const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],r),u=l[l.length-1];let d=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const p=r.lng||this.language,m=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return m?i?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${d}${s}`:i?{res:s,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:s;const A=this.resolve(t,r);let g=A?.res;const h=A?.usedKey||s,f=A?.exactUsedKey||s,b=["[object Number]","[object Function]","[object RegExp]"],y=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,k=r.count!==void 0&&!xn(r.count),C=ZC.hasDefaultValue(r),E=k?this.pluralResolver.getSuffix(p,r.count,r):"",_=r.ordinal&&k?this.pluralResolver.getSuffix(p,r.count,{ordinal:!1}):"",x=k&&!r.ordinal&&r.count===0,S=x&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${E}`]||r[`defaultValue${_}`]||r.defaultValue;let I=g;w&&!g&&C&&(I=S);const D=i4(I),Q=Object.prototype.toString.apply(I);if(w&&I&&D&&b.indexOf(Q)<0&&!(xn(y)&&Array.isArray(I))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const R=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,I,{...r,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(A.res=R,A.usedParams=this.getUsedParamsDetails(r),A):R}if(o){const R=Array.isArray(I),B=R?[]:{},T=R?f:h;for(const N in I)if(Object.prototype.hasOwnProperty.call(I,N)){const L=`${T}${o}${N}`;C&&!g?B[N]=this.translate(L,{...r,defaultValue:i4(S)?S[N]:void 0,joinArrays:!1,ns:l}):B[N]=this.translate(L,{...r,joinArrays:!1,ns:l}),B[N]===L&&(B[N]=I[N])}g=B}}else if(w&&xn(y)&&Array.isArray(g))g=g.join(y),g&&(g=this.extendTranslation(g,t,r,a));else{let R=!1,B=!1;!this.isValidLookup(g)&&C&&(R=!0,g=S),this.isValidLookup(g)||(B=!0,g=s);const N=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:g,L=C&&S!==g&&this.options.updateMissing;if(B||R||L){if(this.logger.log(L?"updateKey":"missingKey",p,u,s,L?S:g),o){const $=this.resolve(s,{...r,keySeparator:!1});$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let $=0;$<O.length;$++)M.push(O[$]);else this.options.saveMissingTo==="all"?M=this.languageUtils.toResolveHierarchy(r.lng||this.language):M.push(r.lng||this.language);const P=($,q,j)=>{const W=C&&j!==g?j:N;this.options.missingKeyHandler?this.options.missingKeyHandler($,u,q,W,L,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing($,u,q,W,L,r),this.emit("missingKey",$,u,q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?M.forEach($=>{const q=this.pluralResolver.getSuffixes($,r);x&&r[`defaultValue${this.options.pluralSeparator}zero`]&&q.indexOf(`${this.options.pluralSeparator}zero`)<0&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(j=>{P([$],s+j,r[`defaultValue${j}`]||S)})}):P(M,s,S))}g=this.extendTranslation(g,t,r,A,a),B&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(B||R)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,R?g:void 0,r))}return i?(A.res=g,A.usedParams=this.getUsedParamsDetails(r),A):g}extendTranslation(t,n,a,r,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const l=xn(t)&&(a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const p=t.match(this.interpolator.nestingRegexp);u=p&&p.length}let d=a.replace&&!xn(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,a.lng||this.language||r.usedLng,a),l){const p=t.match(this.interpolator.nestingRegexp),m=p&&p.length;u<m&&(a.nest=!1)}!a.lng&&r&&r.res&&(a.lng=this.language||r.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,(...p)=>i?.[0]===p[0]&&!a.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),a)),a.interpolation&&this.interpolator.reset()}const o=a.postProcess||this.options.postProcess,s=xn(o)?[o]:o;return t!=null&&s?.length&&a.applyPostProcessor!==!1&&(t=hY.handle(s,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t,n={}){let a,r,i,o,s;return xn(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?O0(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(a))return;const u=this.extractFromKey(l,n),d=u.key;r=d;let p=u.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const m=n.count!==void 0&&!xn(n.count),A=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(xn(n.context)||typeof n.context=="number")&&n.context!=="",h=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);p.forEach(f=>{this.isValidLookup(a)||(s=f,!bY[`${h[0]}-${f}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(bY[`${h[0]}-${f}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(b=>{if(this.isValidLookup(a))return;o=b;const y=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,d,b,f,n);else{let k;m&&(k=this.pluralResolver.getSuffix(b,n.count,n));const C=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&k.indexOf(E)===0&&y.push(d+k.replace(E,this.options.pluralSeparator)),y.push(d+k),A&&y.push(d+C)),g){const _=`${d}${this.options.contextSeparator||"_"}${n.context}`;y.push(_),m&&(n.ordinal&&k.indexOf(E)===0&&y.push(_+k.replace(E,this.options.pluralSeparator)),y.push(_+k),A&&y.push(_+C))}}let w;for(;w=y.pop();)this.isValidLookup(a)||(i=w,a=this.getResource(b,f,w,n))}))})}),{res:a,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,a,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,a,r):this.resourceStore.getResource(t,n,a,r)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!xn(t.replace);let r=a?t.replace:t;if(a&&typeof t.count<"u"&&(r.count=t.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!a){r={...r};for(const i of n)delete r[i]}return r}static hasDefaultValue(t){const n="defaultValue";for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&n===a.substring(0,n.length)&&t[a]!==void 0)return!0;return!1}}class yY{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dl.create("languageUtils")}getScriptPartFromCode(t){if(t=M0(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=M0(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(xn(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(a=>{if(n)return;const r=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&t.forEach(a=>{if(n)return;const r=this.getScriptPartFromCode(a);if(this.isSupportedCode(r))return n=r;const i=this.getLanguagePartFromCode(a);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),xn(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let a=t[n];return a||(a=t[this.getScriptPartFromCode(n)]),a||(a=t[this.formatLanguageCode(n)]),a||(a=t[this.getLanguagePartFromCode(n)]),a||(a=t.default),a||[]}toResolveHierarchy(t,n){const a=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),r=[],i=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return xn(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):xn(t)&&i(this.formatLanguageCode(t)),a.forEach(o=>{r.indexOf(o)<0&&i(this.formatLanguageCode(o))}),r}}const wY={zero:0,one:1,two:2,few:3,many:4,other:5},kY={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class J8e{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=dl.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const a=M0(t==="dev"?"en":t),r=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:a,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(a,{type:r})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),kY;if(!t.match(/-|_/))return kY;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,n)}return this.pluralRulesCache[i]=o,o}needsPlural(t,n={}){let a=this.getRule(t,n);return a||(a=this.getRule("dev",n)),a?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,a={}){return this.getSuffixes(t,a).map(r=>`${n}${r}`)}getSuffixes(t,n={}){let a=this.getRule(t,n);return a||(a=this.getRule("dev",n)),a?a.resolvedOptions().pluralCategories.sort((r,i)=>wY[r]-wY[i]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(t,n,a={}){const r=this.getRule(t,a);return r?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,a))}}const vY=(e,t,n,a=".",r=!0)=>{let i=G8e(e,t,n);return!i&&r&&xn(n)&&(i=r4(e,n,a),i===void 0&&(i=r4(t,n,a))),i},o4=e=>e.replace(/\$/g,"$$$$");class _Y{constructor(t={}){this.logger=dl.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:a,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:p,nestingPrefix:m,nestingPrefixEscaped:A,nestingSuffix:g,nestingSuffixEscaped:h,nestingOptionsSeparator:f,maxReplaces:b,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:U8e,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=i?Nm(i):o||"{{",this.suffix=s?Nm(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?Nm(m):A||Nm("$t("),this.nestingSuffix=g?Nm(g):h||Nm(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=b||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,a)=>n?.source===a?(n.lastIndex=0,n):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,a,r){let i,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=A=>{if(A.indexOf(this.formatSeparator)<0){const b=vY(n,l,A,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,a,{...r,...n,interpolationkey:A}):b}const g=A.split(this.formatSeparator),h=g.shift().trim(),f=g.join(this.formatSeparator).trim();return this.format(vY(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),f,a,{...r,...n,interpolationkey:h})};this.resetRegExp();const d=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:A=>o4(A)},{regex:this.regexp,safeValue:A=>this.escapeValue?o4(this.escape(A)):o4(A)}].forEach(A=>{for(s=0;i=A.regex.exec(t);){const g=i[1].trim();if(o=u(g),o===void 0)if(typeof d=="function"){const f=d(t,i,r);o=xn(f)?f:""}else if(r&&Object.prototype.hasOwnProperty.call(r,g))o="";else if(p){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),o="";else!xn(o)&&!this.useRawValueToEscape&&(o=uY(o));const h=A.safeValue(o);if(t=t.replace(i[0],h),p?(A.regex.lastIndex+=o.length,A.regex.lastIndex-=i[0].length):A.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n,a={}){let r,i,o;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const p=l.split(new RegExp(`${Nm(d)}[ ]*{`));let m=`{${p[1]}`;l=p[0],m=this.interpolate(m,o);const A=m.match(/'/g),g=m.match(/"/g);((A?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{o=JSON.parse(m),u&&(o={...u,...o})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,h),`${l}${d}${m}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;r=this.nestingRegexp.exec(t);){let l=[];o={...a},o=o.replace&&!xn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(u!==-1&&(l=r[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),i=n(s.call(this,r[1].trim(),o),o),i&&r[0]===t&&!xn(i))return i;xn(i)||(i=uY(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((d,p)=>this.format(d,p,a.lng,{...a,interpolationkey:r[1].trim()}),i.trim())),t=t.replace(r[0],i),this.regexp.lastIndex=0}return t}}const X8e=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const a=e.split("(");t=a[0].toLowerCase().trim();const r=a[1].substring(0,a[1].length-1);t==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):t==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},CY=e=>{const t={};return(n,a,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const o=a+JSON.stringify(i);let s=t[o];return s||(s=e(M0(a),r),t[o]=s),s(n)}},eNe=e=>(t,n,a)=>e(M0(n),a)(t);class tNe{constructor(t={}){this.logger=dl.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const a=n.cacheInBuiltFormats?CY:eNe;this.formats={number:a((r,i)=>{const o=new Intl.NumberFormat(r,{...i});return s=>o.format(s)}),currency:a((r,i)=>{const o=new Intl.NumberFormat(r,{...i,style:"currency"});return s=>o.format(s)}),datetime:a((r,i)=>{const o=new Intl.DateTimeFormat(r,{...i});return s=>o.format(s)}),relativetime:a((r,i)=>{const o=new Intl.RelativeTimeFormat(r,{...i});return s=>o.format(s,i.range||"day")}),list:a((r,i)=>{const o=new Intl.ListFormat(r,{...i});return s=>o.format(s)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=CY(n)}format(t,n,a,r={}){const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{const{formatName:u,formatOptions:d}=X8e(l);if(this.formats[u]){let p=s;try{const m=r?.formatParams?.[r.interpolationkey]||{},A=m.locale||m.lng||r.locale||r.lng||a;p=this.formats[u](s,A,{...d,...r,...m})}catch(m){this.logger.warn(m)}return p}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}const nNe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class aNe extends KC{constructor(t,n,a,r={}){super(),this.backend=t,this.store=n,this.services=a,this.languageUtils=a.languageUtils,this.options=r,this.logger=dl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(a,r.backend,r)}queueLoad(t,n,a,r){const i={},o={},s={},l={};return t.forEach(u=>{let d=!0;n.forEach(p=>{const m=`${u}|${p}`;!a.reload&&this.store.hasResourceBundle(u,p)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?o[m]===void 0&&(o[m]=!0):(this.state[m]=1,d=!1,o[m]===void 0&&(o[m]=!0),i[m]===void 0&&(i[m]=!0),l[p]===void 0&&(l[p]=!0)))}),d||(s[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,a){const r=t.split("|"),i=r[0],o=r[1];n&&this.emit("failedLoading",i,o,n),!n&&a&&this.store.addResourceBundle(i,o,a,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&a&&(this.state[t]=0);const s={};this.queue.forEach(l=>{q8e(l.loaded,[i],o),nNe(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(p=>{s[u][p]===void 0&&(s[u][p]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,a,r=0,i=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:a,tried:r,wait:i,callback:o});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(u&&d&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,a,r+1,i*2,o)},i);return}o(u,d)},l=this.backend[a].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,n,s)}prepareLoading(t,n,a={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();xn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),xn(n)&&(n=[n]);const i=this.queueLoad(t,n,a,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,a){this.prepareLoading(t,n,{},a)}reload(t,n,a){this.prepareLoading(t,n,{reload:!0},a)}loadOne(t,n=""){const a=t.split("|"),r=a[0],i=a[1];this.read(r,i,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${r} failed`,o),!o&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${r}`,s),this.loaded(t,o,s)})}saveMissing(t,n,a,r,i,o={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${a}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend?.create){const l={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,a,r,l):d=u(t,n,a,r),d&&typeof d.then=="function"?d.then(p=>s(null,p)).catch(s):s(null,d)}catch(d){s(d)}else u(t,n,a,r,s,l)}!t||!t[0]||this.store.addResource(t[0],n,a,r)}}}const s4=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),xn(e[1])&&(t.defaultValue=e[1]),xn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(a=>{t[a]=n[a]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),EY=e=>(xn(e.ns)&&(e.ns=[e.ns]),xn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),xn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),VC=()=>{},rNe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},xY="__i18next_supportNoticeShown",iNe=()=>typeof globalThis<"u"&&!!globalThis[xY],oNe=()=>{typeof globalThis<"u"&&(globalThis[xY]=!0)},sNe=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(t=>t?.projectId));class P0 extends KC{constructor(t={},n){if(super(),this.options=EY(t),this.services={},this.logger=dl,this.modules={external:[]},rNe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(xn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const a=s4();this.options={...a,...this.options,...EY(t)},this.options.interpolation={...a.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=a.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!sNe(this)&&!iNe()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),oNe());const r=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?dl.init(r(this.modules.logger),this.options):dl.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=tNe;const d=new yY(this.options);this.store=new gY(this.options.resources,this.options);const p=this.services;p.logger=dl,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new J8e(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==a.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(p.formatter=r(u),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new _Y(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new aNe(r(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(A,...g)=>{this.emit(A,...g)}),this.modules.languageDetector&&(p.languageDetector=r(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=r(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ZC(this.services,this.options),this.translator.on("*",(A,...g)=>{this.emit(A,...g)}),this.modules.external.forEach(A=>{A.init&&A.init(this)})}if(this.format=this.options.interpolation.format,n||(n=VC),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=L0(),l=()=>{const u=(d,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(p),n(d,p)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,n=VC){let a=n;const r=xn(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const i=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(s=>o(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(s)})}else a(null)}reloadResources(t,n,a){const r=L0();return typeof t=="function"&&(a=t,t=void 0),typeof n=="function"&&(a=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),a||(a=VC),this.services.backendConnector.reload(t,n,i=>{r.resolve(),a(i)}),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&hY.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const a=this.languages[n];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const a=L0();this.emit("languageChanging",t);const r=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},i=(s,l)=>{l?this.isLanguageChangingTo===t&&(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,a.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},o=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const l=xn(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(xn(s)?[s]:s);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),a}getFixedT(t,n,a){const r=(i,o,...s)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([i,o].concat(s)):l={...o},l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||a||r.keyPrefix);const u=this.options.keySeparator||".";let d;return l.keyPrefix&&Array.isArray(i)?d=i.map(p=>(typeof p=="function"&&(p=O0(p,{...this.options,...o})),`${l.keyPrefix}${u}${p}`)):(typeof i=="function"&&(i=O0(i,{...this.options,...o})),d=l.keyPrefix?`${l.keyPrefix}${u}${i}`:i),this.t(d,l)};return xn(t)?r.lng=t:r.lngs=t,r.ns=n,r.keyPrefix=a,r}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const a=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(a,t)&&(!r||o(i,t)))}loadNamespaces(t,n){const a=L0();return this.options.ns?(xn(t)&&(t=[t]),t.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{a.resolve(),n&&n(r)}),a):(n&&n(),Promise.resolve())}loadLanguages(t,n){const a=L0();xn(t)&&(t=[t]);const r=this.options.preload||[],i=t.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=r.concat(i),this.loadResources(o=>{a.resolve(),n&&n(o)}),a):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const r=new Intl.Locale(t);if(r&&r.getTextInfo){const i=r.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services?.languageUtils||new yY(s4());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(a.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const a=new P0(t,n);return a.createInstance=P0.createInstance,a}cloneInstance(t={},n=VC){const a=t.forkResourceStore;a&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},i=new P0(r);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},a){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,p)=>(d[p]={...l[u][p]},d),l[u]),l),{});i.store=new gY(s,r),i.services.resourceStore=i.store}if(t.interpolation){const l={...s4().interpolation,...this.options.interpolation,...t.interpolation},u={...r,interpolation:l};i.services.interpolator=new _Y(u)}return i.translator=new ZC(i.services,r),i.translator.on("*",(s,...l)=>{i.emit(s,...l)}),i.init(r,n),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ci=P0.createInstance();Ci.createInstance,Ci.dir,Ci.init,Ci.loadResources,Ci.reloadResources,Ci.use,Ci.changeLanguage,Ci.getFixedT,Ci.t,Ci.exists,Ci.setDefaultNamespace,Ci.hasLoadedNamespace,Ci.loadNamespaces,Ci.loadLanguages;var JC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cNe(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var r=!1;try{r=this instanceof a}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),n}const lNe=(e,t,n,a)=>{const r=[n,{code:t,...a||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);Fm(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)},BY={},IY=(e,t,n,a)=>{Fm(n)&&BY[n]||(Fm(n)&&(BY[n]=new Date),lNe(e,t,n,a))},SY=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},c4=(e,t,n)=>{e.loadNamespaces(t,SY(e,n))},DY=(e,t,n,a)=>{if(Fm(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return c4(e,n,a);n.forEach(r=>{e.options.ns.indexOf(r)<0&&e.options.ns.push(r)}),e.loadLanguages(t,SY(e,a))},uNe=(e,t,n={})=>!t.languages||!t.languages.length?(IY(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(a,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!r(a.isLanguageChangingTo,e))return!1}}),Fm=e=>typeof e=="string",dNe=e=>typeof e=="object"&&e!==null,pNe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,mNe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ANe=e=>mNe[e];let l4={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(pNe,ANe),transDefaultProps:void 0};const gNe=(e={})=>{l4={...l4,...e}},hNe=()=>l4;let QY;const fNe=e=>{QY=e},bNe=()=>QY,yNe={type:"3rdParty",init(e){gNe(e.options.react),fNe(e)}},wNe=ne.createContext();class kNe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var XC={exports:{}},u4={};var TY;function vNe(){if(TY)return u4;TY=1;var e=ne;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,r=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function s(p,m){var A=m(),g=a({inst:{value:A,getSnapshot:m}}),h=g[0].inst,f=g[1];return i(function(){h.value=A,h.getSnapshot=m,l(h)&&f({inst:h})},[p,A,m]),r(function(){return l(h)&&f({inst:h}),p(function(){l(h)&&f({inst:h})})},[p]),o(A),A}function l(p){var m=p.getSnapshot;p=p.value;try{var A=m();return!n(p,A)}catch{return!0}}function u(p,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return u4.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,u4}var d4={};var NY;function _Ne(){return NY||(NY=1,process.env.NODE_ENV!=="production"&&(function(){function e(A,g){return A===g&&(A!==0||1/A===1/g)||A!==A&&g!==g}function t(A,g){d||r.startTransition===void 0||(d=!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 h=g();if(!p){var f=g();i(h,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}f=o({inst:{value:h,getSnapshot:g}});var b=f[0].inst,y=f[1];return l(function(){b.value=h,b.getSnapshot=g,n(b)&&y({inst:b})},[A,h,g]),s(function(){return n(b)&&y({inst:b}),A(function(){n(b)&&y({inst:b})})},[A]),u(h),h}function n(A){var g=A.getSnapshot;A=A.value;try{var h=g();return!i(A,h)}catch{return!0}}function a(A,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=ne,i=typeof Object.is=="function"?Object.is:e,o=r.useState,s=r.useEffect,l=r.useLayoutEffect,u=r.useDebugValue,d=!1,p=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;d4.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),d4}var FY;function CNe(){return FY||(FY=1,process.env.NODE_ENV==="production"?XC.exports=vNe():XC.exports=_Ne()),XC.exports}var ENe=CNe();const xNe={t:(e,t)=>{if(Fm(t))return t;if(dNe(t)&&Fm(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},ready:!1},BNe=()=>()=>{},Da=(e,t={})=>{const{i18n:n}=t,{i18n:a,defaultNS:r}=ne.useContext(wNe)||{},i=n||a||bNe();i&&!i.reportNamespaces&&(i.reportNamespaces=new kNe),i||IY(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=ne.useMemo(()=>({...hNe(),...i?.options?.react,...t}),[i,t]),{useSuspense:s,keyPrefix:l}=o,u=r||i?.options?.defaultNS,d=Fm(u)?[u]:u||["translation"],p=ne.useMemo(()=>d,d);i?.reportNamespaces?.addUsedNamespaces?.(p);const m=ne.useRef(0),A=ne.useCallback(S=>{if(!i)return BNe;const{bindI18n:I,bindI18nStore:D}=o,Q=()=>{m.current+=1,S()};return I&&i.on(I,Q),D&&i.store.on(D,Q),()=>{I&&I.split(" ").forEach(R=>i.off(R,Q)),D&&D.split(" ").forEach(R=>i.store.off(R,Q))}},[i,o]),g=ne.useRef(),h=ne.useCallback(()=>{if(!i)return xNe;const S=!!(i.isInitialized||i.initializedStoreOnce)&&p.every(T=>uNe(T,i,o)),I=t.lng||i.language,D=m.current,Q=g.current;if(Q&&Q.ready===S&&Q.lng===I&&Q.keyPrefix===l&&Q.revision===D)return Q;const B={t:i.getFixedT(I,o.nsMode==="fallback"?p:p[0],l),ready:S,lng:I,keyPrefix:l,revision:D};return g.current=B,B},[i,p,l,o,t.lng]),[f,b]=ne.useState(0),{t:y,ready:w}=ENe.useSyncExternalStore(A,h,h);ne.useEffect(()=>{if(i&&!w&&!s){const S=()=>b(I=>I+1);t.lng?DY(i,t.lng,p,S):c4(i,p,S)}},[i,t.lng,p,w,s,f]);const k=i||{},C=ne.useRef(null),E=ne.useRef(),_=S=>{const I=Object.getOwnPropertyDescriptors(S);I.__original&&delete I.__original;const D=Object.create(Object.getPrototypeOf(S),I);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},x=ne.useMemo(()=>{const S=k,I=S?.language;let D=S;S&&(C.current&&C.current.__original===S?E.current!==I?(D=_(S),C.current=D,E.current=I):D=C.current:(D=_(S),C.current=D,E.current=I));const Q=[y,D,w];return Q.t=y,Q.i18n=D,Q.ready=w,Q},[y,k,w,k.resolvedLanguage,k.language,k.languages]);if(i&&s&&!w)throw new Promise(S=>{const I=()=>S();t.lng?DY(i,t.lng,p,I):c4(i,p,I)});return x};class LY extends Error{code;status;details;constructor(t,n){super(t.error.message),this.name="GentiqError",this.code=t.error.code,this.status=n,this.details=t.error.details}}function ih(e,t){const n=typeof e=="string"?e:e.code,a=`errors.${n}`,r=t(a);return r===a?typeof e!="string"&&e.message?e.message:n.replace(/_/g," ").replace(/\b\w/g,i=>i.toUpperCase()):r}let Ra={api:{basePath:"/api"},app:{basePath:"/",cacheNamespace:"gentiq"}},Ui={getToken:()=>localStorage.getItem("token"),setToken:e=>localStorage.setItem("token",e),clearToken:()=>{localStorage.removeItem("token")},getHeaders:()=>{const e=localStorage.getItem("token");return e?{Authorization:`Bearer ${e}`}:{}}};const Zt={init:e=>{if(Ra={...Ra,...e,api:e.api?{...Ra.api,...e.api}:Ra.api,app:e.app?{...Ra.app,...e.app}:Ra.app},e.api?.authAdapter){const t=e.api.authAdapter;Ui={...t,getHeaders:t.getHeaders||(()=>{const n=t.getToken();return n?{Authorization:`Bearer ${n}`}:{}})}}},getConfig:()=>Ra,getToken:()=>Ui.getToken(),setToken:e=>{Ui.setToken(e)},clearToken:()=>{Ui.clearToken()},getHeaders:()=>Ui.getHeaders(),getEndpoint:(e,t,...n)=>{const a=Ra.api?.endpoints?.[e];return a?typeof a=="function"?a(...n):a:typeof t=="function"?t(...n):t},handleResponse:async(e,t="Request failed")=>{if(!e.ok){const n=await e.json().catch(()=>({}));if(n.error&&(n.error.code||n.error.message))throw new LY(n,e.status);const a=n.error||n.message||t,r=new Error(a);throw r.status=e.status,r}return e.json()},login:async(e,t)=>{const n=Zt.getEndpoint("login","/public/auth/login"),a=await fetch(`${Ra.api?.basePath}${n}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:e,password:t})}),r=await Zt.handleResponse(a,"Login failed");return r.token&&Zt.setToken(r.token),r},register:async(e,t,n,a,r)=>{const i=Zt.getEndpoint("register","/public/auth/register"),o=await fetch(`${Ra.api?.basePath}${i}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:e,password:t,name:n,surname:a,metadata:r})}),s=await Zt.handleResponse(o,"Registration failed");return s.token&&Zt.setToken(s.token),s},getBalance:async()=>{const e=Zt.getEndpoint("balance","/users/balance"),t=await fetch(`${Ra.api?.basePath}${e}`,{headers:{...Ui.getHeaders()}});return Zt.handleResponse(t,"Failed to fetch balance")},getHistory:async(e=0,t=50)=>{const n=Zt.getEndpoint("threads","/chat/threads"),a=await fetch(`${Ra.api?.basePath}${n}?skip=${e}&limit=${t}`,{headers:{...Ui.getHeaders()}});return Zt.handleResponse(a,"Failed to fetch chat history")},getThreadMessages:async e=>{if(!Zt.getToken())throw new Error("No token found");const n=Zt.getEndpoint("threadMessages",r=>`/chat/threads/${r.replace(/^\//,"")}`,e),a=await fetch(`${Ra.api?.basePath}${n}`,{headers:{...Ui.getHeaders()}});return Zt.handleResponse(a,"Failed to fetch thread messages")},deleteThread:async e=>{if(!Zt.getToken())throw new Error("No token found");const n=Zt.getEndpoint("deleteThread",r=>`/chat/threads/${r.replace(/^\//,"")}`,e),a=await fetch(`${Ra.api?.basePath}${n}`,{method:"DELETE",headers:{...Ui.getHeaders()}});return Zt.handleResponse(a,"Failed to delete thread")},updateThreadTitle:async(e,t)=>{if(!Zt.getToken())throw new Error("No token found");const a=Zt.getEndpoint("updateThreadTitle",i=>`/chat/threads/${i.replace(/^\//,"")}`,e),r=await fetch(`${Ra.api?.basePath}${a}`,{method:"PATCH",headers:{"Content-Type":"application/json",...Ui.getHeaders()},body:JSON.stringify({title:t})});return Zt.handleResponse(r,"Failed to update thread title")},async getAttachmentBlobUrl(e){if(Ra.api?.attachmentResolver)return Ra.api.attachmentResolver(e);const t=Zt.getEndpoint("attachments",r=>`/chat/attachments/${r}`,e),n=await fetch(`${Ra.api?.basePath}${t}`,{headers:{...Ui.getHeaders()}});if(!n.ok)return Zt.handleResponse(n,"Failed to fetch attachment");const a=await n.blob();return URL.createObjectURL(a)},async getPublicAttachmentBlobUrl(e){const t=Zt.getEndpoint("sharedAttachments",r=>`/public/attachments/${r}`,e),n=await fetch(`${Ra.api?.basePath}${t}`,{headers:{"Content-Type":"application/json"}});if(!n.ok)return Zt.handleResponse(n,"Failed to fetch public attachment");const a=await n.blob();return URL.createObjectURL(a)},saveFeedback:async(e,t,n)=>{const a=Zt.getEndpoint("feedback","/chat/feedback"),r=await fetch(`${Ra.api?.basePath}${a}`,{method:"POST",headers:{"Content-Type":"application/json",...Ui.getHeaders()},body:JSON.stringify({thread_id:e.replace(/^\//,""),message_id:t,sentiment:n})});return Zt.handleResponse(r,"Failed to save feedback")},getMe:async()=>{const e=Zt.getEndpoint("me","/users/me"),t=await fetch(`${Ra.api?.basePath}${e}`,{headers:{...Ui.getHeaders()}});return Zt.handleResponse(t,"Failed to fetch user profile")},updateMe:async e=>{const t=Zt.getEndpoint("me","/users/me"),n=await fetch(`${Ra.api?.basePath}${t}`,{method:"PATCH",headers:{"Content-Type":"application/json",...Ui.getHeaders()},body:JSON.stringify(e)});return Zt.handleResponse(n,"Failed to update user profile")},pinThread:async(e,t)=>{if(!Zt.getToken())throw new Error("No token found");const a=Zt.getEndpoint("updateThreadTitle",i=>`/chat/threads/${i.replace(/^\//,"")}`,e),r=await fetch(`${Ra.api?.basePath}${a}`,{method:"PATCH",headers:{"Content-Type":"application/json",...Ui.getHeaders()},body:JSON.stringify({pinned:t})});return Zt.handleResponse(r,"Failed to pin thread")},shareThread:async e=>{if(!Zt.getToken())throw new Error("No token found");const n=Zt.getEndpoint("shareThread",r=>`/chat/threads/${r.replace(/^\//,"")}/share`,e),a=await fetch(`${Ra.api?.basePath}${n}`,{method:"POST",headers:{...Ui.getHeaders()}});return Zt.handleResponse(a,"Failed to share thread")},getSharedThread:async e=>{const t=Zt.getEndpoint("sharedThread",a=>`/public/shared/${a}`,e),n=await fetch(`${Ra.api?.basePath}${t}`,{headers:{"Content-Type":"application/json"}});return Zt.handleResponse(n,"Failed to fetch shared thread")}};function INe(e,t){const[n,a]=ne.useState(e.metadata?.feedback),r=ne.useCallback(o=>{navigator.clipboard.writeText(o).catch(s=>{console.error("Error copying text:",s)})},[]),i=ne.useCallback(async o=>{const s=n===o?void 0:o;a(s);try{const l=e.parts.find(d=>d.type==="data-message-id"),u=l?l.data[0].message_id:e.id;await Zt.saveFeedback(t,u,s??null)}catch(l){console.error("Error saving feedback:",l)}},[n,e,t]);return{feedback:n,handleFeedback:i,copy:r}}function p4(){const{i18n:e}=Da(),t=ne.useMemo(()=>{const n=Zt.getConfig();return{name:n.app?.name||void 0||"Gentiq",language:n.app?.language||e.language||"en",showToolDetails:n.app?.showToolDetails??!0}},[e.language]);return ne.useEffect(()=>{t.language&&(document.documentElement.dir=t.language==="fa"?"rtl":"ltr",document.documentElement.lang=t.language)},[t.language]),{appName:t.name||"Gentiq",language:t.language||e.language,isRtl:t.language==="fa",showToolDetails:!!t.showToolDetails,config:t,isLoading:!1,error:null}}function RY(e){const{part:t,message:n,status:a,regen:r,index:i,lastMessage:o,conversationId:s,isFinished:l,renderMessagePart:u,chat:d,readonly:p}=e,{showToolDetails:m}=p4(),{TextPart:A,ReasoningPart:g,ToolPart:h,FilePart:f,toolComponents:b,threadActions:y}=Zi(),{feedback:w,handleFeedback:k,copy:C}=INe(n,s);if(u){const S=u(t,n);if(S!==void 0)return F.jsx(F.Fragment,{children:S})}if(["data-progress-update","data-message-id","data-chat-finished","data-title"].includes(t.type))return null;const _=n.parts.filter(S=>!["data-progress-update","data-message-id","data-chat-finished","data-title"].includes(S.type)),x=t===_[_.length-1];return t.type==="text"?F.jsx(A,{part:t,message:n,status:a,isFinished:!!l,lastMessage:o,isLastVisiblePart:x,regen:r,feedback:w,handleFeedback:k,copyHost:C,feedbackEnabled:p?!1:y?.feedback??!1,retryEnabled:p?!1:y?.retry??!1}):t.type==="reasoning"?F.jsx(g,{part:t,status:a,index:i,partsCount:n.parts.length,lastMessage:o}):t.type.startsWith("tool-")||"toolCallId"in t?F.jsx(h,{part:t,message:n,chat:d,toolComponents:b,showToolCalls:!!m}):t.type==="file"?F.jsx(f,{part:t,message:n}):null}function MY(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=MY(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function m4(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=MY(e))&&(a&&(a+=" "),a+=t);return a}const SNe=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},DNe=(e,t)=>({classGroupId:e,validator:t}),OY=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),e1="-",PY=[],QNe="arbitrary..",TNe=e=>{const t=FNe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return NNe(o);const s=o.split(e1),l=s[0]===""&&s.length>1?1:0;return $Y(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=a[o],u=n[o];return l?u?SNe(u,l):l:u||PY}return n[o]||PY}}},$Y=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const u=$Y(e,t+1,i);if(u)return u}const o=n.validators;if(o===null)return;const s=t===0?e.join(e1):e.slice(t).join(e1),l=o.length;for(let u=0;u<l;u++){const d=o[u];if(d.validator(s))return d.classGroupId}},NNe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?QNe+a:void 0})(),FNe=e=>{const{theme:t,classGroups:n}=e;return LNe(n,t)},LNe=(e,t)=>{const n=OY();for(const a in e){const r=e[a];A4(r,n,a,t)}return n},A4=(e,t,n,a)=>{const r=e.length;for(let i=0;i<r;i++){const o=e[i];RNe(o,t,n,a)}},RNe=(e,t,n,a)=>{if(typeof e=="string"){MNe(e,t,n);return}if(typeof e=="function"){ONe(e,t,n,a);return}PNe(e,t,n,a)},MNe=(e,t,n)=>{const a=e===""?t:jY(t,e);a.classGroupId=n},ONe=(e,t,n,a)=>{if($Ne(e)){A4(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(DNe(n,e))},PNe=(e,t,n,a)=>{const r=Object.entries(e),i=r.length;for(let o=0;o<i;o++){const[s,l]=r[o];A4(l,jY(t,s),n,a)}},jY=(e,t)=>{let n=e;const a=t.split(e1),r=a.length;for(let i=0;i<r;i++){const o=a[i];let s=n.nextPart.get(o);s||(s=OY(),n.nextPart.set(o,s)),n=s}return n},$Ne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jNe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const r=(i,o)=>{n[i]=o,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(i){let o=n[i];if(o!==void 0)return o;if((o=a[i])!==void 0)return r(i,o),o},set(i,o){i in n?n[i]=o:r(i,o)}}},g4="!",qY=":",qNe=[],GY=(e,t,n,a,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:r}),GNe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=r=>{const i=[];let o=0,s=0,l=0,u;const d=r.length;for(let h=0;h<d;h++){const f=r[h];if(o===0&&s===0){if(f===qY){i.push(r.slice(l,h)),l=h+1;continue}if(f==="/"){u=h;continue}}f==="["?o++:f==="]"?o--:f==="("?s++:f===")"&&s--}const p=i.length===0?r:r.slice(l);let m=p,A=!1;p.endsWith(g4)?(m=p.slice(0,-1),A=!0):p.startsWith(g4)&&(m=p.slice(1),A=!0);const g=u&&u>l?u-l:void 0;return GY(i,A,m,g)};if(t){const r=t+qY,i=a;a=o=>o.startsWith(r)?i(o.slice(r.length)):GY(qNe,!1,o,void 0,!0)}if(n){const r=a;a=i=>n({className:i,parseClassName:r})}return a},zNe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let r=[];for(let i=0;i<n.length;i++){const o=n[i],s=o[0]==="[",l=t.has(o);s||l?(r.length>0&&(r.sort(),a.push(...r),r=[]),a.push(o)):r.push(o)}return r.length>0&&(r.sort(),a.push(...r)),a}},UNe=e=>({cache:jNe(e.cacheSize),parseClassName:GNe(e),sortModifiers:zNe(e),...TNe(e)}),HNe=/\s+/,YNe=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:i}=t,o=[],s=e.trim().split(HNe);let l="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:p,modifiers:m,hasImportantModifier:A,baseClassName:g,maybePostfixModifierPosition:h}=n(d);if(p){l=d+(l.length>0?" "+l:l);continue}let f=!!h,b=a(f?g.substring(0,h):g);if(!b){if(!f){l=d+(l.length>0?" "+l:l);continue}if(b=a(g),!b){l=d+(l.length>0?" "+l:l);continue}f=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),w=A?y+g4:y,k=w+b;if(o.indexOf(k)>-1)continue;o.push(k);const C=r(b,f);for(let E=0;E<C.length;++E){const _=C[E];o.push(w+_)}l=d+(l.length>0?" "+l:l)}return l},WNe=(...e)=>{let t=0,n,a,r="";for(;t<e.length;)(n=e[t++])&&(a=zY(n))&&(r&&(r+=" "),r+=a);return r},zY=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=zY(e[a]))&&(n&&(n+=" "),n+=t);return n},KNe=(e,...t)=>{let n,a,r,i;const o=l=>{const u=t.reduce((d,p)=>p(d),e());return n=UNe(u),a=n.cache.get,r=n.cache.set,i=s,s(l)},s=l=>{const u=a(l);if(u)return u;const d=YNe(l,n);return r(l,d),d};return i=o,(...l)=>i(WNe(...l))},ZNe=[],zr=e=>{const t=n=>n[e]||ZNe;return t.isThemeGetter=!0,t},UY=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,HY=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VNe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,JNe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XNe=/\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$/,eFe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tFe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nFe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$d=e=>VNe.test(e),Mn=e=>!!e&&!Number.isNaN(Number(e)),jd=e=>!!e&&Number.isInteger(Number(e)),h4=e=>e.endsWith("%")&&Mn(e.slice(0,-1)),gu=e=>JNe.test(e),YY=()=>!0,aFe=e=>XNe.test(e)&&!eFe.test(e),f4=()=>!1,rFe=e=>tFe.test(e),iFe=e=>nFe.test(e),oFe=e=>!en(e)&&!tn(e),sFe=e=>qd(e,XY,f4),en=e=>UY.test(e),Lm=e=>qd(e,eW,aFe),WY=e=>qd(e,gFe,Mn),cFe=e=>qd(e,nW,YY),lFe=e=>qd(e,tW,f4),KY=e=>qd(e,VY,f4),uFe=e=>qd(e,JY,iFe),t1=e=>qd(e,aW,rFe),tn=e=>HY.test(e),$0=e=>Rm(e,eW),dFe=e=>Rm(e,tW),ZY=e=>Rm(e,VY),pFe=e=>Rm(e,XY),mFe=e=>Rm(e,JY),n1=e=>Rm(e,aW,!0),AFe=e=>Rm(e,nW,!0),qd=(e,t,n)=>{const a=UY.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Rm=(e,t,n=!1)=>{const a=HY.exec(e);return a?a[1]?t(a[1]):n:!1},VY=e=>e==="position"||e==="percentage",JY=e=>e==="image"||e==="url",XY=e=>e==="length"||e==="size"||e==="bg-size",eW=e=>e==="length",gFe=e=>e==="number",tW=e=>e==="family-name",nW=e=>e==="number"||e==="weight",aW=e=>e==="shadow",rW=KNe(()=>{const e=zr("color"),t=zr("font"),n=zr("text"),a=zr("font-weight"),r=zr("tracking"),i=zr("leading"),o=zr("breakpoint"),s=zr("container"),l=zr("spacing"),u=zr("radius"),d=zr("shadow"),p=zr("inset-shadow"),m=zr("text-shadow"),A=zr("drop-shadow"),g=zr("blur"),h=zr("perspective"),f=zr("aspect"),b=zr("ease"),y=zr("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...k(),tn,en],E=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],x=()=>[tn,en,l],S=()=>[$d,"full","auto",...x()],I=()=>[jd,"none","subgrid",tn,en],D=()=>["auto",{span:["full",jd,tn,en]},jd,tn,en],Q=()=>[jd,"auto",tn,en],R=()=>["auto","min","max","fr",tn,en],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],T=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...x()],L=()=>[$d,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],M=()=>[$d,"screen","full","dvw","lvw","svw","min","max","fit",...x()],O=()=>[$d,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],P=()=>[e,tn,en],$=()=>[...k(),ZY,KY,{position:[tn,en]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",pFe,sFe,{size:[tn,en]}],W=()=>[h4,$0,Lm],U=()=>["","none","full",u,tn,en],X=()=>["",Mn,$0,Lm],Y=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[Mn,h4,ZY,KY],J=()=>["","none",g,tn,en],ee=()=>["none",Mn,tn,en],V=()=>["none",Mn,tn,en],pe=()=>[Mn,tn,en],ue=()=>[$d,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gu],breakpoint:[gu],color:[YY],container:[gu],"drop-shadow":[gu],ease:["in","out","in-out"],font:[oFe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gu],shadow:[gu],spacing:["px",Mn],text:[gu],"text-shadow":[gu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$d,en,tn,f]}],container:["container"],columns:[{columns:[Mn,en,tn,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{"inset-s":S(),start:S()}],end:[{"inset-e":S(),end:S()}],"inset-bs":[{"inset-bs":S()}],"inset-be":[{"inset-be":S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[jd,"auto",tn,en]}],basis:[{basis:[$d,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Mn,$d,"auto","initial","none",en]}],grow:[{grow:["",Mn,tn,en]}],shrink:[{shrink:["",Mn,tn,en]}],order:[{order:[jd,"first","last","none",tn,en]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...T(),"normal"]}],"justify-self":[{"justify-self":["auto",...T()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...T(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...T(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...T(),"baseline"]}],"place-self":[{"place-self":["auto",...T()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],"inline-size":[{inline:["auto",...M()]}],"min-inline-size":[{"min-inline":["auto",...M()]}],"max-inline-size":[{"max-inline":["none",...M()]}],"block-size":[{block:["auto",...O()]}],"min-block-size":[{"min-block":["auto",...O()]}],"max-block-size":[{"max-block":["none",...O()]}],w:[{w:[s,"screen",...L()]}],"min-w":[{"min-w":[s,"screen","none",...L()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,$0,Lm]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,AFe,cFe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",h4,en]}],"font-family":[{font:[dFe,lFe,t]}],"font-features":[{"font-features":[en]}],"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:[r,tn,en]}],"line-clamp":[{"line-clamp":[Mn,"none",tn,WY]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",tn,en]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",tn,en]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[Mn,"from-font","auto",tn,Lm]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Mn,"auto",tn,en]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",tn,en]}],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",tn,en]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jd,tn,en],radial:["",tn,en],conic:[jd,tn,en]},mFe,uFe]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Mn,tn,en]}],"outline-w":[{outline:["",Mn,$0,Lm]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,n1,t1]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",p,n1,t1]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Mn,Lm]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",m,n1,t1]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Mn,tn,en]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[Mn]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[tn,en]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[Mn]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",tn,en]}],filter:[{filter:["","none",tn,en]}],blur:[{blur:J()}],brightness:[{brightness:[Mn,tn,en]}],contrast:[{contrast:[Mn,tn,en]}],"drop-shadow":[{"drop-shadow":["","none",A,n1,t1]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",Mn,tn,en]}],"hue-rotate":[{"hue-rotate":[Mn,tn,en]}],invert:[{invert:["",Mn,tn,en]}],saturate:[{saturate:[Mn,tn,en]}],sepia:[{sepia:["",Mn,tn,en]}],"backdrop-filter":[{"backdrop-filter":["","none",tn,en]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[Mn,tn,en]}],"backdrop-contrast":[{"backdrop-contrast":[Mn,tn,en]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Mn,tn,en]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Mn,tn,en]}],"backdrop-invert":[{"backdrop-invert":["",Mn,tn,en]}],"backdrop-opacity":[{"backdrop-opacity":[Mn,tn,en]}],"backdrop-saturate":[{"backdrop-saturate":[Mn,tn,en]}],"backdrop-sepia":[{"backdrop-sepia":["",Mn,tn,en]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",tn,en]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Mn,"initial",tn,en]}],ease:[{ease:["linear","initial",b,tn,en]}],delay:[{delay:[Mn,tn,en]}],animate:[{animate:["none",y,tn,en]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,tn,en]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[tn,en,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",tn,en]}],"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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",tn,en]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[Mn,$0,Lm,WY]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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 Ct(...e){return rW(m4(e))}function b4(e,t){if(t==="/")return e;const n=e.endsWith("/")?e.slice(0,-1):e,a=t.startsWith("/")?t:"/"+t;return n+a}const a1=({className:e,...t})=>F.jsx("div",{className:Ct("flex items-center gap-1.5 px-1 py-3",e),...t,children:[0,1,2].map(n=>F.jsx("span",{className:"size-2 rounded-full bg-primary/70",style:{animation:"typing-bounce 1.2s ease-in-out infinite",animationDelay:`${n*.18}s`}},n))}),hFe=/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;function oh(e,t="ltr"){if(!e)return t;for(const n of e){if(hFe.test(n))return"rtl";if(/[A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8]/.test(n))return"ltr"}return"ltr"}const fFe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bFe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),iW=e=>{const t=bFe(e);return t.charAt(0).toUpperCase()+t.slice(1)},oW=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),yFe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var wFe={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"};const kFe=ne.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:r="",children:i,iconNode:o,...s},l)=>ne.createElement("svg",{ref:l,...wFe,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:oW("lucide",r),...!i&&!yFe(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,d])=>ne.createElement(u,d)),...Array.isArray(i)?i:[i]]));const un=(e,t)=>{const n=ne.forwardRef(({className:a,...r},i)=>ne.createElement(kFe,{ref:i,iconNode:t,className:oW(`lucide-${fFe(iW(e))}`,`lucide-${e}`,a),...r}));return n.displayName=iW(e),n};const vFe=un("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);const _Fe=un("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const CFe=un("book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);const EFe=un("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);const j0=un("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const q0=un("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const xFe=un("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const BFe=un("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const IFe=un("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const SFe=un("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);const sW=un("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const DFe=un("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const QFe=un("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const TFe=un("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);const NFe=un("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);const r1=un("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Gd=un("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);const FFe=un("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);const cW=un("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const lW=un("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"}]]);const LFe=un("image-plus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);const RFe=un("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const uW=un("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const y4=un("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const MFe=un("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const dW=un("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);const OFe=un("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]);const PFe=un("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);const w4=un("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);const pW=un("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);const $Fe=un("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const jFe=un("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);const qFe=un("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"}]]);const GFe=un("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const zFe=un("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);const mW=un("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);const UFe=un("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const HFe=un("refresh-ccw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);const YFe=un("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const WFe=un("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const KFe=un("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const k4=un("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const AW=un("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);const ZFe=un("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const VFe=un("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);const JFe=un("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const gW=un("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);const XFe=un("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);const e6e=un("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);const t6e=un("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const n6e=un("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const a6e=un("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);const r6e=un("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);const Mm=un("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const hW=un("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);const i6e=un("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);const o6e=un("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function fW(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function G0(...e){return t=>{let n=!1;const a=e.map(r=>{const i=fW(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<a.length;r++){const i=a[r];typeof i=="function"?i():fW(e[r],null)}}}}function ha(...e){return re.useCallback(G0(...e),e)}var s6e=Symbol.for("react.lazy"),i1=re[" use ".trim().toString()];function c6e(e){return typeof e=="object"&&e!==null&&"then"in e}function bW(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===s6e&&"_payload"in e&&c6e(e._payload)}function l6e(e){const t=u6e(e),n=re.forwardRef((a,r)=>{let{children:i,...o}=a;bW(i)&&typeof i1=="function"&&(i=i1(i._payload));const s=re.Children.toArray(i),l=s.find(p6e);if(l){const u=l.props.children,d=s.map(p=>p===l?re.Children.count(u)>1?re.Children.only(null):re.isValidElement(u)?u.props.children:null:p);return F.jsx(t,{...o,ref:r,children:re.isValidElement(u)?re.cloneElement(u,void 0,d):null})}return F.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var v4=l6e("Slot");function u6e(e){const t=re.forwardRef((n,a)=>{let{children:r,...i}=n;if(bW(r)&&typeof i1=="function"&&(r=i1(r._payload)),re.isValidElement(r)){const o=A6e(r),s=m6e(i,r.props);return r.type!==re.Fragment&&(s.ref=a?G0(a,o):o),re.cloneElement(r,s)}return re.Children.count(r)>1?re.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var d6e=Symbol("radix.slottable");function p6e(e){return re.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===d6e}function m6e(e,t){const n={...t};for(const a in t){const r=e[a],i=t[a];/^on[A-Z]/.test(a)?r&&i?n[a]=(...s)=>{const l=i(...s);return r(...s),l}:r&&(n[a]=r):a==="style"?n[a]={...r,...i}:a==="className"&&(n[a]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function A6e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const yW=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wW=m4,o1=(e,t)=>n=>{var a;if(t?.variants==null)return wW(e,n?.class,n?.className);const{variants:r,defaultVariants:i}=t,o=Object.keys(r).map(u=>{const d=n?.[u],p=i?.[u];if(d===null)return null;const m=yW(d)||yW(p);return r[u][m]}),s=n&&Object.entries(n).reduce((u,d)=>{let[p,m]=d;return m===void 0||(u[p]=m),u},{}),l=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((u,d)=>{let{class:p,className:m,...A}=d;return Object.entries(A).every(g=>{let[h,f]=g;return Array.isArray(f)?f.includes({...i,...s}[h]):{...i,...s}[h]===f})?[...u,p,m]:u},[]);return wW(e,o,l,n?.class,n?.className)},g6e=o1("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-[3px] 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"}});function oi({className:e,variant:t,size:n,asChild:a=!1,...r}){const i=a?v4:"button";return F.jsx(i,{"data-slot":"button",className:Ct(g6e({variant:t,size:n,className:e})),...r})}const h6e={damping:.7,stiffness:.05,mass:1.25},f6e=70,b6e=1e3/60,y6e=350;let s1=!1;globalThis.document?.addEventListener("mousedown",()=>{s1=!0}),globalThis.document?.addEventListener("mouseup",()=>{s1=!1}),globalThis.document?.addEventListener("click",()=>{s1=!1});const w6e=(e={})=>{const[t,n]=ne.useState(!1),[a,r]=ne.useState(e.initial!==!1),[i,o]=ne.useState(!1),s=ne.useRef(null);s.current=e;const l=ne.useCallback(()=>{if(!s1)return!1;const y=window.getSelection();if(!y||!y.rangeCount)return!1;const w=y.getRangeAt(0);return w.commonAncestorContainer.contains(f.current)||f.current?.contains(w.commonAncestorContainer)},[]),u=ne.useCallback(y=>{p.isAtBottom=y,r(y)},[]),d=ne.useCallback(y=>{p.escapedFromLock=y,n(y)},[]),p=ne.useMemo(()=>{let y;return{escapedFromLock:t,isAtBottom:a,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return f.current?.scrollTop??0},set scrollTop(w){f.current&&(f.current.scrollTop=w,p.ignoreScrollToTop=f.current.scrollTop)},get targetScrollTop(){return!f.current||!b.current?0:f.current.scrollHeight-1-f.current.clientHeight},get calculatedTargetScrollTop(){if(!f.current||!b.current)return 0;const{targetScrollTop:w}=this;if(!e.targetScrollTop)return w;if(y?.targetScrollTop===w)return y.calculatedScrollTop;const k=Math.max(Math.min(e.targetScrollTop(w,{scrollElement:f.current,contentElement:b.current}),w),0);return y={targetScrollTop:w,calculatedScrollTop:k},requestAnimationFrame(()=>{y=void 0}),k},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=f6e}}},[]),m=ne.useCallback((y={})=>{typeof y=="string"&&(y={animation:y}),y.preserveScrollPosition||u(!0);const w=Date.now()+(Number(y.wait)||0),k=C4(s.current,y.animation),{ignoreEscapes:C=!1}=y;let E,_=p.calculatedTargetScrollTop;y.duration instanceof Promise?y.duration.finally(()=>{E=Date.now()}):E=w+(y.duration??0);const x=async()=>{const S=new Promise(requestAnimationFrame).then(()=>{if(!p.isAtBottom)return p.animation=void 0,!1;const{scrollTop:I}=p,D=performance.now(),Q=(D-(p.lastTick??D))/b6e;if(p.animation||(p.animation={behavior:k,promise:S,ignoreEscapes:C}),p.animation.behavior===k&&(p.lastTick=D),l()||w>Date.now())return x();if(I<Math.min(_,p.calculatedTargetScrollTop)){if(p.animation?.behavior===k){if(k==="instant")return p.scrollTop=p.calculatedTargetScrollTop,x();p.velocity=(k.damping*p.velocity+k.stiffness*p.scrollDifference)/k.mass,p.accumulated+=p.velocity*Q,p.scrollTop+=p.accumulated,p.scrollTop!==I&&(p.accumulated=0)}return x()}return E>Date.now()?(_=p.calculatedTargetScrollTop,x()):(p.animation=void 0,p.scrollTop<p.calculatedTargetScrollTop?m({animation:C4(s.current,s.current.resize),ignoreEscapes:C,duration:Math.max(0,E-Date.now())||void 0}):p.isAtBottom)});return S.then(I=>(requestAnimationFrame(()=>{p.animation||(p.lastTick=void 0,p.velocity=0)}),I))};return y.wait!==!0&&(p.animation=void 0),p.animation?.behavior===k?p.animation.promise:x()},[u,l,p]),A=ne.useCallback(()=>{d(!0),u(!1)},[d,u]),g=ne.useCallback(({target:y})=>{if(y!==f.current)return;const{scrollTop:w,ignoreScrollToTop:k}=p;let{lastScrollTop:C=w}=p;p.lastScrollTop=w,p.ignoreScrollToTop=void 0,k&&k>w&&(C=k),o(p.isNearBottom),setTimeout(()=>{if(p.resizeDifference||w===k)return;if(l()){d(!0),u(!1);return}const E=w>C,_=w<C;if(p.animation?.ignoreEscapes){p.scrollTop=C;return}_&&(d(!0),u(!1)),E&&d(!1),!p.escapedFromLock&&p.isNearBottom&&u(!0)},1)},[d,u,l,p]),h=ne.useCallback(({target:y,deltaY:w})=>{let k=y;for(;!["scroll","auto"].includes(getComputedStyle(k).overflow);){if(!k.parentElement)return;k=k.parentElement}k===f.current&&w<0&&f.current.scrollHeight>f.current.clientHeight&&!p.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,p]),f=kW(y=>{f.current?.removeEventListener("scroll",g),f.current?.removeEventListener("wheel",h),y?.addEventListener("scroll",g,{passive:!0}),y?.addEventListener("wheel",h,{passive:!0})},[]),b=kW(y=>{if(p.resizeObserver?.disconnect(),!y)return;let w;p.resizeObserver=new ResizeObserver(([k])=>{const{height:C}=k.contentRect,E=C-(w??C);if(p.resizeDifference=E,p.scrollTop>p.targetScrollTop&&(p.scrollTop=p.targetScrollTop),o(p.isNearBottom),E>=0){const _=C4(s.current,w?s.current.resize:s.current.initial);m({animation:_,wait:!0,preserveScrollPosition:!0,duration:_==="instant"?void 0:y6e})}else p.isNearBottom&&(d(!1),u(!0));w=C,requestAnimationFrame(()=>{setTimeout(()=>{p.resizeDifference===E&&(p.resizeDifference=0)},1)})}),p.resizeObserver?.observe(y)},[]);return{contentRef:b,scrollRef:f,scrollToBottom:m,stopScroll:A,isAtBottom:a||i,isNearBottom:i,escapedFromLock:t,state:p}};function kW(e,t){const n=ne.useCallback(a=>(n.current=a,e(a)),t);return n}const _4=new Map;function C4(...e){const t={...h6e};let n=!1;for(const r of e){if(r==="instant"){n=!0;continue}typeof r=="object"&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass)}const a=JSON.stringify(t);return _4.has(a)||_4.set(a,Object.freeze(t)),n?"instant":_4.get(a)}const vW=ne.createContext(null),k6e=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function c1({instance:e,children:t,resize:n,initial:a,mass:r,damping:i,stiffness:o,targetScrollTop:s,contextRef:l,...u}){const d=ne.useRef(null),p=re.useCallback((C,E)=>(k?.targetScrollTop??s)?.(C,E)??C,[s]),m=w6e({mass:r,damping:i,stiffness:o,resize:n,initial:a,targetScrollTop:p}),{scrollRef:A,contentRef:g,scrollToBottom:h,stopScroll:f,isAtBottom:b,escapedFromLock:y,state:w}=e??m,k=ne.useMemo(()=>({scrollToBottom:h,stopScroll:f,scrollRef:A,isAtBottom:b,escapedFromLock:y,contentRef:g,state:w,get targetScrollTop(){return d.current},set targetScrollTop(C){d.current=C}}),[h,b,g,A,f,y,w]);return ne.useImperativeHandle(l,()=>k,[k]),k6e(()=>{A.current&&getComputedStyle(A.current).overflow==="visible"&&(A.current.style.overflow="auto")},[]),re.createElement(vW.Provider,{value:k},re.createElement("div",{...u},typeof t=="function"?t(k):t))}(function(e){function t({children:n,scrollClassName:a,...r}){const i=_W();return re.createElement("div",{ref:i.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:a},re.createElement("div",{...r,ref:i.contentRef},typeof n=="function"?n(i):n))}e.Content=t})(c1||(c1={}));function _W(){const e=ne.useContext(vW);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const v6e=({className:e,...t})=>F.jsx(c1,{className:Ct("relative flex-1 overflow-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),_6e=({className:e,...t})=>F.jsx(c1.Content,{className:Ct("p-4 pb-6 stick-to-bottom",e),scrollClassName:"custom-scrollbar",...t}),C6e=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:a}=_W(),r=ne.useCallback(()=>{a()},[a]);return n?null:F.jsx("button",{className:Ct("absolute bottom-32 left-1/2 -translate-x-1/2 z-10","flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-medium","glass border border-border/50 shadow-lg shadow-black/10","text-foreground/80 hover:text-foreground","transition-all duration-300 ease-out","hover:shadow-xl hover:shadow-primary/10 hover:-translate-y-0.5 hover:border-primary/30","animate-in fade-in slide-in-from-bottom-2 duration-200",e),onClick:r,type:"button",...t,children:F.jsx(vFe,{className:"size-3.5"})})};function nn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function E6e(e,t){const n=re.createContext(t),a=i=>{const{children:o,...s}=i,l=re.useMemo(()=>s,Object.values(s));return F.jsx(n.Provider,{value:l,children:o})};a.displayName=e+"Provider";function r(i){const o=re.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[a,r]}function hu(e,t=[]){let n=[];function a(i,o){const s=re.createContext(o),l=n.length;n=[...n,o];const u=p=>{const{scope:m,children:A,...g}=p,h=m?.[e]?.[l]||s,f=re.useMemo(()=>g,Object.values(g));return F.jsx(h.Provider,{value:f,children:A})};u.displayName=i+"Provider";function d(p,m){const A=m?.[e]?.[l]||s,g=re.useContext(A);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,d]}const r=()=>{const i=n.map(o=>re.createContext(o));return function(s){const l=s?.[e]||i;return re.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[a,x6e(r,...t)]}function x6e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=a.reduce((s,{useScope:l,scopeName:u})=>{const p=l(i)[`__scope${u}`];return{...s,...p}},{});return re.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var Ei=globalThis?.document?re.useLayoutEffect:()=>{},B6e=re[" useInsertionEffect ".trim().toString()]||Ei;function fu({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[r,i,o]=I6e({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:r;{const d=re.useRef(e!==void 0);re.useEffect(()=>{const p=d.current;p!==s&&console.warn(`${a} is changing from ${p?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. 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.`),d.current=s},[s,a])}const u=re.useCallback(d=>{if(s){const p=S6e(d)?d(e):d;p!==e&&o.current?.(p)}else i(d)},[s,e,i,o]);return[l,u]}function I6e({defaultProp:e,onChange:t}){const[n,a]=re.useState(e),r=re.useRef(n),i=re.useRef(t);return B6e(()=>{i.current=t},[t]),re.useEffect(()=>{r.current!==n&&(i.current?.(n),r.current=n)},[n,r]),[n,a,i]}function S6e(e){return typeof e=="function"}function sh(e){const t=D6e(e),n=re.forwardRef((a,r)=>{const{children:i,...o}=a,s=re.Children.toArray(i),l=s.find(T6e);if(l){const u=l.props.children,d=s.map(p=>p===l?re.Children.count(u)>1?re.Children.only(null):re.isValidElement(u)?u.props.children:null:p);return F.jsx(t,{...o,ref:r,children:re.isValidElement(u)?re.cloneElement(u,void 0,d):null})}return F.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function D6e(e){const t=re.forwardRef((n,a)=>{const{children:r,...i}=n;if(re.isValidElement(r)){const o=F6e(r),s=N6e(i,r.props);return r.type!==re.Fragment&&(s.ref=a?G0(a,o):o),re.cloneElement(r,s)}return re.Children.count(r)>1?re.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CW=Symbol("radix.slottable");function Q6e(e){const t=({children:n})=>F.jsx(F.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=CW,t}function T6e(e){return re.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CW}function N6e(e,t){const n={...t};for(const a in t){const r=e[a],i=t[a];/^on[A-Z]/.test(a)?r&&i?n[a]=(...s)=>{const l=i(...s);return r(...s),l}:r&&(n[a]=r):a==="style"?n[a]={...r,...i}:a==="className"&&(n[a]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function F6e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var L6e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jn=L6e.reduce((e,t)=>{const n=sh(`Primitive.${t}`),a=re.forwardRef((r,i)=>{const{asChild:o,...s}=r,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),F.jsx(l,{...s,ref:i})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function EW(e,t){e&&jC.flushSync(()=>e.dispatchEvent(t))}function R6e(e,t){return re.useReducer((n,a)=>t[n][a]??n,e)}var Cc=e=>{const{present:t,children:n}=e,a=M6e(t),r=typeof n=="function"?n({present:a.isPresent}):re.Children.only(n),i=ha(a.ref,O6e(r));return typeof n=="function"||a.isPresent?re.cloneElement(r,{ref:i}):null};Cc.displayName="Presence";function M6e(e){const[t,n]=re.useState(),a=re.useRef(null),r=re.useRef(e),i=re.useRef("none"),o=e?"mounted":"unmounted",[s,l]=R6e(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return re.useEffect(()=>{const u=l1(a.current);i.current=s==="mounted"?u:"none"},[s]),Ei(()=>{const u=a.current,d=r.current;if(d!==e){const m=i.current,A=l1(u);e?l("MOUNT"):A==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&m!==A?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Ei(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,p=A=>{const h=l1(a.current).includes(CSS.escape(A.animationName));if(A.target===t&&h&&(l("ANIMATION_END"),!r.current)){const f=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=f)})}},m=A=>{A.target===t&&(i.current=l1(a.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:re.useCallback(u=>{a.current=u?getComputedStyle(u):null,n(u)},[])}}function l1(e){return e?.animationName||"none"}function O6e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var P6e=re[" useId ".trim().toString()]||(()=>{}),$6e=0;function Ec(e){const[t,n]=re.useState(P6e());return Ei(()=>{n(a=>a??String($6e++))},[e]),e||(t?`radix-${t}`:"")}var u1="Collapsible",[j6e]=hu(u1),[q6e,E4]=j6e(u1),xW=re.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:a,defaultOpen:r,disabled:i,onOpenChange:o,...s}=e,[l,u]=fu({prop:a,defaultProp:r??!1,onChange:o,caller:u1});return F.jsx(q6e,{scope:n,disabled:i,contentId:Ec(),open:l,onOpenToggle:re.useCallback(()=>u(d=>!d),[u]),children:F.jsx(jn.div,{"data-state":B4(l),"data-disabled":i?"":void 0,...s,ref:t})})});xW.displayName=u1;var BW="CollapsibleTrigger",IW=re.forwardRef((e,t)=>{const{__scopeCollapsible:n,...a}=e,r=E4(BW,n);return F.jsx(jn.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":B4(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...a,ref:t,onClick:nn(e.onClick,r.onOpenToggle)})});IW.displayName=BW;var x4="CollapsibleContent",SW=re.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=E4(x4,e.__scopeCollapsible);return F.jsx(Cc,{present:n||r.open,children:({present:i})=>F.jsx(G6e,{...a,ref:t,present:i})})});SW.displayName=x4;var G6e=re.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:a,children:r,...i}=e,o=E4(x4,n),[s,l]=re.useState(a),u=re.useRef(null),d=ha(t,u),p=re.useRef(0),m=p.current,A=re.useRef(0),g=A.current,h=o.open||s,f=re.useRef(h),b=re.useRef(void 0);return re.useEffect(()=>{const y=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(y)},[]),Ei(()=>{const y=u.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const w=y.getBoundingClientRect();p.current=w.height,A.current=w.width,f.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),l(a)}},[o.open,a]),F.jsx(jn.div,{"data-state":B4(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!h,...i,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:h&&r})});function B4(e){return e?"open":"closed"}var z6e=xW;function I4({...e}){return F.jsx(z6e,{"data-slot":"collapsible",...e})}function S4({...e}){return F.jsx(IW,{"data-slot":"collapsible-trigger",...e})}function D4({...e}){return F.jsx(SW,{"data-slot":"collapsible-content",...e})}const U6e=({className:e,...t})=>F.jsx(I4,{className:Ct("not-prose mb-4 text-primary text-xs",e),...t}),H6e=({className:e,count:t,children:n,...a})=>{const{t:r}=Da();return F.jsx(S4,{className:Ct("flex items-center gap-2",e),...a,children:n??F.jsxs(F.Fragment,{children:[F.jsx("p",{className:"font-medium",children:r("chat.used_sources",{count:t})}),F.jsx(q0,{className:"h-4 w-4"})]})})},Y6e=({className:e,...t})=>F.jsx(D4,{className:Ct("mt-3 flex w-fit flex-col gap-2","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),W6e=({href:e,title:t,children:n,...a})=>F.jsx("a",{className:"flex items-center gap-2",href:e,rel:"noreferrer",target:"_blank",...a,children:n??F.jsxs(F.Fragment,{children:[F.jsx(CFe,{className:"h-4 w-4"}),F.jsx("span",{className:"block font-medium",children:t})]})}),K6e=({latestProgress:e,parts:t})=>{const n=e.data[0].status,a=e.data[0].message,r=t.lastIndexOf(e);if(!!(t.slice(r+1).some(p=>p.type==="text"&&(p.text||"").trim().length>0||p.type==="tool-invocation"||p.type==="tool-call")&&n!=="running"))return null;const l=n==="running",u=n==="error",d=oh(a);return F.jsx("div",{className:Ct("flex w-full py-3 mx-auto max-w-4xl px-4 md:px-0 animate-in-bubble",d==="rtl"?"justify-end":"justify-start"),children:F.jsxs("div",{className:Ct("flex items-center gap-3 text-sm text-muted-foreground",d==="rtl"&&"flex-row-reverse"),dir:d,children:[l?F.jsx("div",{className:"size-4 animate-spin rounded-full border-2 border-primary border-r-transparent shrink-0"}):u?F.jsx(Mm,{className:"size-4 text-destructive shrink-0"}):F.jsx(j0,{className:"size-4 text-green-500 shrink-0"}),F.jsx("span",{className:Ct("font-medium",l&&"animate-pulse"),children:a})]})})};function DW({messages:e,status:t,isLoadingHistory:n,error:a,conversationId:r,regen:i,onSuggestionClick:o,chat:s,className:l,readonly:u}){const{i18n:d,t:p}=Da(),m=d.language==="fa",{WelcomeScreen:A}=Zi(),g=e[e.length-1],h=g?.role==="assistant"&&(t==="ready"||g.parts.some(f=>f.type==="data-chat-finished"));return F.jsxs(v6e,{className:Ct("min-h-0 flex-1",l),children:[F.jsxs(_6e,{className:"max-w-4xl mx-auto w-full px-4 md:px-0 pb-32",dir:"ltr",children:[e.length===0&&!n?F.jsx(A,{onSuggestionClick:o}):e.map(f=>F.jsxs("div",{children:[f.role==="assistant"&&f.parts.filter(b=>b.type==="source-url").length>0&&F.jsxs(U6e,{children:[F.jsx(H6e,{count:f.parts.filter(b=>b.type==="source-url").length}),f.parts.filter(b=>b.type==="source-url").map((b,y)=>F.jsx(Y6e,{children:F.jsx(W6e,{href:b.url,title:b.url},`${f.id}-${y}`)},`${f.id}-${y}`))]}),f.parts.map((b,y)=>F.jsx(RY,{part:b,message:f,status:t,index:y,regen:i,lastMessage:f.id===e.at(-1)?.id,conversationId:r,isFinished:h,chat:s,readonly:u},`${f.id}-${y}`))]},f.id)),(()=>{if(!g||g.role!=="assistant")return null;const f=g.parts.filter(y=>y.type==="data-progress-update");if(f.length===0)return null;const b=f[f.length-1];return b?F.jsx(K6e,{latestProgress:b,parts:g.parts}):null})(),(n||t==="submitted")&&F.jsx("div",{className:"animate-in-bubble",children:F.jsx(a1,{})}),t==="streaming"&&(()=>{const f=e[e.length-1];return!f||f.role==="user"?F.jsx(a1,{}):f.parts?.some(y=>y.type==="text"&&y.text?.trim().length>0||y.type==="reasoning"||y.type==="tool-invocation"||y.type==="tool-call")?null:F.jsx(a1,{})})(),t==="error"&&a&&F.jsx("div",{className:"mx-auto max-w-4xl w-full px-4 my-3 animate-in-bubble",children:F.jsxs("div",{className:Ct("flex w-full items-start gap-3 px-4 py-3.5 rounded-xl bg-destructive/8 border border-destructive/15",m?"border-r-2 border-r-destructive/60":"border-l-2 border-l-destructive/60"),dir:m?"rtl":"ltr",children:[F.jsx("div",{className:"size-1.5 rounded-full bg-destructive mt-2 shrink-0"}),F.jsxs("div",{className:Ct("text-sm text-destructive/90 leading-relaxed flex-1",m?"text-right":"text-left"),children:[F.jsx("span",{className:"font-semibold",children:p("chat.error")})," ",a.message]})]})})]}),F.jsx(C6e,{})]})}function Z6e({className:e,...t}){return F.jsx("textarea",{"data-slot":"textarea",className:Ct("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t})}const V6e=({className:e,...t})=>F.jsx("div",{className:"bg-transparent w-full",children:F.jsx("form",{className:Ct("w-full flex items-end gap-2 overflow-hidden","rounded-lg bg-surface glow-primary","px-3 py-2","transition-all duration-300 ease-out","border-none","hover:shadow-foreground/5","has-focus-visible:ring-2 has-focus-visible:ring-foreground/20 has-focus-visible:shadow-lg has-focus-visible:shadow-foreground/5",e),...t})}),J6e=({onChange:e,className:t,placeholder:n="What would you like to know?",...a})=>{const r=s=>{if(s.key==="Enter"){if(s.nativeEvent.isComposing||s.shiftKey)return;s.preventDefault();const l=s.currentTarget.form;l&&l.requestSubmit()}},{i18n:i}=Da(),o=oh(a.value,i.dir());return F.jsx(Z6e,{dir:o,className:Ct("flex-1 resize-none rounded-none border-none shadow-none outline-none ring-0","px-2 py-2.5","field-sizing-content max-h-[6lh] bg-transparent dark:bg-transparent","focus-visible:ring-0 min-h-[40px] md:min-h-[44px]","text-[1.0625rem] placeholder:text-muted-foreground/60","transition-all duration-200",t),name:"message",onChange:s=>{e?.(s)},onKeyDown:r,placeholder:n,...a})},X6e=({className:e,...t})=>F.jsx("div",{className:Ct("flex shrink-0 items-center gap-1.5 pb-1",e),...t}),eLe=({className:e,...t})=>F.jsx("div",{className:Ct("flex items-center gap-0.5",e),...t}),tLe=({variant:e="ghost",className:t,size:n,...a})=>{const r=n??ne.Children.count(a.children)>1?"default":"icon";return F.jsx(oi,{className:Ct("shrink-0 gap-1.5 rounded-xl","text-muted-foreground hover:text-foreground","hover:bg-accent/60 transition-all duration-200","hover:scale-105 active:scale-95",r==="default"&&"px-3",t),size:r,type:"button",variant:e,...a})},nLe=({className:e,variant:t="default",size:n="icon",status:a,children:r,...i})=>{let o=F.jsx(_Fe,{className:"size-4"});return a==="submitted"?o=F.jsx(y4,{className:"size-4 animate-spin"}):a==="streaming"?o=F.jsx(JFe,{className:"size-3.5 fill-current"}):a==="error"&&(o=F.jsx(Mm,{className:"size-4"})),F.jsx(oi,{className:Ct("shrink-0 rounded-lg size-9","bg-gradient-to-br from-primary to-primary/80","text-primary-foreground","shadow-md shadow-primary/30","hover:shadow-lg hover:shadow-primary/40","transition-all duration-200 ease-out","hover:scale-105 active:scale-95","disabled:opacity-40 disabled:shadow-none disabled:scale-100",a==="submitted"&&"bg-gradient-to-br from-muted to-muted/80 shadow-none text-foreground",a==="streaming"&&"bg-gradient-to-br from-primary to-primary/80 shadow-md text-primary-foreground",e),size:n,type:a==="streaming"?"button":"submit",variant:t,...i,children:r??o})};function pl(e){const t=re.useRef(e);return re.useEffect(()=>{t.current=e}),re.useMemo(()=>(...n)=>t.current?.(...n),[])}function aLe(e,t=globalThis?.document){const n=pl(e);re.useEffect(()=>{const a=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var rLe="DismissableLayer",Q4="dismissableLayer.update",iLe="dismissableLayer.pointerDownOutside",oLe="dismissableLayer.focusOutside",QW,TW=re.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),z0=re.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:o,onDismiss:s,...l}=e,u=re.useContext(TW),[d,p]=re.useState(null),m=d?.ownerDocument??globalThis?.document,[,A]=re.useState({}),g=ha(t,_=>p(_)),h=Array.from(u.layers),[f]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(f),y=d?h.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=b,C=lLe(_=>{const x=_.target,S=[...u.branches].some(I=>I.contains(x));!k||S||(r?.(_),o?.(_),_.defaultPrevented||s?.())},m),E=uLe(_=>{const x=_.target;[...u.branches].some(I=>I.contains(x))||(i?.(_),o?.(_),_.defaultPrevented||s?.())},m);return aLe(_=>{y===u.layers.size-1&&(a?.(_),!_.defaultPrevented&&s&&(_.preventDefault(),s()))},m),re.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(QW=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),NW(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=QW)}},[d,m,n,u]),re.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),NW())},[d,u]),re.useEffect(()=>{const _=()=>A({});return document.addEventListener(Q4,_),()=>document.removeEventListener(Q4,_)},[]),F.jsx(jn.div,{...l,ref:g,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:nn(e.onFocusCapture,E.onFocusCapture),onBlurCapture:nn(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:nn(e.onPointerDownCapture,C.onPointerDownCapture)})});z0.displayName=rLe;var sLe="DismissableLayerBranch",cLe=re.forwardRef((e,t)=>{const n=re.useContext(TW),a=re.useRef(null),r=ha(t,a);return re.useEffect(()=>{const i=a.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),F.jsx(jn.div,{...e,ref:r})});cLe.displayName=sLe;function lLe(e,t=globalThis?.document){const n=pl(e),a=re.useRef(!1),r=re.useRef(()=>{});return re.useEffect(()=>{const i=s=>{if(s.target&&!a.current){let l=function(){FW(iLe,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);a.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function uLe(e,t=globalThis?.document){const n=pl(e),a=re.useRef(!1);return re.useEffect(()=>{const r=i=>{i.target&&!a.current&&FW(oLe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function NW(){const e=new CustomEvent(Q4);document.dispatchEvent(e)}function FW(e,t,n,{discrete:a}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),a?EW(r,i):r.dispatchEvent(i)}const dLe=["top","right","bottom","left"],zd=Math.min,ws=Math.max,d1=Math.round,p1=Math.floor,ml=e=>({x:e,y:e}),pLe={left:"right",right:"left",bottom:"top",top:"bottom"};function T4(e,t,n){return ws(e,zd(t,n))}function bu(e,t){return typeof e=="function"?e(t):e}function yu(e){return e.split("-")[0]}function ch(e){return e.split("-")[1]}function N4(e){return e==="x"?"y":"x"}function F4(e){return e==="y"?"height":"width"}function Al(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function L4(e){return N4(Al(e))}function mLe(e,t,n){n===void 0&&(n=!1);const a=ch(e),r=L4(e),i=F4(r);let o=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=m1(o)),[o,m1(o)]}function ALe(e){const t=m1(e);return[R4(e),t,R4(t)]}function R4(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const LW=["left","right"],RW=["right","left"],gLe=["top","bottom"],hLe=["bottom","top"];function fLe(e,t,n){switch(e){case"top":case"bottom":return n?t?RW:LW:t?LW:RW;case"left":case"right":return t?gLe:hLe;default:return[]}}function bLe(e,t,n,a){const r=ch(e);let i=fLe(yu(e),n==="start",a);return r&&(i=i.map(o=>o+"-"+r),t&&(i=i.concat(i.map(R4)))),i}function m1(e){const t=yu(e);return pLe[t]+e.slice(t.length)}function yLe(e){return{top:0,right:0,bottom:0,left:0,...e}}function MW(e){return typeof e!="number"?yLe(e):{top:e,right:e,bottom:e,left:e}}function A1(e){const{x:t,y:n,width:a,height:r}=e;return{width:a,height:r,top:n,left:t,right:t+a,bottom:n+r,x:t,y:n}}function OW(e,t,n){let{reference:a,floating:r}=e;const i=Al(t),o=L4(t),s=F4(o),l=yu(t),u=i==="y",d=a.x+a.width/2-r.width/2,p=a.y+a.height/2-r.height/2,m=a[s]/2-r[s]/2;let A;switch(l){case"top":A={x:d,y:a.y-r.height};break;case"bottom":A={x:d,y:a.y+a.height};break;case"right":A={x:a.x+a.width,y:p};break;case"left":A={x:a.x-r.width,y:p};break;default:A={x:a.x,y:a.y}}switch(ch(t)){case"start":A[o]-=m*(n&&u?-1:1);break;case"end":A[o]+=m*(n&&u?-1:1);break}return A}async function wLe(e,t){var n;t===void 0&&(t={});const{x:a,y:r,platform:i,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:A=0}=bu(t,e),g=MW(A),f=s[m?p==="floating"?"reference":"floating":p],b=A1(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(f)))==null||n?f:f.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),y=p==="floating"?{x:a,y:r,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=A1(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(b.top-C.top+g.top)/k.y,bottom:(C.bottom-b.bottom+g.bottom)/k.y,left:(b.left-C.left+g.left)/k.x,right:(C.right-b.right+g.right)/k.x}}const kLe=50,vLe=async(e,t,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:i=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:wLe},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=OW(u,a,l),m=a,A=0;const g={};for(let h=0;h<i.length;h++){const f=i[h];if(!f)continue;const{name:b,fn:y}=f,{x:w,y:k,data:C,reset:E}=await y({x:d,y:p,initialPlacement:a,placement:m,strategy:r,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});d=w??d,p=k??p,g[b]={...g[b],...C},E&&A<kLe&&(A++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:d,y:p}=OW(u,m,l)),h=-1)}return{x:d,y:p,placement:m,strategy:r,middlewareData:g}},_Le=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:r,rects:i,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=bu(e,t)||{};if(u==null)return{};const p=MW(d),m={x:n,y:a},A=L4(r),g=F4(A),h=await o.getDimensions(u),f=A==="y",b=f?"top":"left",y=f?"bottom":"right",w=f?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[A]-m[A]-i.floating[g],C=m[A]-i.reference[A],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let _=E?E[w]:0;(!_||!await(o.isElement==null?void 0:o.isElement(E)))&&(_=s.floating[w]||i.floating[g]);const x=k/2-C/2,S=_/2-h[g]/2-1,I=zd(p[b],S),D=zd(p[y],S),Q=I,R=_-h[g]-D,B=_/2-h[g]/2+x,T=T4(Q,B,R),N=!l.arrow&&ch(r)!=null&&B!==T&&i.reference[g]/2-(B<Q?I:D)-h[g]/2<0,L=N?B<Q?B-Q:B-R:0;return{[A]:m[A]+L,data:{[A]:T,centerOffset:B-T-L,...N&&{alignmentOffset:L}},reset:N}}}),CLe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:r,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...f}=bu(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=yu(r),y=Al(s),w=yu(s)===s,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(w||!h?[m1(s)]:ALe(s)),E=g!=="none";!m&&E&&C.push(...bLe(s,h,g,k));const _=[s,...C],x=await l.detectOverflow(t,f),S=[];let I=((a=i.flip)==null?void 0:a.overflows)||[];if(d&&S.push(x[b]),p){const B=mLe(r,o,k);S.push(x[B[0]],x[B[1]])}if(I=[...I,{placement:r,overflows:S}],!S.every(B=>B<=0)){var D,Q;const B=(((D=i.flip)==null?void 0:D.index)||0)+1,T=_[B];if(T&&(!(p==="alignment"?y!==Al(T):!1)||I.every(M=>Al(M.placement)===y?M.overflows[0]>0:!0)))return{data:{index:B,overflows:I},reset:{placement:T}};let N=(Q=I.filter(L=>L.overflows[0]<=0).sort((L,M)=>L.overflows[1]-M.overflows[1])[0])==null?void 0:Q.placement;if(!N)switch(A){case"bestFit":{var R;const L=(R=I.filter(M=>{if(E){const O=Al(M.placement);return O===y||O==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(O=>O>0).reduce((O,P)=>O+P,0)]).sort((M,O)=>M[1]-O[1])[0])==null?void 0:R[0];L&&(N=L);break}case"initialPlacement":N=s;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function PW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $W(e){return dLe.some(t=>e[t]>=0)}const ELe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:r="referenceHidden",...i}=bu(e,t);switch(r){case"referenceHidden":{const o=await a.detectOverflow(t,{...i,elementContext:"reference"}),s=PW(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$W(s)}}}case"escaped":{const o=await a.detectOverflow(t,{...i,altBoundary:!0}),s=PW(o,n.floating);return{data:{escapedOffsets:s,escaped:$W(s)}}}default:return{}}}}},jW=new Set(["left","top"]);async function xLe(e,t){const{placement:n,platform:a,elements:r}=e,i=await(a.isRTL==null?void 0:a.isRTL(r.floating)),o=yu(n),s=ch(n),l=Al(n)==="y",u=jW.has(o)?-1:1,d=i&&l?-1:1,p=bu(t,e);let{mainAxis:m,crossAxis:A,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof g=="number"&&(A=s==="end"?g*-1:g),l?{x:A*d,y:m*u}:{x:m*u,y:A*d}}const BLe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:r,y:i,placement:o,middlewareData:s}=t,l=await xLe(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(a=s.arrow)!=null&&a.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:o}}}}},ILe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:r,platform:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...u}=bu(e,t),d={x:n,y:a},p=await i.detectOverflow(t,u),m=Al(yu(r)),A=N4(m);let g=d[A],h=d[m];if(o){const b=A==="y"?"top":"left",y=A==="y"?"bottom":"right",w=g+p[b],k=g-p[y];g=T4(w,g,k)}if(s){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=h+p[b],k=h-p[y];h=T4(w,h,k)}const f=l.fn({...t,[A]:g,[m]:h});return{...f,data:{x:f.x-n,y:f.y-a,enabled:{[A]:o,[m]:s}}}}}},SLe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:r,rects:i,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=bu(e,t),d={x:n,y:a},p=Al(r),m=N4(p);let A=d[m],g=d[p];const h=bu(s,t),f=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const w=m==="y"?"height":"width",k=i.reference[m]-i.floating[w]+f.mainAxis,C=i.reference[m]+i.reference[w]-f.mainAxis;A<k?A=k:A>C&&(A=C)}if(u){var b,y;const w=m==="y"?"width":"height",k=jW.has(yu(r)),C=i.reference[p]-i.floating[w]+(k&&((b=o.offset)==null?void 0:b[p])||0)+(k?0:f.crossAxis),E=i.reference[p]+i.reference[w]+(k?0:((y=o.offset)==null?void 0:y[p])||0)-(k?f.crossAxis:0);g<C?g=C:g>E&&(g=E)}return{[m]:A,[p]:g}}}},DLe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:r,rects:i,platform:o,elements:s}=t,{apply:l=()=>{},...u}=bu(e,t),d=await o.detectOverflow(t,u),p=yu(r),m=ch(r),A=Al(r)==="y",{width:g,height:h}=i.floating;let f,b;p==="top"||p==="bottom"?(f=p,b=m===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(b=p,f=m==="end"?"top":"bottom");const y=h-d.top-d.bottom,w=g-d.left-d.right,k=zd(h-d[f],y),C=zd(g-d[b],w),E=!t.middlewareData.shift;let _=k,x=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(x=w),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(_=y),E&&!m){const I=ws(d.left,0),D=ws(d.right,0),Q=ws(d.top,0),R=ws(d.bottom,0);A?x=g-2*(I!==0||D!==0?I+D:ws(d.left,d.right)):_=h-2*(Q!==0||R!==0?Q+R:ws(d.top,d.bottom))}await l({...t,availableWidth:x,availableHeight:_});const S=await o.getDimensions(s.floating);return g!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function g1(){return typeof window<"u"}function lh(e){return qW(e)?(e.nodeName||"").toLowerCase():"#document"}function ks(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gl(e){var t;return(t=(qW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qW(e){return g1()?e instanceof Node||e instanceof ks(e).Node:!1}function xc(e){return g1()?e instanceof Element||e instanceof ks(e).Element:!1}function wu(e){return g1()?e instanceof HTMLElement||e instanceof ks(e).HTMLElement:!1}function GW(e){return!g1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ks(e).ShadowRoot}function U0(e){const{overflow:t,overflowX:n,overflowY:a,display:r}=Bc(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&r!=="inline"&&r!=="contents"}function QLe(e){return/^(table|td|th)$/.test(lh(e))}function h1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const TLe=/transform|translate|scale|rotate|perspective|filter/,NLe=/paint|layout|strict|content/,Om=e=>!!e&&e!=="none";let M4;function O4(e){const t=xc(e)?Bc(e):e;return Om(t.transform)||Om(t.translate)||Om(t.scale)||Om(t.rotate)||Om(t.perspective)||!P4()&&(Om(t.backdropFilter)||Om(t.filter))||TLe.test(t.willChange||"")||NLe.test(t.contain||"")}function FLe(e){let t=Ud(e);for(;wu(t)&&!uh(t);){if(O4(t))return t;if(h1(t))return null;t=Ud(t)}return null}function P4(){return M4==null&&(M4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),M4}function uh(e){return/^(html|body|#document)$/.test(lh(e))}function Bc(e){return ks(e).getComputedStyle(e)}function f1(e){return xc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ud(e){if(lh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||GW(e)&&e.host||gl(e);return GW(t)?t.host:t}function zW(e){const t=Ud(e);return uh(t)?e.ownerDocument?e.ownerDocument.body:e.body:wu(t)&&U0(t)?t:zW(t)}function H0(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=zW(e),i=r===((a=e.ownerDocument)==null?void 0:a.body),o=ks(r);if(i){const s=$4(o);return t.concat(o,o.visualViewport||[],U0(r)?r:[],s&&n?H0(s):[])}else return t.concat(r,H0(r,[],n))}function $4(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function UW(e){const t=Bc(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const r=wu(e),i=r?e.offsetWidth:n,o=r?e.offsetHeight:a,s=d1(n)!==i||d1(a)!==o;return s&&(n=i,a=o),{width:n,height:a,$:s}}function j4(e){return xc(e)?e:e.contextElement}function dh(e){const t=j4(e);if(!wu(t))return ml(1);const n=t.getBoundingClientRect(),{width:a,height:r,$:i}=UW(t);let o=(i?d1(n.width):n.width)/a,s=(i?d1(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const LLe=ml(0);function HW(e){const t=ks(e);return!P4()||!t.visualViewport?LLe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RLe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ks(e)?!1:t}function Pm(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=j4(e);let o=ml(1);t&&(a?xc(a)&&(o=dh(a)):o=dh(e));const s=RLe(i,n,a)?HW(i):ml(0);let l=(r.left+s.x)/o.x,u=(r.top+s.y)/o.y,d=r.width/o.x,p=r.height/o.y;if(i){const m=ks(i),A=a&&xc(a)?ks(a):a;let g=m,h=$4(g);for(;h&&a&&A!==g;){const f=dh(h),b=h.getBoundingClientRect(),y=Bc(h),w=b.left+(h.clientLeft+parseFloat(y.paddingLeft))*f.x,k=b.top+(h.clientTop+parseFloat(y.paddingTop))*f.y;l*=f.x,u*=f.y,d*=f.x,p*=f.y,l+=w,u+=k,g=ks(h),h=$4(g)}}return A1({width:d,height:p,x:l,y:u})}function b1(e,t){const n=f1(e).scrollLeft;return t?t.left+n:Pm(gl(e)).left+n}function YW(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-b1(e,n),r=n.top+t.scrollTop;return{x:a,y:r}}function MLe(e){let{elements:t,rect:n,offsetParent:a,strategy:r}=e;const i=r==="fixed",o=gl(a),s=t?h1(t.floating):!1;if(a===o||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ml(1);const d=ml(0),p=wu(a);if((p||!p&&!i)&&((lh(a)!=="body"||U0(o))&&(l=f1(a)),p)){const A=Pm(a);u=dh(a),d.x=A.x+a.clientLeft,d.y=A.y+a.clientTop}const m=o&&!p&&!i?YW(o,l):ml(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function OLe(e){return Array.from(e.getClientRects())}function PLe(e){const t=gl(e),n=f1(e),a=e.ownerDocument.body,r=ws(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),i=ws(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let o=-n.scrollLeft+b1(e);const s=-n.scrollTop;return Bc(a).direction==="rtl"&&(o+=ws(t.clientWidth,a.clientWidth)-r),{width:r,height:i,x:o,y:s}}const WW=25;function $Le(e,t){const n=ks(e),a=gl(e),r=n.visualViewport;let i=a.clientWidth,o=a.clientHeight,s=0,l=0;if(r){i=r.width,o=r.height;const d=P4();(!d||d&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}const u=b1(a);if(u<=0){const d=a.ownerDocument,p=d.body,m=getComputedStyle(p),A=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(a.clientWidth-p.clientWidth-A);g<=WW&&(i-=g)}else u<=WW&&(i+=u);return{width:i,height:o,x:s,y:l}}function jLe(e,t){const n=Pm(e,!0,t==="fixed"),a=n.top+e.clientTop,r=n.left+e.clientLeft,i=wu(e)?dh(e):ml(1),o=e.clientWidth*i.x,s=e.clientHeight*i.y,l=r*i.x,u=a*i.y;return{width:o,height:s,x:l,y:u}}function KW(e,t,n){let a;if(t==="viewport")a=$Le(e,n);else if(t==="document")a=PLe(gl(e));else if(xc(t))a=jLe(t,n);else{const r=HW(e);a={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return A1(a)}function ZW(e,t){const n=Ud(e);return n===t||!xc(n)||uh(n)?!1:Bc(n).position==="fixed"||ZW(n,t)}function qLe(e,t){const n=t.get(e);if(n)return n;let a=H0(e,[],!1).filter(s=>xc(s)&&lh(s)!=="body"),r=null;const i=Bc(e).position==="fixed";let o=i?Ud(e):e;for(;xc(o)&&!uh(o);){const s=Bc(o),l=O4(o);!l&&s.position==="fixed"&&(r=null),(i?!l&&!r:!l&&s.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||U0(o)&&!l&&ZW(e,o))?a=a.filter(d=>d!==o):r=s,o=Ud(o)}return t.set(e,a),a}function GLe(e){let{element:t,boundary:n,rootBoundary:a,strategy:r}=e;const o=[...n==="clippingAncestors"?h1(t)?[]:qLe(t,this._c):[].concat(n),a],s=KW(t,o[0],r);let l=s.top,u=s.right,d=s.bottom,p=s.left;for(let m=1;m<o.length;m++){const A=KW(t,o[m],r);l=ws(A.top,l),u=zd(A.right,u),d=zd(A.bottom,d),p=ws(A.left,p)}return{width:u-p,height:d-l,x:p,y:l}}function zLe(e){const{width:t,height:n}=UW(e);return{width:t,height:n}}function ULe(e,t,n){const a=wu(t),r=gl(t),i=n==="fixed",o=Pm(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ml(0);function u(){l.x=b1(r)}if(a||!a&&!i)if((lh(t)!=="body"||U0(r))&&(s=f1(t)),a){const A=Pm(t,!0,i,t);l.x=A.x+t.clientLeft,l.y=A.y+t.clientTop}else r&&u();i&&!a&&r&&u();const d=r&&!a&&!i?YW(r,s):ml(0),p=o.left+s.scrollLeft-l.x-d.x,m=o.top+s.scrollTop-l.y-d.y;return{x:p,y:m,width:o.width,height:o.height}}function q4(e){return Bc(e).position==="static"}function VW(e,t){if(!wu(e)||Bc(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gl(e)===n&&(n=n.ownerDocument.body),n}function JW(e,t){const n=ks(e);if(h1(e))return n;if(!wu(e)){let r=Ud(e);for(;r&&!uh(r);){if(xc(r)&&!q4(r))return r;r=Ud(r)}return n}let a=VW(e,t);for(;a&&QLe(a)&&q4(a);)a=VW(a,t);return a&&uh(a)&&q4(a)&&!O4(a)?n:a||FLe(e)||n}const HLe=async function(e){const t=this.getOffsetParent||JW,n=this.getDimensions,a=await n(e.floating);return{reference:ULe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function YLe(e){return Bc(e).direction==="rtl"}const WLe={convertOffsetParentRelativeRectToViewportRelativeRect:MLe,getDocumentElement:gl,getClippingRect:GLe,getOffsetParent:JW,getElementRects:HLe,getClientRects:OLe,getDimensions:zLe,getScale:dh,isElement:xc,isRTL:YLe};function XW(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KLe(e,t){let n=null,a;const r=gl(e);function i(){var s;clearTimeout(a),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:p,width:m,height:A}=u;if(s||t(),!m||!A)return;const g=p1(p),h=p1(r.clientWidth-(d+m)),f=p1(r.clientHeight-(p+A)),b=p1(d),w={rootMargin:-g+"px "+-h+"px "+-f+"px "+-b+"px",threshold:ws(0,zd(1,l))||1};let k=!0;function C(E){const _=E[0].intersectionRatio;if(_!==l){if(!k)return o();_?o(!1,_):a=setTimeout(()=>{o(!1,1e-7)},1e3)}_===1&&!XW(u,e.getBoundingClientRect())&&o(),k=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return o(!0),i}function ZLe(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=a,u=j4(e),d=r||i?[...u?H0(u):[],...t?H0(t):[]]:[];d.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const p=u&&s?KLe(u,n):null;let m=-1,A=null;o&&(A=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&A&&t&&(A.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=A)==null||w.observe(t)})),n()}),u&&!l&&A.observe(u),t&&A.observe(t));let g,h=l?Pm(e):null;l&&f();function f(){const b=Pm(e);h&&!XW(h,b)&&n(),h=b,g=requestAnimationFrame(f)}return n(),()=>{var b;d.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),p?.(),(b=A)==null||b.disconnect(),A=null,l&&cancelAnimationFrame(g)}}const VLe=BLe,JLe=ILe,XLe=CLe,e9e=DLe,t9e=ELe,eK=_Le,n9e=SLe,a9e=(e,t,n)=>{const a=new Map,r={platform:WLe,...n},i={...r.platform,_c:a};return vLe(e,t,{...r,platform:i})};var r9e=typeof document<"u",i9e=function(){},y1=r9e?ne.useLayoutEffect:i9e;function w1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!w1(e[a],t[a]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,r[a]))return!1;for(a=n;a--!==0;){const i=r[a];if(!(i==="_owner"&&e.$$typeof)&&!w1(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function tK(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nK(e,t){const n=tK(e);return Math.round(t*n)/n}function G4(e){const t=re.useRef(e);return y1(()=>{t.current=e}),t}function o9e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:r,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,p]=re.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,A]=re.useState(a);w1(m,a)||A(a);const[g,h]=re.useState(null),[f,b]=re.useState(null),y=re.useCallback(M=>{M!==E.current&&(E.current=M,h(M))},[]),w=re.useCallback(M=>{M!==_.current&&(_.current=M,b(M))},[]),k=i||g,C=o||f,E=re.useRef(null),_=re.useRef(null),x=re.useRef(d),S=l!=null,I=G4(l),D=G4(r),Q=G4(u),R=re.useCallback(()=>{if(!E.current||!_.current)return;const M={placement:t,strategy:n,middleware:m};D.current&&(M.platform=D.current),a9e(E.current,_.current,M).then(O=>{const P={...O,isPositioned:Q.current!==!1};B.current&&!w1(x.current,P)&&(x.current=P,jC.flushSync(()=>{p(P)}))})},[m,t,n,D,Q]);y1(()=>{u===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,p(M=>({...M,isPositioned:!1})))},[u]);const B=re.useRef(!1);y1(()=>(B.current=!0,()=>{B.current=!1}),[]),y1(()=>{if(k&&(E.current=k),C&&(_.current=C),k&&C){if(I.current)return I.current(k,C,R);R()}},[k,C,R,I,S]);const T=re.useMemo(()=>({reference:E,floating:_,setReference:y,setFloating:w}),[y,w]),N=re.useMemo(()=>({reference:k,floating:C}),[k,C]),L=re.useMemo(()=>{const M={position:n,left:0,top:0};if(!N.floating)return M;const O=nK(N.floating,d.x),P=nK(N.floating,d.y);return s?{...M,transform:"translate("+O+"px, "+P+"px)",...tK(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:P}},[n,s,N.floating,d.x,d.y]);return re.useMemo(()=>({...d,update:R,refs:T,elements:N,floatingStyles:L}),[d,R,T,N,L])}const s9e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:r}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?eK({element:a.current,padding:r}).fn(n):{}:a?eK({element:a,padding:r}).fn(n):{}}}},c9e=(e,t)=>{const n=VLe(e);return{name:n.name,fn:n.fn,options:[e,t]}},l9e=(e,t)=>{const n=JLe(e);return{name:n.name,fn:n.fn,options:[e,t]}},u9e=(e,t)=>({fn:n9e(e).fn,options:[e,t]}),d9e=(e,t)=>{const n=XLe(e);return{name:n.name,fn:n.fn,options:[e,t]}},p9e=(e,t)=>{const n=e9e(e);return{name:n.name,fn:n.fn,options:[e,t]}},m9e=(e,t)=>{const n=t9e(e);return{name:n.name,fn:n.fn,options:[e,t]}},A9e=(e,t)=>{const n=s9e(e);return{name:n.name,fn:n.fn,options:[e,t]}};var g9e="Arrow",aK=re.forwardRef((e,t)=>{const{children:n,width:a=10,height:r=5,...i}=e;return F.jsx(jn.svg,{...i,ref:t,width:a,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:F.jsx("polygon",{points:"0,0 30,0 15,10"})})});aK.displayName=g9e;var h9e=aK;function f9e(e){const[t,n]=re.useState(void 0);return Ei(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let o,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,s=u.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var z4="Popper",[rK,ph]=hu(z4),[b9e,iK]=rK(z4),oK=e=>{const{__scopePopper:t,children:n}=e,[a,r]=re.useState(null);return F.jsx(b9e,{scope:t,anchor:a,onAnchorChange:r,children:n})};oK.displayName=z4;var sK="PopperAnchor",cK=re.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...r}=e,i=iK(sK,n),o=re.useRef(null),s=ha(t,o),l=re.useRef(null);return re.useEffect(()=>{const u=l.current;l.current=a?.current||o.current,u!==l.current&&i.onAnchorChange(l.current)}),a?null:F.jsx(jn.div,{...r,ref:s})});cK.displayName=sK;var U4="PopperContent",[y9e,w9e]=rK(U4),lK=re.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:r=0,align:i="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:A="optimized",onPlaced:g,...h}=e,f=iK(U4,n),[b,y]=re.useState(null),w=ha(t,Y=>y(Y)),[k,C]=re.useState(null),E=f9e(k),_=E?.width??0,x=E?.height??0,S=a+(i!=="center"?"-"+i:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],Q=D.length>0,R={padding:I,boundary:D.filter(v9e),altBoundary:Q},{refs:B,floatingStyles:T,placement:N,isPositioned:L,middlewareData:M}=o9e({strategy:"fixed",placement:S,whileElementsMounted:(...Y)=>ZLe(...Y,{animationFrame:A==="always"}),elements:{reference:f.anchor},middleware:[c9e({mainAxis:r+x,alignmentAxis:o}),l&&l9e({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?u9e():void 0,...R}),l&&d9e({...R}),p9e({...R,apply:({elements:Y,rects:ae,availableWidth:Z,availableHeight:J})=>{const{width:ee,height:V}=ae.reference,pe=Y.floating.style;pe.setProperty("--radix-popper-available-width",`${Z}px`),pe.setProperty("--radix-popper-available-height",`${J}px`),pe.setProperty("--radix-popper-anchor-width",`${ee}px`),pe.setProperty("--radix-popper-anchor-height",`${V}px`)}}),k&&A9e({element:k,padding:s}),_9e({arrowWidth:_,arrowHeight:x}),m&&m9e({strategy:"referenceHidden",...R})]}),[O,P]=pK(N),$=pl(g);Ei(()=>{L&&$?.()},[L,$]);const q=M.arrow?.x,j=M.arrow?.y,W=M.arrow?.centerOffset!==0,[U,X]=re.useState();return Ei(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),F.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:L?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:F.jsx(y9e,{scope:n,placedSide:O,onArrowChange:C,arrowX:q,arrowY:j,shouldHideArrow:W,children:F.jsx(jn.div,{"data-side":O,"data-align":P,...h,ref:w,style:{...h.style,animation:L?void 0:"none"}})})})});lK.displayName=U4;var uK="PopperArrow",k9e={top:"bottom",right:"left",bottom:"top",left:"right"},dK=re.forwardRef(function(t,n){const{__scopePopper:a,...r}=t,i=w9e(uK,a),o=k9e[i.placedSide];return F.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]: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:F.jsx(h9e,{...r,ref:n,style:{...r.style,display:"block"}})})});dK.displayName=uK;function v9e(e){return e!==null}var _9e=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=pK(n),p={start:"0%",center:"50%",end:"100%"}[d],m=(r.arrow?.x??0)+s/2,A=(r.arrow?.y??0)+l/2;let g="",h="";return u==="bottom"?(g=o?p:`${m}px`,h=`${-l}px`):u==="top"?(g=o?p:`${m}px`,h=`${a.floating.height+l}px`):u==="right"?(g=`${-l}px`,h=o?p:`${A}px`):u==="left"&&(g=`${a.floating.width+l}px`,h=o?p:`${A}px`),{data:{x:g,y:h}}}});function pK(e){const[t,n="center"]=e.split("-");return[t,n]}var H4=oK,Y4=cK,W4=lK,K4=dK,C9e="Portal",Y0=re.forwardRef((e,t)=>{const{container:n,...a}=e,[r,i]=re.useState(!1);Ei(()=>i(!0),[]);const o=n||r&&globalThis?.document?.body;return o?UQ.createPortal(F.jsx(jn.div,{...a,ref:t}),o):null});Y0.displayName=C9e;var mK=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"}),E9e="VisuallyHidden",AK=re.forwardRef((e,t)=>F.jsx(jn.span,{...e,ref:t,style:{...mK,...e.style}}));AK.displayName=E9e;var x9e=AK,[k1]=hu("Tooltip",[ph]),v1=ph(),gK="TooltipProvider",B9e=700,Z4="tooltip.open",[I9e,V4]=k1(gK),hK=e=>{const{__scopeTooltip:t,delayDuration:n=B9e,skipDelayDuration:a=300,disableHoverableContent:r=!1,children:i}=e,o=re.useRef(!0),s=re.useRef(!1),l=re.useRef(0);return re.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),F.jsx(I9e,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:re.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,a)},[a]),isPointerInTransitRef:s,onPointerInTransitChange:re.useCallback(u=>{s.current=u},[]),disableHoverableContent:r,children:i})};hK.displayName=gK;var W0="Tooltip",[S9e,K0]=k1(W0),fK=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:r,onOpenChange:i,disableHoverableContent:o,delayDuration:s}=e,l=V4(W0,e.__scopeTooltip),u=v1(t),[d,p]=re.useState(null),m=Ec(),A=re.useRef(0),g=o??l.disableHoverableContent,h=s??l.delayDuration,f=re.useRef(!1),[b,y]=fu({prop:a,defaultProp:r??!1,onChange:_=>{_?(l.onOpen(),document.dispatchEvent(new CustomEvent(Z4))):l.onClose(),i?.(_)},caller:W0}),w=re.useMemo(()=>b?f.current?"delayed-open":"instant-open":"closed",[b]),k=re.useCallback(()=>{window.clearTimeout(A.current),A.current=0,f.current=!1,y(!0)},[y]),C=re.useCallback(()=>{window.clearTimeout(A.current),A.current=0,y(!1)},[y]),E=re.useCallback(()=>{window.clearTimeout(A.current),A.current=window.setTimeout(()=>{f.current=!0,y(!0),A.current=0},h)},[h,y]);return re.useEffect(()=>()=>{A.current&&(window.clearTimeout(A.current),A.current=0)},[]),F.jsx(H4,{...u,children:F.jsx(S9e,{scope:t,contentId:m,open:b,stateAttribute:w,trigger:d,onTriggerChange:p,onTriggerEnter:re.useCallback(()=>{l.isOpenDelayedRef.current?E():k()},[l.isOpenDelayedRef,E,k]),onTriggerLeave:re.useCallback(()=>{g?C():(window.clearTimeout(A.current),A.current=0)},[C,g]),onOpen:k,onClose:C,disableHoverableContent:g,children:n})})};fK.displayName=W0;var J4="TooltipTrigger",bK=re.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,r=K0(J4,n),i=V4(J4,n),o=v1(n),s=re.useRef(null),l=ha(t,s,r.onTriggerChange),u=re.useRef(!1),d=re.useRef(!1),p=re.useCallback(()=>u.current=!1,[]);return re.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),F.jsx(Y4,{asChild:!0,...o,children:F.jsx(jn.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...a,ref:l,onPointerMove:nn(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:nn(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:nn(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:nn(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:nn(e.onBlur,r.onClose),onClick:nn(e.onClick,r.onClose)})})});bK.displayName=J4;var X4="TooltipPortal",[D9e,Q9e]=k1(X4,{forceMount:void 0}),yK=e=>{const{__scopeTooltip:t,forceMount:n,children:a,container:r}=e,i=K0(X4,t);return F.jsx(D9e,{scope:t,forceMount:n,children:F.jsx(Cc,{present:n||i.open,children:F.jsx(Y0,{asChild:!0,container:r,children:a})})})};yK.displayName=X4;var mh="TooltipContent",wK=re.forwardRef((e,t)=>{const n=Q9e(mh,e.__scopeTooltip),{forceMount:a=n.forceMount,side:r="top",...i}=e,o=K0(mh,e.__scopeTooltip);return F.jsx(Cc,{present:a||o.open,children:o.disableHoverableContent?F.jsx(kK,{side:r,...i,ref:t}):F.jsx(T9e,{side:r,...i,ref:t})})}),T9e=re.forwardRef((e,t)=>{const n=K0(mh,e.__scopeTooltip),a=V4(mh,e.__scopeTooltip),r=re.useRef(null),i=ha(t,r),[o,s]=re.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:p}=a,m=re.useCallback(()=>{s(null),p(!1)},[p]),A=re.useCallback((g,h)=>{const f=g.currentTarget,b={x:g.clientX,y:g.clientY},y=R9e(b,f.getBoundingClientRect()),w=M9e(b,y),k=O9e(h.getBoundingClientRect()),C=$9e([...w,...k]);s(C),p(!0)},[p]);return re.useEffect(()=>()=>m(),[m]),re.useEffect(()=>{if(l&&d){const g=f=>A(f,d),h=f=>A(f,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",h)}}},[l,d,A,m]),re.useEffect(()=>{if(o){const g=h=>{const f=h.target,b={x:h.clientX,y:h.clientY},y=l?.contains(f)||d?.contains(f),w=!P9e(b,o);y?m():w&&(m(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,o,u,m]),F.jsx(kK,{...e,ref:i})}),[N9e,F9e]=k1(W0,{isInside:!1}),L9e=Q6e("TooltipContent"),kK=re.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:o,...s}=e,l=K0(mh,n),u=v1(n),{onClose:d}=l;return re.useEffect(()=>(document.addEventListener(Z4,d),()=>document.removeEventListener(Z4,d)),[d]),re.useEffect(()=>{if(l.trigger){const p=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,d]),F.jsx(z0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:F.jsxs(W4,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.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:[F.jsx(L9e,{children:a}),F.jsx(N9e,{scope:n,isInside:!0,children:F.jsx(x9e,{id:l.contentId,role:"tooltip",children:r||a})})]})})});wK.displayName=mh;var vK="TooltipArrow",_K=re.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,r=v1(n);return F9e(vK,n).isInside?null:F.jsx(K4,{...r,...a,ref:t})});_K.displayName=vK;function R9e(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,a,r,i)){case i:return"left";case r:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function M9e(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function O9e(e){const{top:t,right:n,bottom:a,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:a},{x:r,y:a}]}function P9e(e,t){const{x:n,y:a}=e;let r=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const s=t[i],l=t[o],u=s.x,d=s.y,p=l.x,m=l.y;d>a!=m>a&&n<(p-u)*(a-d)/(m-d)+u&&(r=!r)}return r}function $9e(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),j9e(t)}function j9e(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const r=e[a];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const r=e[a];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var q9e=hK,G9e=fK,z9e=bK,U9e=yK,H9e=wK,Y9e=_K;function _1({delayDuration:e=400,...t}){return F.jsx(q9e,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function $m({...e}){return F.jsx(_1,{children:F.jsx(G9e,{"data-slot":"tooltip",...e})})}function jm({...e}){return F.jsx(z9e,{"data-slot":"tooltip-trigger",...e})}function qm({className:e,sideOffset:t=0,children:n,...a}){return F.jsx(U9e,{children:F.jsxs(H9e,{"data-slot":"tooltip-content",sideOffset:t,className:Ct("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-sm text-balance",e),...a,children:[n,F.jsx(Y9e,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function W9e(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const K9e=e=>{switch(e){case"success":return J9e;case"info":return eRe;case"warning":return X9e;case"error":return tRe;default:return null}},Z9e=Array(12).fill(0),V9e=({visible:e,className:t})=>ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ne.createElement("div",{className:"sonner-spinner"},Z9e.map((n,a)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),J9e=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),X9e=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),eRe=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),tRe=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),nRe=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),aRe=()=>{const[e,t]=ne.useState(document.hidden);return ne.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let eT=1;class rRe{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...r}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:eT++,o=this.toasts.find(l=>l.id===i),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...t,id:i,title:a}),{...l,...t,id:i,dismissible:s,title:a}):l):this.addToast({title:a,...r,dismissible:s,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let i=a!==void 0,o;const s=r.then(async u=>{if(o=["resolve",u],ne.isValidElement(u))i=!1,this.create({id:a,type:"default",message:u});else if(oRe(u)&&!u.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,g=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:m,...g})}else if(u instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(u):n.error,m=typeof n.description=="function"?await n.description(u):n.description,g=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:m,...g})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(u):n.success,m=typeof n.description=="function"?await n.description(u):n.description,g=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:a,type:"success",description:m,...g})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){i=!1;const d=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,A=typeof d=="object"&&!ne.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:p,...A})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>s.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));return typeof a!="string"&&typeof a!="number"?{unwrap:l}:Object.assign(a,{unwrap:l})},this.custom=(t,n)=>{const a=n?.id||eT++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Yo=new rRe,iRe=(e,t)=>{const n=t?.id||eT++;return Yo.addToast({title:e,...t,id:n}),n},oRe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",sRe=iRe,cRe=()=>Yo.toasts,lRe=()=>Yo.getActiveToasts(),Wo=Object.assign(sRe,{success:Yo.success,info:Yo.info,warning:Yo.warning,error:Yo.error,custom:Yo.custom,message:Yo.message,promise:Yo.promise,dismiss:Yo.dismiss,loading:Yo.loading},{getHistory:cRe,getToasts:lRe});W9e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function C1(e){return e.label!==void 0}const uRe=3,dRe="24px",pRe="16px",CK=4e3,mRe=356,ARe=14,gRe=45,hRe=200;function hl(...e){return e.filter(Boolean).join(" ")}function fRe(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const bRe=e=>{var t,n,a,r,i,o,s,l,u;const{invert:d,toast:p,unstyled:m,interacting:A,setHeights:g,visibleToasts:h,heights:f,index:b,toasts:y,expanded:w,removeToast:k,defaultRichColors:C,closeButton:E,style:_,cancelButtonStyle:x,actionButtonStyle:S,className:I="",descriptionClassName:D="",duration:Q,position:R,gap:B,expandByDefault:T,classNames:N,icons:L,closeButtonAriaLabel:M="Close toast"}=e,[O,P]=ne.useState(null),[$,q]=ne.useState(null),[j,W]=ne.useState(!1),[U,X]=ne.useState(!1),[Y,ae]=ne.useState(!1),[Z,J]=ne.useState(!1),[ee,V]=ne.useState(!1),[pe,ue]=ne.useState(0),[Te,Le]=ne.useState(0),qe=ne.useRef(p.duration||Q||CK),Ee=ne.useRef(null),De=ne.useRef(null),Ue=b===0,ye=b+1<=h,et=p.type,Be=p.dismissible!==!1,He=p.className||"",Je=p.descriptionClassName||"",he=ne.useMemo(()=>f.findIndex(We=>We.toastId===p.id)||0,[f,p.id]),_e=ne.useMemo(()=>{var We;return(We=p.closeButton)!=null?We:E},[p.closeButton,E]),$e=ne.useMemo(()=>p.duration||Q||CK,[p.duration,Q]),de=ne.useRef(0),je=ne.useRef(0),te=ne.useRef(0),Ae=ne.useRef(null),[z,le]=R.split("-"),ce=ne.useMemo(()=>f.reduce((We,me,Ye)=>Ye>=he?We:We+me.height,0),[f,he]),be=aRe(),we=p.invert||d,Ie=et==="loading";je.current=ne.useMemo(()=>he*B+ce,[he,ce]),ne.useEffect(()=>{qe.current=$e},[$e]),ne.useEffect(()=>{W(!0)},[]),ne.useEffect(()=>{const We=De.current;if(We){const me=We.getBoundingClientRect().height;return Le(me),g(Ye=>[{toastId:p.id,height:me,position:p.position},...Ye]),()=>g(Ye=>Ye.filter(fe=>fe.toastId!==p.id))}},[g,p.id]),ne.useLayoutEffect(()=>{if(!j)return;const We=De.current,me=We.style.height;We.style.height="auto";const Ye=We.getBoundingClientRect().height;We.style.height=me,Le(Ye),g(fe=>fe.find(gt=>gt.toastId===p.id)?fe.map(gt=>gt.toastId===p.id?{...gt,height:Ye}:gt):[{toastId:p.id,height:Ye,position:p.position},...fe])},[j,p.title,p.description,g,p.id,p.jsx,p.action,p.cancel]);const Re=ne.useCallback(()=>{X(!0),ue(je.current),g(We=>We.filter(me=>me.toastId!==p.id)),setTimeout(()=>{k(p)},hRe)},[p,k,g,je]);ne.useEffect(()=>{if(p.promise&&et==="loading"||p.duration===1/0||p.type==="loading")return;let We;return w||A||be?(()=>{if(te.current<de.current){const fe=new Date().getTime()-de.current;qe.current=qe.current-fe}te.current=new Date().getTime()})():qe.current!==1/0&&(de.current=new Date().getTime(),We=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Re()},qe.current)),()=>clearTimeout(We)},[w,A,p,et,be,Re]),ne.useEffect(()=>{p.delete&&(Re(),p.onDismiss==null||p.onDismiss.call(p,p))},[Re,p.delete]);function ve(){var We;if(L?.loading){var me;return ne.createElement("div",{className:hl(N?.loader,p==null||(me=p.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":et==="loading"},L.loading)}return ne.createElement(V9e,{className:hl(N?.loader,p==null||(We=p.classNames)==null?void 0:We.loader),visible:et==="loading"})}const Oe=p.icon||L?.[et]||K9e(et);var Xe,Ge;return ne.createElement("li",{tabIndex:0,ref:De,className:hl(I,He,N?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,N?.default,N?.[et],p==null||(n=p.classNames)==null?void 0:n[et]),"data-sonner-toast":"","data-rich-colors":(Xe=p.richColors)!=null?Xe:C,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":j,"data-promise":!!p.promise,"data-swiped":ee,"data-removed":U,"data-visible":ye,"data-y-position":z,"data-x-position":le,"data-index":b,"data-front":Ue,"data-swiping":Y,"data-dismissible":Be,"data-type":et,"data-invert":we,"data-swipe-out":Z,"data-swipe-direction":$,"data-expanded":!!(w||T&&j),"data-testid":p.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${U?pe:je.current}px`,"--initial-height":T?"auto":`${Te}px`,..._,...p.style},onDragEnd:()=>{ae(!1),P(null),Ae.current=null},onPointerDown:We=>{We.button!==2&&(Ie||!Be||(Ee.current=new Date,ue(je.current),We.target.setPointerCapture(We.pointerId),We.target.tagName!=="BUTTON"&&(ae(!0),Ae.current={x:We.clientX,y:We.clientY})))},onPointerUp:()=>{var We,me,Ye;if(Z||!Be)return;Ae.current=null;const fe=Number(((We=De.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wt=Number(((me=De.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),gt=new Date().getTime()-((Ye=Ee.current)==null?void 0:Ye.getTime()),ut=O==="x"?fe:wt,St=Math.abs(ut)/gt;if(Math.abs(ut)>=gRe||St>.11){ue(je.current),p.onDismiss==null||p.onDismiss.call(p,p),q(O==="x"?fe>0?"right":"left":wt>0?"down":"up"),Re(),J(!0);return}else{var dt,ot;(dt=De.current)==null||dt.style.setProperty("--swipe-amount-x","0px"),(ot=De.current)==null||ot.style.setProperty("--swipe-amount-y","0px")}V(!1),ae(!1),P(null)},onPointerMove:We=>{var me,Ye,fe;if(!Ae.current||!Be||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;const gt=We.clientY-Ae.current.y,ut=We.clientX-Ae.current.x;var St;const dt=(St=e.swipeDirections)!=null?St:fRe(R);!O&&(Math.abs(ut)>1||Math.abs(gt)>1)&&P(Math.abs(ut)>Math.abs(gt)?"x":"y");let ot={x:0,y:0};const se=ft=>1/(1.5+Math.abs(ft)/20);if(O==="y"){if(dt.includes("top")||dt.includes("bottom"))if(dt.includes("top")&&gt<0||dt.includes("bottom")&&gt>0)ot.y=gt;else{const ft=gt*se(gt);ot.y=Math.abs(ft)<Math.abs(gt)?ft:gt}}else if(O==="x"&&(dt.includes("left")||dt.includes("right")))if(dt.includes("left")&&ut<0||dt.includes("right")&&ut>0)ot.x=ut;else{const ft=ut*se(ut);ot.x=Math.abs(ft)<Math.abs(ut)?ft:ut}(Math.abs(ot.x)>0||Math.abs(ot.y)>0)&&V(!0),(Ye=De.current)==null||Ye.style.setProperty("--swipe-amount-x",`${ot.x}px`),(fe=De.current)==null||fe.style.setProperty("--swipe-amount-y",`${ot.y}px`)}},_e&&!p.jsx&&et!=="loading"?ne.createElement("button",{"aria-label":M,"data-disabled":Ie,"data-close-button":!0,onClick:Ie||!Be?()=>{}:()=>{Re(),p.onDismiss==null||p.onDismiss.call(p,p)},className:hl(N?.closeButton,p==null||(a=p.classNames)==null?void 0:a.closeButton)},(Ge=L?.close)!=null?Ge:nRe):null,(et||p.icon||p.promise)&&p.icon!==null&&(L?.[et]!==null||p.icon)?ne.createElement("div",{"data-icon":"",className:hl(N?.icon,p==null||(r=p.classNames)==null?void 0:r.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ve():null,p.type!=="loading"?Oe:null):null,ne.createElement("div",{"data-content":"",className:hl(N?.content,p==null||(i=p.classNames)==null?void 0:i.content)},ne.createElement("div",{"data-title":"",className:hl(N?.title,p==null||(o=p.classNames)==null?void 0:o.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ne.createElement("div",{"data-description":"",className:hl(D,Je,N?.description,p==null||(s=p.classNames)==null?void 0:s.description)},typeof p.description=="function"?p.description():p.description):null),ne.isValidElement(p.cancel)?p.cancel:p.cancel&&C1(p.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||x,onClick:We=>{C1(p.cancel)&&Be&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,We),Re())},className:hl(N?.cancelButton,p==null||(l=p.classNames)==null?void 0:l.cancelButton)},p.cancel.label):null,ne.isValidElement(p.action)?p.action:p.action&&C1(p.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||S,onClick:We=>{C1(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,We),!We.defaultPrevented&&Re())},className:hl(N?.actionButton,p==null||(u=p.classNames)==null?void 0:u.actionButton)},p.action.label):null)};function EK(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function yRe(e,t){const n={};return[e,t].forEach((a,r)=>{const i=r===1,o=i?"--mobile-offset":"--offset",s=i?pRe:dRe;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof a=="number"||typeof a=="string"?l(a):typeof a=="object"?["top","right","bottom","left"].forEach(u=>{a[u]===void 0?n[`${o}-${u}`]=s:n[`${o}-${u}`]=typeof a[u]=="number"?`${a[u]}px`:a[u]}):l(s)}),n}const wRe=ne.forwardRef(function(t,n){const{id:a,invert:r,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:l,className:u,offset:d,mobileOffset:p,theme:m="light",richColors:A,duration:g,style:h,visibleToasts:f=uRe,toastOptions:b,dir:y=EK(),gap:w=ARe,icons:k,containerAriaLabel:C="Notifications"}=t,[E,_]=ne.useState([]),x=ne.useMemo(()=>a?E.filter(j=>j.toasterId===a):E.filter(j=>!j.toasterId),[E,a]),S=ne.useMemo(()=>Array.from(new Set([i].concat(x.filter(j=>j.position).map(j=>j.position)))),[x,i]),[I,D]=ne.useState([]),[Q,R]=ne.useState(!1),[B,T]=ne.useState(!1),[N,L]=ne.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=ne.useRef(null),O=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=ne.useRef(null),$=ne.useRef(!1),q=ne.useCallback(j=>{_(W=>{var U;return(U=W.find(X=>X.id===j.id))!=null&&U.delete||Yo.dismiss(j.id),W.filter(({id:X})=>X!==j.id)})},[]);return ne.useEffect(()=>Yo.subscribe(j=>{if(j.dismiss){requestAnimationFrame(()=>{_(W=>W.map(U=>U.id===j.id?{...U,delete:!0}:U))});return}setTimeout(()=>{UQ.flushSync(()=>{_(W=>{const U=W.findIndex(X=>X.id===j.id);return U!==-1?[...W.slice(0,U),{...W[U],...j},...W.slice(U+1)]:[j,...W]})})})}),[E]),ne.useEffect(()=>{if(m!=="system"){L(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;const j=window.matchMedia("(prefers-color-scheme: dark)");try{j.addEventListener("change",({matches:W})=>{L(W?"dark":"light")})}catch{j.addListener(({matches:U})=>{try{L(U?"dark":"light")}catch(X){console.error(X)}})}},[m]),ne.useEffect(()=>{E.length<=1&&R(!1)},[E]),ne.useEffect(()=>{const j=W=>{var U;if(o.every(ae=>W[ae]||W.code===ae)){var Y;R(!0),(Y=M.current)==null||Y.focus()}W.code==="Escape"&&(document.activeElement===M.current||(U=M.current)!=null&&U.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[o]),ne.useEffect(()=>{if(M.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,$.current=!1)}},[M.current]),ne.createElement("section",{ref:n,"aria-label":`${C} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((j,W)=>{var U;const[X,Y]=j.split("-");return x.length?ne.createElement("ol",{key:j,dir:y==="auto"?EK():y,tabIndex:-1,ref:M,className:u,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":X,"data-x-position":Y,style:{"--front-toast-height":`${((U=I[0])==null?void 0:U.height)||0}px`,"--width":`${mRe}px`,"--gap":`${w}px`,...h,...yRe(d,p)},onBlur:ae=>{$.current&&!ae.currentTarget.contains(ae.relatedTarget)&&($.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||$.current||($.current=!0,P.current=ae.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{B||R(!1)},onDragEnd:()=>R(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||T(!0)},onPointerUp:()=>T(!1)},x.filter(ae=>!ae.position&&W===0||ae.position===j).map((ae,Z)=>{var J,ee;return ne.createElement(bRe,{key:ae.id,icons:k,index:Z,toast:ae,defaultRichColors:A,duration:(J=b?.duration)!=null?J:g,className:b?.className,descriptionClassName:b?.descriptionClassName,invert:r,visibleToasts:f,closeButton:(ee=b?.closeButton)!=null?ee:l,interacting:B,position:j,style:b?.style,unstyled:b?.unstyled,classNames:b?.classNames,cancelButtonStyle:b?.cancelButtonStyle,actionButtonStyle:b?.actionButtonStyle,closeButtonAriaLabel:b?.closeButtonAriaLabel,removeToast:q,toasts:x.filter(V=>V.position==ae.position),heights:I.filter(V=>V.position==ae.position),setHeights:D,expandByDefault:s,gap:w,expanded:Q,swipeDirections:t.swipeDirections})})):null}))});function xK({onSend:e,status:t,isLastMessageFinished:n,stop:a,isErrorVisible:r,conversationId:i,className:o}){const{t:s}=Da(),{composer:l}=Zi(),[u,d]=ne.useState(""),[p,m]=ne.useState([]),A=ne.useRef(null),g=ne.useRef(null);ne.useEffect(()=>{i==="/"&&A.current&&A.current.focus()},[i]);const h=ne.useCallback(w=>{if(w.target.files){const k=Array.from(w.target.files),C=l?.attachments?.maxSize;if(C&&k.filter(_=>_.size>C).length>0){Wo.error(s("chat.file_too_large",{size:C}));return}m(E=>[...E,...k])}w.target.value=""},[l,s]),f=ne.useCallback(w=>{m(k=>k.filter((C,E)=>E!==w))},[]),b=t==="streaming"&&!n,y=w=>{if(w.preventDefault(),!b&&(u.trim()||p.length>0)){const k=new DataTransfer;p.forEach(C=>k.items.add(C)),e(u,k.files),d(""),m([])}};return F.jsx("div",{className:Ct("shrink-0 px-4 pb-5 pt-2 md:px-6 md:pb-6 w-full",o),children:F.jsx("div",{className:"max-w-4xl mx-auto w-full",children:F.jsxs(V6e,{onSubmit:y,children:[F.jsx("input",{type:"file",ref:g,onChange:h,multiple:!0,accept:l?.attachments?.types?.join(",")||"image/*,text/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx",className:"hidden"}),F.jsxs("div",{className:"flex flex-col flex-1 gap-2",children:[p.length>0&&F.jsx("div",{className:"flex flex-wrap gap-2 px-2 pt-2",children:p.map((w,k)=>F.jsxs("div",{className:"group relative flex items-center gap-2 rounded-xl glass-surface px-2.5 py-1.5 text-sm shadow-sm",children:[w.type.startsWith("image/")?F.jsx("img",{src:URL.createObjectURL(w),alt:w.name,className:"size-7 rounded-lg object-cover ring-1 ring-border/50"}):F.jsx(cW,{className:"size-3.5 text-muted-foreground shrink-0"}),F.jsx("span",{className:"max-w-[120px] truncate text-xs font-medium text-foreground/80",children:w.name}),F.jsx("button",{type:"button",onClick:()=>f(k),className:"ml-0.5 flex items-center justify-center size-4 rounded-full hover:bg-destructive/15 text-muted-foreground/60 hover:text-destructive transition-all duration-150",children:F.jsx(Mm,{className:"size-2.5"})})]},`${w.name}-${k}`))}),F.jsx(J6e,{ref:A,onChange:w=>d(w.target.value),value:u,autoFocus:!0,placeholder:l?.placeholder?s(l.placeholder):s("chat.input_placeholder")})]}),F.jsxs(X6e,{children:[F.jsx(eLe,{children:(l?.attachments?.enabled??!1)&&F.jsxs($m,{children:[F.jsx(jm,{asChild:!0,children:F.jsx(tLe,{variant:"ghost",onClick:()=>g.current?.click(),disabled:b,children:F.jsx(qFe,{className:"size-4"})})}),F.jsx(qm,{children:s("chat.attach_file")})]})}),F.jsx(nLe,{disabled:t!=="streaming"&&!u&&p.length===0,status:r?"error":t==="error"?void 0:n?"ready":t,onClick:t==="streaming"&&!n?a:void 0})]})]})})})}var kRe=re.createContext(void 0);function tT(e){const t=re.useContext(kRe);return e||t||"ltr"}function BK(e,[t,n]){return Math.min(n,Math.max(t,e))}const vRe=({suggestion:e,onClick:t,className:n,variant:a="outline",size:r="sm",children:i,...o})=>{const s=()=>{t?.(e)};return F.jsx(oi,{className:Ct("cursor-pointer rounded-full px-4",n),onClick:s,size:r,type:"button",variant:a,...o,children:i??e})},IK=({onSuggestionClick:e,icons:t})=>{const{t:n,i18n:a}=Da(),{welcome:r}=Zi(),i=r?.prompts??[],o=i.map(d=>{const p=typeof d=="string"?d:d.text;return n(p)}).filter(d=>d!==null&&d!==""),s=a.dir()==="rtl",l=r?.greeting?n(r.greeting)??r.greeting:n("chat.welcome.title"),u=r?.subtitle?n(r.subtitle):null;return F.jsxs("div",{dir:s?"rtl":"ltr",className:"flex flex-col items-center justify-center min-h-[60vh] text-center px-6 animate-in fade-in duration-700 ease-out",children:[r?.icon&&F.jsxs("div",{className:"mb-8 relative flex items-center justify-center",children:[F.jsx("div",{className:"absolute size-24 rounded-full bg-primary/5 blur-[40px] animate-pulse"}),F.jsx("div",{className:"relative size-12 md:size-16 rounded-xl bg-gradient-to-br from-surface to-secondary flex items-center justify-center border border-border/10 dark:border-border/5 shadow-xl shadow-black/10",children:typeof r.icon=="function"?F.jsx(r.icon,{className:"size-6 md:size-8 text-primary opacity-80"}):r.icon})]}),(l||u)&&F.jsxs("div",{className:"space-y-3 mb-12 max-w-xl mx-auto",children:[l&&F.jsx("h1",{className:"text-2xl md:text-3xl font-black tracking-tight leading-tight text-foreground",children:l}),u&&F.jsx("p",{className:"text-muted-foreground text-base md:text-lg font-medium max-w-md mx-auto leading-relaxed opacity-85 dark:opacity-70",children:u})]}),o.length>0&&F.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 w-full max-w-xl",children:o.map((d,p)=>{const m=i[p],A=typeof m!="string"?m.icon:null,g=t&&t[p%t.length]?t[p%t.length]:PFe,h=A||g;return F.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-3 duration-700 fill-mode-both",style:{animationDelay:`${p*80}ms`},children:F.jsxs(vRe,{onClick:()=>e(d),suggestion:d,variant:"ghost",className:Ct("h-full py-4 px-5 justify-start text-start items-center whitespace-normal w-full","group rounded-xl relative overflow-hidden","bg-secondary/45 border border-border/12 dark:bg-secondary/20 dark:border-border/5","hover:bg-secondary/70 hover:border-border/25 dark:hover:bg-secondary/40 dark:hover:border-border/10","hover:-translate-y-0.5 transition-[background-color,border-color,transform] duration-300 ease-out-quint"),children:[F.jsxs("div",{className:"flex items-center gap-3 w-full text-start",children:[F.jsx("div",{className:"size-8 rounded-lg bg-secondary/35 dark:bg-background/40 flex items-center justify-center shrink-0 border border-border/10 dark:border-border/5 group-hover:bg-primary group-hover:text-primary-foreground transition-colors duration-300",children:F.jsx(h,{className:"size-4"})}),F.jsx("div",{className:"flex flex-col gap-0.5 overflow-hidden",children:F.jsx("span",{className:"text-sm md:text-base font-semibold text-foreground/80 group-hover:text-foreground transition-colors",children:d.length>60?d.substring(0,60)+"...":d})})]}),F.jsx("div",{className:Ct("absolute bottom-0 left-0 w-full h-[1.5px] bg-primary scale-x-0 group-hover:scale-x-100 transition-transform duration-500",s?"origin-right":"origin-left")})]})},p)})})]})},SK=({className:e,from:t,...n})=>F.jsx("div",{className:Ct("group flex w-full items-end gap-3",t==="user"?"is-user justify-end":"is-assistant",e),...n}),DK=({children:e,className:t,isPlain:n,...a})=>F.jsx("div",{className:Ct("flex flex-col gap-2 overflow-hidden text-[1.0625rem]",!n&&["group-[.is-user]:rounded-lg group-[.is-user]:rounded-br-sm","group-[.is-user]:bg-gradient-to-br group-[.is-user]:from-primary group-[.is-user]:to-primary/85","group-[.is-user]:text-primary-foreground","group-[.is-user]:px-5 group-[.is-user]:py-3.5","group-[.is-user]:shadow-lg group-[.is-user]:shadow-primary/20","group-[.is-user]:max-w-[88%] md:group-[.is-user]:max-w-[78%]","group-[.is-user]:dark"],"group-[.is-assistant]:bg-transparent","group-[.is-assistant]:px-0 group-[.is-assistant]:py-1","group-[.is-assistant]:w-full group-[.is-assistant]:leading-[1.7]",t),...a,children:e}),_Re=({className:e,children:t,...n})=>F.jsx("div",{className:Ct("flex items-center gap-0.5","opacity-100","transition-opacity duration-200",e),...n,children:t}),E1=({tooltip:e,children:t,label:n,className:a,variant:r="ghost",size:i="sm",...o})=>{const s=F.jsxs(oi,{className:Ct("size-7 p-1 rounded-lg","text-muted-foreground/60 hover:text-foreground","hover:bg-accent/70","transition-all duration-150","hover:scale-105 active:scale-95",a),size:i,type:"button",variant:r,...o,children:[t,F.jsx("span",{className:"sr-only",children:n??e})]});return e?F.jsx(_1,{children:F.jsxs($m,{children:[F.jsx(jm,{asChild:!0,children:s}),F.jsx(qm,{children:F.jsx("p",{children:e})})]})}):s},Z0=(function(e){if(e==null)return BRe;if(typeof e=="function")return x1(e);if(typeof e=="object")return Array.isArray(e)?CRe(e):ERe(e);if(typeof e=="string")return xRe(e);throw new Error("Expected function, string, or object as test")});function CRe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Z0(e[n]);return x1(a);function a(...r){let i=-1;for(;++i<t.length;)if(t[i].apply(this,r))return!0;return!1}}function ERe(e){const t=e;return x1(n);function n(a){const r=a;let i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function xRe(e){return x1(t);function t(n){return n&&n.type===e}}function x1(e){return t;function t(n,a,r){return!!(IRe(n)&&e.call(this,n,typeof a=="number"?a:void 0,r||void 0))}}function BRe(){return!0}function IRe(e){return e!==null&&typeof e=="object"&&"type"in e}function AAn(e){return e}const QK=[],V0=!0,nT=!1,Ah="skip";function aT(e,t,n,a){let r;typeof t=="function"&&typeof n!="function"?(a=n,n=t):r=t;const i=Z0(r),o=a?-1:1;s(e,void 0,[])();function s(l,u,d){const p=l&&typeof l=="object"?l:{};if(typeof p.type=="string"){const A=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(A?"<"+A+">":""))+")"})}return m;function m(){let A=QK,g,h,f;if((!t||i(l,u,d[d.length-1]||void 0))&&(A=SRe(n(l,d)),A[0]===nT))return A;if("children"in l&&l.children){const b=l;if(b.children&&A[0]!==Ah)for(h=(a?b.children.length:-1)+o,f=d.concat(b);h>-1&&h<b.children.length;){const y=b.children[h];if(g=s(y,h,f)(),g[0]===nT)return g;h=typeof g[1]=="number"?g[1]:h+o}}return A}}}function SRe(e){return Array.isArray(e)?e:typeof e=="number"?[V0,e]:e==null?QK:[e]}function gh(e,t,n,a){let r,i,o;typeof t=="function"&&typeof n!="function"?(i=void 0,o=t,r=n):(i=t,o=n,r=a),aT(e,i,s,r);function s(l,u){const d=u[u.length-1],p=d?d.children.indexOf(l):void 0;return o(l,p,d)}}const hh={indicator:"indicator",textOnly:"text-only",remove:"remove"};function DRe({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:a=!1,allowedProtocols:r=[],blockedImageClass:i="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:s=hh.indicator,imageBlockPolicy:l=hh.indicator}){const u=t.length&&!t.every(p=>p==="*"),d=n.length&&!n.every(p=>p==="*");if(!e&&(u||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return p=>{const m=RRe(e,t,n,a,r,i,o,s,l);FK(p),gh(p,m)}}function TK(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function QRe(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const TRe=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),NRe=new Set(["javascript:","data:","file:","vbscript:"]);function NK(e,t,n,a=!1,r=!1,i=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!r)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return r&&a&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const o=TK(e,n);if(!o||NRe.has(o.protocol)||!(TRe.has(o.protocol)||i.includes(o.protocol)||i.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const l=QRe(e);return o&&t.some(u=>{const d=TK(u,n);return!d||d.origin!==o.origin?!1:o.href.startsWith(d.href)})?l?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:l?o.pathname+o.search+o.hash:o.href:null}function FK(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)FK(t)}}const rT=Symbol("node-seen");function FRe(e,t,n){return t===hh.remove?{type:"remove"}:t===hh.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function LRe(e,t,n){if(t===hh.remove)return{type:"remove"};if(t===hh.textOnly){const a=String(e.properties.alt||"");return a?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:a}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const RRe=(e,t,n,a,r,i,o,s,l)=>{const u=(d,p,m)=>{if(d.type!=="element"||d[rT])return V0;if(d.tagName==="a"){const A=NK(d.properties.href,t,e,!1,!1,r);if(A===null){if(d[rT]=!0,gh(d,u),m&&typeof p=="number"){const g=FRe(d,s,o);if(g.type==="remove")return m.children.splice(p,1),[Ah,p];m.children[p]=g.element}return Ah}else return d.properties.href=A,d.properties.target="_blank",d.properties.rel="noopener noreferrer",V0}if(d.tagName==="img"){const A=NK(d.properties.src,n,e,a,!0,r);if(A===null){if(d[rT]=!0,gh(d,u),m&&typeof p=="number"){const g=LRe(d,l,i);if(g.type==="remove")return m.children.splice(p,1),[Ah,p];m.children[p]=g.element}return Ah}else return d.properties.src=A,V0}return V0};return u};class J0{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}J0.prototype.normal={},J0.prototype.property={},J0.prototype.space=void 0;function LK(e,t){const n={},a={};for(const r of e)Object.assign(n,r.property),Object.assign(a,r.normal);return new J0(n,a,t)}function X0(e){return e.toLowerCase()}let Ko=class{constructor(t,n){this.attribute=n,this.property=t}};Ko.prototype.attribute="",Ko.prototype.booleanish=!1,Ko.prototype.boolean=!1,Ko.prototype.commaOrSpaceSeparated=!1,Ko.prototype.commaSeparated=!1,Ko.prototype.defined=!1,Ko.prototype.mustUseProperty=!1,Ko.prototype.number=!1,Ko.prototype.overloadedBoolean=!1,Ko.prototype.property="",Ko.prototype.spaceSeparated=!1,Ko.prototype.space=void 0;let MRe=0;const Nn=Gm(),Nr=Gm(),iT=Gm(),Qt=Gm(),Qa=Gm(),fh=Gm(),vs=Gm();function Gm(){return 2**++MRe}const oT=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nn,booleanish:Nr,commaOrSpaceSeparated:vs,commaSeparated:fh,number:Qt,overloadedBoolean:iT,spaceSeparated:Qa},Symbol.toStringTag,{value:"Module"})),sT=Object.keys(oT);class cT extends Ko{constructor(t,n,a,r){let i=-1;if(super(t,n),RK(this,"space",r),typeof a=="number")for(;++i<sT.length;){const o=sT[i];RK(this,sT[i],(a&oT[o])===oT[o])}}}cT.prototype.defined=!0;function RK(e,t,n){n&&(e[t]=n)}function bh(e){const t={},n={};for(const[a,r]of Object.entries(e.properties)){const i=new cT(a,e.transform(e.attributes||{},a),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(i.mustUseProperty=!0),t[a]=i,n[X0(a)]=a,n[X0(i.attribute)]=a}return new J0(t,n,e.space)}const MK=bh({properties:{ariaActiveDescendant:null,ariaAtomic:Nr,ariaAutoComplete:null,ariaBusy:Nr,ariaChecked:Nr,ariaColCount:Qt,ariaColIndex:Qt,ariaColSpan:Qt,ariaControls:Qa,ariaCurrent:null,ariaDescribedBy:Qa,ariaDetails:null,ariaDisabled:Nr,ariaDropEffect:Qa,ariaErrorMessage:null,ariaExpanded:Nr,ariaFlowTo:Qa,ariaGrabbed:Nr,ariaHasPopup:null,ariaHidden:Nr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qa,ariaLevel:Qt,ariaLive:null,ariaModal:Nr,ariaMultiLine:Nr,ariaMultiSelectable:Nr,ariaOrientation:null,ariaOwns:Qa,ariaPlaceholder:null,ariaPosInSet:Qt,ariaPressed:Nr,ariaReadOnly:Nr,ariaRelevant:null,ariaRequired:Nr,ariaRoleDescription:Qa,ariaRowCount:Qt,ariaRowIndex:Qt,ariaRowSpan:Qt,ariaSelected:Nr,ariaSetSize:Qt,ariaSort:null,ariaValueMax:Qt,ariaValueMin:Qt,ariaValueNow:Qt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function OK(e,t){return t in e?e[t]:t}function PK(e,t){return OK(e,t.toLowerCase())}const ORe=bh({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fh,acceptCharset:Qa,accessKey:Qa,action:null,allow:null,allowFullScreen:Nn,allowPaymentRequest:Nn,allowUserMedia:Nn,alt:null,as:null,async:Nn,autoCapitalize:null,autoComplete:Qa,autoFocus:Nn,autoPlay:Nn,blocking:Qa,capture:null,charSet:null,checked:Nn,cite:null,className:Qa,cols:Qt,colSpan:null,content:null,contentEditable:Nr,controls:Nn,controlsList:Qa,coords:Qt|fh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Nn,defer:Nn,dir:null,dirName:null,disabled:Nn,download:iT,draggable:Nr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Nn,formTarget:null,headers:Qa,height:Qt,hidden:iT,high:Qt,href:null,hrefLang:null,htmlFor:Qa,httpEquiv:Qa,id:null,imageSizes:null,imageSrcSet:null,inert:Nn,inputMode:null,integrity:null,is:null,isMap:Nn,itemId:null,itemProp:Qa,itemRef:Qa,itemScope:Nn,itemType:Qa,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Nn,low:Qt,manifest:null,max:null,maxLength:Qt,media:null,method:null,min:null,minLength:Qt,multiple:Nn,muted:Nn,name:null,nonce:null,noModule:Nn,noValidate:Nn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Nn,optimum:Qt,pattern:null,ping:Qa,placeholder:null,playsInline:Nn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Nn,referrerPolicy:null,rel:Qa,required:Nn,reversed:Nn,rows:Qt,rowSpan:Qt,sandbox:Qa,scope:null,scoped:Nn,seamless:Nn,selected:Nn,shadowRootClonable:Nn,shadowRootDelegatesFocus:Nn,shadowRootMode:null,shape:null,size:Qt,sizes:null,slot:null,span:Qt,spellCheck:Nr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Qt,step:null,style:null,tabIndex:Qt,target:null,title:null,translate:null,type:null,typeMustMatch:Nn,useMap:null,value:Nr,width:Qt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qa,axis:null,background:null,bgColor:null,border:Qt,borderColor:null,bottomMargin:Qt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Nn,declare:Nn,event:null,face:null,frame:null,frameBorder:null,hSpace:Qt,leftMargin:Qt,link:null,longDesc:null,lowSrc:null,marginHeight:Qt,marginWidth:Qt,noResize:Nn,noHref:Nn,noShade:Nn,noWrap:Nn,object:null,profile:null,prompt:null,rev:null,rightMargin:Qt,rules:null,scheme:null,scrolling:Nr,standby:null,summary:null,text:null,topMargin:Qt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Qt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Nn,disableRemotePlayback:Nn,prefix:null,property:null,results:Qt,security:null,unselectable:null},space:"html",transform:PK}),PRe=bh({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:vs,accentHeight:Qt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Qt,amplitude:Qt,arabicForm:null,ascent:Qt,attributeName:null,attributeType:null,azimuth:Qt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Qt,by:null,calcMode:null,capHeight:Qt,className:Qa,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Qt,diffuseConstant:Qt,direction:null,display:null,dur:null,divisor:Qt,dominantBaseline:null,download:Nn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Qt,enableBackground:null,end:null,event:null,exponent:Qt,externalResourcesRequired:null,fill:null,fillOpacity:Qt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fh,g2:fh,glyphName:fh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Qt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Qt,horizOriginX:Qt,horizOriginY:Qt,id:null,ideographic:Qt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Qt,k:Qt,k1:Qt,k2:Qt,k3:Qt,k4:Qt,kernelMatrix:vs,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Qt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Qt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Qt,overlineThickness:Qt,paintOrder:null,panose1:null,path:null,pathLength:Qt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qa,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Qt,pointsAtY:Qt,pointsAtZ:Qt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vs,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vs,rev:vs,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vs,requiredFeatures:vs,requiredFonts:vs,requiredFormats:vs,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Qt,specularExponent:Qt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Qt,strikethroughThickness:Qt,string:null,stroke:null,strokeDashArray:vs,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Qt,strokeOpacity:Qt,strokeWidth:null,style:null,surfaceScale:Qt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vs,tabIndex:Qt,tableValues:null,target:null,targetX:Qt,targetY:Qt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vs,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Qt,underlineThickness:Qt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Qt,values:null,vAlphabetic:Qt,vMathematical:Qt,vectorEffect:null,vHanging:Qt,vIdeographic:Qt,version:null,vertAdvY:Qt,vertOriginX:Qt,vertOriginY:Qt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Qt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:OK}),$K=bh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),jK=bh({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:PK}),qK=bh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$Re={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},jRe=/[A-Z]/g,GK=/-[a-z]/g,qRe=/^data[-\w.:]+$/i;function ew(e,t){const n=X0(t);let a=t,r=Ko;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qRe.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(GK,zRe);a="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!GK.test(i)){let o=i.replace(jRe,GRe);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}r=cT}return new r(a,t)}function GRe(e){return"-"+e.toLowerCase()}function zRe(e){return e.charAt(1).toUpperCase()}const yh=LK([MK,ORe,$K,jK,qK],"html"),fl=LK([MK,PRe,$K,jK,qK],"svg");function zK(e){const t=[],n=String(e||"");let a=n.indexOf(","),r=0,i=!1;for(;!i;){a===-1&&(a=n.length,i=!0);const o=n.slice(r,a).trim();(o||!i)&&t.push(o),r=a+1,a=n.indexOf(",",r)}return t}function lT(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const UK=/[#.]/g;function URe(e,t){const n=e||"",a={};let r=0,i,o;for(;r<n.length;){UK.lastIndex=r;const s=UK.exec(n),l=n.slice(r,s?s.index:n.length);l&&(i?i==="#"?a.id=l:Array.isArray(a.className)?a.className.push(l):a.className=[l]:o=l,r+=l.length),s&&(i=s[0],r++)}return{type:"element",tagName:o||t||"div",properties:a,children:[]}}function HK(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function uT(e){return e.join(" ").trim()}function YK(e,t,n){const a=n?KRe(n):void 0;function r(i,o,...s){let l;if(i==null){l={type:"root",children:[]};const u=o;s.unshift(u)}else{l=URe(i,t);const u=l.tagName.toLowerCase(),d=a?a.get(u):void 0;if(l.tagName=d||u,HRe(o))s.unshift(o);else for(const[p,m]of Object.entries(o))YRe(e,l.properties,p,m)}for(const u of s)dT(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return r}function HRe(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const r=t[a];if(r&&typeof r=="object"){if(!Array.isArray(r))return!0;const i=r;for(const o of i)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function YRe(e,t,n,a){const r=ew(e,n);let i;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;i=a}else typeof a=="boolean"?i=a:typeof a=="string"?r.spaceSeparated?i=HK(a):r.commaSeparated?i=zK(a):r.commaOrSpaceSeparated?i=HK(zK(a).join(" ")):i=WK(r,r.property,a):Array.isArray(a)?i=[...a]:i=r.property==="style"?WRe(a):String(a);if(Array.isArray(i)){const o=[];for(const s of i)o.push(WK(r,r.property,s));i=o}r.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[r.property]=i}}function dT(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)dT(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?dT(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function WK(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||X0(n)===X0(t)))return!0}return n}function WRe(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function KRe(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const ZRe=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],KK=YK(yh,"div"),ZK=YK(fl,"g",ZRe),bl={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function VRe(e,t){return VK(e,{})||{type:"root",children:[]}}function VK(e,t){const n=JRe(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function JRe(e,t){switch(e.nodeType){case 1:return n5e(e,t);case 3:return e5e(e);case 8:return t5e(e);case 9:return JK(e,t);case 10:return XRe();case 11:return JK(e,t);default:return}}function JK(e,t){return{type:"root",children:XK(e,t)}}function XRe(){return{type:"doctype"}}function e5e(e){return{type:"text",value:e.nodeValue||""}}function t5e(e){return{type:"comment",value:e.nodeValue||""}}function n5e(e,t){const n=e.namespaceURI,a=n===bl.svg?ZK:KK,r=n===bl.html?e.tagName.toLowerCase():e.tagName,i=n===bl.html&&r==="template"?e.content:e,o=e.getAttributeNames(),s={};let l=-1;for(;++l<o.length;)s[o[l]]=e.getAttribute(o[l])||"";return a(r,s,XK(i,t))}function XK(e,t){const n=e.childNodes,a=[];let r=-1;for(;++r<n.length;){const i=VK(n[r],t);i!==void 0&&a.push(i)}return a}new DOMParser;function a5e(e,t){const n=r5e(e);return VRe(n)}function r5e(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const eZ=(function(e,t,n){const a=Z0(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),zm=(function(e){if(e==null)return s5e;if(typeof e=="string")return o5e(e);if(typeof e=="object")return i5e(e);if(typeof e=="function")return pT(e);throw new Error("Expected function, string, or array as `test`")});function i5e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=zm(e[n]);return pT(a);function a(...r){let i=-1;for(;++i<t.length;)if(t[i].apply(this,r))return!0;return!1}}function o5e(e){return pT(t);function t(n){return n.tagName===e}}function pT(e){return t;function t(n,a,r){return!!(c5e(n)&&e.call(this,n,typeof a=="number"?a:void 0,r||void 0))}}function s5e(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function c5e(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const tZ=/\n/g,nZ=/[\t ]+/g,mT=zm("br"),aZ=zm(h5e),l5e=zm("p"),rZ=zm("tr"),u5e=zm(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",g5e,f5e]),iZ=zm(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function d5e(e,t){const n=t||{},a="children"in e?e.children:[],r=iZ(e),i=cZ(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...sZ(e,{breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<a.length;)o.push(...oZ(a[s],e,{whitespace:i,breakBefore:s?void 0:r,breakAfter:s<a.length-1?mT(a[s+1]):r}));const l=[];let u;for(s=-1;++s<o.length;){const d=o[s];typeof d=="number"?u!==void 0&&d>u&&(u=d):d&&(u!==void 0&&u>-1&&l.push(`
1
+ (function(gn,F){typeof exports=="object"&&typeof module<"u"?F(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("react-router-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","react-router-dom"],F):(gn=typeof globalThis<"u"?globalThis:gn||self,F(gn.Gentiq={},gn.jsxRuntime,gn.React,gn.ReactDOM,gn.ReactRouterDOM))})(this,(function(gn,F,ne,UQ,_i){"use strict";var Fy,Ly,Ry,My,Oy,Py,$y,jy,Xg,qy,Gy,zy,Uy,Hy,Yy,Wy,Ky,Zy,Vy,Jy,Xy,e0,t0,n0,a0,r0,i0,o0,s0,c0,l0,u0,d0,p0,m0,A0,g0,h0,f0,b0,y0,w0,k0,v0,_0,C0,E0,eh,x0,B0,I0,Md,S0,D0,Q0,T0;function qH(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const re=qH(ne),jC=qH(UQ);var rh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},a8e={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r8e=class{#e=a8e;#t=!1;setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&this.#t&&e!==this.#e&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:this.#e,provider:e}),this.#e=e,process.env.NODE_ENV!=="production"&&(this.#t=!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&(this.#t=!0),this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&(this.#t=!0),this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Sm=new r8e;function i8e(e){setTimeout(e,0)}var Dm=typeof window>"u"||"Deno"in globalThis;function ho(){}function o8e(e,t){return typeof e=="function"?e(t):e}function HQ(e){return typeof e=="number"&&e>=0&&e!==1/0}function GH(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Pd(e,t){return typeof e=="function"?e(t):e}function Hs(e,t){return typeof e=="function"?e(t):e}function zH(e,t){const{type:n="all",exact:a,fetchStatus:r,predicate:i,queryKey:o,stale:s}=e;if(o){if(a){if(t.queryHash!==YQ(o,t.options))return!1}else if(!F0(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||r&&r!==t.state.fetchStatus||i&&!i(t))}function UH(e,t){const{exact:n,status:a,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Qm(t.options.mutationKey)!==Qm(i))return!1}else if(!F0(t.options.mutationKey,i))return!1}return!(a&&t.state.status!==a||r&&!r(t))}function YQ(e,t){return(t?.queryKeyHashFn||Qm)(e)}function Qm(e){return JSON.stringify(e,(t,n)=>KQ(n)?Object.keys(n).sort().reduce((a,r)=>(a[r]=n[r],a),{}):n)}function F0(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>F0(e[n],t[n])):!1}var s8e=Object.prototype.hasOwnProperty;function WQ(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=HH(e)&&HH(t);if(!a&&!(KQ(e)&&KQ(t)))return t;const i=(a?e:Object.keys(e)).length,o=a?t:Object.keys(t),s=o.length,l=a?new Array(s):{};let u=0;for(let d=0;d<s;d++){const p=a?d:o[d],m=e[p],A=t[p];if(m===A){l[p]=m,(a?d<i:s8e.call(e,p))&&u++;continue}if(m===null||A===null||typeof m!="object"||typeof A!="object"){l[p]=A;continue}const g=WQ(m,A,n+1);l[p]=g,g===m&&u++}return i===s&&u===i?e:l}function qC(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function HH(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function KQ(e){if(!YH(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!YH(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function YH(e){return Object.prototype.toString.call(e)==="[object Object]"}function c8e(e){return new Promise(t=>{Sm.setTimeout(t,e)})}function ZQ(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return WQ(e,t)}catch(a){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${a}`),a}return WQ(e,t)}return t}function l8e(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function u8e(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var GC=Symbol();function WH(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===GC&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===GC?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function VQ(e,t){return typeof e=="function"?e(...t):!!e}function d8e(e,t,n){let a=!1,r;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),a||(a=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)}),e}var p8e=class extends rh{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Dm&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},JQ=new p8e;function XQ(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});n.status="pending",n.catch(()=>{});function a(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{a({status:"fulfilled",value:r}),e(r)},n.reject=r=>{a({status:"rejected",reason:r}),t(r)},n}var m8e=i8e;function A8e(){let e=[],t=0,n=s=>{s()},a=s=>{s()},r=m8e;const i=s=>{t?e.push(s):r(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&r(()=>{a(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{a=s},setScheduler:s=>{r=s}}}var Gr=A8e(),g8e=class extends rh{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Dm&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},zC=new g8e;function h8e(e){return Math.min(1e3*2**e,3e4)}function KH(e){return(e??"online")==="online"?zC.isOnline():!0}var e4=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function ZH(e){let t=!1,n=0,a;const r=XQ(),i=()=>r.status!=="pending",o=h=>{if(!i()){const f=new e4(h);m(f),e.onCancel?.(f)}},s=()=>{t=!0},l=()=>{t=!1},u=()=>JQ.isFocused()&&(e.networkMode==="always"||zC.isOnline())&&e.canRun(),d=()=>KH(e.networkMode)&&e.canRun(),p=h=>{i()||(a?.(),r.resolve(h))},m=h=>{i()||(a?.(),r.reject(h))},A=()=>new Promise(h=>{a=f=>{(i()||u())&&h(f)},e.onPause?.()}).then(()=>{a=void 0,i()||e.onContinue?.()}),g=()=>{if(i())return;let h;const f=n===0?e.initialPromise:void 0;try{h=f??e.fn()}catch(b){h=Promise.reject(b)}Promise.resolve(h).then(p).catch(b=>{if(i())return;const y=e.retry??(Dm?0:3),w=e.retryDelay??h8e,k=typeof w=="function"?w(n,b):w,C=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,b);if(t||!C){m(b);return}n++,e.onFail?.(n,b),c8e(k).then(()=>u()?void 0:A()).then(()=>{t?m(b):g()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(a?.(),r),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?g():A().then(g),r)}}var VH=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),HQ(this.gcTime)&&(this.#e=Sm.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Dm?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Sm.clearTimeout(this.#e),this.#e=void 0)}},f8e=class extends VH{#e;#t;#n;#r;#a;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=eY(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=eY(this.options);t.data!==void 0&&(this.setState(XH(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=ZQ(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(ho).catch(ho):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Hs(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===GC||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Pd(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!GH(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(l=>l.options.queryFn);s&&this.setOptions(s.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const n=new AbortController,a=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},r=()=>{const s=WH(this.options,t),u=(()=>{const d={client:this.#r,queryKey:this.queryKey,meta:this.meta};return a(d),d})();return this.#s=!1,this.options.persister?this.options.persister(s,u,this):s(u)},o=(()=>{const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:r};return a(s),s})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#o({type:"fetch",meta:o.fetchOptions?.meta}),this.#a=ZH({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof e4&&s.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(s,l)=>{this.#o({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#a.start();if(s===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#n.config.onSuccess?.(s,this),this.#n.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof e4){if(s.silent)return this.#a.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#o({type:"error",error:s}),this.#n.config.onError?.(s,this),this.#n.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#o(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...JH(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,...XH(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const r=e.error;return{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Gr.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function JH(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:KH(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function XH(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function eY(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var tY=class extends rh{constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.#s=XQ(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#a;#i;#s;#o;#g;#p;#m;#l;#u;#c;#A=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),nY(this.#t,this.options)?this.#d():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return t4(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return t4(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#w(),this.#k(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hs(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#t.setOptions(this.options),t._defaulted&&!qC(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&aY(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||Hs(this.options.enabled,this.#t)!==Hs(t.enabled,this.#t)||Pd(this.options.staleTime,this.#t)!==Pd(t.staleTime,this.#t))&&this.#h();const r=this.#f();a&&(this.#t!==n||Hs(this.options.enabled,this.#t)!==Hs(t.enabled,this.#t)||r!==this.#c)&&this.#b(r)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return y8e(this,n)&&(this.#r=n,this.#i=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){this.#A.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#d(e){this.#v();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ho)),t}#h(){this.#w();const e=Pd(this.options.staleTime,this.#t);if(Dm||this.#r.isStale||!HQ(e))return;const n=GH(this.#r.dataUpdatedAt,e)+1;this.#l=Sm.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#f(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#b(e){this.#k(),this.#c=e,!(Dm||Hs(this.options.enabled,this.#t)===!1||!HQ(this.#c)||this.#c===0)&&(this.#u=Sm.setInterval(()=>{(this.options.refetchIntervalInBackground||JQ.isFocused())&&this.#d()},this.#c))}#y(){this.#h(),this.#b(this.#f())}#w(){this.#l&&(Sm.clearTimeout(this.#l),this.#l=void 0)}#k(){this.#u&&(Sm.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,a=this.options,r=this.#r,i=this.#a,o=this.#i,l=e!==n?e.state:this.#n,{state:u}=e;let d={...u},p=!1,m;if(t._optimisticResults){const x=this.hasListeners(),S=!x&&nY(e,t),I=x&&aY(e,n,t,a);(S||I)&&(d={...d,...JH(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:A,errorUpdatedAt:g,status:h}=d;m=d.data;let f=!1;if(t.placeholderData!==void 0&&m===void 0&&h==="pending"){let x;r?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(x=r.data,f=!0):x=typeof t.placeholderData=="function"?t.placeholderData(this.#m?.state.data,this.#m):t.placeholderData,x!==void 0&&(h="success",m=ZQ(r?.data,x,t),p=!0)}if(t.select&&m!==void 0&&!f)if(r&&m===i?.data&&t.select===this.#g)m=this.#p;else try{this.#g=t.select,m=t.select(m),m=ZQ(r?.data,m,t),this.#p=m,this.#o=null}catch(x){this.#o=x}this.#o&&(A=this.#o,m=this.#p,g=Date.now(),h="error");const b=d.fetchStatus==="fetching",y=h==="pending",w=h==="error",k=y&&b,C=m!==void 0,_={status:h,fetchStatus:d.fetchStatus,isPending:y,isSuccess:h==="success",isError:w,isInitialLoading:k,isLoading:k,data:m,dataUpdatedAt:d.dataUpdatedAt,error:A,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:w&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:w&&C,isStale:n4(e,t),refetch:this.refetch,promise:this.#s,isEnabled:Hs(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const x=_.data!==void 0,S=_.status==="error"&&!x,I=R=>{S?R.reject(_.error):x&&R.resolve(_.data)},D=()=>{const R=this.#s=_.promise=XQ();I(R)},Q=this.#s;switch(Q.status){case"pending":e.queryHash===n.queryHash&&I(Q);break;case"fulfilled":(S||_.data!==Q.value)&&D();break;case"rejected":(!S||_.error!==Q.reason)&&D();break}}return _}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#i=this.options,this.#a.data!==void 0&&(this.#m=this.#t),qC(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,r=typeof a=="function"?a():a;if(r==="all"||!r&&!this.#A.size)return!0;const i=new Set(r??this.#A);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(o=>{const s=o;return this.#r[s]!==e[s]&&i.has(s)})};this.#_({listeners:n()})}#v(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#_(e){Gr.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function b8e(e,t){return Hs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function nY(e,t){return b8e(e,t)||e.state.data!==void 0&&t4(e,t,t.refetchOnMount)}function t4(e,t,n){if(Hs(t.enabled,e)!==!1&&Pd(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&n4(e,t)}return!1}function aY(e,t,n,a){return(e!==t||Hs(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&n4(e,n)}function n4(e,t){return Hs(t.enabled,e)!==!1&&e.isStaleByTime(Pd(t.staleTime,e))}function y8e(e,t){return!qC(e.getCurrentResult(),t)}function UC(e){return{onFetch:(t,n)=>{const a=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let d=!1;const p=g=>{d8e(g,()=>t.signal,()=>d=!0)},m=WH(t.options,t.fetchOptions),A=async(g,h,f)=>{if(d)return Promise.reject();if(h==null&&g.pages.length)return Promise.resolve(g);const y=(()=>{const E={client:t.client,queryKey:t.queryKey,pageParam:h,direction:f?"backward":"forward",meta:t.options.meta};return p(E),E})(),w=await m(y),{maxPages:k}=t.options,C=f?u8e:l8e;return{pages:C(g.pages,w,k),pageParams:C(g.pageParams,h,k)}};if(r&&i.length){const g=r==="backward",h=g?rY:a4,f={pages:i,pageParams:o},b=h(a,f);s=await A(f,b,g)}else{const g=e??i.length;do{const h=l===0?o[0]??a.initialPageParam:a4(a,s);if(l>0&&h==null)break;s=await A(s,h),l++}while(l<g)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function a4(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function rY(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function w8e(e,t){return t?a4(e,t)!=null:!1}function k8e(e,t){return!t||!e.getPreviousPageParam?!1:rY(e,t)!=null}var v8e=class extends tY{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:UC()})}getOptimisticResult(e){return e.behavior=UC(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:n}=e,a=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:o,isRefetchError:s}=a,l=n.fetchMeta?.fetchMore?.direction,u=o&&l==="forward",d=r&&l==="forward",p=o&&l==="backward",m=r&&l==="backward";return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:w8e(t,n.data),hasPreviousPage:k8e(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:s&&!u&&!p,isRefetching:i&&!d&&!m}}},_8e=class extends VH{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||iY(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#a({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ZH({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,o)=>{this.#a({type:"failed",failureCount:i,error:o})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",r=!this.#r.canStart();try{if(a)t();else{this.#a({type:"pending",variables:e,isPaused:r}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#a({type:"pending",context:o,variables:e,isPaused:r})}const i=await this.#r.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#a({type:"success",data:i}),i}catch(i){try{await this.#n.config.onError?.(i,e,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onError?.(i,e,this.state.context,n)}catch(o){Promise.reject(o)}try{await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n)}catch(o){Promise.reject(o)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,n)}catch(o){Promise.reject(o)}throw this.#a({type:"error",error:i}),i}finally{this.#n.runNext(this)}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Gr.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function iY(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var C8e=class extends rh{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new _8e({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=HC(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=HC(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=HC(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(r=>r.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=HC(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Gr.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>UH(t,n))}findAll(e={}){return this.getAll().filter(t=>UH(e,t))}notify(e){Gr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Gr.batch(()=>Promise.all(e.map(t=>t.continue().catch(ho))))}};function HC(e){return e.options.scope?.id}var E8e=class extends rh{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),qC(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Qm(n.mutationKey)!==Qm(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#i(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#a(),this.#i()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#a(){const t=this.#n?.state??iY();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#i(t){Gr.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,a=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,a,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(t.data,null,n,a,r)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,a,r)}catch(i){Promise.reject(i)}try{this.#r.onSettled?.(void 0,t.error,n,a,r)}catch(i){Promise.reject(i)}}}this.listeners.forEach(n=>{n(this.#t)})})}},x8e=class extends rh{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,r=t.queryHash??YQ(a,t);let i=this.get(r);return i||(i=new f8e({client:e,queryKey:a,queryHash:r,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Gr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>zH(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>zH(e,n)):t}notify(e){Gr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Gr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Gr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},B8e=class{#e;#t;#n;#r;#a;#i;#s;#o;constructor(e={}){this.#e=e.queryCache||new x8e,this.#t=e.mutationCache||new C8e,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=JQ.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=zC.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#o?.(),this.#o=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Pd(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(a.queryHash)?.state.data,o=o8e(t,i);if(o!==void 0)return this.#e.build(this,a).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Gr.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Gr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Gr.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=Gr.batch(()=>this.#e.findAll(e).map(r=>r.cancel(n)));return Promise.all(a).then(ho).catch(ho)}invalidateQueries(e,t={}){return Gr.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=Gr.batch(()=>this.#e.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,n);return n.throwOnError||(i=i.catch(ho)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(a).then(ho)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Pd(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ho).catch(ho)}fetchInfiniteQuery(e){return e.behavior=UC(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ho).catch(ho)}ensureInfiniteQueryData(e){return e.behavior=UC(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return zC.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Qm(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{F0(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(Qm(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{F0(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=YQ(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===GC&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},oY=re.createContext(void 0),mu=e=>{const t=re.useContext(oY);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},I8e=({client:e,children:t})=>(re.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),F.jsx(oY.Provider,{value:e,children:t})),sY=re.createContext(!1),S8e=()=>re.useContext(sY);sY.Provider;function D8e(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Q8e=re.createContext(D8e()),T8e=()=>re.useContext(Q8e),N8e=(e,t,n)=>{const a=n?.state.error&&typeof e.throwOnError=="function"?VQ(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},F8e=e=>{re.useEffect(()=>{e.clearReset()},[e])},L8e=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(r&&e.data===void 0||VQ(n,[e.error,a])),R8e=e=>{if(e.suspense){const n=r=>r==="static"?r:Math.max(r??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...r)=>n(a(...r)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},M8e=(e,t)=>e.isLoading&&e.isFetching&&!t,O8e=(e,t)=>e?.suspense&&t.isPending,cY=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function lY(e,t,n){if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const a=S8e(),r=T8e(),i=mu(),o=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(o);const s=i.getQueryCache().get(o.queryHash);process.env.NODE_ENV!=="production"&&(o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),o._optimisticResults=a?"isRestoring":"optimistic",R8e(o),N8e(o,r,s),F8e(r);const l=!i.getQueryCache().get(o.queryHash),[u]=re.useState(()=>new t(i,o)),d=u.getOptimisticResult(o),p=!a&&e.subscribed!==!1;if(re.useSyncExternalStore(re.useCallback(m=>{const A=p?u.subscribe(Gr.batchCalls(m)):ho;return u.updateResult(),A},[u,p]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),re.useEffect(()=>{u.setOptions(o)},[o,u]),O8e(o,d))throw cY(o,u,r);if(L8e({result:d,errorResetBoundary:r,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!Dm&&M8e(d,a)&&(l?cY(o,u,r):s?.promise)?.catch(ho).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function Tm(e,t){return lY(e,tY)}function Au(e,t){const n=mu(),[a]=re.useState(()=>new E8e(n,e));re.useEffect(()=>{a.setOptions(e)},[a,e]);const r=re.useSyncExternalStore(re.useCallback(o=>a.subscribe(Gr.batchCalls(o)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),i=re.useCallback((o,s)=>{a.mutate(o,s).catch(ho)},[a]);if(r.error&&VQ(a.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}function P8e(e,t){return lY(e,v8e)}const xn=e=>typeof e=="string",L0=()=>{let e,t;const n=new Promise((a,r)=>{e=a,t=r});return n.resolve=e,n.reject=t,n},uY=e=>e==null?"":""+e,$8e=(e,t,n)=>{e.forEach(a=>{t[a]&&(n[a]=t[a])})},j8e=/###/g,dY=e=>e&&e.indexOf("###")>-1?e.replace(j8e,"."):e,pY=e=>!e||xn(e),R0=(e,t,n)=>{const a=xn(t)?t.split("."):t;let r=0;for(;r<a.length-1;){if(pY(e))return{};const i=dY(a[r]);!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={},++r}return pY(e)?{}:{obj:e,k:dY(a[r])}},mY=(e,t,n)=>{const{obj:a,k:r}=R0(e,t,Object);if(a!==void 0||t.length===1){a[r]=n;return}let i=t[t.length-1],o=t.slice(0,t.length-1),s=R0(e,o,Object);for(;s.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),s=R0(e,o,Object),s?.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},q8e=(e,t,n,a)=>{const{obj:r,k:i}=R0(e,t,Object);r[i]=r[i]||[],r[i].push(n)},YC=(e,t)=>{const{obj:n,k:a}=R0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,a))return n[a]},G8e=(e,t,n)=>{const a=YC(e,n);return a!==void 0?a:YC(t,n)},AY=(e,t,n)=>{for(const a in t)a!=="__proto__"&&a!=="constructor"&&(a in e?xn(e[a])||e[a]instanceof String||xn(t[a])||t[a]instanceof String?n&&(e[a]=t[a]):AY(e[a],t[a],n):e[a]=t[a]);return e},Nm=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var z8e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const U8e=e=>xn(e)?e.replace(/[&<>"'\/]/g,t=>z8e[t]):e;class H8e{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const a=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,a),this.regExpQueue.push(t),a}}const Y8e=[" ",",","?","!",";"],W8e=new H8e(20),K8e=(e,t,n)=>{t=t||"",n=n||"";const a=Y8e.filter(o=>t.indexOf(o)<0&&n.indexOf(o)<0);if(a.length===0)return!0;const r=W8e.getRegExp(`(${a.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!r.test(e);if(!i){const o=e.indexOf(n);o>0&&!r.test(e.substring(0,o))&&(i=!0)}return i},r4=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const a=t.split(n);let r=e;for(let i=0;i<a.length;){if(!r||typeof r!="object")return;let o,s="";for(let l=i;l<a.length;++l)if(l!==i&&(s+=n),s+=a[l],o=r[s],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&l<a.length-1)continue;i+=l-i+1;break}r=o}return r},M0=e=>e?.replace(/_/g,"-"),Z8e={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class WC{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||Z8e,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,a,r){return r&&!this.debug?null:(xn(t[0])&&(t[0]=`${a}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new WC(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new WC(this.logger,t)}}var dl=new WC;class KC{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(a=>{this.observers[a]||(this.observers[a]=new Map);const r=this.observers[a].get(n)||0;this.observers[a].set(n,r+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([r,i])=>{for(let o=0;o<i;o++)r(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([r,i])=>{for(let o=0;o<i;o++)r.apply(r,[t,...n])})}}class gY extends KC{constructor(t,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,a,r={}){const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],a&&(Array.isArray(a)?s.push(...a):xn(a)&&i?s.push(...a.split(i)):s.push(a)));const l=YC(this.data,s);return!l&&!n&&!a&&t.indexOf(".")>-1&&(t=s[0],n=s[1],a=s.slice(2).join(".")),l||!o||!xn(a)?l:r4(this.data?.[t]?.[n],a,i)}addResource(t,n,a,r,i={silent:!1}){const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];a&&(s=s.concat(o?a.split(o):a)),t.indexOf(".")>-1&&(s=t.split("."),r=n,n=s[1]),this.addNamespaces(n),mY(this.data,s,r),i.silent||this.emit("added",t,n,a,r)}addResources(t,n,a,r={silent:!1}){for(const i in a)(xn(a[i])||Array.isArray(a[i]))&&this.addResource(t,n,i,a[i],{silent:!0});r.silent||this.emit("added",t,n,a)}addResourceBundle(t,n,a,r,i,o={silent:!1,skipCopy:!1}){let s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),r=a,a=n,n=s[1]),this.addNamespaces(n);let l=YC(this.data,s)||{};o.skipCopy||(a=JSON.parse(JSON.stringify(a))),r?AY(l,a,i):l={...l,...a},mY(this.data,s,l),o.silent||this.emit("added",t,n,a)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var hY={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,a,r){return e.forEach(i=>{t=this.processors[i]?.process(t,n,a,r)??t}),t}};const fY=Symbol("i18next/PATH_KEY");function V8e(){const e=[],t=Object.create(null);let n;return t.get=(a,r)=>(n?.revoke?.(),r===fY?e:(e.push(r),n=Proxy.revocable(a,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function O0(e,t){const{[fY]:n}=e(V8e()),a=t?.keySeparator??".",r=t?.nsSeparator??":";if(n.length>1&&r){const i=t?.ns;if((i?Array.isArray(i)?i:[i]:[]).includes(n[0]))return`${n[0]}${r}${n.slice(1).join(a)}`}return n.join(a)}const bY={},i4=e=>!xn(e)&&typeof e!="boolean"&&typeof e!="number";class ZC extends KC{constructor(t,n={}){super(),$8e(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=dl.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const a={...n};if(t==null)return!1;const r=this.resolve(t,a);if(r?.res===void 0)return!1;const i=i4(r.res);return!(a.returnObjects===!1&&i)}extractFromKey(t,n){let a=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const o=a&&t.indexOf(a)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!K8e(t,a,r);if(o&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:xn(i)?[i]:i};const u=t.split(a);(a!==r||a===r&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),t=u.join(r)}return{key:t,namespaces:xn(i)?[i]:i}}translate(t,n,a){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";typeof t=="function"&&(t=O0(t,{...this.options,...r})),Array.isArray(t)||(t=[String(t)]),t=t.map(R=>typeof R=="function"?O0(R,{...this.options,...r}):String(R));const i=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(t[t.length-1],r),u=l[l.length-1];let d=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const p=r.lng||this.language,m=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p?.toLowerCase()==="cimode")return m?i?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${d}${s}`:i?{res:s,usedKey:s,exactUsedKey:s,usedLng:p,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:s;const A=this.resolve(t,r);let g=A?.res;const h=A?.usedKey||s,f=A?.exactUsedKey||s,b=["[object Number]","[object Function]","[object RegExp]"],y=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,k=r.count!==void 0&&!xn(r.count),C=ZC.hasDefaultValue(r),E=k?this.pluralResolver.getSuffix(p,r.count,r):"",_=r.ordinal&&k?this.pluralResolver.getSuffix(p,r.count,{ordinal:!1}):"",x=k&&!r.ordinal&&r.count===0,S=x&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${E}`]||r[`defaultValue${_}`]||r.defaultValue;let I=g;w&&!g&&C&&(I=S);const D=i4(I),Q=Object.prototype.toString.apply(I);if(w&&I&&D&&b.indexOf(Q)<0&&!(xn(y)&&Array.isArray(I))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const R=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,I,{...r,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(A.res=R,A.usedParams=this.getUsedParamsDetails(r),A):R}if(o){const R=Array.isArray(I),B=R?[]:{},T=R?f:h;for(const N in I)if(Object.prototype.hasOwnProperty.call(I,N)){const L=`${T}${o}${N}`;C&&!g?B[N]=this.translate(L,{...r,defaultValue:i4(S)?S[N]:void 0,joinArrays:!1,ns:l}):B[N]=this.translate(L,{...r,joinArrays:!1,ns:l}),B[N]===L&&(B[N]=I[N])}g=B}}else if(w&&xn(y)&&Array.isArray(g))g=g.join(y),g&&(g=this.extendTranslation(g,t,r,a));else{let R=!1,B=!1;!this.isValidLookup(g)&&C&&(R=!0,g=S),this.isValidLookup(g)||(B=!0,g=s);const N=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&B?void 0:g,L=C&&S!==g&&this.options.updateMissing;if(B||R||L){if(this.logger.log(L?"updateKey":"missingKey",p,u,s,L?S:g),o){const $=this.resolve(s,{...r,keySeparator:!1});$&&$.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let M=[];const O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(let $=0;$<O.length;$++)M.push(O[$]);else this.options.saveMissingTo==="all"?M=this.languageUtils.toResolveHierarchy(r.lng||this.language):M.push(r.lng||this.language);const P=($,q,j)=>{const W=C&&j!==g?j:N;this.options.missingKeyHandler?this.options.missingKeyHandler($,u,q,W,L,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing($,u,q,W,L,r),this.emit("missingKey",$,u,q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?M.forEach($=>{const q=this.pluralResolver.getSuffixes($,r);x&&r[`defaultValue${this.options.pluralSeparator}zero`]&&q.indexOf(`${this.options.pluralSeparator}zero`)<0&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(j=>{P([$],s+j,r[`defaultValue${j}`]||S)})}):P(M,s,S))}g=this.extendTranslation(g,t,r,A,a),B&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(B||R)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,R?g:void 0,r))}return i?(A.res=g,A.usedParams=this.getUsedParamsDetails(r),A):g}extendTranslation(t,n,a,r,i){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...a},a.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init({...a,interpolation:{...this.options.interpolation,...a.interpolation}});const l=xn(t)&&(a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(l){const p=t.match(this.interpolator.nestingRegexp);u=p&&p.length}let d=a.replace&&!xn(a.replace)?a.replace:a;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,a.lng||this.language||r.usedLng,a),l){const p=t.match(this.interpolator.nestingRegexp),m=p&&p.length;u<m&&(a.nest=!1)}!a.lng&&r&&r.res&&(a.lng=this.language||r.usedLng),a.nest!==!1&&(t=this.interpolator.nest(t,(...p)=>i?.[0]===p[0]&&!a.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${n[0]}`),null):this.translate(...p,n),a)),a.interpolation&&this.interpolator.reset()}const o=a.postProcess||this.options.postProcess,s=xn(o)?[o]:o;return t!=null&&s?.length&&a.applyPostProcessor!==!1&&(t=hY.handle(s,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(a)},...a}:a,this)),t}resolve(t,n={}){let a,r,i,o,s;return xn(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(l=>typeof l=="function"?O0(l,{...this.options,...n}):l)),t.forEach(l=>{if(this.isValidLookup(a))return;const u=this.extractFromKey(l,n),d=u.key;r=d;let p=u.namespaces;this.options.fallbackNS&&(p=p.concat(this.options.fallbackNS));const m=n.count!==void 0&&!xn(n.count),A=m&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(xn(n.context)||typeof n.context=="number")&&n.context!=="",h=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);p.forEach(f=>{this.isValidLookup(a)||(s=f,!bY[`${h[0]}-${f}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(bY[`${h[0]}-${f}`]=!0,this.logger.warn(`key "${r}" for languages "${h.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(b=>{if(this.isValidLookup(a))return;o=b;const y=[d];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(y,d,b,f,n);else{let k;m&&(k=this.pluralResolver.getSuffix(b,n.count,n));const C=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&k.indexOf(E)===0&&y.push(d+k.replace(E,this.options.pluralSeparator)),y.push(d+k),A&&y.push(d+C)),g){const _=`${d}${this.options.contextSeparator||"_"}${n.context}`;y.push(_),m&&(n.ordinal&&k.indexOf(E)===0&&y.push(_+k.replace(E,this.options.pluralSeparator)),y.push(_+k),A&&y.push(_+C))}}let w;for(;w=y.pop();)this.isValidLookup(a)||(i=w,a=this.getResource(b,f,w,n))}))})}),{res:a,usedKey:r,exactUsedKey:i,usedLng:o,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,a,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,a,r):this.resourceStore.getResource(t,n,a,r)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],a=t.replace&&!xn(t.replace);let r=a?t.replace:t;if(a&&typeof t.count<"u"&&(r.count=t.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!a){r={...r};for(const i of n)delete r[i]}return r}static hasDefaultValue(t){const n="defaultValue";for(const a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&n===a.substring(0,n.length)&&t[a]!==void 0)return!0;return!1}}class yY{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dl.create("languageUtils")}getScriptPartFromCode(t){if(t=M0(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=M0(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(xn(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(a=>{if(n)return;const r=this.formatLanguageCode(a);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&t.forEach(a=>{if(n)return;const r=this.getScriptPartFromCode(a);if(this.isSupportedCode(r))return n=r;const i=this.getLanguagePartFromCode(a);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),xn(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let a=t[n];return a||(a=t[this.getScriptPartFromCode(n)]),a||(a=t[this.formatLanguageCode(n)]),a||(a=t[this.getLanguagePartFromCode(n)]),a||(a=t.default),a||[]}toResolveHierarchy(t,n){const a=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),r=[],i=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return xn(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):xn(t)&&i(this.formatLanguageCode(t)),a.forEach(o=>{r.indexOf(o)<0&&i(this.formatLanguageCode(o))}),r}}const wY={zero:0,one:1,two:2,few:3,many:4,other:5},kY={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class J8e{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=dl.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const a=M0(t==="dev"?"en":t),r=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:a,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(a,{type:r})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),kY;if(!t.match(/-|_/))return kY;const l=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(l,n)}return this.pluralRulesCache[i]=o,o}needsPlural(t,n={}){let a=this.getRule(t,n);return a||(a=this.getRule("dev",n)),a?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n,a={}){return this.getSuffixes(t,a).map(r=>`${n}${r}`)}getSuffixes(t,n={}){let a=this.getRule(t,n);return a||(a=this.getRule("dev",n)),a?a.resolvedOptions().pluralCategories.sort((r,i)=>wY[r]-wY[i]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(t,n,a={}){const r=this.getRule(t,a);return r?`${this.options.prepend}${a.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,a))}}const vY=(e,t,n,a=".",r=!0)=>{let i=G8e(e,t,n);return!i&&r&&xn(n)&&(i=r4(e,n,a),i===void 0&&(i=r4(t,n,a))),i},o4=e=>e.replace(/\$/g,"$$$$");class _Y{constructor(t={}){this.logger=dl.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:a,useRawValueToEscape:r,prefix:i,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:p,nestingPrefix:m,nestingPrefixEscaped:A,nestingSuffix:g,nestingSuffixEscaped:h,nestingOptionsSeparator:f,maxReplaces:b,alwaysFormat:y}=t.interpolation;this.escape=n!==void 0?n:U8e,this.escapeValue=a!==void 0?a:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=i?Nm(i):o||"{{",this.suffix=s?Nm(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":p||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=m?Nm(m):A||Nm("$t("),this.nestingSuffix=g?Nm(g):h||Nm(")"),this.nestingOptionsSeparator=f||",",this.maxReplaces=b||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,a)=>n?.source===a?(n.lastIndex=0,n):new RegExp(a,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,a,r){let i,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=A=>{if(A.indexOf(this.formatSeparator)<0){const b=vY(n,l,A,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,a,{...r,...n,interpolationkey:A}):b}const g=A.split(this.formatSeparator),h=g.shift().trim(),f=g.join(this.formatSeparator).trim();return this.format(vY(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure),f,a,{...r,...n,interpolationkey:h})};this.resetRegExp();const d=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,p=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:A=>o4(A)},{regex:this.regexp,safeValue:A=>this.escapeValue?o4(this.escape(A)):o4(A)}].forEach(A=>{for(s=0;i=A.regex.exec(t);){const g=i[1].trim();if(o=u(g),o===void 0)if(typeof d=="function"){const f=d(t,i,r);o=xn(f)?f:""}else if(r&&Object.prototype.hasOwnProperty.call(r,g))o="";else if(p){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`),o="";else!xn(o)&&!this.useRawValueToEscape&&(o=uY(o));const h=A.safeValue(o);if(t=t.replace(i[0],h),p?(A.regex.lastIndex+=o.length,A.regex.lastIndex-=i[0].length):A.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n,a={}){let r,i,o;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const p=l.split(new RegExp(`${Nm(d)}[ ]*{`));let m=`{${p[1]}`;l=p[0],m=this.interpolate(m,o);const A=m.match(/'/g),g=m.match(/"/g);((A?.length??0)%2===0&&!g||(g?.length??0)%2!==0)&&(m=m.replace(/'/g,'"'));try{o=JSON.parse(m),u&&(o={...u,...o})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,h),`${l}${d}${m}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,l};for(;r=this.nestingRegexp.exec(t);){let l=[];o={...a},o=o.replace&&!xn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(u!==-1&&(l=r[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),i=n(s.call(this,r[1].trim(),o),o),i&&r[0]===t&&!xn(i))return i;xn(i)||(i=uY(i)),i||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),i=""),l.length&&(i=l.reduce((d,p)=>this.format(d,p,a.lng,{...a,interpolationkey:r[1].trim()}),i.trim())),t=t.replace(r[0],i),this.regexp.lastIndex=0}return t}}const X8e=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const a=e.split("(");t=a[0].toLowerCase().trim();const r=a[1].substring(0,a[1].length-1);t==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):t==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},CY=e=>{const t={};return(n,a,r)=>{let i=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(i={...i,[r.interpolationkey]:void 0});const o=a+JSON.stringify(i);let s=t[o];return s||(s=e(M0(a),r),t[o]=s),s(n)}},eNe=e=>(t,n,a)=>e(M0(n),a)(t);class tNe{constructor(t={}){this.logger=dl.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const a=n.cacheInBuiltFormats?CY:eNe;this.formats={number:a((r,i)=>{const o=new Intl.NumberFormat(r,{...i});return s=>o.format(s)}),currency:a((r,i)=>{const o=new Intl.NumberFormat(r,{...i,style:"currency"});return s=>o.format(s)}),datetime:a((r,i)=>{const o=new Intl.DateTimeFormat(r,{...i});return s=>o.format(s)}),relativetime:a((r,i)=>{const o=new Intl.RelativeTimeFormat(r,{...i});return s=>o.format(s,i.range||"day")}),list:a((r,i)=>{const o=new Intl.ListFormat(r,{...i});return s=>o.format(s)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=CY(n)}format(t,n,a,r={}){const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{const{formatName:u,formatOptions:d}=X8e(l);if(this.formats[u]){let p=s;try{const m=r?.formatParams?.[r.interpolationkey]||{},A=m.locale||m.lng||r.locale||r.lng||a;p=this.formats[u](s,A,{...d,...r,...m})}catch(m){this.logger.warn(m)}return p}else this.logger.warn(`there was no format function for ${u}`);return s},t)}}const nNe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class aNe extends KC{constructor(t,n,a,r={}){super(),this.backend=t,this.store=n,this.services=a,this.languageUtils=a.languageUtils,this.options=r,this.logger=dl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(a,r.backend,r)}queueLoad(t,n,a,r){const i={},o={},s={},l={};return t.forEach(u=>{let d=!0;n.forEach(p=>{const m=`${u}|${p}`;!a.reload&&this.store.hasResourceBundle(u,p)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?o[m]===void 0&&(o[m]=!0):(this.state[m]=1,d=!1,o[m]===void 0&&(o[m]=!0),i[m]===void 0&&(i[m]=!0),l[p]===void 0&&(l[p]=!0)))}),d||(s[u]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,a){const r=t.split("|"),i=r[0],o=r[1];n&&this.emit("failedLoading",i,o,n),!n&&a&&this.store.addResourceBundle(i,o,a,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&a&&(this.state[t]=0);const s={};this.queue.forEach(l=>{q8e(l.loaded,[i],o),nNe(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(p=>{s[u][p]===void 0&&(s[u][p]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,a,r=0,i=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:a,tried:r,wait:i,callback:o});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const p=this.waitingReads.shift();this.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(u&&d&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,a,r+1,i*2,o)},i);return}o(u,d)},l=this.backend[a].bind(this.backend);if(l.length===2){try{const u=l(t,n);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(t,n,s)}prepareLoading(t,n,a={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();xn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),xn(n)&&(n=[n]);const i=this.queueLoad(t,n,a,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,a){this.prepareLoading(t,n,{},a)}reload(t,n,a){this.prepareLoading(t,n,{reload:!0},a)}loadOne(t,n=""){const a=t.split("|"),r=a[0],i=a[1];this.read(r,i,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${n}loading namespace ${i} for language ${r} failed`,o),!o&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${r}`,s),this.loaded(t,o,s)})}saveMissing(t,n,a,r,i,o={},s=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${a}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(a==null||a==="")){if(this.backend?.create){const l={...o,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(t,n,a,r,l):d=u(t,n,a,r),d&&typeof d.then=="function"?d.then(p=>s(null,p)).catch(s):s(null,d)}catch(d){s(d)}else u(t,n,a,r,s,l)}!t||!t[0]||this.store.addResource(t[0],n,a,r)}}}const s4=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),xn(e[1])&&(t.defaultValue=e[1]),xn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(a=>{t[a]=n[a]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),EY=e=>(xn(e.ns)&&(e.ns=[e.ns]),xn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),xn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),VC=()=>{},rNe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})},xY="__i18next_supportNoticeShown",iNe=()=>typeof globalThis<"u"&&!!globalThis[xY],oNe=()=>{typeof globalThis<"u"&&(globalThis[xY]=!0)},sNe=e=>!!(e?.modules?.backend?.name?.indexOf("Locize")>0||e?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||e?.options?.backend?.backends&&e.options.backend.backends.some(t=>t?.name?.indexOf("Locize")>0||t?.constructor?.name?.indexOf("Locize")>0)||e?.options?.backend?.projectId||e?.options?.backend?.backendOptions&&e.options.backend.backendOptions.some(t=>t?.projectId));class P0 extends KC{constructor(t={},n){if(super(),this.options=EY(t),this.services={},this.logger=dl,this.modules={external:[]},rNe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(xn(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const a=s4();this.options={...a,...this.options,...EY(t)},this.options.interpolation={...a.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=a.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!sNe(this)&&!iNe()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is made possible by our own product, Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),oNe());const r=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?dl.init(r(this.modules.logger),this.options):dl.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=tNe;const d=new yY(this.options);this.store=new gY(this.options.resources,this.options);const p=this.services;p.logger=dl,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new J8e(d,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==a.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),u&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(p.formatter=r(u),p.formatter.init&&p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new _Y(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new aNe(r(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",(A,...g)=>{this.emit(A,...g)}),this.modules.languageDetector&&(p.languageDetector=r(this.modules.languageDetector),p.languageDetector.init&&p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=r(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new ZC(this.services,this.options),this.translator.on("*",(A,...g)=>{this.emit(A,...g)}),this.modules.external.forEach(A=>{A.init&&A.init(this)})}if(this.format=this.options.interpolation.format,n||(n=VC),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=L0(),l=()=>{const u=(d,p)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(p),n(d,p)};if(this.languages&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(t,n=VC){let a=n;const r=xn(t)?t:this.language;if(typeof t=="function"&&(a=t),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return a();const i=[],o=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>o(l)),this.options.preload?.forEach?.(s=>o(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),a(s)})}else a(null)}reloadResources(t,n,a){const r=L0();return typeof t=="function"&&(a=t,t=void 0),typeof n=="function"&&(a=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),a||(a=VC),this.services.backendConnector.reload(t,n,i=>{r.resolve(),a(i)}),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&hY.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let n=0;n<this.languages.length;n++){const a=this.languages[n];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,n){this.isLanguageChangingTo=t;const a=L0();this.emit("languageChanging",t);const r=s=>{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},i=(s,l)=>{l?this.isLanguageChangingTo===t&&(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,a.resolve((...u)=>this.t(...u)),n&&n(s,(...u)=>this.t(...u))},o=s=>{!t&&!s&&this.services.languageDetector&&(s=[]);const l=xn(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(xn(s)?[s]:s);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector?.cacheUserLanguage?.(u)),this.loadResources(u,d=>{i(d,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),a}getFixedT(t,n,a){const r=(i,o,...s)=>{let l;typeof o!="object"?l=this.options.overloadTranslationOptionHandler([i,o].concat(s)):l={...o},l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||a||r.keyPrefix);const u=this.options.keySeparator||".";let d;return l.keyPrefix&&Array.isArray(i)?d=i.map(p=>(typeof p=="function"&&(p=O0(p,{...this.options,...o})),`${l.keyPrefix}${u}${p}`)):(typeof i=="function"&&(i=O0(i,{...this.options,...o})),d=l.keyPrefix?`${l.keyPrefix}${u}${i}`:i),this.t(d,l)};return xn(t)?r.lng=t:r.lngs=t,r.ns=n,r.keyPrefix=a,r}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const a=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(a.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(n.precheck){const s=n.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(a,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(a,t)&&(!r||o(i,t)))}loadNamespaces(t,n){const a=L0();return this.options.ns?(xn(t)&&(t=[t]),t.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{a.resolve(),n&&n(r)}),a):(n&&n(),Promise.resolve())}loadLanguages(t,n){const a=L0();xn(t)&&(t=[t]);const r=this.options.preload||[],i=t.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=r.concat(i),this.loadResources(o=>{a.resolve(),n&&n(o)}),a):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const r=new Intl.Locale(t);if(r&&r.getTextInfo){const i=r.getTextInfo();if(i&&i.direction)return i.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],a=this.services?.languageUtils||new yY(s4());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(a.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const a=new P0(t,n);return a.createInstance=P0.createInstance,a}cloneInstance(t={},n=VC){const a=t.forkResourceStore;a&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},i=new P0(r);if((t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},a){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,p)=>(d[p]={...l[u][p]},d),l[u]),l),{});i.store=new gY(s,r),i.services.resourceStore=i.store}if(t.interpolation){const l={...s4().interpolation,...this.options.interpolation,...t.interpolation},u={...r,interpolation:l};i.services.interpolator=new _Y(u)}return i.translator=new ZC(i.services,r),i.translator.on("*",(s,...l)=>{i.emit(s,...l)}),i.init(r,n),i.translator.options=r,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ci=P0.createInstance();Ci.createInstance,Ci.dir,Ci.init,Ci.loadResources,Ci.reloadResources,Ci.use,Ci.changeLanguage,Ci.getFixedT,Ci.t,Ci.exists,Ci.setDefaultNamespace,Ci.hasLoadedNamespace,Ci.loadNamespaces,Ci.loadLanguages;var JC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cNe(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function a(){var r=!1;try{r=this instanceof a}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),n}const lNe=(e,t,n,a)=>{const r=[n,{code:t,...a||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(r,"warn","react-i18next::",!0);Fm(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...r):console?.warn&&console.warn(...r)},BY={},IY=(e,t,n,a)=>{Fm(n)&&BY[n]||(Fm(n)&&(BY[n]=new Date),lNe(e,t,n,a))},SY=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},c4=(e,t,n)=>{e.loadNamespaces(t,SY(e,n))},DY=(e,t,n,a)=>{if(Fm(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return c4(e,n,a);n.forEach(r=>{e.options.ns.indexOf(r)<0&&e.options.ns.push(r)}),e.loadLanguages(t,SY(e,a))},uNe=(e,t,n={})=>!t.languages||!t.languages.length?(IY(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(a,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!r(a.isLanguageChangingTo,e))return!1}}),Fm=e=>typeof e=="string",dNe=e=>typeof e=="object"&&e!==null,pNe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,mNe={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},ANe=e=>mNe[e];let l4={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(pNe,ANe),transDefaultProps:void 0};const gNe=(e={})=>{l4={...l4,...e}},hNe=()=>l4;let QY;const fNe=e=>{QY=e},bNe=()=>QY,yNe={type:"3rdParty",init(e){gNe(e.options.react),fNe(e)}},wNe=ne.createContext();class kNe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var XC={exports:{}},u4={};var TY;function vNe(){if(TY)return u4;TY=1;var e=ne;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,r=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function s(p,m){var A=m(),g=a({inst:{value:A,getSnapshot:m}}),h=g[0].inst,f=g[1];return i(function(){h.value=A,h.getSnapshot=m,l(h)&&f({inst:h})},[p,A,m]),r(function(){return l(h)&&f({inst:h}),p(function(){l(h)&&f({inst:h})})},[p]),o(A),A}function l(p){var m=p.getSnapshot;p=p.value;try{var A=m();return!n(p,A)}catch{return!0}}function u(p,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return u4.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,u4}var d4={};var NY;function _Ne(){return NY||(NY=1,process.env.NODE_ENV!=="production"&&(function(){function e(A,g){return A===g&&(A!==0||1/A===1/g)||A!==A&&g!==g}function t(A,g){d||r.startTransition===void 0||(d=!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 h=g();if(!p){var f=g();i(h,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}f=o({inst:{value:h,getSnapshot:g}});var b=f[0].inst,y=f[1];return l(function(){b.value=h,b.getSnapshot=g,n(b)&&y({inst:b})},[A,h,g]),s(function(){return n(b)&&y({inst:b}),A(function(){n(b)&&y({inst:b})})},[A]),u(h),h}function n(A){var g=A.getSnapshot;A=A.value;try{var h=g();return!i(A,h)}catch{return!0}}function a(A,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=ne,i=typeof Object.is=="function"?Object.is:e,o=r.useState,s=r.useEffect,l=r.useLayoutEffect,u=r.useDebugValue,d=!1,p=!1,m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;d4.useSyncExternalStore=r.useSyncExternalStore!==void 0?r.useSyncExternalStore:m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),d4}var FY;function CNe(){return FY||(FY=1,process.env.NODE_ENV==="production"?XC.exports=vNe():XC.exports=_Ne()),XC.exports}var ENe=CNe();const xNe={t:(e,t)=>{if(Fm(t))return t;if(dNe(t)&&Fm(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const n=e[e.length-1];return typeof n=="function"?"":n}return e},ready:!1},BNe=()=>()=>{},Da=(e,t={})=>{const{i18n:n}=t,{i18n:a,defaultNS:r}=ne.useContext(wNe)||{},i=n||a||bNe();i&&!i.reportNamespaces&&(i.reportNamespaces=new kNe),i||IY(i,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const o=ne.useMemo(()=>({...hNe(),...i?.options?.react,...t}),[i,t]),{useSuspense:s,keyPrefix:l}=o,u=r||i?.options?.defaultNS,d=Fm(u)?[u]:u||["translation"],p=ne.useMemo(()=>d,d);i?.reportNamespaces?.addUsedNamespaces?.(p);const m=ne.useRef(0),A=ne.useCallback(S=>{if(!i)return BNe;const{bindI18n:I,bindI18nStore:D}=o,Q=()=>{m.current+=1,S()};return I&&i.on(I,Q),D&&i.store.on(D,Q),()=>{I&&I.split(" ").forEach(R=>i.off(R,Q)),D&&D.split(" ").forEach(R=>i.store.off(R,Q))}},[i,o]),g=ne.useRef(),h=ne.useCallback(()=>{if(!i)return xNe;const S=!!(i.isInitialized||i.initializedStoreOnce)&&p.every(T=>uNe(T,i,o)),I=t.lng||i.language,D=m.current,Q=g.current;if(Q&&Q.ready===S&&Q.lng===I&&Q.keyPrefix===l&&Q.revision===D)return Q;const B={t:i.getFixedT(I,o.nsMode==="fallback"?p:p[0],l),ready:S,lng:I,keyPrefix:l,revision:D};return g.current=B,B},[i,p,l,o,t.lng]),[f,b]=ne.useState(0),{t:y,ready:w}=ENe.useSyncExternalStore(A,h,h);ne.useEffect(()=>{if(i&&!w&&!s){const S=()=>b(I=>I+1);t.lng?DY(i,t.lng,p,S):c4(i,p,S)}},[i,t.lng,p,w,s,f]);const k=i||{},C=ne.useRef(null),E=ne.useRef(),_=S=>{const I=Object.getOwnPropertyDescriptors(S);I.__original&&delete I.__original;const D=Object.create(Object.getPrototypeOf(S),I);if(!Object.prototype.hasOwnProperty.call(D,"__original"))try{Object.defineProperty(D,"__original",{value:S,writable:!1,enumerable:!1,configurable:!1})}catch{}return D},x=ne.useMemo(()=>{const S=k,I=S?.language;let D=S;S&&(C.current&&C.current.__original===S?E.current!==I?(D=_(S),C.current=D,E.current=I):D=C.current:(D=_(S),C.current=D,E.current=I));const Q=[y,D,w];return Q.t=y,Q.i18n=D,Q.ready=w,Q},[y,k,w,k.resolvedLanguage,k.language,k.languages]);if(i&&s&&!w)throw new Promise(S=>{const I=()=>S();t.lng?DY(i,t.lng,p,I):c4(i,p,I)});return x};class LY extends Error{code;status;details;constructor(t,n){super(t.error.message),this.name="GentiqError",this.code=t.error.code,this.status=n,this.details=t.error.details}}function ih(e,t){const n=typeof e=="string"?e:e.code,a=`errors.${n}`,r=t(a);return r===a?typeof e!="string"&&e.message?e.message:n.replace(/_/g," ").replace(/\b\w/g,i=>i.toUpperCase()):r}let Ra={api:{basePath:"/api"},app:{basePath:"/",cacheNamespace:"gentiq"}},Ui={getToken:()=>localStorage.getItem("token"),setToken:e=>localStorage.setItem("token",e),clearToken:()=>{localStorage.removeItem("token")},getHeaders:()=>{const e=localStorage.getItem("token");return e?{Authorization:`Bearer ${e}`}:{}}};const Zt={init:e=>{if(Ra={...Ra,...e,api:e.api?{...Ra.api,...e.api}:Ra.api,app:e.app?{...Ra.app,...e.app}:Ra.app},e.api?.authAdapter){const t=e.api.authAdapter;Ui={...t,getHeaders:t.getHeaders||(()=>{const n=t.getToken();return n?{Authorization:`Bearer ${n}`}:{}})}}},getConfig:()=>Ra,getToken:()=>Ui.getToken(),setToken:e=>{Ui.setToken(e)},clearToken:()=>{Ui.clearToken()},getHeaders:()=>Ui.getHeaders(),getEndpoint:(e,t,...n)=>{const a=Ra.api?.endpoints?.[e];return a?typeof a=="function"?a(...n):a:typeof t=="function"?t(...n):t},handleResponse:async(e,t="Request failed")=>{if(!e.ok){const n=await e.json().catch(()=>({}));if(n.error&&(n.error.code||n.error.message))throw new LY(n,e.status);const a=n.error||n.message||t,r=new Error(a);throw r.status=e.status,r}return e.json()},login:async(e,t)=>{const n=Zt.getEndpoint("login","/public/auth/login"),a=await fetch(`${Ra.api?.basePath}${n}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:e,password:t})}),r=await Zt.handleResponse(a,"Login failed");return r.token&&Zt.setToken(r.token),r},register:async(e,t,n,a,r)=>{const i=Zt.getEndpoint("register","/public/auth/register"),o=await fetch(`${Ra.api?.basePath}${i}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:e,password:t,name:n,surname:a,metadata:r})}),s=await Zt.handleResponse(o,"Registration failed");return s.token&&Zt.setToken(s.token),s},getBalance:async()=>{const e=Zt.getEndpoint("balance","/users/balance"),t=await fetch(`${Ra.api?.basePath}${e}`,{headers:{...Ui.getHeaders()}});return Zt.handleResponse(t,"Failed to fetch balance")},getHistory:async(e=0,t=50)=>{const n=Zt.getEndpoint("threads","/chat/threads"),a=await fetch(`${Ra.api?.basePath}${n}?skip=${e}&limit=${t}`,{headers:{...Ui.getHeaders()}});return Zt.handleResponse(a,"Failed to fetch chat history")},getThreadMessages:async e=>{if(!Zt.getToken())throw new Error("No token found");const n=Zt.getEndpoint("threadMessages",r=>`/chat/threads/${r.replace(/^\//,"")}`,e),a=await fetch(`${Ra.api?.basePath}${n}`,{headers:{...Ui.getHeaders()}});return Zt.handleResponse(a,"Failed to fetch thread messages")},deleteThread:async e=>{if(!Zt.getToken())throw new Error("No token found");const n=Zt.getEndpoint("deleteThread",r=>`/chat/threads/${r.replace(/^\//,"")}`,e),a=await fetch(`${Ra.api?.basePath}${n}`,{method:"DELETE",headers:{...Ui.getHeaders()}});return Zt.handleResponse(a,"Failed to delete thread")},updateThreadTitle:async(e,t)=>{if(!Zt.getToken())throw new Error("No token found");const a=Zt.getEndpoint("updateThreadTitle",i=>`/chat/threads/${i.replace(/^\//,"")}`,e),r=await fetch(`${Ra.api?.basePath}${a}`,{method:"PATCH",headers:{"Content-Type":"application/json",...Ui.getHeaders()},body:JSON.stringify({title:t})});return Zt.handleResponse(r,"Failed to update thread title")},async getAttachmentBlobUrl(e){if(Ra.api?.attachmentResolver)return Ra.api.attachmentResolver(e);const t=Zt.getEndpoint("attachments",r=>`/chat/attachments/${r}`,e),n=await fetch(`${Ra.api?.basePath}${t}`,{headers:{...Ui.getHeaders()}});if(!n.ok)return Zt.handleResponse(n,"Failed to fetch attachment");const a=await n.blob();return URL.createObjectURL(a)},async getPublicAttachmentBlobUrl(e){const t=Zt.getEndpoint("sharedAttachments",r=>`/public/attachments/${r}`,e),n=await fetch(`${Ra.api?.basePath}${t}`,{headers:{"Content-Type":"application/json"}});if(!n.ok)return Zt.handleResponse(n,"Failed to fetch public attachment");const a=await n.blob();return URL.createObjectURL(a)},saveFeedback:async(e,t,n)=>{const a=Zt.getEndpoint("feedback","/chat/feedback"),r=await fetch(`${Ra.api?.basePath}${a}`,{method:"POST",headers:{"Content-Type":"application/json",...Ui.getHeaders()},body:JSON.stringify({thread_id:e.replace(/^\//,""),message_id:t,sentiment:n})});return Zt.handleResponse(r,"Failed to save feedback")},getMe:async()=>{const e=Zt.getEndpoint("me","/users/me"),t=await fetch(`${Ra.api?.basePath}${e}`,{headers:{...Ui.getHeaders()}});return Zt.handleResponse(t,"Failed to fetch user profile")},updateMe:async e=>{const t=Zt.getEndpoint("me","/users/me"),n=await fetch(`${Ra.api?.basePath}${t}`,{method:"PATCH",headers:{"Content-Type":"application/json",...Ui.getHeaders()},body:JSON.stringify(e)});return Zt.handleResponse(n,"Failed to update user profile")},pinThread:async(e,t)=>{if(!Zt.getToken())throw new Error("No token found");const a=Zt.getEndpoint("updateThreadTitle",i=>`/chat/threads/${i.replace(/^\//,"")}`,e),r=await fetch(`${Ra.api?.basePath}${a}`,{method:"PATCH",headers:{"Content-Type":"application/json",...Ui.getHeaders()},body:JSON.stringify({pinned:t})});return Zt.handleResponse(r,"Failed to pin thread")},shareThread:async e=>{if(!Zt.getToken())throw new Error("No token found");const n=Zt.getEndpoint("shareThread",r=>`/chat/threads/${r.replace(/^\//,"")}/share`,e),a=await fetch(`${Ra.api?.basePath}${n}`,{method:"POST",headers:{...Ui.getHeaders()}});return Zt.handleResponse(a,"Failed to share thread")},getSharedThread:async e=>{const t=Zt.getEndpoint("sharedThread",a=>`/public/shared/${a}`,e),n=await fetch(`${Ra.api?.basePath}${t}`,{headers:{"Content-Type":"application/json"}});return Zt.handleResponse(n,"Failed to fetch shared thread")}};function INe(e,t){const[n,a]=ne.useState(e.metadata?.feedback),r=ne.useCallback(o=>{navigator.clipboard.writeText(o).catch(s=>{console.error("Error copying text:",s)})},[]),i=ne.useCallback(async o=>{const s=n===o?void 0:o;a(s);try{const l=e.parts.find(d=>d.type==="data-message-id"),u=l?l.data[0].message_id:e.id;await Zt.saveFeedback(t,u,s??null)}catch(l){console.error("Error saving feedback:",l)}},[n,e,t]);return{feedback:n,handleFeedback:i,copy:r}}function p4(){const{i18n:e}=Da(),t=ne.useMemo(()=>{const n=Zt.getConfig();return{name:n.app?.name||"Gentiq App",language:n.app?.language||e.language||"en",showToolDetails:n.app?.showToolDetails??!0}},[e.language]);return ne.useEffect(()=>{t.language&&(document.documentElement.dir=t.language==="fa"?"rtl":"ltr",document.documentElement.lang=t.language)},[t.language]),{appName:t.name||"Gentiq",language:t.language||e.language,isRtl:t.language==="fa",showToolDetails:!!t.showToolDetails,config:t,isLoading:!1,error:null}}function RY(e){const{part:t,message:n,status:a,regen:r,index:i,lastMessage:o,conversationId:s,isFinished:l,renderMessagePart:u,chat:d,readonly:p}=e,{showToolDetails:m}=p4(),{TextPart:A,ReasoningPart:g,ToolPart:h,FilePart:f,toolComponents:b,threadActions:y}=Zi(),{feedback:w,handleFeedback:k,copy:C}=INe(n,s);if(u){const S=u(t,n);if(S!==void 0)return F.jsx(F.Fragment,{children:S})}if(["data-progress-update","data-message-id","data-chat-finished","data-title"].includes(t.type))return null;const _=n.parts.filter(S=>!["data-progress-update","data-message-id","data-chat-finished","data-title"].includes(S.type)),x=t===_[_.length-1];return t.type==="text"?F.jsx(A,{part:t,message:n,status:a,isFinished:!!l,lastMessage:o,isLastVisiblePart:x,regen:r,feedback:w,handleFeedback:k,copyHost:C,feedbackEnabled:p?!1:y?.feedback??!1,retryEnabled:p?!1:y?.retry??!1}):t.type==="reasoning"?F.jsx(g,{part:t,status:a,index:i,partsCount:n.parts.length,lastMessage:o}):t.type.startsWith("tool-")||"toolCallId"in t?F.jsx(h,{part:t,message:n,chat:d,toolComponents:b,showToolCalls:!!m}):t.type==="file"?F.jsx(f,{part:t,message:n}):null}function MY(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=MY(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function m4(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=MY(e))&&(a&&(a+=" "),a+=t);return a}const SNe=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},DNe=(e,t)=>({classGroupId:e,validator:t}),OY=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),e1="-",PY=[],QNe="arbitrary..",TNe=e=>{const t=FNe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return NNe(o);const s=o.split(e1),l=s[0]===""&&s.length>1?1:0;return $Y(s,l,t)},getConflictingClassGroupIds:(o,s)=>{if(s){const l=a[o],u=n[o];return l?u?SNe(u,l):l:u||PY}return n[o]||PY}}},$Y=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],i=n.nextPart.get(r);if(i){const u=$Y(e,t+1,i);if(u)return u}const o=n.validators;if(o===null)return;const s=t===0?e.join(e1):e.slice(t).join(e1),l=o.length;for(let u=0;u<l;u++){const d=o[u];if(d.validator(s))return d.classGroupId}},NNe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?QNe+a:void 0})(),FNe=e=>{const{theme:t,classGroups:n}=e;return LNe(n,t)},LNe=(e,t)=>{const n=OY();for(const a in e){const r=e[a];A4(r,n,a,t)}return n},A4=(e,t,n,a)=>{const r=e.length;for(let i=0;i<r;i++){const o=e[i];RNe(o,t,n,a)}},RNe=(e,t,n,a)=>{if(typeof e=="string"){MNe(e,t,n);return}if(typeof e=="function"){ONe(e,t,n,a);return}PNe(e,t,n,a)},MNe=(e,t,n)=>{const a=e===""?t:jY(t,e);a.classGroupId=n},ONe=(e,t,n,a)=>{if($Ne(e)){A4(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(DNe(n,e))},PNe=(e,t,n,a)=>{const r=Object.entries(e),i=r.length;for(let o=0;o<i;o++){const[s,l]=r[o];A4(l,jY(t,s),n,a)}},jY=(e,t)=>{let n=e;const a=t.split(e1),r=a.length;for(let i=0;i<r;i++){const o=a[i];let s=n.nextPart.get(o);s||(s=OY(),n.nextPart.set(o,s)),n=s}return n},$Ne=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,jNe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const r=(i,o)=>{n[i]=o,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(i){let o=n[i];if(o!==void 0)return o;if((o=a[i])!==void 0)return r(i,o),o},set(i,o){i in n?n[i]=o:r(i,o)}}},g4="!",qY=":",qNe=[],GY=(e,t,n,a,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:r}),GNe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=r=>{const i=[];let o=0,s=0,l=0,u;const d=r.length;for(let h=0;h<d;h++){const f=r[h];if(o===0&&s===0){if(f===qY){i.push(r.slice(l,h)),l=h+1;continue}if(f==="/"){u=h;continue}}f==="["?o++:f==="]"?o--:f==="("?s++:f===")"&&s--}const p=i.length===0?r:r.slice(l);let m=p,A=!1;p.endsWith(g4)?(m=p.slice(0,-1),A=!0):p.startsWith(g4)&&(m=p.slice(1),A=!0);const g=u&&u>l?u-l:void 0;return GY(i,A,m,g)};if(t){const r=t+qY,i=a;a=o=>o.startsWith(r)?i(o.slice(r.length)):GY(qNe,!1,o,void 0,!0)}if(n){const r=a;a=i=>n({className:i,parseClassName:r})}return a},zNe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let r=[];for(let i=0;i<n.length;i++){const o=n[i],s=o[0]==="[",l=t.has(o);s||l?(r.length>0&&(r.sort(),a.push(...r),r=[]),a.push(o)):r.push(o)}return r.length>0&&(r.sort(),a.push(...r)),a}},UNe=e=>({cache:jNe(e.cacheSize),parseClassName:GNe(e),sortModifiers:zNe(e),...TNe(e)}),HNe=/\s+/,YNe=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:i}=t,o=[],s=e.trim().split(HNe);let l="";for(let u=s.length-1;u>=0;u-=1){const d=s[u],{isExternal:p,modifiers:m,hasImportantModifier:A,baseClassName:g,maybePostfixModifierPosition:h}=n(d);if(p){l=d+(l.length>0?" "+l:l);continue}let f=!!h,b=a(f?g.substring(0,h):g);if(!b){if(!f){l=d+(l.length>0?" "+l:l);continue}if(b=a(g),!b){l=d+(l.length>0?" "+l:l);continue}f=!1}const y=m.length===0?"":m.length===1?m[0]:i(m).join(":"),w=A?y+g4:y,k=w+b;if(o.indexOf(k)>-1)continue;o.push(k);const C=r(b,f);for(let E=0;E<C.length;++E){const _=C[E];o.push(w+_)}l=d+(l.length>0?" "+l:l)}return l},WNe=(...e)=>{let t=0,n,a,r="";for(;t<e.length;)(n=e[t++])&&(a=zY(n))&&(r&&(r+=" "),r+=a);return r},zY=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=zY(e[a]))&&(n&&(n+=" "),n+=t);return n},KNe=(e,...t)=>{let n,a,r,i;const o=l=>{const u=t.reduce((d,p)=>p(d),e());return n=UNe(u),a=n.cache.get,r=n.cache.set,i=s,s(l)},s=l=>{const u=a(l);if(u)return u;const d=YNe(l,n);return r(l,d),d};return i=o,(...l)=>i(WNe(...l))},ZNe=[],zr=e=>{const t=n=>n[e]||ZNe;return t.isThemeGetter=!0,t},UY=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,HY=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VNe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,JNe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,XNe=/\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$/,eFe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tFe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nFe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$d=e=>VNe.test(e),Mn=e=>!!e&&!Number.isNaN(Number(e)),jd=e=>!!e&&Number.isInteger(Number(e)),h4=e=>e.endsWith("%")&&Mn(e.slice(0,-1)),gu=e=>JNe.test(e),YY=()=>!0,aFe=e=>XNe.test(e)&&!eFe.test(e),f4=()=>!1,rFe=e=>tFe.test(e),iFe=e=>nFe.test(e),oFe=e=>!en(e)&&!tn(e),sFe=e=>qd(e,XY,f4),en=e=>UY.test(e),Lm=e=>qd(e,eW,aFe),WY=e=>qd(e,gFe,Mn),cFe=e=>qd(e,nW,YY),lFe=e=>qd(e,tW,f4),KY=e=>qd(e,VY,f4),uFe=e=>qd(e,JY,iFe),t1=e=>qd(e,aW,rFe),tn=e=>HY.test(e),$0=e=>Rm(e,eW),dFe=e=>Rm(e,tW),ZY=e=>Rm(e,VY),pFe=e=>Rm(e,XY),mFe=e=>Rm(e,JY),n1=e=>Rm(e,aW,!0),AFe=e=>Rm(e,nW,!0),qd=(e,t,n)=>{const a=UY.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Rm=(e,t,n=!1)=>{const a=HY.exec(e);return a?a[1]?t(a[1]):n:!1},VY=e=>e==="position"||e==="percentage",JY=e=>e==="image"||e==="url",XY=e=>e==="length"||e==="size"||e==="bg-size",eW=e=>e==="length",gFe=e=>e==="number",tW=e=>e==="family-name",nW=e=>e==="number"||e==="weight",aW=e=>e==="shadow",rW=KNe(()=>{const e=zr("color"),t=zr("font"),n=zr("text"),a=zr("font-weight"),r=zr("tracking"),i=zr("leading"),o=zr("breakpoint"),s=zr("container"),l=zr("spacing"),u=zr("radius"),d=zr("shadow"),p=zr("inset-shadow"),m=zr("text-shadow"),A=zr("drop-shadow"),g=zr("blur"),h=zr("perspective"),f=zr("aspect"),b=zr("ease"),y=zr("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...k(),tn,en],E=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],x=()=>[tn,en,l],S=()=>[$d,"full","auto",...x()],I=()=>[jd,"none","subgrid",tn,en],D=()=>["auto",{span:["full",jd,tn,en]},jd,tn,en],Q=()=>[jd,"auto",tn,en],R=()=>["auto","min","max","fr",tn,en],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],T=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...x()],L=()=>[$d,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],M=()=>[$d,"screen","full","dvw","lvw","svw","min","max","fit",...x()],O=()=>[$d,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],P=()=>[e,tn,en],$=()=>[...k(),ZY,KY,{position:[tn,en]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",pFe,sFe,{size:[tn,en]}],W=()=>[h4,$0,Lm],U=()=>["","none","full",u,tn,en],X=()=>["",Mn,$0,Lm],Y=()=>["solid","dashed","dotted","double"],ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[Mn,h4,ZY,KY],J=()=>["","none",g,tn,en],ee=()=>["none",Mn,tn,en],V=()=>["none",Mn,tn,en],pe=()=>[Mn,tn,en],ue=()=>[$d,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gu],breakpoint:[gu],color:[YY],container:[gu],"drop-shadow":[gu],ease:["in","out","in-out"],font:[oFe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gu],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gu],shadow:[gu],spacing:["px",Mn],text:[gu],"text-shadow":[gu],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$d,en,tn,f]}],container:["container"],columns:[{columns:[Mn,en,tn,s]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"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:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:S()}],"inset-x":[{"inset-x":S()}],"inset-y":[{"inset-y":S()}],start:[{"inset-s":S(),start:S()}],end:[{"inset-e":S(),end:S()}],"inset-bs":[{"inset-bs":S()}],"inset-be":[{"inset-be":S()}],top:[{top:S()}],right:[{right:S()}],bottom:[{bottom:S()}],left:[{left:S()}],visibility:["visible","invisible","collapse"],z:[{z:[jd,"auto",tn,en]}],basis:[{basis:[$d,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Mn,$d,"auto","initial","none",en]}],grow:[{grow:["",Mn,tn,en]}],shrink:[{shrink:["",Mn,tn,en]}],order:[{order:[jd,"first","last","none",tn,en]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":Q()}],"col-end":[{"col-end":Q()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":Q()}],"row-end":[{"row-end":Q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...T(),"normal"]}],"justify-self":[{"justify-self":["auto",...T()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...T(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...T(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...T(),"baseline"]}],"place-self":[{"place-self":["auto",...T()]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],"inline-size":[{inline:["auto",...M()]}],"min-inline-size":[{"min-inline":["auto",...M()]}],"max-inline-size":[{"max-inline":["none",...M()]}],"block-size":[{block:["auto",...O()]}],"min-block-size":[{"min-block":["auto",...O()]}],"max-block-size":[{"max-block":["none",...O()]}],w:[{w:[s,"screen",...L()]}],"min-w":[{"min-w":[s,"screen","none",...L()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[o]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,$0,Lm]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,AFe,cFe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",h4,en]}],"font-family":[{font:[dFe,lFe,t]}],"font-features":[{"font-features":[en]}],"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:[r,tn,en]}],"line-clamp":[{"line-clamp":[Mn,"none",tn,WY]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",tn,en]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",tn,en]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:[Mn,"from-font","auto",tn,Lm]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[Mn,"auto",tn,en]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",tn,en]}],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",tn,en]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jd,tn,en],radial:["",tn,en],conic:[jd,tn,en]},mFe,uFe]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Y(),"hidden","none"]}],"divide-style":[{divide:[...Y(),"hidden","none"]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...Y(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Mn,tn,en]}],"outline-w":[{outline:["",Mn,$0,Lm]}],"outline-color":[{outline:P()}],shadow:[{shadow:["","none",d,n1,t1]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":["none",p,n1,t1]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[Mn,Lm]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":["none",m,n1,t1]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[Mn,tn,en]}],"mix-blend":[{"mix-blend":[...ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ae()}],"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":[Mn]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[tn,en]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[Mn]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:$()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",tn,en]}],filter:[{filter:["","none",tn,en]}],blur:[{blur:J()}],brightness:[{brightness:[Mn,tn,en]}],contrast:[{contrast:[Mn,tn,en]}],"drop-shadow":[{"drop-shadow":["","none",A,n1,t1]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:["",Mn,tn,en]}],"hue-rotate":[{"hue-rotate":[Mn,tn,en]}],invert:[{invert:["",Mn,tn,en]}],saturate:[{saturate:[Mn,tn,en]}],sepia:[{sepia:["",Mn,tn,en]}],"backdrop-filter":[{"backdrop-filter":["","none",tn,en]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[Mn,tn,en]}],"backdrop-contrast":[{"backdrop-contrast":[Mn,tn,en]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Mn,tn,en]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Mn,tn,en]}],"backdrop-invert":[{"backdrop-invert":["",Mn,tn,en]}],"backdrop-opacity":[{"backdrop-opacity":[Mn,tn,en]}],"backdrop-saturate":[{"backdrop-saturate":[Mn,tn,en]}],"backdrop-sepia":[{"backdrop-sepia":["",Mn,tn,en]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",tn,en]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Mn,"initial",tn,en]}],ease:[{ease:["linear","initial",b,tn,en]}],delay:[{delay:[Mn,tn,en]}],animate:[{animate:["none",y,tn,en]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[h,tn,en]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[tn,en,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:P()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:P()}],"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",tn,en]}],"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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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",tn,en]}],fill:[{fill:["none",...P()]}],"stroke-w":[{stroke:[Mn,$0,Lm,WY]}],stroke:[{stroke:["none",...P()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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 Ct(...e){return rW(m4(e))}function b4(e,t){if(t==="/")return e;const n=e.endsWith("/")?e.slice(0,-1):e,a=t.startsWith("/")?t:"/"+t;return n+a}const a1=({className:e,...t})=>F.jsx("div",{className:Ct("flex items-center gap-1.5 px-1 py-3",e),...t,children:[0,1,2].map(n=>F.jsx("span",{className:"size-2 rounded-full bg-primary/70",style:{animation:"typing-bounce 1.2s ease-in-out infinite",animationDelay:`${n*.18}s`}},n))}),hFe=/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;function oh(e,t="ltr"){if(!e)return t;for(const n of e){if(hFe.test(n))return"rtl";if(/[A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02B8]/.test(n))return"ltr"}return"ltr"}const fFe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bFe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),iW=e=>{const t=bFe(e);return t.charAt(0).toUpperCase()+t.slice(1)},oW=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),yFe=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var wFe={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"};const kFe=ne.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:r="",children:i,iconNode:o,...s},l)=>ne.createElement("svg",{ref:l,...wFe,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:oW("lucide",r),...!i&&!yFe(s)&&{"aria-hidden":"true"},...s},[...o.map(([u,d])=>ne.createElement(u,d)),...Array.isArray(i)?i:[i]]));const un=(e,t)=>{const n=ne.forwardRef(({className:a,...r},i)=>ne.createElement(kFe,{ref:i,iconNode:t,className:oW(`lucide-${fFe(iW(e))}`,`lucide-${e}`,a),...r}));return n.displayName=iW(e),n};const vFe=un("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);const _Fe=un("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);const CFe=un("book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]);const EFe=un("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);const j0=un("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const q0=un("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const xFe=un("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const BFe=un("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const IFe=un("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const SFe=un("circle-plus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);const sW=un("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const DFe=un("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const QFe=un("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const TFe=un("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);const NFe=un("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);const r1=un("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Gd=un("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);const FFe=un("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);const cW=un("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const lW=un("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"}]]);const LFe=un("image-plus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);const RFe=un("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const uW=un("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const y4=un("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const MFe=un("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const dW=un("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);const OFe=un("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]);const PFe=un("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);const w4=un("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);const pW=un("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]);const $Fe=un("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);const jFe=un("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);const qFe=un("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"}]]);const GFe=un("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);const zFe=un("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]);const mW=un("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);const UFe=un("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const HFe=un("refresh-ccw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);const YFe=un("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const WFe=un("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const KFe=un("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const k4=un("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const AW=un("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);const ZFe=un("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);const VFe=un("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);const JFe=un("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const gW=un("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);const XFe=un("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);const e6e=un("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);const t6e=un("trash",[["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const n6e=un("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const a6e=un("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);const r6e=un("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);const Mm=un("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const hW=un("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);const i6e=un("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);const o6e=un("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function fW(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function G0(...e){return t=>{let n=!1;const a=e.map(r=>{const i=fW(r,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let r=0;r<a.length;r++){const i=a[r];typeof i=="function"?i():fW(e[r],null)}}}}function ha(...e){return re.useCallback(G0(...e),e)}var s6e=Symbol.for("react.lazy"),i1=re[" use ".trim().toString()];function c6e(e){return typeof e=="object"&&e!==null&&"then"in e}function bW(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===s6e&&"_payload"in e&&c6e(e._payload)}function l6e(e){const t=u6e(e),n=re.forwardRef((a,r)=>{let{children:i,...o}=a;bW(i)&&typeof i1=="function"&&(i=i1(i._payload));const s=re.Children.toArray(i),l=s.find(p6e);if(l){const u=l.props.children,d=s.map(p=>p===l?re.Children.count(u)>1?re.Children.only(null):re.isValidElement(u)?u.props.children:null:p);return F.jsx(t,{...o,ref:r,children:re.isValidElement(u)?re.cloneElement(u,void 0,d):null})}return F.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}var v4=l6e("Slot");function u6e(e){const t=re.forwardRef((n,a)=>{let{children:r,...i}=n;if(bW(r)&&typeof i1=="function"&&(r=i1(r._payload)),re.isValidElement(r)){const o=A6e(r),s=m6e(i,r.props);return r.type!==re.Fragment&&(s.ref=a?G0(a,o):o),re.cloneElement(r,s)}return re.Children.count(r)>1?re.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var d6e=Symbol("radix.slottable");function p6e(e){return re.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===d6e}function m6e(e,t){const n={...t};for(const a in t){const r=e[a],i=t[a];/^on[A-Z]/.test(a)?r&&i?n[a]=(...s)=>{const l=i(...s);return r(...s),l}:r&&(n[a]=r):a==="style"?n[a]={...r,...i}:a==="className"&&(n[a]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function A6e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const yW=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wW=m4,o1=(e,t)=>n=>{var a;if(t?.variants==null)return wW(e,n?.class,n?.className);const{variants:r,defaultVariants:i}=t,o=Object.keys(r).map(u=>{const d=n?.[u],p=i?.[u];if(d===null)return null;const m=yW(d)||yW(p);return r[u][m]}),s=n&&Object.entries(n).reduce((u,d)=>{let[p,m]=d;return m===void 0||(u[p]=m),u},{}),l=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((u,d)=>{let{class:p,className:m,...A}=d;return Object.entries(A).every(g=>{let[h,f]=g;return Array.isArray(f)?f.includes({...i,...s}[h]):{...i,...s}[h]===f})?[...u,p,m]:u},[]);return wW(e,o,l,n?.class,n?.className)},g6e=o1("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-[3px] 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"}});function oi({className:e,variant:t,size:n,asChild:a=!1,...r}){const i=a?v4:"button";return F.jsx(i,{"data-slot":"button",className:Ct(g6e({variant:t,size:n,className:e})),...r})}const h6e={damping:.7,stiffness:.05,mass:1.25},f6e=70,b6e=1e3/60,y6e=350;let s1=!1;globalThis.document?.addEventListener("mousedown",()=>{s1=!0}),globalThis.document?.addEventListener("mouseup",()=>{s1=!1}),globalThis.document?.addEventListener("click",()=>{s1=!1});const w6e=(e={})=>{const[t,n]=ne.useState(!1),[a,r]=ne.useState(e.initial!==!1),[i,o]=ne.useState(!1),s=ne.useRef(null);s.current=e;const l=ne.useCallback(()=>{if(!s1)return!1;const y=window.getSelection();if(!y||!y.rangeCount)return!1;const w=y.getRangeAt(0);return w.commonAncestorContainer.contains(f.current)||f.current?.contains(w.commonAncestorContainer)},[]),u=ne.useCallback(y=>{p.isAtBottom=y,r(y)},[]),d=ne.useCallback(y=>{p.escapedFromLock=y,n(y)},[]),p=ne.useMemo(()=>{let y;return{escapedFromLock:t,isAtBottom:a,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return f.current?.scrollTop??0},set scrollTop(w){f.current&&(f.current.scrollTop=w,p.ignoreScrollToTop=f.current.scrollTop)},get targetScrollTop(){return!f.current||!b.current?0:f.current.scrollHeight-1-f.current.clientHeight},get calculatedTargetScrollTop(){if(!f.current||!b.current)return 0;const{targetScrollTop:w}=this;if(!e.targetScrollTop)return w;if(y?.targetScrollTop===w)return y.calculatedScrollTop;const k=Math.max(Math.min(e.targetScrollTop(w,{scrollElement:f.current,contentElement:b.current}),w),0);return y={targetScrollTop:w,calculatedScrollTop:k},requestAnimationFrame(()=>{y=void 0}),k},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=f6e}}},[]),m=ne.useCallback((y={})=>{typeof y=="string"&&(y={animation:y}),y.preserveScrollPosition||u(!0);const w=Date.now()+(Number(y.wait)||0),k=C4(s.current,y.animation),{ignoreEscapes:C=!1}=y;let E,_=p.calculatedTargetScrollTop;y.duration instanceof Promise?y.duration.finally(()=>{E=Date.now()}):E=w+(y.duration??0);const x=async()=>{const S=new Promise(requestAnimationFrame).then(()=>{if(!p.isAtBottom)return p.animation=void 0,!1;const{scrollTop:I}=p,D=performance.now(),Q=(D-(p.lastTick??D))/b6e;if(p.animation||(p.animation={behavior:k,promise:S,ignoreEscapes:C}),p.animation.behavior===k&&(p.lastTick=D),l()||w>Date.now())return x();if(I<Math.min(_,p.calculatedTargetScrollTop)){if(p.animation?.behavior===k){if(k==="instant")return p.scrollTop=p.calculatedTargetScrollTop,x();p.velocity=(k.damping*p.velocity+k.stiffness*p.scrollDifference)/k.mass,p.accumulated+=p.velocity*Q,p.scrollTop+=p.accumulated,p.scrollTop!==I&&(p.accumulated=0)}return x()}return E>Date.now()?(_=p.calculatedTargetScrollTop,x()):(p.animation=void 0,p.scrollTop<p.calculatedTargetScrollTop?m({animation:C4(s.current,s.current.resize),ignoreEscapes:C,duration:Math.max(0,E-Date.now())||void 0}):p.isAtBottom)});return S.then(I=>(requestAnimationFrame(()=>{p.animation||(p.lastTick=void 0,p.velocity=0)}),I))};return y.wait!==!0&&(p.animation=void 0),p.animation?.behavior===k?p.animation.promise:x()},[u,l,p]),A=ne.useCallback(()=>{d(!0),u(!1)},[d,u]),g=ne.useCallback(({target:y})=>{if(y!==f.current)return;const{scrollTop:w,ignoreScrollToTop:k}=p;let{lastScrollTop:C=w}=p;p.lastScrollTop=w,p.ignoreScrollToTop=void 0,k&&k>w&&(C=k),o(p.isNearBottom),setTimeout(()=>{if(p.resizeDifference||w===k)return;if(l()){d(!0),u(!1);return}const E=w>C,_=w<C;if(p.animation?.ignoreEscapes){p.scrollTop=C;return}_&&(d(!0),u(!1)),E&&d(!1),!p.escapedFromLock&&p.isNearBottom&&u(!0)},1)},[d,u,l,p]),h=ne.useCallback(({target:y,deltaY:w})=>{let k=y;for(;!["scroll","auto"].includes(getComputedStyle(k).overflow);){if(!k.parentElement)return;k=k.parentElement}k===f.current&&w<0&&f.current.scrollHeight>f.current.clientHeight&&!p.animation?.ignoreEscapes&&(d(!0),u(!1))},[d,u,p]),f=kW(y=>{f.current?.removeEventListener("scroll",g),f.current?.removeEventListener("wheel",h),y?.addEventListener("scroll",g,{passive:!0}),y?.addEventListener("wheel",h,{passive:!0})},[]),b=kW(y=>{if(p.resizeObserver?.disconnect(),!y)return;let w;p.resizeObserver=new ResizeObserver(([k])=>{const{height:C}=k.contentRect,E=C-(w??C);if(p.resizeDifference=E,p.scrollTop>p.targetScrollTop&&(p.scrollTop=p.targetScrollTop),o(p.isNearBottom),E>=0){const _=C4(s.current,w?s.current.resize:s.current.initial);m({animation:_,wait:!0,preserveScrollPosition:!0,duration:_==="instant"?void 0:y6e})}else p.isNearBottom&&(d(!1),u(!0));w=C,requestAnimationFrame(()=>{setTimeout(()=>{p.resizeDifference===E&&(p.resizeDifference=0)},1)})}),p.resizeObserver?.observe(y)},[]);return{contentRef:b,scrollRef:f,scrollToBottom:m,stopScroll:A,isAtBottom:a||i,isNearBottom:i,escapedFromLock:t,state:p}};function kW(e,t){const n=ne.useCallback(a=>(n.current=a,e(a)),t);return n}const _4=new Map;function C4(...e){const t={...h6e};let n=!1;for(const r of e){if(r==="instant"){n=!0;continue}typeof r=="object"&&(n=!1,t.damping=r.damping??t.damping,t.stiffness=r.stiffness??t.stiffness,t.mass=r.mass??t.mass)}const a=JSON.stringify(t);return _4.has(a)||_4.set(a,Object.freeze(t)),n?"instant":_4.get(a)}const vW=ne.createContext(null),k6e=typeof window<"u"?ne.useLayoutEffect:ne.useEffect;function c1({instance:e,children:t,resize:n,initial:a,mass:r,damping:i,stiffness:o,targetScrollTop:s,contextRef:l,...u}){const d=ne.useRef(null),p=re.useCallback((C,E)=>(k?.targetScrollTop??s)?.(C,E)??C,[s]),m=w6e({mass:r,damping:i,stiffness:o,resize:n,initial:a,targetScrollTop:p}),{scrollRef:A,contentRef:g,scrollToBottom:h,stopScroll:f,isAtBottom:b,escapedFromLock:y,state:w}=e??m,k=ne.useMemo(()=>({scrollToBottom:h,stopScroll:f,scrollRef:A,isAtBottom:b,escapedFromLock:y,contentRef:g,state:w,get targetScrollTop(){return d.current},set targetScrollTop(C){d.current=C}}),[h,b,g,A,f,y,w]);return ne.useImperativeHandle(l,()=>k,[k]),k6e(()=>{A.current&&getComputedStyle(A.current).overflow==="visible"&&(A.current.style.overflow="auto")},[]),re.createElement(vW.Provider,{value:k},re.createElement("div",{...u},typeof t=="function"?t(k):t))}(function(e){function t({children:n,scrollClassName:a,...r}){const i=_W();return re.createElement("div",{ref:i.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:a},re.createElement("div",{...r,ref:i.contentRef},typeof n=="function"?n(i):n))}e.Content=t})(c1||(c1={}));function _W(){const e=ne.useContext(vW);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const v6e=({className:e,...t})=>F.jsx(c1,{className:Ct("relative flex-1 overflow-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),_6e=({className:e,...t})=>F.jsx(c1.Content,{className:Ct("p-4 pb-6 stick-to-bottom",e),scrollClassName:"custom-scrollbar",...t}),C6e=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:a}=_W(),r=ne.useCallback(()=>{a()},[a]);return n?null:F.jsx("button",{className:Ct("absolute bottom-32 left-1/2 -translate-x-1/2 z-10","flex items-center gap-1.5 px-4 py-2 rounded-full text-sm font-medium","glass border border-border/50 shadow-lg shadow-black/10","text-foreground/80 hover:text-foreground","transition-all duration-300 ease-out","hover:shadow-xl hover:shadow-primary/10 hover:-translate-y-0.5 hover:border-primary/30","animate-in fade-in slide-in-from-bottom-2 duration-200",e),onClick:r,type:"button",...t,children:F.jsx(vFe,{className:"size-3.5"})})};function nn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function E6e(e,t){const n=re.createContext(t),a=i=>{const{children:o,...s}=i,l=re.useMemo(()=>s,Object.values(s));return F.jsx(n.Provider,{value:l,children:o})};a.displayName=e+"Provider";function r(i){const o=re.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[a,r]}function hu(e,t=[]){let n=[];function a(i,o){const s=re.createContext(o),l=n.length;n=[...n,o];const u=p=>{const{scope:m,children:A,...g}=p,h=m?.[e]?.[l]||s,f=re.useMemo(()=>g,Object.values(g));return F.jsx(h.Provider,{value:f,children:A})};u.displayName=i+"Provider";function d(p,m){const A=m?.[e]?.[l]||s,g=re.useContext(A);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[u,d]}const r=()=>{const i=n.map(o=>re.createContext(o));return function(s){const l=s?.[e]||i;return re.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return r.scopeName=e,[a,x6e(r,...t)]}function x6e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const o=a.reduce((s,{useScope:l,scopeName:u})=>{const p=l(i)[`__scope${u}`];return{...s,...p}},{});return re.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var Ei=globalThis?.document?re.useLayoutEffect:()=>{},B6e=re[" useInsertionEffect ".trim().toString()]||Ei;function fu({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[r,i,o]=I6e({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:r;{const d=re.useRef(e!==void 0);re.useEffect(()=>{const p=d.current;p!==s&&console.warn(`${a} is changing from ${p?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. 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.`),d.current=s},[s,a])}const u=re.useCallback(d=>{if(s){const p=S6e(d)?d(e):d;p!==e&&o.current?.(p)}else i(d)},[s,e,i,o]);return[l,u]}function I6e({defaultProp:e,onChange:t}){const[n,a]=re.useState(e),r=re.useRef(n),i=re.useRef(t);return B6e(()=>{i.current=t},[t]),re.useEffect(()=>{r.current!==n&&(i.current?.(n),r.current=n)},[n,r]),[n,a,i]}function S6e(e){return typeof e=="function"}function sh(e){const t=D6e(e),n=re.forwardRef((a,r)=>{const{children:i,...o}=a,s=re.Children.toArray(i),l=s.find(T6e);if(l){const u=l.props.children,d=s.map(p=>p===l?re.Children.count(u)>1?re.Children.only(null):re.isValidElement(u)?u.props.children:null:p);return F.jsx(t,{...o,ref:r,children:re.isValidElement(u)?re.cloneElement(u,void 0,d):null})}return F.jsx(t,{...o,ref:r,children:i})});return n.displayName=`${e}.Slot`,n}function D6e(e){const t=re.forwardRef((n,a)=>{const{children:r,...i}=n;if(re.isValidElement(r)){const o=F6e(r),s=N6e(i,r.props);return r.type!==re.Fragment&&(s.ref=a?G0(a,o):o),re.cloneElement(r,s)}return re.Children.count(r)>1?re.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CW=Symbol("radix.slottable");function Q6e(e){const t=({children:n})=>F.jsx(F.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=CW,t}function T6e(e){return re.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===CW}function N6e(e,t){const n={...t};for(const a in t){const r=e[a],i=t[a];/^on[A-Z]/.test(a)?r&&i?n[a]=(...s)=>{const l=i(...s);return r(...s),l}:r&&(n[a]=r):a==="style"?n[a]={...r,...i}:a==="className"&&(n[a]=[r,i].filter(Boolean).join(" "))}return{...e,...n}}function F6e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var L6e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jn=L6e.reduce((e,t)=>{const n=sh(`Primitive.${t}`),a=re.forwardRef((r,i)=>{const{asChild:o,...s}=r,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),F.jsx(l,{...s,ref:i})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function EW(e,t){e&&jC.flushSync(()=>e.dispatchEvent(t))}function R6e(e,t){return re.useReducer((n,a)=>t[n][a]??n,e)}var Cc=e=>{const{present:t,children:n}=e,a=M6e(t),r=typeof n=="function"?n({present:a.isPresent}):re.Children.only(n),i=ha(a.ref,O6e(r));return typeof n=="function"||a.isPresent?re.cloneElement(r,{ref:i}):null};Cc.displayName="Presence";function M6e(e){const[t,n]=re.useState(),a=re.useRef(null),r=re.useRef(e),i=re.useRef("none"),o=e?"mounted":"unmounted",[s,l]=R6e(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return re.useEffect(()=>{const u=l1(a.current);i.current=s==="mounted"?u:"none"},[s]),Ei(()=>{const u=a.current,d=r.current;if(d!==e){const m=i.current,A=l1(u);e?l("MOUNT"):A==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&m!==A?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Ei(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,p=A=>{const h=l1(a.current).includes(CSS.escape(A.animationName));if(A.target===t&&h&&(l("ANIMATION_END"),!r.current)){const f=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=f)})}},m=A=>{A.target===t&&(i.current=l1(a.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:re.useCallback(u=>{a.current=u?getComputedStyle(u):null,n(u)},[])}}function l1(e){return e?.animationName||"none"}function O6e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var P6e=re[" useId ".trim().toString()]||(()=>{}),$6e=0;function Ec(e){const[t,n]=re.useState(P6e());return Ei(()=>{n(a=>a??String($6e++))},[e]),e||(t?`radix-${t}`:"")}var u1="Collapsible",[j6e]=hu(u1),[q6e,E4]=j6e(u1),xW=re.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:a,defaultOpen:r,disabled:i,onOpenChange:o,...s}=e,[l,u]=fu({prop:a,defaultProp:r??!1,onChange:o,caller:u1});return F.jsx(q6e,{scope:n,disabled:i,contentId:Ec(),open:l,onOpenToggle:re.useCallback(()=>u(d=>!d),[u]),children:F.jsx(jn.div,{"data-state":B4(l),"data-disabled":i?"":void 0,...s,ref:t})})});xW.displayName=u1;var BW="CollapsibleTrigger",IW=re.forwardRef((e,t)=>{const{__scopeCollapsible:n,...a}=e,r=E4(BW,n);return F.jsx(jn.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":B4(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...a,ref:t,onClick:nn(e.onClick,r.onOpenToggle)})});IW.displayName=BW;var x4="CollapsibleContent",SW=re.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=E4(x4,e.__scopeCollapsible);return F.jsx(Cc,{present:n||r.open,children:({present:i})=>F.jsx(G6e,{...a,ref:t,present:i})})});SW.displayName=x4;var G6e=re.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:a,children:r,...i}=e,o=E4(x4,n),[s,l]=re.useState(a),u=re.useRef(null),d=ha(t,u),p=re.useRef(0),m=p.current,A=re.useRef(0),g=A.current,h=o.open||s,f=re.useRef(h),b=re.useRef(void 0);return re.useEffect(()=>{const y=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(y)},[]),Ei(()=>{const y=u.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const w=y.getBoundingClientRect();p.current=w.height,A.current=w.width,f.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),l(a)}},[o.open,a]),F.jsx(jn.div,{"data-state":B4(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!h,...i,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:h&&r})});function B4(e){return e?"open":"closed"}var z6e=xW;function I4({...e}){return F.jsx(z6e,{"data-slot":"collapsible",...e})}function S4({...e}){return F.jsx(IW,{"data-slot":"collapsible-trigger",...e})}function D4({...e}){return F.jsx(SW,{"data-slot":"collapsible-content",...e})}const U6e=({className:e,...t})=>F.jsx(I4,{className:Ct("not-prose mb-4 text-primary text-xs",e),...t}),H6e=({className:e,count:t,children:n,...a})=>{const{t:r}=Da();return F.jsx(S4,{className:Ct("flex items-center gap-2",e),...a,children:n??F.jsxs(F.Fragment,{children:[F.jsx("p",{className:"font-medium",children:r("chat.used_sources",{count:t})}),F.jsx(q0,{className:"h-4 w-4"})]})})},Y6e=({className:e,...t})=>F.jsx(D4,{className:Ct("mt-3 flex w-fit flex-col gap-2","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),W6e=({href:e,title:t,children:n,...a})=>F.jsx("a",{className:"flex items-center gap-2",href:e,rel:"noreferrer",target:"_blank",...a,children:n??F.jsxs(F.Fragment,{children:[F.jsx(CFe,{className:"h-4 w-4"}),F.jsx("span",{className:"block font-medium",children:t})]})}),K6e=({latestProgress:e,parts:t})=>{const n=e.data[0].status,a=e.data[0].message,r=t.lastIndexOf(e);if(!!(t.slice(r+1).some(p=>p.type==="text"&&(p.text||"").trim().length>0||p.type==="tool-invocation"||p.type==="tool-call")&&n!=="running"))return null;const l=n==="running",u=n==="error",d=oh(a);return F.jsx("div",{className:Ct("flex w-full py-3 mx-auto max-w-4xl px-4 md:px-0 animate-in-bubble",d==="rtl"?"justify-end":"justify-start"),children:F.jsxs("div",{className:Ct("flex items-center gap-3 text-sm text-muted-foreground",d==="rtl"&&"flex-row-reverse"),dir:d,children:[l?F.jsx("div",{className:"size-4 animate-spin rounded-full border-2 border-primary border-r-transparent shrink-0"}):u?F.jsx(Mm,{className:"size-4 text-destructive shrink-0"}):F.jsx(j0,{className:"size-4 text-green-500 shrink-0"}),F.jsx("span",{className:Ct("font-medium",l&&"animate-pulse"),children:a})]})})};function DW({messages:e,status:t,isLoadingHistory:n,error:a,conversationId:r,regen:i,onSuggestionClick:o,chat:s,className:l,readonly:u}){const{i18n:d,t:p}=Da(),m=d.language==="fa",{WelcomeScreen:A}=Zi(),g=e[e.length-1],h=g?.role==="assistant"&&(t==="ready"||g.parts.some(f=>f.type==="data-chat-finished"));return F.jsxs(v6e,{className:Ct("min-h-0 flex-1",l),children:[F.jsxs(_6e,{className:"max-w-4xl mx-auto w-full px-4 md:px-0 pb-32",dir:"ltr",children:[e.length===0&&!n?F.jsx(A,{onSuggestionClick:o}):e.map(f=>F.jsxs("div",{children:[f.role==="assistant"&&f.parts.filter(b=>b.type==="source-url").length>0&&F.jsxs(U6e,{children:[F.jsx(H6e,{count:f.parts.filter(b=>b.type==="source-url").length}),f.parts.filter(b=>b.type==="source-url").map((b,y)=>F.jsx(Y6e,{children:F.jsx(W6e,{href:b.url,title:b.url},`${f.id}-${y}`)},`${f.id}-${y}`))]}),f.parts.map((b,y)=>F.jsx(RY,{part:b,message:f,status:t,index:y,regen:i,lastMessage:f.id===e.at(-1)?.id,conversationId:r,isFinished:h,chat:s,readonly:u},`${f.id}-${y}`))]},f.id)),(()=>{if(!g||g.role!=="assistant")return null;const f=g.parts.filter(y=>y.type==="data-progress-update");if(f.length===0)return null;const b=f[f.length-1];return b?F.jsx(K6e,{latestProgress:b,parts:g.parts}):null})(),(n||t==="submitted")&&F.jsx("div",{className:"animate-in-bubble",children:F.jsx(a1,{})}),t==="streaming"&&(()=>{const f=e[e.length-1];return!f||f.role==="user"?F.jsx(a1,{}):f.parts?.some(y=>y.type==="text"&&y.text?.trim().length>0||y.type==="reasoning"||y.type==="tool-invocation"||y.type==="tool-call")?null:F.jsx(a1,{})})(),t==="error"&&a&&F.jsx("div",{className:"mx-auto max-w-4xl w-full px-4 my-3 animate-in-bubble",children:F.jsxs("div",{className:Ct("flex w-full items-start gap-3 px-4 py-3.5 rounded-xl bg-destructive/8 border border-destructive/15",m?"border-r-2 border-r-destructive/60":"border-l-2 border-l-destructive/60"),dir:m?"rtl":"ltr",children:[F.jsx("div",{className:"size-1.5 rounded-full bg-destructive mt-2 shrink-0"}),F.jsxs("div",{className:Ct("text-sm text-destructive/90 leading-relaxed flex-1",m?"text-right":"text-left"),children:[F.jsx("span",{className:"font-semibold",children:p("chat.error")})," ",a.message]})]})})]}),F.jsx(C6e,{})]})}function Z6e({className:e,...t}){return F.jsx("textarea",{"data-slot":"textarea",className:Ct("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t})}const V6e=({className:e,...t})=>F.jsx("div",{className:"bg-transparent w-full",children:F.jsx("form",{className:Ct("w-full flex items-end gap-2 overflow-hidden","rounded-lg bg-surface glow-primary","px-3 py-2","transition-all duration-300 ease-out","border-none","hover:shadow-foreground/5","has-focus-visible:ring-2 has-focus-visible:ring-foreground/20 has-focus-visible:shadow-lg has-focus-visible:shadow-foreground/5",e),...t})}),J6e=({onChange:e,className:t,placeholder:n="What would you like to know?",...a})=>{const r=s=>{if(s.key==="Enter"){if(s.nativeEvent.isComposing||s.shiftKey)return;s.preventDefault();const l=s.currentTarget.form;l&&l.requestSubmit()}},{i18n:i}=Da(),o=oh(a.value,i.dir());return F.jsx(Z6e,{dir:o,className:Ct("flex-1 resize-none rounded-none border-none shadow-none outline-none ring-0","px-2 py-2.5","field-sizing-content max-h-[6lh] bg-transparent dark:bg-transparent","focus-visible:ring-0 min-h-[40px] md:min-h-[44px]","text-[1.0625rem] placeholder:text-muted-foreground/60","transition-all duration-200",t),name:"message",onChange:s=>{e?.(s)},onKeyDown:r,placeholder:n,...a})},X6e=({className:e,...t})=>F.jsx("div",{className:Ct("flex shrink-0 items-center gap-1.5 pb-1",e),...t}),eLe=({className:e,...t})=>F.jsx("div",{className:Ct("flex items-center gap-0.5",e),...t}),tLe=({variant:e="ghost",className:t,size:n,...a})=>{const r=n??ne.Children.count(a.children)>1?"default":"icon";return F.jsx(oi,{className:Ct("shrink-0 gap-1.5 rounded-xl","text-muted-foreground hover:text-foreground","hover:bg-accent/60 transition-all duration-200","hover:scale-105 active:scale-95",r==="default"&&"px-3",t),size:r,type:"button",variant:e,...a})},nLe=({className:e,variant:t="default",size:n="icon",status:a,children:r,...i})=>{let o=F.jsx(_Fe,{className:"size-4"});return a==="submitted"?o=F.jsx(y4,{className:"size-4 animate-spin"}):a==="streaming"?o=F.jsx(JFe,{className:"size-3.5 fill-current"}):a==="error"&&(o=F.jsx(Mm,{className:"size-4"})),F.jsx(oi,{className:Ct("shrink-0 rounded-lg size-9","bg-gradient-to-br from-primary to-primary/80","text-primary-foreground","shadow-md shadow-primary/30","hover:shadow-lg hover:shadow-primary/40","transition-all duration-200 ease-out","hover:scale-105 active:scale-95","disabled:opacity-40 disabled:shadow-none disabled:scale-100",a==="submitted"&&"bg-gradient-to-br from-muted to-muted/80 shadow-none text-foreground",a==="streaming"&&"bg-gradient-to-br from-primary to-primary/80 shadow-md text-primary-foreground",e),size:n,type:a==="streaming"?"button":"submit",variant:t,...i,children:r??o})};function pl(e){const t=re.useRef(e);return re.useEffect(()=>{t.current=e}),re.useMemo(()=>(...n)=>t.current?.(...n),[])}function aLe(e,t=globalThis?.document){const n=pl(e);re.useEffect(()=>{const a=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var rLe="DismissableLayer",Q4="dismissableLayer.update",iLe="dismissableLayer.pointerDownOutside",oLe="dismissableLayer.focusOutside",QW,TW=re.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),z0=re.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:o,onDismiss:s,...l}=e,u=re.useContext(TW),[d,p]=re.useState(null),m=d?.ownerDocument??globalThis?.document,[,A]=re.useState({}),g=ha(t,_=>p(_)),h=Array.from(u.layers),[f]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=h.indexOf(f),y=d?h.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,k=y>=b,C=lLe(_=>{const x=_.target,S=[...u.branches].some(I=>I.contains(x));!k||S||(r?.(_),o?.(_),_.defaultPrevented||s?.())},m),E=uLe(_=>{const x=_.target;[...u.branches].some(I=>I.contains(x))||(i?.(_),o?.(_),_.defaultPrevented||s?.())},m);return aLe(_=>{y===u.layers.size-1&&(a?.(_),!_.defaultPrevented&&s&&(_.preventDefault(),s()))},m),re.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(QW=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),NW(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=QW)}},[d,m,n,u]),re.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),NW())},[d,u]),re.useEffect(()=>{const _=()=>A({});return document.addEventListener(Q4,_),()=>document.removeEventListener(Q4,_)},[]),F.jsx(jn.div,{...l,ref:g,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:nn(e.onFocusCapture,E.onFocusCapture),onBlurCapture:nn(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:nn(e.onPointerDownCapture,C.onPointerDownCapture)})});z0.displayName=rLe;var sLe="DismissableLayerBranch",cLe=re.forwardRef((e,t)=>{const n=re.useContext(TW),a=re.useRef(null),r=ha(t,a);return re.useEffect(()=>{const i=a.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),F.jsx(jn.div,{...e,ref:r})});cLe.displayName=sLe;function lLe(e,t=globalThis?.document){const n=pl(e),a=re.useRef(!1),r=re.useRef(()=>{});return re.useEffect(()=>{const i=s=>{if(s.target&&!a.current){let l=function(){FW(iLe,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);a.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function uLe(e,t=globalThis?.document){const n=pl(e),a=re.useRef(!1);return re.useEffect(()=>{const r=i=>{i.target&&!a.current&&FW(oLe,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function NW(){const e=new CustomEvent(Q4);document.dispatchEvent(e)}function FW(e,t,n,{discrete:a}){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),a?EW(r,i):r.dispatchEvent(i)}const dLe=["top","right","bottom","left"],zd=Math.min,ws=Math.max,d1=Math.round,p1=Math.floor,ml=e=>({x:e,y:e}),pLe={left:"right",right:"left",bottom:"top",top:"bottom"};function T4(e,t,n){return ws(e,zd(t,n))}function bu(e,t){return typeof e=="function"?e(t):e}function yu(e){return e.split("-")[0]}function ch(e){return e.split("-")[1]}function N4(e){return e==="x"?"y":"x"}function F4(e){return e==="y"?"height":"width"}function Al(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function L4(e){return N4(Al(e))}function mLe(e,t,n){n===void 0&&(n=!1);const a=ch(e),r=L4(e),i=F4(r);let o=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=m1(o)),[o,m1(o)]}function ALe(e){const t=m1(e);return[R4(e),t,R4(t)]}function R4(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const LW=["left","right"],RW=["right","left"],gLe=["top","bottom"],hLe=["bottom","top"];function fLe(e,t,n){switch(e){case"top":case"bottom":return n?t?RW:LW:t?LW:RW;case"left":case"right":return t?gLe:hLe;default:return[]}}function bLe(e,t,n,a){const r=ch(e);let i=fLe(yu(e),n==="start",a);return r&&(i=i.map(o=>o+"-"+r),t&&(i=i.concat(i.map(R4)))),i}function m1(e){const t=yu(e);return pLe[t]+e.slice(t.length)}function yLe(e){return{top:0,right:0,bottom:0,left:0,...e}}function MW(e){return typeof e!="number"?yLe(e):{top:e,right:e,bottom:e,left:e}}function A1(e){const{x:t,y:n,width:a,height:r}=e;return{width:a,height:r,top:n,left:t,right:t+a,bottom:n+r,x:t,y:n}}function OW(e,t,n){let{reference:a,floating:r}=e;const i=Al(t),o=L4(t),s=F4(o),l=yu(t),u=i==="y",d=a.x+a.width/2-r.width/2,p=a.y+a.height/2-r.height/2,m=a[s]/2-r[s]/2;let A;switch(l){case"top":A={x:d,y:a.y-r.height};break;case"bottom":A={x:d,y:a.y+a.height};break;case"right":A={x:a.x+a.width,y:p};break;case"left":A={x:a.x-r.width,y:p};break;default:A={x:a.x,y:a.y}}switch(ch(t)){case"start":A[o]-=m*(n&&u?-1:1);break;case"end":A[o]+=m*(n&&u?-1:1);break}return A}async function wLe(e,t){var n;t===void 0&&(t={});const{x:a,y:r,platform:i,rects:o,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:m=!1,padding:A=0}=bu(t,e),g=MW(A),f=s[m?p==="floating"?"reference":"floating":p],b=A1(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(f)))==null||n?f:f.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),y=p==="floating"?{x:a,y:r,width:o.floating.width,height:o.floating.height}:o.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),k=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=A1(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(b.top-C.top+g.top)/k.y,bottom:(C.bottom-b.bottom+g.bottom)/k.y,left:(b.left-C.left+g.left)/k.x,right:(C.right-b.right+g.right)/k.x}}const kLe=50,vLe=async(e,t,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:i=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:wLe},l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:p}=OW(u,a,l),m=a,A=0;const g={};for(let h=0;h<i.length;h++){const f=i[h];if(!f)continue;const{name:b,fn:y}=f,{x:w,y:k,data:C,reset:E}=await y({x:d,y:p,initialPlacement:a,placement:m,strategy:r,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});d=w??d,p=k??p,g[b]={...g[b],...C},E&&A<kLe&&(A++,typeof E=="object"&&(E.placement&&(m=E.placement),E.rects&&(u=E.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:d,y:p}=OW(u,m,l)),h=-1)}return{x:d,y:p,placement:m,strategy:r,middlewareData:g}},_Le=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:r,rects:i,platform:o,elements:s,middlewareData:l}=t,{element:u,padding:d=0}=bu(e,t)||{};if(u==null)return{};const p=MW(d),m={x:n,y:a},A=L4(r),g=F4(A),h=await o.getDimensions(u),f=A==="y",b=f?"top":"left",y=f?"bottom":"right",w=f?"clientHeight":"clientWidth",k=i.reference[g]+i.reference[A]-m[A]-i.floating[g],C=m[A]-i.reference[A],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let _=E?E[w]:0;(!_||!await(o.isElement==null?void 0:o.isElement(E)))&&(_=s.floating[w]||i.floating[g]);const x=k/2-C/2,S=_/2-h[g]/2-1,I=zd(p[b],S),D=zd(p[y],S),Q=I,R=_-h[g]-D,B=_/2-h[g]/2+x,T=T4(Q,B,R),N=!l.arrow&&ch(r)!=null&&B!==T&&i.reference[g]/2-(B<Q?I:D)-h[g]/2<0,L=N?B<Q?B-Q:B-R:0;return{[A]:m[A]+L,data:{[A]:T,centerOffset:B-T-L,...N&&{alignmentOffset:L}},reset:N}}}),CLe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:r,middlewareData:i,rects:o,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:A="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...f}=bu(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const b=yu(r),y=Al(s),w=yu(s)===s,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=m||(w||!h?[m1(s)]:ALe(s)),E=g!=="none";!m&&E&&C.push(...bLe(s,h,g,k));const _=[s,...C],x=await l.detectOverflow(t,f),S=[];let I=((a=i.flip)==null?void 0:a.overflows)||[];if(d&&S.push(x[b]),p){const B=mLe(r,o,k);S.push(x[B[0]],x[B[1]])}if(I=[...I,{placement:r,overflows:S}],!S.every(B=>B<=0)){var D,Q;const B=(((D=i.flip)==null?void 0:D.index)||0)+1,T=_[B];if(T&&(!(p==="alignment"?y!==Al(T):!1)||I.every(M=>Al(M.placement)===y?M.overflows[0]>0:!0)))return{data:{index:B,overflows:I},reset:{placement:T}};let N=(Q=I.filter(L=>L.overflows[0]<=0).sort((L,M)=>L.overflows[1]-M.overflows[1])[0])==null?void 0:Q.placement;if(!N)switch(A){case"bestFit":{var R;const L=(R=I.filter(M=>{if(E){const O=Al(M.placement);return O===y||O==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(O=>O>0).reduce((O,P)=>O+P,0)]).sort((M,O)=>M[1]-O[1])[0])==null?void 0:R[0];L&&(N=L);break}case"initialPlacement":N=s;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function PW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $W(e){return dLe.some(t=>e[t]>=0)}const ELe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:r="referenceHidden",...i}=bu(e,t);switch(r){case"referenceHidden":{const o=await a.detectOverflow(t,{...i,elementContext:"reference"}),s=PW(o,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:$W(s)}}}case"escaped":{const o=await a.detectOverflow(t,{...i,altBoundary:!0}),s=PW(o,n.floating);return{data:{escapedOffsets:s,escaped:$W(s)}}}default:return{}}}}},jW=new Set(["left","top"]);async function xLe(e,t){const{placement:n,platform:a,elements:r}=e,i=await(a.isRTL==null?void 0:a.isRTL(r.floating)),o=yu(n),s=ch(n),l=Al(n)==="y",u=jW.has(o)?-1:1,d=i&&l?-1:1,p=bu(t,e);let{mainAxis:m,crossAxis:A,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof g=="number"&&(A=s==="end"?g*-1:g),l?{x:A*d,y:m*u}:{x:m*u,y:A*d}}const BLe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:r,y:i,placement:o,middlewareData:s}=t,l=await xLe(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(a=s.arrow)!=null&&a.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:o}}}}},ILe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:r,platform:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:l={fn:b=>{let{x:y,y:w}=b;return{x:y,y:w}}},...u}=bu(e,t),d={x:n,y:a},p=await i.detectOverflow(t,u),m=Al(yu(r)),A=N4(m);let g=d[A],h=d[m];if(o){const b=A==="y"?"top":"left",y=A==="y"?"bottom":"right",w=g+p[b],k=g-p[y];g=T4(w,g,k)}if(s){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",w=h+p[b],k=h-p[y];h=T4(w,h,k)}const f=l.fn({...t,[A]:g,[m]:h});return{...f,data:{x:f.x-n,y:f.y-a,enabled:{[A]:o,[m]:s}}}}}},SLe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:r,rects:i,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=bu(e,t),d={x:n,y:a},p=Al(r),m=N4(p);let A=d[m],g=d[p];const h=bu(s,t),f=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){const w=m==="y"?"height":"width",k=i.reference[m]-i.floating[w]+f.mainAxis,C=i.reference[m]+i.reference[w]-f.mainAxis;A<k?A=k:A>C&&(A=C)}if(u){var b,y;const w=m==="y"?"width":"height",k=jW.has(yu(r)),C=i.reference[p]-i.floating[w]+(k&&((b=o.offset)==null?void 0:b[p])||0)+(k?0:f.crossAxis),E=i.reference[p]+i.reference[w]+(k?0:((y=o.offset)==null?void 0:y[p])||0)-(k?f.crossAxis:0);g<C?g=C:g>E&&(g=E)}return{[m]:A,[p]:g}}}},DLe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:r,rects:i,platform:o,elements:s}=t,{apply:l=()=>{},...u}=bu(e,t),d=await o.detectOverflow(t,u),p=yu(r),m=ch(r),A=Al(r)==="y",{width:g,height:h}=i.floating;let f,b;p==="top"||p==="bottom"?(f=p,b=m===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(b=p,f=m==="end"?"top":"bottom");const y=h-d.top-d.bottom,w=g-d.left-d.right,k=zd(h-d[f],y),C=zd(g-d[b],w),E=!t.middlewareData.shift;let _=k,x=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(x=w),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(_=y),E&&!m){const I=ws(d.left,0),D=ws(d.right,0),Q=ws(d.top,0),R=ws(d.bottom,0);A?x=g-2*(I!==0||D!==0?I+D:ws(d.left,d.right)):_=h-2*(Q!==0||R!==0?Q+R:ws(d.top,d.bottom))}await l({...t,availableWidth:x,availableHeight:_});const S=await o.getDimensions(s.floating);return g!==S.width||h!==S.height?{reset:{rects:!0}}:{}}}};function g1(){return typeof window<"u"}function lh(e){return qW(e)?(e.nodeName||"").toLowerCase():"#document"}function ks(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gl(e){var t;return(t=(qW(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qW(e){return g1()?e instanceof Node||e instanceof ks(e).Node:!1}function xc(e){return g1()?e instanceof Element||e instanceof ks(e).Element:!1}function wu(e){return g1()?e instanceof HTMLElement||e instanceof ks(e).HTMLElement:!1}function GW(e){return!g1()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ks(e).ShadowRoot}function U0(e){const{overflow:t,overflowX:n,overflowY:a,display:r}=Bc(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&r!=="inline"&&r!=="contents"}function QLe(e){return/^(table|td|th)$/.test(lh(e))}function h1(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const TLe=/transform|translate|scale|rotate|perspective|filter/,NLe=/paint|layout|strict|content/,Om=e=>!!e&&e!=="none";let M4;function O4(e){const t=xc(e)?Bc(e):e;return Om(t.transform)||Om(t.translate)||Om(t.scale)||Om(t.rotate)||Om(t.perspective)||!P4()&&(Om(t.backdropFilter)||Om(t.filter))||TLe.test(t.willChange||"")||NLe.test(t.contain||"")}function FLe(e){let t=Ud(e);for(;wu(t)&&!uh(t);){if(O4(t))return t;if(h1(t))return null;t=Ud(t)}return null}function P4(){return M4==null&&(M4=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),M4}function uh(e){return/^(html|body|#document)$/.test(lh(e))}function Bc(e){return ks(e).getComputedStyle(e)}function f1(e){return xc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ud(e){if(lh(e)==="html")return e;const t=e.assignedSlot||e.parentNode||GW(e)&&e.host||gl(e);return GW(t)?t.host:t}function zW(e){const t=Ud(e);return uh(t)?e.ownerDocument?e.ownerDocument.body:e.body:wu(t)&&U0(t)?t:zW(t)}function H0(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=zW(e),i=r===((a=e.ownerDocument)==null?void 0:a.body),o=ks(r);if(i){const s=$4(o);return t.concat(o,o.visualViewport||[],U0(r)?r:[],s&&n?H0(s):[])}else return t.concat(r,H0(r,[],n))}function $4(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function UW(e){const t=Bc(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const r=wu(e),i=r?e.offsetWidth:n,o=r?e.offsetHeight:a,s=d1(n)!==i||d1(a)!==o;return s&&(n=i,a=o),{width:n,height:a,$:s}}function j4(e){return xc(e)?e:e.contextElement}function dh(e){const t=j4(e);if(!wu(t))return ml(1);const n=t.getBoundingClientRect(),{width:a,height:r,$:i}=UW(t);let o=(i?d1(n.width):n.width)/a,s=(i?d1(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const LLe=ml(0);function HW(e){const t=ks(e);return!P4()||!t.visualViewport?LLe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function RLe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ks(e)?!1:t}function Pm(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=j4(e);let o=ml(1);t&&(a?xc(a)&&(o=dh(a)):o=dh(e));const s=RLe(i,n,a)?HW(i):ml(0);let l=(r.left+s.x)/o.x,u=(r.top+s.y)/o.y,d=r.width/o.x,p=r.height/o.y;if(i){const m=ks(i),A=a&&xc(a)?ks(a):a;let g=m,h=$4(g);for(;h&&a&&A!==g;){const f=dh(h),b=h.getBoundingClientRect(),y=Bc(h),w=b.left+(h.clientLeft+parseFloat(y.paddingLeft))*f.x,k=b.top+(h.clientTop+parseFloat(y.paddingTop))*f.y;l*=f.x,u*=f.y,d*=f.x,p*=f.y,l+=w,u+=k,g=ks(h),h=$4(g)}}return A1({width:d,height:p,x:l,y:u})}function b1(e,t){const n=f1(e).scrollLeft;return t?t.left+n:Pm(gl(e)).left+n}function YW(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-b1(e,n),r=n.top+t.scrollTop;return{x:a,y:r}}function MLe(e){let{elements:t,rect:n,offsetParent:a,strategy:r}=e;const i=r==="fixed",o=gl(a),s=t?h1(t.floating):!1;if(a===o||s&&i)return n;let l={scrollLeft:0,scrollTop:0},u=ml(1);const d=ml(0),p=wu(a);if((p||!p&&!i)&&((lh(a)!=="body"||U0(o))&&(l=f1(a)),p)){const A=Pm(a);u=dh(a),d.x=A.x+a.clientLeft,d.y=A.y+a.clientTop}const m=o&&!p&&!i?YW(o,l):ml(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function OLe(e){return Array.from(e.getClientRects())}function PLe(e){const t=gl(e),n=f1(e),a=e.ownerDocument.body,r=ws(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),i=ws(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let o=-n.scrollLeft+b1(e);const s=-n.scrollTop;return Bc(a).direction==="rtl"&&(o+=ws(t.clientWidth,a.clientWidth)-r),{width:r,height:i,x:o,y:s}}const WW=25;function $Le(e,t){const n=ks(e),a=gl(e),r=n.visualViewport;let i=a.clientWidth,o=a.clientHeight,s=0,l=0;if(r){i=r.width,o=r.height;const d=P4();(!d||d&&t==="fixed")&&(s=r.offsetLeft,l=r.offsetTop)}const u=b1(a);if(u<=0){const d=a.ownerDocument,p=d.body,m=getComputedStyle(p),A=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(a.clientWidth-p.clientWidth-A);g<=WW&&(i-=g)}else u<=WW&&(i+=u);return{width:i,height:o,x:s,y:l}}function jLe(e,t){const n=Pm(e,!0,t==="fixed"),a=n.top+e.clientTop,r=n.left+e.clientLeft,i=wu(e)?dh(e):ml(1),o=e.clientWidth*i.x,s=e.clientHeight*i.y,l=r*i.x,u=a*i.y;return{width:o,height:s,x:l,y:u}}function KW(e,t,n){let a;if(t==="viewport")a=$Le(e,n);else if(t==="document")a=PLe(gl(e));else if(xc(t))a=jLe(t,n);else{const r=HW(e);a={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return A1(a)}function ZW(e,t){const n=Ud(e);return n===t||!xc(n)||uh(n)?!1:Bc(n).position==="fixed"||ZW(n,t)}function qLe(e,t){const n=t.get(e);if(n)return n;let a=H0(e,[],!1).filter(s=>xc(s)&&lh(s)!=="body"),r=null;const i=Bc(e).position==="fixed";let o=i?Ud(e):e;for(;xc(o)&&!uh(o);){const s=Bc(o),l=O4(o);!l&&s.position==="fixed"&&(r=null),(i?!l&&!r:!l&&s.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||U0(o)&&!l&&ZW(e,o))?a=a.filter(d=>d!==o):r=s,o=Ud(o)}return t.set(e,a),a}function GLe(e){let{element:t,boundary:n,rootBoundary:a,strategy:r}=e;const o=[...n==="clippingAncestors"?h1(t)?[]:qLe(t,this._c):[].concat(n),a],s=KW(t,o[0],r);let l=s.top,u=s.right,d=s.bottom,p=s.left;for(let m=1;m<o.length;m++){const A=KW(t,o[m],r);l=ws(A.top,l),u=zd(A.right,u),d=zd(A.bottom,d),p=ws(A.left,p)}return{width:u-p,height:d-l,x:p,y:l}}function zLe(e){const{width:t,height:n}=UW(e);return{width:t,height:n}}function ULe(e,t,n){const a=wu(t),r=gl(t),i=n==="fixed",o=Pm(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ml(0);function u(){l.x=b1(r)}if(a||!a&&!i)if((lh(t)!=="body"||U0(r))&&(s=f1(t)),a){const A=Pm(t,!0,i,t);l.x=A.x+t.clientLeft,l.y=A.y+t.clientTop}else r&&u();i&&!a&&r&&u();const d=r&&!a&&!i?YW(r,s):ml(0),p=o.left+s.scrollLeft-l.x-d.x,m=o.top+s.scrollTop-l.y-d.y;return{x:p,y:m,width:o.width,height:o.height}}function q4(e){return Bc(e).position==="static"}function VW(e,t){if(!wu(e)||Bc(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return gl(e)===n&&(n=n.ownerDocument.body),n}function JW(e,t){const n=ks(e);if(h1(e))return n;if(!wu(e)){let r=Ud(e);for(;r&&!uh(r);){if(xc(r)&&!q4(r))return r;r=Ud(r)}return n}let a=VW(e,t);for(;a&&QLe(a)&&q4(a);)a=VW(a,t);return a&&uh(a)&&q4(a)&&!O4(a)?n:a||FLe(e)||n}const HLe=async function(e){const t=this.getOffsetParent||JW,n=this.getDimensions,a=await n(e.floating);return{reference:ULe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function YLe(e){return Bc(e).direction==="rtl"}const WLe={convertOffsetParentRelativeRectToViewportRelativeRect:MLe,getDocumentElement:gl,getClippingRect:GLe,getOffsetParent:JW,getElementRects:HLe,getClientRects:OLe,getDimensions:zLe,getScale:dh,isElement:xc,isRTL:YLe};function XW(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function KLe(e,t){let n=null,a;const r=gl(e);function i(){var s;clearTimeout(a),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:d,top:p,width:m,height:A}=u;if(s||t(),!m||!A)return;const g=p1(p),h=p1(r.clientWidth-(d+m)),f=p1(r.clientHeight-(p+A)),b=p1(d),w={rootMargin:-g+"px "+-h+"px "+-f+"px "+-b+"px",threshold:ws(0,zd(1,l))||1};let k=!0;function C(E){const _=E[0].intersectionRatio;if(_!==l){if(!k)return o();_?o(!1,_):a=setTimeout(()=>{o(!1,1e-7)},1e3)}_===1&&!XW(u,e.getBoundingClientRect())&&o(),k=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return o(!0),i}function ZLe(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=a,u=j4(e),d=r||i?[...u?H0(u):[],...t?H0(t):[]]:[];d.forEach(b=>{r&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const p=u&&s?KLe(u,n):null;let m=-1,A=null;o&&(A=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&A&&t&&(A.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=A)==null||w.observe(t)})),n()}),u&&!l&&A.observe(u),t&&A.observe(t));let g,h=l?Pm(e):null;l&&f();function f(){const b=Pm(e);h&&!XW(h,b)&&n(),h=b,g=requestAnimationFrame(f)}return n(),()=>{var b;d.forEach(y=>{r&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),p?.(),(b=A)==null||b.disconnect(),A=null,l&&cancelAnimationFrame(g)}}const VLe=BLe,JLe=ILe,XLe=CLe,e9e=DLe,t9e=ELe,eK=_Le,n9e=SLe,a9e=(e,t,n)=>{const a=new Map,r={platform:WLe,...n},i={...r.platform,_c:a};return vLe(e,t,{...r,platform:i})};var r9e=typeof document<"u",i9e=function(){},y1=r9e?ne.useLayoutEffect:i9e;function w1(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!w1(e[a],t[a]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,r[a]))return!1;for(a=n;a--!==0;){const i=r[a];if(!(i==="_owner"&&e.$$typeof)&&!w1(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function tK(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function nK(e,t){const n=tK(e);return Math.round(t*n)/n}function G4(e){const t=re.useRef(e);return y1(()=>{t.current=e}),t}function o9e(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:r,elements:{reference:i,floating:o}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,p]=re.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,A]=re.useState(a);w1(m,a)||A(a);const[g,h]=re.useState(null),[f,b]=re.useState(null),y=re.useCallback(M=>{M!==E.current&&(E.current=M,h(M))},[]),w=re.useCallback(M=>{M!==_.current&&(_.current=M,b(M))},[]),k=i||g,C=o||f,E=re.useRef(null),_=re.useRef(null),x=re.useRef(d),S=l!=null,I=G4(l),D=G4(r),Q=G4(u),R=re.useCallback(()=>{if(!E.current||!_.current)return;const M={placement:t,strategy:n,middleware:m};D.current&&(M.platform=D.current),a9e(E.current,_.current,M).then(O=>{const P={...O,isPositioned:Q.current!==!1};B.current&&!w1(x.current,P)&&(x.current=P,jC.flushSync(()=>{p(P)}))})},[m,t,n,D,Q]);y1(()=>{u===!1&&x.current.isPositioned&&(x.current.isPositioned=!1,p(M=>({...M,isPositioned:!1})))},[u]);const B=re.useRef(!1);y1(()=>(B.current=!0,()=>{B.current=!1}),[]),y1(()=>{if(k&&(E.current=k),C&&(_.current=C),k&&C){if(I.current)return I.current(k,C,R);R()}},[k,C,R,I,S]);const T=re.useMemo(()=>({reference:E,floating:_,setReference:y,setFloating:w}),[y,w]),N=re.useMemo(()=>({reference:k,floating:C}),[k,C]),L=re.useMemo(()=>{const M={position:n,left:0,top:0};if(!N.floating)return M;const O=nK(N.floating,d.x),P=nK(N.floating,d.y);return s?{...M,transform:"translate("+O+"px, "+P+"px)",...tK(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:P}},[n,s,N.floating,d.x,d.y]);return re.useMemo(()=>({...d,update:R,refs:T,elements:N,floatingStyles:L}),[d,R,T,N,L])}const s9e=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:r}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?eK({element:a.current,padding:r}).fn(n):{}:a?eK({element:a,padding:r}).fn(n):{}}}},c9e=(e,t)=>{const n=VLe(e);return{name:n.name,fn:n.fn,options:[e,t]}},l9e=(e,t)=>{const n=JLe(e);return{name:n.name,fn:n.fn,options:[e,t]}},u9e=(e,t)=>({fn:n9e(e).fn,options:[e,t]}),d9e=(e,t)=>{const n=XLe(e);return{name:n.name,fn:n.fn,options:[e,t]}},p9e=(e,t)=>{const n=e9e(e);return{name:n.name,fn:n.fn,options:[e,t]}},m9e=(e,t)=>{const n=t9e(e);return{name:n.name,fn:n.fn,options:[e,t]}},A9e=(e,t)=>{const n=s9e(e);return{name:n.name,fn:n.fn,options:[e,t]}};var g9e="Arrow",aK=re.forwardRef((e,t)=>{const{children:n,width:a=10,height:r=5,...i}=e;return F.jsx(jn.svg,{...i,ref:t,width:a,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:F.jsx("polygon",{points:"0,0 30,0 15,10"})})});aK.displayName=g9e;var h9e=aK;function f9e(e){const[t,n]=re.useState(void 0);return Ei(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let o,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,s=u.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var z4="Popper",[rK,ph]=hu(z4),[b9e,iK]=rK(z4),oK=e=>{const{__scopePopper:t,children:n}=e,[a,r]=re.useState(null);return F.jsx(b9e,{scope:t,anchor:a,onAnchorChange:r,children:n})};oK.displayName=z4;var sK="PopperAnchor",cK=re.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...r}=e,i=iK(sK,n),o=re.useRef(null),s=ha(t,o),l=re.useRef(null);return re.useEffect(()=>{const u=l.current;l.current=a?.current||o.current,u!==l.current&&i.onAnchorChange(l.current)}),a?null:F.jsx(jn.div,{...r,ref:s})});cK.displayName=sK;var U4="PopperContent",[y9e,w9e]=rK(U4),lK=re.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:r=0,align:i="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:A="optimized",onPlaced:g,...h}=e,f=iK(U4,n),[b,y]=re.useState(null),w=ha(t,Y=>y(Y)),[k,C]=re.useState(null),E=f9e(k),_=E?.width??0,x=E?.height??0,S=a+(i!=="center"?"-"+i:""),I=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],Q=D.length>0,R={padding:I,boundary:D.filter(v9e),altBoundary:Q},{refs:B,floatingStyles:T,placement:N,isPositioned:L,middlewareData:M}=o9e({strategy:"fixed",placement:S,whileElementsMounted:(...Y)=>ZLe(...Y,{animationFrame:A==="always"}),elements:{reference:f.anchor},middleware:[c9e({mainAxis:r+x,alignmentAxis:o}),l&&l9e({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?u9e():void 0,...R}),l&&d9e({...R}),p9e({...R,apply:({elements:Y,rects:ae,availableWidth:Z,availableHeight:J})=>{const{width:ee,height:V}=ae.reference,pe=Y.floating.style;pe.setProperty("--radix-popper-available-width",`${Z}px`),pe.setProperty("--radix-popper-available-height",`${J}px`),pe.setProperty("--radix-popper-anchor-width",`${ee}px`),pe.setProperty("--radix-popper-anchor-height",`${V}px`)}}),k&&A9e({element:k,padding:s}),_9e({arrowWidth:_,arrowHeight:x}),m&&m9e({strategy:"referenceHidden",...R})]}),[O,P]=pK(N),$=pl(g);Ei(()=>{L&&$?.()},[L,$]);const q=M.arrow?.x,j=M.arrow?.y,W=M.arrow?.centerOffset!==0,[U,X]=re.useState();return Ei(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),F.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:L?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:F.jsx(y9e,{scope:n,placedSide:O,onArrowChange:C,arrowX:q,arrowY:j,shouldHideArrow:W,children:F.jsx(jn.div,{"data-side":O,"data-align":P,...h,ref:w,style:{...h.style,animation:L?void 0:"none"}})})})});lK.displayName=U4;var uK="PopperArrow",k9e={top:"bottom",right:"left",bottom:"top",left:"right"},dK=re.forwardRef(function(t,n){const{__scopePopper:a,...r}=t,i=w9e(uK,a),o=k9e[i.placedSide];return F.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]: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:F.jsx(h9e,{...r,ref:n,style:{...r.style,display:"block"}})})});dK.displayName=uK;function v9e(e){return e!==null}var _9e=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:r}=t,o=r.arrow?.centerOffset!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,d]=pK(n),p={start:"0%",center:"50%",end:"100%"}[d],m=(r.arrow?.x??0)+s/2,A=(r.arrow?.y??0)+l/2;let g="",h="";return u==="bottom"?(g=o?p:`${m}px`,h=`${-l}px`):u==="top"?(g=o?p:`${m}px`,h=`${a.floating.height+l}px`):u==="right"?(g=`${-l}px`,h=o?p:`${A}px`):u==="left"&&(g=`${a.floating.width+l}px`,h=o?p:`${A}px`),{data:{x:g,y:h}}}});function pK(e){const[t,n="center"]=e.split("-");return[t,n]}var H4=oK,Y4=cK,W4=lK,K4=dK,C9e="Portal",Y0=re.forwardRef((e,t)=>{const{container:n,...a}=e,[r,i]=re.useState(!1);Ei(()=>i(!0),[]);const o=n||r&&globalThis?.document?.body;return o?UQ.createPortal(F.jsx(jn.div,{...a,ref:t}),o):null});Y0.displayName=C9e;var mK=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"}),E9e="VisuallyHidden",AK=re.forwardRef((e,t)=>F.jsx(jn.span,{...e,ref:t,style:{...mK,...e.style}}));AK.displayName=E9e;var x9e=AK,[k1]=hu("Tooltip",[ph]),v1=ph(),gK="TooltipProvider",B9e=700,Z4="tooltip.open",[I9e,V4]=k1(gK),hK=e=>{const{__scopeTooltip:t,delayDuration:n=B9e,skipDelayDuration:a=300,disableHoverableContent:r=!1,children:i}=e,o=re.useRef(!0),s=re.useRef(!1),l=re.useRef(0);return re.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),F.jsx(I9e,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:re.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,a)},[a]),isPointerInTransitRef:s,onPointerInTransitChange:re.useCallback(u=>{s.current=u},[]),disableHoverableContent:r,children:i})};hK.displayName=gK;var W0="Tooltip",[S9e,K0]=k1(W0),fK=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:r,onOpenChange:i,disableHoverableContent:o,delayDuration:s}=e,l=V4(W0,e.__scopeTooltip),u=v1(t),[d,p]=re.useState(null),m=Ec(),A=re.useRef(0),g=o??l.disableHoverableContent,h=s??l.delayDuration,f=re.useRef(!1),[b,y]=fu({prop:a,defaultProp:r??!1,onChange:_=>{_?(l.onOpen(),document.dispatchEvent(new CustomEvent(Z4))):l.onClose(),i?.(_)},caller:W0}),w=re.useMemo(()=>b?f.current?"delayed-open":"instant-open":"closed",[b]),k=re.useCallback(()=>{window.clearTimeout(A.current),A.current=0,f.current=!1,y(!0)},[y]),C=re.useCallback(()=>{window.clearTimeout(A.current),A.current=0,y(!1)},[y]),E=re.useCallback(()=>{window.clearTimeout(A.current),A.current=window.setTimeout(()=>{f.current=!0,y(!0),A.current=0},h)},[h,y]);return re.useEffect(()=>()=>{A.current&&(window.clearTimeout(A.current),A.current=0)},[]),F.jsx(H4,{...u,children:F.jsx(S9e,{scope:t,contentId:m,open:b,stateAttribute:w,trigger:d,onTriggerChange:p,onTriggerEnter:re.useCallback(()=>{l.isOpenDelayedRef.current?E():k()},[l.isOpenDelayedRef,E,k]),onTriggerLeave:re.useCallback(()=>{g?C():(window.clearTimeout(A.current),A.current=0)},[C,g]),onOpen:k,onClose:C,disableHoverableContent:g,children:n})})};fK.displayName=W0;var J4="TooltipTrigger",bK=re.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,r=K0(J4,n),i=V4(J4,n),o=v1(n),s=re.useRef(null),l=ha(t,s,r.onTriggerChange),u=re.useRef(!1),d=re.useRef(!1),p=re.useCallback(()=>u.current=!1,[]);return re.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),F.jsx(Y4,{asChild:!0,...o,children:F.jsx(jn.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...a,ref:l,onPointerMove:nn(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:nn(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:nn(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:nn(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:nn(e.onBlur,r.onClose),onClick:nn(e.onClick,r.onClose)})})});bK.displayName=J4;var X4="TooltipPortal",[D9e,Q9e]=k1(X4,{forceMount:void 0}),yK=e=>{const{__scopeTooltip:t,forceMount:n,children:a,container:r}=e,i=K0(X4,t);return F.jsx(D9e,{scope:t,forceMount:n,children:F.jsx(Cc,{present:n||i.open,children:F.jsx(Y0,{asChild:!0,container:r,children:a})})})};yK.displayName=X4;var mh="TooltipContent",wK=re.forwardRef((e,t)=>{const n=Q9e(mh,e.__scopeTooltip),{forceMount:a=n.forceMount,side:r="top",...i}=e,o=K0(mh,e.__scopeTooltip);return F.jsx(Cc,{present:a||o.open,children:o.disableHoverableContent?F.jsx(kK,{side:r,...i,ref:t}):F.jsx(T9e,{side:r,...i,ref:t})})}),T9e=re.forwardRef((e,t)=>{const n=K0(mh,e.__scopeTooltip),a=V4(mh,e.__scopeTooltip),r=re.useRef(null),i=ha(t,r),[o,s]=re.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:p}=a,m=re.useCallback(()=>{s(null),p(!1)},[p]),A=re.useCallback((g,h)=>{const f=g.currentTarget,b={x:g.clientX,y:g.clientY},y=R9e(b,f.getBoundingClientRect()),w=M9e(b,y),k=O9e(h.getBoundingClientRect()),C=$9e([...w,...k]);s(C),p(!0)},[p]);return re.useEffect(()=>()=>m(),[m]),re.useEffect(()=>{if(l&&d){const g=f=>A(f,d),h=f=>A(f,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",h)}}},[l,d,A,m]),re.useEffect(()=>{if(o){const g=h=>{const f=h.target,b={x:h.clientX,y:h.clientY},y=l?.contains(f)||d?.contains(f),w=!P9e(b,o);y?m():w&&(m(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,o,u,m]),F.jsx(kK,{...e,ref:i})}),[N9e,F9e]=k1(W0,{isInside:!1}),L9e=Q6e("TooltipContent"),kK=re.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:o,...s}=e,l=K0(mh,n),u=v1(n),{onClose:d}=l;return re.useEffect(()=>(document.addEventListener(Z4,d),()=>document.removeEventListener(Z4,d)),[d]),re.useEffect(()=>{if(l.trigger){const p=m=>{m.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,d]),F.jsx(z0,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:p=>p.preventDefault(),onDismiss:d,children:F.jsxs(W4,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.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:[F.jsx(L9e,{children:a}),F.jsx(N9e,{scope:n,isInside:!0,children:F.jsx(x9e,{id:l.contentId,role:"tooltip",children:r||a})})]})})});wK.displayName=mh;var vK="TooltipArrow",_K=re.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,r=v1(n);return F9e(vK,n).isInside?null:F.jsx(K4,{...r,...a,ref:t})});_K.displayName=vK;function R9e(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,a,r,i)){case i:return"left";case r:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function M9e(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function O9e(e){const{top:t,right:n,bottom:a,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:a},{x:r,y:a}]}function P9e(e,t){const{x:n,y:a}=e;let r=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const s=t[i],l=t[o],u=s.x,d=s.y,p=l.x,m=l.y;d>a!=m>a&&n<(p-u)*(a-d)/(m-d)+u&&(r=!r)}return r}function $9e(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),j9e(t)}function j9e(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const r=e[a];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const r=e[a];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(r.y-o.y)>=(i.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var q9e=hK,G9e=fK,z9e=bK,U9e=yK,H9e=wK,Y9e=_K;function _1({delayDuration:e=400,...t}){return F.jsx(q9e,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function $m({...e}){return F.jsx(_1,{children:F.jsx(G9e,{"data-slot":"tooltip",...e})})}function jm({...e}){return F.jsx(z9e,{"data-slot":"tooltip-trigger",...e})}function qm({className:e,sideOffset:t=0,children:n,...a}){return F.jsx(U9e,{children:F.jsxs(H9e,{"data-slot":"tooltip-content",sideOffset:t,className:Ct("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-sm text-balance",e),...a,children:[n,F.jsx(Y9e,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}function W9e(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const K9e=e=>{switch(e){case"success":return J9e;case"info":return eRe;case"warning":return X9e;case"error":return tRe;default:return null}},Z9e=Array(12).fill(0),V9e=({visible:e,className:t})=>ne.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ne.createElement("div",{className:"sonner-spinner"},Z9e.map((n,a)=>ne.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),J9e=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),X9e=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),eRe=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),tRe=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ne.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),nRe=ne.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ne.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ne.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),aRe=()=>{const[e,t]=ne.useState(document.hidden);return ne.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let eT=1;class rRe{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...r}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:eT++,o=this.toasts.find(l=>l.id===i),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...t,id:i,title:a}),{...l,...t,id:i,dismissible:s,title:a}):l):this.addToast({title:a,...r,dismissible:s,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let i=a!==void 0,o;const s=r.then(async u=>{if(o=["resolve",u],ne.isValidElement(u))i=!1,this.create({id:a,type:"default",message:u});else if(oRe(u)&&!u.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,m=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,g=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:m,...g})}else if(u instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(u):n.error,m=typeof n.description=="function"?await n.description(u):n.description,g=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:a,type:"error",description:m,...g})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(u):n.success,m=typeof n.description=="function"?await n.description(u):n.description,g=typeof p=="object"&&!ne.isValidElement(p)?p:{message:p};this.create({id:a,type:"success",description:m,...g})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){i=!1;const d=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,A=typeof d=="object"&&!ne.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:p,...A})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,d)=>s.then(()=>o[0]==="reject"?d(o[1]):u(o[1])).catch(d));return typeof a!="string"&&typeof a!="number"?{unwrap:l}:Object.assign(a,{unwrap:l})},this.custom=(t,n)=>{const a=n?.id||eT++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Yo=new rRe,iRe=(e,t)=>{const n=t?.id||eT++;return Yo.addToast({title:e,...t,id:n}),n},oRe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",sRe=iRe,cRe=()=>Yo.toasts,lRe=()=>Yo.getActiveToasts(),Wo=Object.assign(sRe,{success:Yo.success,info:Yo.info,warning:Yo.warning,error:Yo.error,custom:Yo.custom,message:Yo.message,promise:Yo.promise,dismiss:Yo.dismiss,loading:Yo.loading},{getHistory:cRe,getToasts:lRe});W9e("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function C1(e){return e.label!==void 0}const uRe=3,dRe="24px",pRe="16px",CK=4e3,mRe=356,ARe=14,gRe=45,hRe=200;function hl(...e){return e.filter(Boolean).join(" ")}function fRe(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const bRe=e=>{var t,n,a,r,i,o,s,l,u;const{invert:d,toast:p,unstyled:m,interacting:A,setHeights:g,visibleToasts:h,heights:f,index:b,toasts:y,expanded:w,removeToast:k,defaultRichColors:C,closeButton:E,style:_,cancelButtonStyle:x,actionButtonStyle:S,className:I="",descriptionClassName:D="",duration:Q,position:R,gap:B,expandByDefault:T,classNames:N,icons:L,closeButtonAriaLabel:M="Close toast"}=e,[O,P]=ne.useState(null),[$,q]=ne.useState(null),[j,W]=ne.useState(!1),[U,X]=ne.useState(!1),[Y,ae]=ne.useState(!1),[Z,J]=ne.useState(!1),[ee,V]=ne.useState(!1),[pe,ue]=ne.useState(0),[Te,Le]=ne.useState(0),qe=ne.useRef(p.duration||Q||CK),Ee=ne.useRef(null),De=ne.useRef(null),Ue=b===0,ye=b+1<=h,et=p.type,Be=p.dismissible!==!1,He=p.className||"",Je=p.descriptionClassName||"",he=ne.useMemo(()=>f.findIndex(We=>We.toastId===p.id)||0,[f,p.id]),_e=ne.useMemo(()=>{var We;return(We=p.closeButton)!=null?We:E},[p.closeButton,E]),$e=ne.useMemo(()=>p.duration||Q||CK,[p.duration,Q]),de=ne.useRef(0),je=ne.useRef(0),te=ne.useRef(0),Ae=ne.useRef(null),[z,le]=R.split("-"),ce=ne.useMemo(()=>f.reduce((We,me,Ye)=>Ye>=he?We:We+me.height,0),[f,he]),be=aRe(),we=p.invert||d,Ie=et==="loading";je.current=ne.useMemo(()=>he*B+ce,[he,ce]),ne.useEffect(()=>{qe.current=$e},[$e]),ne.useEffect(()=>{W(!0)},[]),ne.useEffect(()=>{const We=De.current;if(We){const me=We.getBoundingClientRect().height;return Le(me),g(Ye=>[{toastId:p.id,height:me,position:p.position},...Ye]),()=>g(Ye=>Ye.filter(fe=>fe.toastId!==p.id))}},[g,p.id]),ne.useLayoutEffect(()=>{if(!j)return;const We=De.current,me=We.style.height;We.style.height="auto";const Ye=We.getBoundingClientRect().height;We.style.height=me,Le(Ye),g(fe=>fe.find(gt=>gt.toastId===p.id)?fe.map(gt=>gt.toastId===p.id?{...gt,height:Ye}:gt):[{toastId:p.id,height:Ye,position:p.position},...fe])},[j,p.title,p.description,g,p.id,p.jsx,p.action,p.cancel]);const Re=ne.useCallback(()=>{X(!0),ue(je.current),g(We=>We.filter(me=>me.toastId!==p.id)),setTimeout(()=>{k(p)},hRe)},[p,k,g,je]);ne.useEffect(()=>{if(p.promise&&et==="loading"||p.duration===1/0||p.type==="loading")return;let We;return w||A||be?(()=>{if(te.current<de.current){const fe=new Date().getTime()-de.current;qe.current=qe.current-fe}te.current=new Date().getTime()})():qe.current!==1/0&&(de.current=new Date().getTime(),We=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),Re()},qe.current)),()=>clearTimeout(We)},[w,A,p,et,be,Re]),ne.useEffect(()=>{p.delete&&(Re(),p.onDismiss==null||p.onDismiss.call(p,p))},[Re,p.delete]);function ve(){var We;if(L?.loading){var me;return ne.createElement("div",{className:hl(N?.loader,p==null||(me=p.classNames)==null?void 0:me.loader,"sonner-loader"),"data-visible":et==="loading"},L.loading)}return ne.createElement(V9e,{className:hl(N?.loader,p==null||(We=p.classNames)==null?void 0:We.loader),visible:et==="loading"})}const Oe=p.icon||L?.[et]||K9e(et);var Xe,Ge;return ne.createElement("li",{tabIndex:0,ref:De,className:hl(I,He,N?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,N?.default,N?.[et],p==null||(n=p.classNames)==null?void 0:n[et]),"data-sonner-toast":"","data-rich-colors":(Xe=p.richColors)!=null?Xe:C,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":j,"data-promise":!!p.promise,"data-swiped":ee,"data-removed":U,"data-visible":ye,"data-y-position":z,"data-x-position":le,"data-index":b,"data-front":Ue,"data-swiping":Y,"data-dismissible":Be,"data-type":et,"data-invert":we,"data-swipe-out":Z,"data-swipe-direction":$,"data-expanded":!!(w||T&&j),"data-testid":p.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${U?pe:je.current}px`,"--initial-height":T?"auto":`${Te}px`,..._,...p.style},onDragEnd:()=>{ae(!1),P(null),Ae.current=null},onPointerDown:We=>{We.button!==2&&(Ie||!Be||(Ee.current=new Date,ue(je.current),We.target.setPointerCapture(We.pointerId),We.target.tagName!=="BUTTON"&&(ae(!0),Ae.current={x:We.clientX,y:We.clientY})))},onPointerUp:()=>{var We,me,Ye;if(Z||!Be)return;Ae.current=null;const fe=Number(((We=De.current)==null?void 0:We.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),wt=Number(((me=De.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),gt=new Date().getTime()-((Ye=Ee.current)==null?void 0:Ye.getTime()),ut=O==="x"?fe:wt,St=Math.abs(ut)/gt;if(Math.abs(ut)>=gRe||St>.11){ue(je.current),p.onDismiss==null||p.onDismiss.call(p,p),q(O==="x"?fe>0?"right":"left":wt>0?"down":"up"),Re(),J(!0);return}else{var dt,ot;(dt=De.current)==null||dt.style.setProperty("--swipe-amount-x","0px"),(ot=De.current)==null||ot.style.setProperty("--swipe-amount-y","0px")}V(!1),ae(!1),P(null)},onPointerMove:We=>{var me,Ye,fe;if(!Ae.current||!Be||((me=window.getSelection())==null?void 0:me.toString().length)>0)return;const gt=We.clientY-Ae.current.y,ut=We.clientX-Ae.current.x;var St;const dt=(St=e.swipeDirections)!=null?St:fRe(R);!O&&(Math.abs(ut)>1||Math.abs(gt)>1)&&P(Math.abs(ut)>Math.abs(gt)?"x":"y");let ot={x:0,y:0};const se=ft=>1/(1.5+Math.abs(ft)/20);if(O==="y"){if(dt.includes("top")||dt.includes("bottom"))if(dt.includes("top")&&gt<0||dt.includes("bottom")&&gt>0)ot.y=gt;else{const ft=gt*se(gt);ot.y=Math.abs(ft)<Math.abs(gt)?ft:gt}}else if(O==="x"&&(dt.includes("left")||dt.includes("right")))if(dt.includes("left")&&ut<0||dt.includes("right")&&ut>0)ot.x=ut;else{const ft=ut*se(ut);ot.x=Math.abs(ft)<Math.abs(ut)?ft:ut}(Math.abs(ot.x)>0||Math.abs(ot.y)>0)&&V(!0),(Ye=De.current)==null||Ye.style.setProperty("--swipe-amount-x",`${ot.x}px`),(fe=De.current)==null||fe.style.setProperty("--swipe-amount-y",`${ot.y}px`)}},_e&&!p.jsx&&et!=="loading"?ne.createElement("button",{"aria-label":M,"data-disabled":Ie,"data-close-button":!0,onClick:Ie||!Be?()=>{}:()=>{Re(),p.onDismiss==null||p.onDismiss.call(p,p)},className:hl(N?.closeButton,p==null||(a=p.classNames)==null?void 0:a.closeButton)},(Ge=L?.close)!=null?Ge:nRe):null,(et||p.icon||p.promise)&&p.icon!==null&&(L?.[et]!==null||p.icon)?ne.createElement("div",{"data-icon":"",className:hl(N?.icon,p==null||(r=p.classNames)==null?void 0:r.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||ve():null,p.type!=="loading"?Oe:null):null,ne.createElement("div",{"data-content":"",className:hl(N?.content,p==null||(i=p.classNames)==null?void 0:i.content)},ne.createElement("div",{"data-title":"",className:hl(N?.title,p==null||(o=p.classNames)==null?void 0:o.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ne.createElement("div",{"data-description":"",className:hl(D,Je,N?.description,p==null||(s=p.classNames)==null?void 0:s.description)},typeof p.description=="function"?p.description():p.description):null),ne.isValidElement(p.cancel)?p.cancel:p.cancel&&C1(p.cancel)?ne.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||x,onClick:We=>{C1(p.cancel)&&Be&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,We),Re())},className:hl(N?.cancelButton,p==null||(l=p.classNames)==null?void 0:l.cancelButton)},p.cancel.label):null,ne.isValidElement(p.action)?p.action:p.action&&C1(p.action)?ne.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||S,onClick:We=>{C1(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,We),!We.defaultPrevented&&Re())},className:hl(N?.actionButton,p==null||(u=p.classNames)==null?void 0:u.actionButton)},p.action.label):null)};function EK(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function yRe(e,t){const n={};return[e,t].forEach((a,r)=>{const i=r===1,o=i?"--mobile-offset":"--offset",s=i?pRe:dRe;function l(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof a=="number"||typeof a=="string"?l(a):typeof a=="object"?["top","right","bottom","left"].forEach(u=>{a[u]===void 0?n[`${o}-${u}`]=s:n[`${o}-${u}`]=typeof a[u]=="number"?`${a[u]}px`:a[u]}):l(s)}),n}const wRe=ne.forwardRef(function(t,n){const{id:a,invert:r,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:l,className:u,offset:d,mobileOffset:p,theme:m="light",richColors:A,duration:g,style:h,visibleToasts:f=uRe,toastOptions:b,dir:y=EK(),gap:w=ARe,icons:k,containerAriaLabel:C="Notifications"}=t,[E,_]=ne.useState([]),x=ne.useMemo(()=>a?E.filter(j=>j.toasterId===a):E.filter(j=>!j.toasterId),[E,a]),S=ne.useMemo(()=>Array.from(new Set([i].concat(x.filter(j=>j.position).map(j=>j.position)))),[x,i]),[I,D]=ne.useState([]),[Q,R]=ne.useState(!1),[B,T]=ne.useState(!1),[N,L]=ne.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=ne.useRef(null),O=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),P=ne.useRef(null),$=ne.useRef(!1),q=ne.useCallback(j=>{_(W=>{var U;return(U=W.find(X=>X.id===j.id))!=null&&U.delete||Yo.dismiss(j.id),W.filter(({id:X})=>X!==j.id)})},[]);return ne.useEffect(()=>Yo.subscribe(j=>{if(j.dismiss){requestAnimationFrame(()=>{_(W=>W.map(U=>U.id===j.id?{...U,delete:!0}:U))});return}setTimeout(()=>{UQ.flushSync(()=>{_(W=>{const U=W.findIndex(X=>X.id===j.id);return U!==-1?[...W.slice(0,U),{...W[U],...j},...W.slice(U+1)]:[j,...W]})})})}),[E]),ne.useEffect(()=>{if(m!=="system"){L(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;const j=window.matchMedia("(prefers-color-scheme: dark)");try{j.addEventListener("change",({matches:W})=>{L(W?"dark":"light")})}catch{j.addListener(({matches:U})=>{try{L(U?"dark":"light")}catch(X){console.error(X)}})}},[m]),ne.useEffect(()=>{E.length<=1&&R(!1)},[E]),ne.useEffect(()=>{const j=W=>{var U;if(o.every(ae=>W[ae]||W.code===ae)){var Y;R(!0),(Y=M.current)==null||Y.focus()}W.code==="Escape"&&(document.activeElement===M.current||(U=M.current)!=null&&U.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[o]),ne.useEffect(()=>{if(M.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,$.current=!1)}},[M.current]),ne.createElement("section",{ref:n,"aria-label":`${C} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((j,W)=>{var U;const[X,Y]=j.split("-");return x.length?ne.createElement("ol",{key:j,dir:y==="auto"?EK():y,tabIndex:-1,ref:M,className:u,"data-sonner-toaster":!0,"data-sonner-theme":N,"data-y-position":X,"data-x-position":Y,style:{"--front-toast-height":`${((U=I[0])==null?void 0:U.height)||0}px`,"--width":`${mRe}px`,"--gap":`${w}px`,...h,...yRe(d,p)},onBlur:ae=>{$.current&&!ae.currentTarget.contains(ae.relatedTarget)&&($.current=!1,P.current&&(P.current.focus({preventScroll:!0}),P.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||$.current||($.current=!0,P.current=ae.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{B||R(!1)},onDragEnd:()=>R(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||T(!0)},onPointerUp:()=>T(!1)},x.filter(ae=>!ae.position&&W===0||ae.position===j).map((ae,Z)=>{var J,ee;return ne.createElement(bRe,{key:ae.id,icons:k,index:Z,toast:ae,defaultRichColors:A,duration:(J=b?.duration)!=null?J:g,className:b?.className,descriptionClassName:b?.descriptionClassName,invert:r,visibleToasts:f,closeButton:(ee=b?.closeButton)!=null?ee:l,interacting:B,position:j,style:b?.style,unstyled:b?.unstyled,classNames:b?.classNames,cancelButtonStyle:b?.cancelButtonStyle,actionButtonStyle:b?.actionButtonStyle,closeButtonAriaLabel:b?.closeButtonAriaLabel,removeToast:q,toasts:x.filter(V=>V.position==ae.position),heights:I.filter(V=>V.position==ae.position),setHeights:D,expandByDefault:s,gap:w,expanded:Q,swipeDirections:t.swipeDirections})})):null}))});function xK({onSend:e,status:t,isLastMessageFinished:n,stop:a,isErrorVisible:r,conversationId:i,className:o}){const{t:s}=Da(),{composer:l}=Zi(),[u,d]=ne.useState(""),[p,m]=ne.useState([]),A=ne.useRef(null),g=ne.useRef(null);ne.useEffect(()=>{i==="/"&&A.current&&A.current.focus()},[i]);const h=ne.useCallback(w=>{if(w.target.files){const k=Array.from(w.target.files),C=l?.attachments?.maxSize;if(C&&k.filter(_=>_.size>C).length>0){Wo.error(s("chat.file_too_large",{size:C}));return}m(E=>[...E,...k])}w.target.value=""},[l,s]),f=ne.useCallback(w=>{m(k=>k.filter((C,E)=>E!==w))},[]),b=t==="streaming"&&!n,y=w=>{if(w.preventDefault(),!b&&(u.trim()||p.length>0)){const k=new DataTransfer;p.forEach(C=>k.items.add(C)),e(u,k.files),d(""),m([])}};return F.jsx("div",{className:Ct("shrink-0 px-4 pb-5 pt-2 md:px-6 md:pb-6 w-full",o),children:F.jsx("div",{className:"max-w-4xl mx-auto w-full",children:F.jsxs(V6e,{onSubmit:y,children:[F.jsx("input",{type:"file",ref:g,onChange:h,multiple:!0,accept:l?.attachments?.types?.join(",")||"image/*,text/*,.pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx",className:"hidden"}),F.jsxs("div",{className:"flex flex-col flex-1 gap-2",children:[p.length>0&&F.jsx("div",{className:"flex flex-wrap gap-2 px-2 pt-2",children:p.map((w,k)=>F.jsxs("div",{className:"group relative flex items-center gap-2 rounded-xl glass-surface px-2.5 py-1.5 text-sm shadow-sm",children:[w.type.startsWith("image/")?F.jsx("img",{src:URL.createObjectURL(w),alt:w.name,className:"size-7 rounded-lg object-cover ring-1 ring-border/50"}):F.jsx(cW,{className:"size-3.5 text-muted-foreground shrink-0"}),F.jsx("span",{className:"max-w-[120px] truncate text-xs font-medium text-foreground/80",children:w.name}),F.jsx("button",{type:"button",onClick:()=>f(k),className:"ml-0.5 flex items-center justify-center size-4 rounded-full hover:bg-destructive/15 text-muted-foreground/60 hover:text-destructive transition-all duration-150",children:F.jsx(Mm,{className:"size-2.5"})})]},`${w.name}-${k}`))}),F.jsx(J6e,{ref:A,onChange:w=>d(w.target.value),value:u,autoFocus:!0,placeholder:l?.placeholder?s(l.placeholder):s("chat.input_placeholder")})]}),F.jsxs(X6e,{children:[F.jsx(eLe,{children:(l?.attachments?.enabled??!1)&&F.jsxs($m,{children:[F.jsx(jm,{asChild:!0,children:F.jsx(tLe,{variant:"ghost",onClick:()=>g.current?.click(),disabled:b,children:F.jsx(qFe,{className:"size-4"})})}),F.jsx(qm,{children:s("chat.attach_file")})]})}),F.jsx(nLe,{disabled:t!=="streaming"&&!u&&p.length===0,status:r?"error":t==="error"?void 0:n?"ready":t,onClick:t==="streaming"&&!n?a:void 0})]})]})})})}var kRe=re.createContext(void 0);function tT(e){const t=re.useContext(kRe);return e||t||"ltr"}function BK(e,[t,n]){return Math.min(n,Math.max(t,e))}const vRe=({suggestion:e,onClick:t,className:n,variant:a="outline",size:r="sm",children:i,...o})=>{const s=()=>{t?.(e)};return F.jsx(oi,{className:Ct("cursor-pointer rounded-full px-4",n),onClick:s,size:r,type:"button",variant:a,...o,children:i??e})},IK=({onSuggestionClick:e,icons:t})=>{const{t:n,i18n:a}=Da(),{welcome:r}=Zi(),i=r?.prompts??[],o=i.map(d=>{const p=typeof d=="string"?d:d.text;return n(p)}).filter(d=>d!==null&&d!==""),s=a.dir()==="rtl",l=r?.greeting?n(r.greeting)??r.greeting:n("chat.welcome.title"),u=r?.subtitle?n(r.subtitle):null;return F.jsxs("div",{dir:s?"rtl":"ltr",className:"flex flex-col items-center justify-center min-h-[60vh] text-center px-6 animate-in fade-in duration-700 ease-out",children:[r?.icon&&F.jsxs("div",{className:"mb-8 relative flex items-center justify-center",children:[F.jsx("div",{className:"absolute size-24 rounded-full bg-primary/5 blur-[40px] animate-pulse"}),F.jsx("div",{className:"relative size-12 md:size-16 rounded-xl bg-gradient-to-br from-surface to-secondary flex items-center justify-center border border-border/10 dark:border-border/5 shadow-xl shadow-black/10",children:typeof r.icon=="function"?F.jsx(r.icon,{className:"size-6 md:size-8 text-primary opacity-80"}):r.icon})]}),(l||u)&&F.jsxs("div",{className:"space-y-3 mb-12 max-w-xl mx-auto",children:[l&&F.jsx("h1",{className:"text-2xl md:text-3xl font-black tracking-tight leading-tight text-foreground",children:l}),u&&F.jsx("p",{className:"text-muted-foreground text-base md:text-lg font-medium max-w-md mx-auto leading-relaxed opacity-85 dark:opacity-70",children:u})]}),o.length>0&&F.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 w-full max-w-xl",children:o.map((d,p)=>{const m=i[p],A=typeof m!="string"?m.icon:null,g=t&&t[p%t.length]?t[p%t.length]:PFe,h=A||g;return F.jsx("div",{className:"animate-in fade-in slide-in-from-bottom-3 duration-700 fill-mode-both",style:{animationDelay:`${p*80}ms`},children:F.jsxs(vRe,{onClick:()=>e(d),suggestion:d,variant:"ghost",className:Ct("h-full py-4 px-5 justify-start text-start items-center whitespace-normal w-full","group rounded-xl relative overflow-hidden","bg-secondary/45 border border-border/12 dark:bg-secondary/20 dark:border-border/5","hover:bg-secondary/70 hover:border-border/25 dark:hover:bg-secondary/40 dark:hover:border-border/10","hover:-translate-y-0.5 transition-[background-color,border-color,transform] duration-300 ease-out-quint"),children:[F.jsxs("div",{className:"flex items-center gap-3 w-full text-start",children:[F.jsx("div",{className:"size-8 rounded-lg bg-secondary/35 dark:bg-background/40 flex items-center justify-center shrink-0 border border-border/10 dark:border-border/5 group-hover:bg-primary group-hover:text-primary-foreground transition-colors duration-300",children:F.jsx(h,{className:"size-4"})}),F.jsx("div",{className:"flex flex-col gap-0.5 overflow-hidden",children:F.jsx("span",{className:"text-sm md:text-base font-semibold text-foreground/80 group-hover:text-foreground transition-colors",children:d.length>60?d.substring(0,60)+"...":d})})]}),F.jsx("div",{className:Ct("absolute bottom-0 left-0 w-full h-[1.5px] bg-primary scale-x-0 group-hover:scale-x-100 transition-transform duration-500",s?"origin-right":"origin-left")})]})},p)})})]})},SK=({className:e,from:t,...n})=>F.jsx("div",{className:Ct("group flex w-full items-end gap-3",t==="user"?"is-user justify-end":"is-assistant",e),...n}),DK=({children:e,className:t,isPlain:n,...a})=>F.jsx("div",{className:Ct("flex flex-col gap-2 overflow-hidden text-[1.0625rem]",!n&&["group-[.is-user]:rounded-lg group-[.is-user]:rounded-br-sm","group-[.is-user]:bg-gradient-to-br group-[.is-user]:from-primary group-[.is-user]:to-primary/85","group-[.is-user]:text-primary-foreground","group-[.is-user]:px-5 group-[.is-user]:py-3.5","group-[.is-user]:shadow-lg group-[.is-user]:shadow-primary/20","group-[.is-user]:max-w-[88%] md:group-[.is-user]:max-w-[78%]","group-[.is-user]:dark"],"group-[.is-assistant]:bg-transparent","group-[.is-assistant]:px-0 group-[.is-assistant]:py-1","group-[.is-assistant]:w-full group-[.is-assistant]:leading-[1.7]",t),...a,children:e}),_Re=({className:e,children:t,...n})=>F.jsx("div",{className:Ct("flex items-center gap-0.5","opacity-100","transition-opacity duration-200",e),...n,children:t}),E1=({tooltip:e,children:t,label:n,className:a,variant:r="ghost",size:i="sm",...o})=>{const s=F.jsxs(oi,{className:Ct("size-7 p-1 rounded-lg","text-muted-foreground/60 hover:text-foreground","hover:bg-accent/70","transition-all duration-150","hover:scale-105 active:scale-95",a),size:i,type:"button",variant:r,...o,children:[t,F.jsx("span",{className:"sr-only",children:n??e})]});return e?F.jsx(_1,{children:F.jsxs($m,{children:[F.jsx(jm,{asChild:!0,children:s}),F.jsx(qm,{children:F.jsx("p",{children:e})})]})}):s},Z0=(function(e){if(e==null)return BRe;if(typeof e=="function")return x1(e);if(typeof e=="object")return Array.isArray(e)?CRe(e):ERe(e);if(typeof e=="string")return xRe(e);throw new Error("Expected function, string, or object as test")});function CRe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Z0(e[n]);return x1(a);function a(...r){let i=-1;for(;++i<t.length;)if(t[i].apply(this,r))return!0;return!1}}function ERe(e){const t=e;return x1(n);function n(a){const r=a;let i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function xRe(e){return x1(t);function t(n){return n&&n.type===e}}function x1(e){return t;function t(n,a,r){return!!(IRe(n)&&e.call(this,n,typeof a=="number"?a:void 0,r||void 0))}}function BRe(){return!0}function IRe(e){return e!==null&&typeof e=="object"&&"type"in e}function AAn(e){return e}const QK=[],V0=!0,nT=!1,Ah="skip";function aT(e,t,n,a){let r;typeof t=="function"&&typeof n!="function"?(a=n,n=t):r=t;const i=Z0(r),o=a?-1:1;s(e,void 0,[])();function s(l,u,d){const p=l&&typeof l=="object"?l:{};if(typeof p.type=="string"){const A=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(l.type+(A?"<"+A+">":""))+")"})}return m;function m(){let A=QK,g,h,f;if((!t||i(l,u,d[d.length-1]||void 0))&&(A=SRe(n(l,d)),A[0]===nT))return A;if("children"in l&&l.children){const b=l;if(b.children&&A[0]!==Ah)for(h=(a?b.children.length:-1)+o,f=d.concat(b);h>-1&&h<b.children.length;){const y=b.children[h];if(g=s(y,h,f)(),g[0]===nT)return g;h=typeof g[1]=="number"?g[1]:h+o}}return A}}}function SRe(e){return Array.isArray(e)?e:typeof e=="number"?[V0,e]:e==null?QK:[e]}function gh(e,t,n,a){let r,i,o;typeof t=="function"&&typeof n!="function"?(i=void 0,o=t,r=n):(i=t,o=n,r=a),aT(e,i,s,r);function s(l,u){const d=u[u.length-1],p=d?d.children.indexOf(l):void 0;return o(l,p,d)}}const hh={indicator:"indicator",textOnly:"text-only",remove:"remove"};function DRe({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:a=!1,allowedProtocols:r=[],blockedImageClass:i="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:s=hh.indicator,imageBlockPolicy:l=hh.indicator}){const u=t.length&&!t.every(p=>p==="*"),d=n.length&&!n.every(p=>p==="*");if(!e&&(u||d))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return p=>{const m=RRe(e,t,n,a,r,i,o,s,l);FK(p),gh(p,m)}}function TK(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function QRe(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const TRe=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),NRe=new Set(["javascript:","data:","file:","vbscript:"]);function NK(e,t,n,a=!1,r=!1,i=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!r)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return r&&a&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const d=e.substring(5);if(d&&d.length>0&&d!=="invalid")return e}}catch{return null}return null}const o=TK(e,n);if(!o||NRe.has(o.protocol)||!(TRe.has(o.protocol)||i.includes(o.protocol)||i.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const l=QRe(e);return o&&t.some(u=>{const d=TK(u,n);return!d||d.origin!==o.origin?!1:o.href.startsWith(d.href)})?l?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:l?o.pathname+o.search+o.hash:o.href:null}function FK(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)FK(t)}}const rT=Symbol("node-seen");function FRe(e,t,n){return t===hh.remove?{type:"remove"}:t===hh.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function LRe(e,t,n){if(t===hh.remove)return{type:"remove"};if(t===hh.textOnly){const a=String(e.properties.alt||"");return a?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:a}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const RRe=(e,t,n,a,r,i,o,s,l)=>{const u=(d,p,m)=>{if(d.type!=="element"||d[rT])return V0;if(d.tagName==="a"){const A=NK(d.properties.href,t,e,!1,!1,r);if(A===null){if(d[rT]=!0,gh(d,u),m&&typeof p=="number"){const g=FRe(d,s,o);if(g.type==="remove")return m.children.splice(p,1),[Ah,p];m.children[p]=g.element}return Ah}else return d.properties.href=A,d.properties.target="_blank",d.properties.rel="noopener noreferrer",V0}if(d.tagName==="img"){const A=NK(d.properties.src,n,e,a,!0,r);if(A===null){if(d[rT]=!0,gh(d,u),m&&typeof p=="number"){const g=LRe(d,l,i);if(g.type==="remove")return m.children.splice(p,1),[Ah,p];m.children[p]=g.element}return Ah}else return d.properties.src=A,V0}return V0};return u};class J0{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}J0.prototype.normal={},J0.prototype.property={},J0.prototype.space=void 0;function LK(e,t){const n={},a={};for(const r of e)Object.assign(n,r.property),Object.assign(a,r.normal);return new J0(n,a,t)}function X0(e){return e.toLowerCase()}let Ko=class{constructor(t,n){this.attribute=n,this.property=t}};Ko.prototype.attribute="",Ko.prototype.booleanish=!1,Ko.prototype.boolean=!1,Ko.prototype.commaOrSpaceSeparated=!1,Ko.prototype.commaSeparated=!1,Ko.prototype.defined=!1,Ko.prototype.mustUseProperty=!1,Ko.prototype.number=!1,Ko.prototype.overloadedBoolean=!1,Ko.prototype.property="",Ko.prototype.spaceSeparated=!1,Ko.prototype.space=void 0;let MRe=0;const Nn=Gm(),Nr=Gm(),iT=Gm(),Qt=Gm(),Qa=Gm(),fh=Gm(),vs=Gm();function Gm(){return 2**++MRe}const oT=Object.freeze(Object.defineProperty({__proto__:null,boolean:Nn,booleanish:Nr,commaOrSpaceSeparated:vs,commaSeparated:fh,number:Qt,overloadedBoolean:iT,spaceSeparated:Qa},Symbol.toStringTag,{value:"Module"})),sT=Object.keys(oT);class cT extends Ko{constructor(t,n,a,r){let i=-1;if(super(t,n),RK(this,"space",r),typeof a=="number")for(;++i<sT.length;){const o=sT[i];RK(this,sT[i],(a&oT[o])===oT[o])}}}cT.prototype.defined=!0;function RK(e,t,n){n&&(e[t]=n)}function bh(e){const t={},n={};for(const[a,r]of Object.entries(e.properties)){const i=new cT(a,e.transform(e.attributes||{},a),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(i.mustUseProperty=!0),t[a]=i,n[X0(a)]=a,n[X0(i.attribute)]=a}return new J0(t,n,e.space)}const MK=bh({properties:{ariaActiveDescendant:null,ariaAtomic:Nr,ariaAutoComplete:null,ariaBusy:Nr,ariaChecked:Nr,ariaColCount:Qt,ariaColIndex:Qt,ariaColSpan:Qt,ariaControls:Qa,ariaCurrent:null,ariaDescribedBy:Qa,ariaDetails:null,ariaDisabled:Nr,ariaDropEffect:Qa,ariaErrorMessage:null,ariaExpanded:Nr,ariaFlowTo:Qa,ariaGrabbed:Nr,ariaHasPopup:null,ariaHidden:Nr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qa,ariaLevel:Qt,ariaLive:null,ariaModal:Nr,ariaMultiLine:Nr,ariaMultiSelectable:Nr,ariaOrientation:null,ariaOwns:Qa,ariaPlaceholder:null,ariaPosInSet:Qt,ariaPressed:Nr,ariaReadOnly:Nr,ariaRelevant:null,ariaRequired:Nr,ariaRoleDescription:Qa,ariaRowCount:Qt,ariaRowIndex:Qt,ariaRowSpan:Qt,ariaSelected:Nr,ariaSetSize:Qt,ariaSort:null,ariaValueMax:Qt,ariaValueMin:Qt,ariaValueNow:Qt,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function OK(e,t){return t in e?e[t]:t}function PK(e,t){return OK(e,t.toLowerCase())}const ORe=bh({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fh,acceptCharset:Qa,accessKey:Qa,action:null,allow:null,allowFullScreen:Nn,allowPaymentRequest:Nn,allowUserMedia:Nn,alt:null,as:null,async:Nn,autoCapitalize:null,autoComplete:Qa,autoFocus:Nn,autoPlay:Nn,blocking:Qa,capture:null,charSet:null,checked:Nn,cite:null,className:Qa,cols:Qt,colSpan:null,content:null,contentEditable:Nr,controls:Nn,controlsList:Qa,coords:Qt|fh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Nn,defer:Nn,dir:null,dirName:null,disabled:Nn,download:iT,draggable:Nr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Nn,formTarget:null,headers:Qa,height:Qt,hidden:iT,high:Qt,href:null,hrefLang:null,htmlFor:Qa,httpEquiv:Qa,id:null,imageSizes:null,imageSrcSet:null,inert:Nn,inputMode:null,integrity:null,is:null,isMap:Nn,itemId:null,itemProp:Qa,itemRef:Qa,itemScope:Nn,itemType:Qa,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Nn,low:Qt,manifest:null,max:null,maxLength:Qt,media:null,method:null,min:null,minLength:Qt,multiple:Nn,muted:Nn,name:null,nonce:null,noModule:Nn,noValidate:Nn,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Nn,optimum:Qt,pattern:null,ping:Qa,placeholder:null,playsInline:Nn,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Nn,referrerPolicy:null,rel:Qa,required:Nn,reversed:Nn,rows:Qt,rowSpan:Qt,sandbox:Qa,scope:null,scoped:Nn,seamless:Nn,selected:Nn,shadowRootClonable:Nn,shadowRootDelegatesFocus:Nn,shadowRootMode:null,shape:null,size:Qt,sizes:null,slot:null,span:Qt,spellCheck:Nr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Qt,step:null,style:null,tabIndex:Qt,target:null,title:null,translate:null,type:null,typeMustMatch:Nn,useMap:null,value:Nr,width:Qt,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qa,axis:null,background:null,bgColor:null,border:Qt,borderColor:null,bottomMargin:Qt,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Nn,declare:Nn,event:null,face:null,frame:null,frameBorder:null,hSpace:Qt,leftMargin:Qt,link:null,longDesc:null,lowSrc:null,marginHeight:Qt,marginWidth:Qt,noResize:Nn,noHref:Nn,noShade:Nn,noWrap:Nn,object:null,profile:null,prompt:null,rev:null,rightMargin:Qt,rules:null,scheme:null,scrolling:Nr,standby:null,summary:null,text:null,topMargin:Qt,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Qt,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Nn,disableRemotePlayback:Nn,prefix:null,property:null,results:Qt,security:null,unselectable:null},space:"html",transform:PK}),PRe=bh({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:vs,accentHeight:Qt,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Qt,amplitude:Qt,arabicForm:null,ascent:Qt,attributeName:null,attributeType:null,azimuth:Qt,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Qt,by:null,calcMode:null,capHeight:Qt,className:Qa,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Qt,diffuseConstant:Qt,direction:null,display:null,dur:null,divisor:Qt,dominantBaseline:null,download:Nn,dx:null,dy:null,edgeMode:null,editable:null,elevation:Qt,enableBackground:null,end:null,event:null,exponent:Qt,externalResourcesRequired:null,fill:null,fillOpacity:Qt,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fh,g2:fh,glyphName:fh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Qt,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Qt,horizOriginX:Qt,horizOriginY:Qt,id:null,ideographic:Qt,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Qt,k:Qt,k1:Qt,k2:Qt,k3:Qt,k4:Qt,kernelMatrix:vs,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Qt,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Qt,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Qt,overlineThickness:Qt,paintOrder:null,panose1:null,path:null,pathLength:Qt,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qa,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Qt,pointsAtY:Qt,pointsAtZ:Qt,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vs,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vs,rev:vs,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vs,requiredFeatures:vs,requiredFonts:vs,requiredFormats:vs,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Qt,specularExponent:Qt,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Qt,strikethroughThickness:Qt,string:null,stroke:null,strokeDashArray:vs,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Qt,strokeOpacity:Qt,strokeWidth:null,style:null,surfaceScale:Qt,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vs,tabIndex:Qt,tableValues:null,target:null,targetX:Qt,targetY:Qt,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vs,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Qt,underlineThickness:Qt,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Qt,values:null,vAlphabetic:Qt,vMathematical:Qt,vectorEffect:null,vHanging:Qt,vIdeographic:Qt,version:null,vertAdvY:Qt,vertOriginX:Qt,vertOriginY:Qt,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Qt,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:OK}),$K=bh({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),jK=bh({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:PK}),qK=bh({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),$Re={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},jRe=/[A-Z]/g,GK=/-[a-z]/g,qRe=/^data[-\w.:]+$/i;function ew(e,t){const n=X0(t);let a=t,r=Ko;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qRe.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(GK,zRe);a="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!GK.test(i)){let o=i.replace(jRe,GRe);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}r=cT}return new r(a,t)}function GRe(e){return"-"+e.toLowerCase()}function zRe(e){return e.charAt(1).toUpperCase()}const yh=LK([MK,ORe,$K,jK,qK],"html"),fl=LK([MK,PRe,$K,jK,qK],"svg");function zK(e){const t=[],n=String(e||"");let a=n.indexOf(","),r=0,i=!1;for(;!i;){a===-1&&(a=n.length,i=!0);const o=n.slice(r,a).trim();(o||!i)&&t.push(o),r=a+1,a=n.indexOf(",",r)}return t}function lT(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const UK=/[#.]/g;function URe(e,t){const n=e||"",a={};let r=0,i,o;for(;r<n.length;){UK.lastIndex=r;const s=UK.exec(n),l=n.slice(r,s?s.index:n.length);l&&(i?i==="#"?a.id=l:Array.isArray(a.className)?a.className.push(l):a.className=[l]:o=l,r+=l.length),s&&(i=s[0],r++)}return{type:"element",tagName:o||t||"div",properties:a,children:[]}}function HK(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function uT(e){return e.join(" ").trim()}function YK(e,t,n){const a=n?KRe(n):void 0;function r(i,o,...s){let l;if(i==null){l={type:"root",children:[]};const u=o;s.unshift(u)}else{l=URe(i,t);const u=l.tagName.toLowerCase(),d=a?a.get(u):void 0;if(l.tagName=d||u,HRe(o))s.unshift(o);else for(const[p,m]of Object.entries(o))YRe(e,l.properties,p,m)}for(const u of s)dT(l.children,u);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return r}function HRe(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const r=t[a];if(r&&typeof r=="object"){if(!Array.isArray(r))return!0;const i=r;for(const o of i)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function YRe(e,t,n,a){const r=ew(e,n);let i;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;i=a}else typeof a=="boolean"?i=a:typeof a=="string"?r.spaceSeparated?i=HK(a):r.commaSeparated?i=zK(a):r.commaOrSpaceSeparated?i=HK(zK(a).join(" ")):i=WK(r,r.property,a):Array.isArray(a)?i=[...a]:i=r.property==="style"?WRe(a):String(a);if(Array.isArray(i)){const o=[];for(const s of i)o.push(WK(r,r.property,s));i=o}r.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[r.property]=i}}function dT(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)dT(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?dT(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function WK(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||X0(n)===X0(t)))return!0}return n}function WRe(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function KRe(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const ZRe=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],KK=YK(yh,"div"),ZK=YK(fl,"g",ZRe),bl={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function VRe(e,t){return VK(e,{})||{type:"root",children:[]}}function VK(e,t){const n=JRe(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function JRe(e,t){switch(e.nodeType){case 1:return n5e(e,t);case 3:return e5e(e);case 8:return t5e(e);case 9:return JK(e,t);case 10:return XRe();case 11:return JK(e,t);default:return}}function JK(e,t){return{type:"root",children:XK(e,t)}}function XRe(){return{type:"doctype"}}function e5e(e){return{type:"text",value:e.nodeValue||""}}function t5e(e){return{type:"comment",value:e.nodeValue||""}}function n5e(e,t){const n=e.namespaceURI,a=n===bl.svg?ZK:KK,r=n===bl.html?e.tagName.toLowerCase():e.tagName,i=n===bl.html&&r==="template"?e.content:e,o=e.getAttributeNames(),s={};let l=-1;for(;++l<o.length;)s[o[l]]=e.getAttribute(o[l])||"";return a(r,s,XK(i,t))}function XK(e,t){const n=e.childNodes,a=[];let r=-1;for(;++r<n.length;){const i=VK(n[r],t);i!==void 0&&a.push(i)}return a}new DOMParser;function a5e(e,t){const n=r5e(e);return VRe(n)}function r5e(e){const t=document.createElement("template");return t.innerHTML=e,t.content}const eZ=(function(e,t,n){const a=Z0(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),zm=(function(e){if(e==null)return s5e;if(typeof e=="string")return o5e(e);if(typeof e=="object")return i5e(e);if(typeof e=="function")return pT(e);throw new Error("Expected function, string, or array as `test`")});function i5e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=zm(e[n]);return pT(a);function a(...r){let i=-1;for(;++i<t.length;)if(t[i].apply(this,r))return!0;return!1}}function o5e(e){return pT(t);function t(n){return n.tagName===e}}function pT(e){return t;function t(n,a,r){return!!(c5e(n)&&e.call(this,n,typeof a=="number"?a:void 0,r||void 0))}}function s5e(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function c5e(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const tZ=/\n/g,nZ=/[\t ]+/g,mT=zm("br"),aZ=zm(h5e),l5e=zm("p"),rZ=zm("tr"),u5e=zm(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",g5e,f5e]),iZ=zm(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function d5e(e,t){const n=t||{},a="children"in e?e.children:[],r=iZ(e),i=cZ(e,{whitespace:n.whitespace||"normal"}),o=[];(e.type==="text"||e.type==="comment")&&o.push(...sZ(e,{breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<a.length;)o.push(...oZ(a[s],e,{whitespace:i,breakBefore:s?void 0:r,breakAfter:s<a.length-1?mT(a[s+1]):r}));const l=[];let u;for(s=-1;++s<o.length;){const d=o[s];typeof d=="number"?u!==void 0&&d>u&&(u=d):d&&(u!==void 0&&u>-1&&l.push(`
2
2
  `.repeat(u)||" "),u=-1,l.push(d))}return l.join("")}function oZ(e,t,n){return e.type==="element"?p5e(e,t,n):e.type==="text"?n.whitespace==="normal"?sZ(e,n):m5e(e):[]}function p5e(e,t,n){const a=cZ(e,n),r=e.children||[];let i=-1,o=[];if(u5e(e))return o;let s,l;for(mT(e)||rZ(e)&&eZ(t,e,rZ)?l=`
3
3
  `:l5e(e)?(s=2,l=2):iZ(e)&&(s=1,l=1);++i<r.length;)o=o.concat(oZ(r[i],e,{whitespace:a,breakBefore:i?void 0:s,breakAfter:i<r.length-1?mT(r[i+1]):l}));return aZ(e)&&eZ(t,e,aZ)&&o.push(" "),s&&o.unshift(s),l&&o.push(l),o}function sZ(e,t){const n=String(e.value),a=[],r=[];let i=0;for(;i<=n.length;){tZ.lastIndex=i;const l=tZ.exec(n),u=l&&"index"in l?l.index:n.length;a.push(A5e(n.slice(i,u).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),i===0?t.breakBefore:!0,u===n.length?t.breakAfter:!0)),i=u+1}let o=-1,s;for(;++o<a.length;)a[o].charCodeAt(a[o].length-1)===8203||o<a.length-1&&a[o+1].charCodeAt(0)===8203?(r.push(a[o]),s=void 0):a[o]?(typeof s=="number"&&r.push(s),r.push(a[o]),s=0):(o===0||o===a.length-1)&&r.push(0);return r}function m5e(e){return[String(e.value)]}function A5e(e,t,n){const a=[];let r=0,i;for(;r<e.length;){nZ.lastIndex=r;const o=nZ.exec(e);i=o?o.index:e.length,!r&&!i&&o&&!t&&a.push(""),r!==i&&a.push(e.slice(r,i)),r=o?i+o[0].length:i}return r!==i&&!n&&a.push(""),a.join(" ")}function cZ(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function g5e(e){return!!(e.properties||{}).hidden}function h5e(e){return e.tagName==="td"||e.tagName==="th"}function f5e(e){return e.tagName==="dialog"&&!(e.properties||{}).open}let Tt=class J3e extends Error{constructor(t,n){var a="KaTeX parse error: "+t,r,i,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,i=o.end,r===s.length?a+=" at end of input: ":a+=" at position "+(r+1)+": ";var l=s.slice(r,i).replace(/[^]/g,"$&̲"),u;r>15?u="…"+s.slice(r-15,r):u=s.slice(0,r);var d;i+15<s.length?d=s.slice(i,i+15)+"…":d=s.slice(i),a+=u+l+d}super(a),this.name="ParseError",Object.setPrototypeOf(this,J3e.prototype),this.position=r,r!=null&&i!=null&&(this.length=i-r),this.rawMessage=t}};var b5e=/([A-Z])/g,AT=e=>e.replace(b5e,"-$1").toLowerCase(),y5e={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},w5e=/[&><"']/g,Hi=e=>String(e).replace(w5e,t=>y5e[t]),B1=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?B1(e.body[0]):e:e.type==="font"?B1(e.body):e,k5e=new Set(["mathord","textord","atom"]),ku=e=>k5e.has(B1(e).type),v5e=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},I1={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function _5e(e){if("default"in e)return e.default;var t=e.type,n=Array.isArray(t)?t[0]:t;if(typeof n!="string")return n.enum[0];switch(n){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class gT{constructor(t){t===void 0&&(t={}),t=t||{};for(var n of Object.keys(I1)){var a=I1[n],r=t[n];this[n]=r!==void 0?a.processor?a.processor(r):r:_5e(a)}}reportNonstrict(t,n,a){var r=this.strict;if(typeof r=="function"&&(r=r(t,n,a)),!(!r||r==="ignore")){if(r===!0||r==="error")throw new Tt("LaTeX-incompatible input and strict mode is set to 'error': "+(n+" ["+t+"]"),a);r==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+n+" ["+t+"]"))}}useStrictBehavior(t,n,a){var r=this.strict;if(typeof r=="function")try{r=r(t,n,a)}catch{r="error"}return!r||r==="ignore"?!1:r===!0||r==="error"?!0:r==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(n+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+r+"': "+n+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var n=v5e(t.url);if(n==null)return!1;t.protocol=n}var a=typeof this.trust=="function"?this.trust(t):this.trust;return!!a}}let Hd=class{constructor(t,n,a){this.id=t,this.size=n,this.cramped=a}sup(){return yl[C5e[this.id]]}sub(){return yl[E5e[this.id]]}fracNum(){return yl[x5e[this.id]]}fracDen(){return yl[B5e[this.id]]}cramp(){return yl[I5e[this.id]]}text(){return yl[S5e[this.id]]}isTight(){return this.size>=2}};var hT=0,S1=1,wh=2,vu=3,tw=4,Ys=5,kh=6,fo=7,yl=[new Hd(hT,0,!1),new Hd(S1,0,!0),new Hd(wh,1,!1),new Hd(vu,1,!0),new Hd(tw,2,!1),new Hd(Ys,2,!0),new Hd(kh,3,!1),new Hd(fo,3,!0)],C5e=[tw,Ys,tw,Ys,kh,fo,kh,fo],E5e=[Ys,Ys,Ys,Ys,fo,fo,fo,fo],x5e=[wh,vu,tw,Ys,kh,fo,kh,fo],B5e=[vu,vu,Ys,Ys,fo,fo,fo,fo],I5e=[S1,S1,vu,vu,Ys,Ys,fo,fo],S5e=[hT,S1,wh,vu,wh,vu,wh,vu],In={DISPLAY:yl[hT],TEXT:yl[wh],SCRIPT:yl[tw],SCRIPTSCRIPT:yl[kh]},fT=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function D5e(e){for(var t=0;t<fT.length;t++)for(var n=fT[t],a=0;a<n.blocks.length;a++){var r=n.blocks[a];if(e>=r[0]&&e<=r[1])return n.name}return null}var D1=[];fT.forEach(e=>e.blocks.forEach(t=>D1.push(...t)));function lZ(e){for(var t=0;t<D1.length;t+=2)if(e>=D1[t]&&e<=D1[t+1])return!0;return!1}var vh=80,Q5e=function(t,n){return"M95,"+(622+t+n)+`
4
4
  c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14