@ours.network/messenger-server 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{chunk-VAAEOUKO.js → chunk-NWN7QVCQ.js} +1 -1
- package/dist/chunks/{server-ONX7REAF.js → server-KKNDALLH.js} +25 -2
- package/dist/cli.js +2 -2
- package/dist/web/assets/{abnfDiagram-N423BO3Z-CqPWn49C.js → abnfDiagram-N423BO3Z-tMbnrRPp.js} +2 -2
- package/dist/web/assets/{abnfDiagram-N423BO3Z-CqPWn49C.js.map → abnfDiagram-N423BO3Z-tMbnrRPp.js.map} +1 -1
- package/dist/web/assets/{arc-3B7PFRgm.js → arc-CaN3XdWl.js} +2 -2
- package/dist/web/assets/{arc-3B7PFRgm.js.map → arc-CaN3XdWl.js.map} +1 -1
- package/dist/web/assets/{architectureDiagram-T3A2C74G-DfLEjIUl.js → architectureDiagram-T3A2C74G-C2v163HA.js} +2 -2
- package/dist/web/assets/{architectureDiagram-T3A2C74G-DfLEjIUl.js.map → architectureDiagram-T3A2C74G-C2v163HA.js.map} +1 -1
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-DbJ87tB6.js → blockDiagram-VBNYF7ZC-D7cFw_1G.js} +2 -2
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-DbJ87tB6.js.map → blockDiagram-VBNYF7ZC-D7cFw_1G.js.map} +1 -1
- package/dist/web/assets/{browser-CqRIlH-x.js → browser-ZTwkz1ke.js} +2 -2
- package/dist/web/assets/{browser-CqRIlH-x.js.map → browser-ZTwkz1ke.js.map} +1 -1
- package/dist/web/assets/{c4Diagram-5PPSVZJV-aYlJS5PI.js → c4Diagram-5PPSVZJV-lzZ-6BHE.js} +2 -2
- package/dist/web/assets/{c4Diagram-5PPSVZJV-aYlJS5PI.js.map → c4Diagram-5PPSVZJV-lzZ-6BHE.js.map} +1 -1
- package/dist/web/assets/channel-DHGEzhW5.js +2 -0
- package/dist/web/assets/{channel-dW2gWx3T.js.map → channel-DHGEzhW5.js.map} +1 -1
- package/dist/web/assets/{chunk-2GRJ4B5K-AJhprA8r.js → chunk-2GRJ4B5K-DClxXpDJ.js} +2 -2
- package/dist/web/assets/{chunk-2GRJ4B5K-AJhprA8r.js.map → chunk-2GRJ4B5K-DClxXpDJ.js.map} +1 -1
- package/dist/web/assets/{chunk-2Q5K7J3B-DlHDneWM.js → chunk-2Q5K7J3B-4YHlxmcb.js} +2 -2
- package/dist/web/assets/{chunk-2Q5K7J3B-DlHDneWM.js.map → chunk-2Q5K7J3B-4YHlxmcb.js.map} +1 -1
- package/dist/web/assets/{chunk-5RXB4S5H-DVtX858s.js → chunk-5RXB4S5H-CW5v1woo.js} +2 -2
- package/dist/web/assets/{chunk-5RXB4S5H-DVtX858s.js.map → chunk-5RXB4S5H-CW5v1woo.js.map} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-BnqyETiw.js → chunk-5VM5RSS4--_JArlCC.js} +2 -2
- package/dist/web/assets/{chunk-5VM5RSS4-BnqyETiw.js.map → chunk-5VM5RSS4--_JArlCC.js.map} +1 -1
- package/dist/web/assets/{chunk-6Q2QTUOP-VwtdxEqq.js → chunk-6Q2QTUOP-BxxqaUhn.js} +2 -2
- package/dist/web/assets/{chunk-6Q2QTUOP-VwtdxEqq.js.map → chunk-6Q2QTUOP-BxxqaUhn.js.map} +1 -1
- package/dist/web/assets/{chunk-GF5L2VYU-BP-GNqx9.js → chunk-GF5L2VYU-DmHfZjxD.js} +2 -2
- package/dist/web/assets/{chunk-GF5L2VYU-BP-GNqx9.js.map → chunk-GF5L2VYU-DmHfZjxD.js.map} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-DzY9yv5e.js → chunk-JWPE2WC7-eiioTSbR.js} +2 -2
- package/dist/web/assets/{chunk-JWPE2WC7-DzY9yv5e.js.map → chunk-JWPE2WC7-eiioTSbR.js.map} +1 -1
- package/dist/web/assets/{chunk-KBJHAD2P-EWGGIyEs.js → chunk-KBJHAD2P-Blt_VULT.js} +2 -2
- package/dist/web/assets/{chunk-KBJHAD2P-EWGGIyEs.js.map → chunk-KBJHAD2P-Blt_VULT.js.map} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-zdkBQ149.js → chunk-RYQCIY6F-BUxR6dsj.js} +2 -2
- package/dist/web/assets/{chunk-RYQCIY6F-zdkBQ149.js.map → chunk-RYQCIY6F-BUxR6dsj.js.map} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-B5s1DPid.js → chunk-XXDRQBXY-BPEldrjd.js} +2 -2
- package/dist/web/assets/{chunk-XXDRQBXY-B5s1DPid.js.map → chunk-XXDRQBXY-BPEldrjd.js.map} +1 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-DWxw5a1w.js +2 -0
- package/dist/web/assets/{classDiagram-JCYQIIEL-qy_NR-tD.js.map → classDiagram-JCYQIIEL-DWxw5a1w.js.map} +1 -1
- package/dist/web/assets/classDiagram-v2-OCEON4UE-DWxw5a1w.js +2 -0
- package/dist/web/assets/{classDiagram-v2-OCEON4UE-qy_NR-tD.js.map → classDiagram-v2-OCEON4UE-DWxw5a1w.js.map} +1 -1
- package/dist/web/assets/{cose-bilkent-JH36ORCC-D_C2gOXL.js → cose-bilkent-JH36ORCC-Kuia42gq.js} +2 -2
- package/dist/web/assets/{cose-bilkent-JH36ORCC-D_C2gOXL.js.map → cose-bilkent-JH36ORCC-Kuia42gq.js.map} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-D5Shoam2.js → cynefin-VYW2F7L2-OoypjKsj.js} +2 -2
- package/dist/web/assets/{cynefin-VYW2F7L2-D5Shoam2.js.map → cynefin-VYW2F7L2-OoypjKsj.js.map} +1 -1
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-BlnnDAn4.js → cynefinDiagram-MW4NZA55-CPp685Kk.js} +2 -2
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-BlnnDAn4.js.map → cynefinDiagram-MW4NZA55-CPp685Kk.js.map} +1 -1
- package/dist/web/assets/{dagre-VZM6K2ZE-CcmbgD8y.js → dagre-VZM6K2ZE-CTM9UwBK.js} +2 -2
- package/dist/web/assets/{dagre-VZM6K2ZE-CcmbgD8y.js.map → dagre-VZM6K2ZE-CTM9UwBK.js.map} +1 -1
- package/dist/web/assets/{diagram-7IWD3JNH-BnuvXuOG.js → diagram-7IWD3JNH-C__xoQMN.js} +2 -2
- package/dist/web/assets/{diagram-7IWD3JNH-BnuvXuOG.js.map → diagram-7IWD3JNH-C__xoQMN.js.map} +1 -1
- package/dist/web/assets/{diagram-B4RE2ZJO-qN04fvc2.js → diagram-B4RE2ZJO-DvtD7Xrs.js} +2 -2
- package/dist/web/assets/{diagram-B4RE2ZJO-qN04fvc2.js.map → diagram-B4RE2ZJO-DvtD7Xrs.js.map} +1 -1
- package/dist/web/assets/{diagram-LBJQPF4R-MyFiPTsp.js → diagram-LBJQPF4R-CL_ydOfw.js} +2 -2
- package/dist/web/assets/{diagram-LBJQPF4R-MyFiPTsp.js.map → diagram-LBJQPF4R-CL_ydOfw.js.map} +1 -1
- package/dist/web/assets/{diagram-Q27KOJAE-D6KbyLDa.js → diagram-Q27KOJAE-yfoS-_eQ.js} +2 -2
- package/dist/web/assets/{diagram-Q27KOJAE-D6KbyLDa.js.map → diagram-Q27KOJAE-yfoS-_eQ.js.map} +1 -1
- package/dist/web/assets/{diagram-UB23O5K3-BYfEham2.js → diagram-UB23O5K3-Cr7RDZdP.js} +2 -2
- package/dist/web/assets/{diagram-UB23O5K3-BYfEham2.js.map → diagram-UB23O5K3-Cr7RDZdP.js.map} +1 -1
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-B2sQIaDq.js → ebnfDiagram-BXEA7PRR-0ibgZy8J.js} +2 -2
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-B2sQIaDq.js.map → ebnfDiagram-BXEA7PRR-0ibgZy8J.js.map} +1 -1
- package/dist/web/assets/{erDiagram-JOGREHBK-TTjrYibZ.js → erDiagram-JOGREHBK-CmICrrXi.js} +2 -2
- package/dist/web/assets/{erDiagram-JOGREHBK-TTjrYibZ.js.map → erDiagram-JOGREHBK-CmICrrXi.js.map} +1 -1
- package/dist/web/assets/{flowDiagram-UKHOOZJN-DBkhF11F.js → flowDiagram-UKHOOZJN-BYeEIN4i.js} +2 -2
- package/dist/web/assets/{flowDiagram-UKHOOZJN-DBkhF11F.js.map → flowDiagram-UKHOOZJN-BYeEIN4i.js.map} +1 -1
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-CZhiXP06.js → ganttDiagram-PKOTCBZU-CzWB9-D0.js} +2 -2
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-CZhiXP06.js.map → ganttDiagram-PKOTCBZU-CzWB9-D0.js.map} +1 -1
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-DY6N0imD.js → gitGraphDiagram-DS77QQ5N-C2Y5QXVs.js} +2 -2
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-DY6N0imD.js.map → gitGraphDiagram-DS77QQ5N-C2Y5QXVs.js.map} +1 -1
- package/dist/web/assets/index-8AhXQ9Q4.js +322 -0
- package/dist/web/assets/index-8AhXQ9Q4.js.map +1 -0
- package/dist/web/assets/index-CpZlHnOh.css +1 -0
- package/dist/web/assets/{infoDiagram-6WML65LV-A8svJtko.js → infoDiagram-6WML65LV-BG9DKBeV.js} +2 -2
- package/dist/web/assets/{infoDiagram-6WML65LV-A8svJtko.js.map → infoDiagram-6WML65LV-BG9DKBeV.js.map} +1 -1
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-B_fUtCK4.js → ishikawaDiagram-WSZJBQD7-bv43yNdj.js} +2 -2
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-B_fUtCK4.js.map → ishikawaDiagram-WSZJBQD7-bv43yNdj.js.map} +1 -1
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-CznRCnfr.js → journeyDiagram-NVQOT4AX-Ce_AD9Jr.js} +2 -2
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-CznRCnfr.js.map → journeyDiagram-NVQOT4AX-Ce_AD9Jr.js.map} +1 -1
- package/dist/web/assets/{jsQR-Bf0UGUa9.js → jsQR-C3ibzKCu.js} +2 -2
- package/dist/web/assets/{jsQR-Bf0UGUa9.js.map → jsQR-C3ibzKCu.js.map} +1 -1
- package/dist/web/assets/{kanban-definition-27J2QSJJ-DWDbR8YK.js → kanban-definition-27J2QSJJ-C07RQH0v.js} +2 -2
- package/dist/web/assets/{kanban-definition-27J2QSJJ-DWDbR8YK.js.map → kanban-definition-27J2QSJJ-C07RQH0v.js.map} +1 -1
- package/dist/web/assets/{linear-v3DKup6r.js → linear-B2ku0h1l.js} +2 -2
- package/dist/web/assets/{linear-v3DKup6r.js.map → linear-B2ku0h1l.js.map} +1 -1
- package/dist/web/assets/{mermaid.core-DFaFLwYZ.js → mermaid.core-qQfZwK3y.js} +5 -5
- package/dist/web/assets/{mermaid.core-DFaFLwYZ.js.map → mermaid.core-qQfZwK3y.js.map} +1 -1
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-WlyKZ1qh.js → mindmap-definition-FAOFIHXS-Bc_6aHOa.js} +2 -2
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-WlyKZ1qh.js.map → mindmap-definition-FAOFIHXS-Bc_6aHOa.js.map} +1 -1
- package/dist/web/assets/{pegDiagram-VL7TDLO6-J8XQMbkI.js → pegDiagram-VL7TDLO6-C2JbLq5Z.js} +2 -2
- package/dist/web/assets/{pegDiagram-VL7TDLO6-J8XQMbkI.js.map → pegDiagram-VL7TDLO6-C2JbLq5Z.js.map} +1 -1
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-Y6kKLO8X.js → pieDiagram-7S7Q4E2Y-CUHZdEND.js} +2 -2
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-Y6kKLO8X.js.map → pieDiagram-7S7Q4E2Y-CUHZdEND.js.map} +1 -1
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-C75AhFwr.js → quadrantDiagram-CIZ2JOQS-jX0WBa6z.js} +2 -2
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-C75AhFwr.js.map → quadrantDiagram-CIZ2JOQS-jX0WBa6z.js.map} +1 -1
- package/dist/web/assets/{railroadDiagram-AXF67PYL-tU0Z34Hp.js → railroadDiagram-AXF67PYL-CRQ4RF66.js} +2 -2
- package/dist/web/assets/{railroadDiagram-AXF67PYL-tU0Z34Hp.js.map → railroadDiagram-AXF67PYL-CRQ4RF66.js.map} +1 -1
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-BCC1SaAL.js → requirementDiagram-LRYGKXZP-CEmCvP-K.js} +2 -2
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-BCC1SaAL.js.map → requirementDiagram-LRYGKXZP-CEmCvP-K.js.map} +1 -1
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-TyaWRXVE.js → sankeyDiagram-W5VNT64P-DvhYDOkK.js} +2 -2
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-TyaWRXVE.js.map → sankeyDiagram-W5VNT64P-DvhYDOkK.js.map} +1 -1
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-DMfSW_GK.js → sequenceDiagram-SI44F4Z6-CRZF6qsa.js} +2 -2
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-DMfSW_GK.js.map → sequenceDiagram-SI44F4Z6-CRZF6qsa.js.map} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CGk_4Pap.js → sizeCapture-X5ZJPWSS-CQ6SmuSU.js} +2 -2
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CGk_4Pap.js.map → sizeCapture-X5ZJPWSS-CQ6SmuSU.js.map} +1 -1
- package/dist/web/assets/{stateDiagram-OKZ733FA-BcV5L0Yw.js → stateDiagram-OKZ733FA-Di-vIHFL.js} +2 -2
- package/dist/web/assets/{stateDiagram-OKZ733FA-BcV5L0Yw.js.map → stateDiagram-OKZ733FA-Di-vIHFL.js.map} +1 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DckIgq6i.js +2 -0
- package/dist/web/assets/{stateDiagram-v2-UEYNNEHI-Bl46jJlT.js.map → stateDiagram-v2-UEYNNEHI-DckIgq6i.js.map} +1 -1
- package/dist/web/assets/{swimlanes-SLNWSIFB-qPeYgkYp.js → swimlanes-SLNWSIFB-Dq9sJDDp.js} +3 -3
- package/dist/web/assets/{swimlanes-SLNWSIFB-qPeYgkYp.js.map → swimlanes-SLNWSIFB-Dq9sJDDp.js.map} +1 -1
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-CXQfr27n.js +9 -0
- package/dist/web/assets/{swimlanesDiagram-ULZ7WXOC-DImmVV5Y.js.map → swimlanesDiagram-ULZ7WXOC-CXQfr27n.js.map} +1 -1
- package/dist/web/assets/{timeline-definition-Z64GVDOM-DK8nOg_7.js → timeline-definition-Z64GVDOM-B5xv2-AA.js} +2 -2
- package/dist/web/assets/{timeline-definition-Z64GVDOM-DK8nOg_7.js.map → timeline-definition-Z64GVDOM-B5xv2-AA.js.map} +1 -1
- package/dist/web/assets/{vennDiagram-T6HMQDX7-gPw7k48o.js → vennDiagram-T6HMQDX7--zxgNZfN.js} +2 -2
- package/dist/web/assets/{vennDiagram-T6HMQDX7-gPw7k48o.js.map → vennDiagram-T6HMQDX7--zxgNZfN.js.map} +1 -1
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-DuSm8bGc.js → wardleyDiagram-T6FBY63Y-6JNX2HhV.js} +2 -2
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-DuSm8bGc.js.map → wardleyDiagram-T6FBY63Y-6JNX2HhV.js.map} +1 -1
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-CWypWmMd.js → xychartDiagram-ELKLHX3M-BOynB1mo.js} +2 -2
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-CWypWmMd.js.map → xychartDiagram-ELKLHX3M-BOynB1mo.js.map} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/web/version.json +1 -1
- package/package.json +3 -3
- package/dist/web/assets/channel-dW2gWx3T.js +0 -2
- package/dist/web/assets/classDiagram-JCYQIIEL-qy_NR-tD.js +0 -2
- package/dist/web/assets/classDiagram-v2-OCEON4UE-qy_NR-tD.js +0 -2
- package/dist/web/assets/index-2K1tlrb7.js +0 -321
- package/dist/web/assets/index-2K1tlrb7.js.map +0 -1
- package/dist/web/assets/index-Dj3R_BQQ.css +0 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-Bl46jJlT.js +0 -2
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-DImmVV5Y.js +0 -9
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
function Xb(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(i,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const a of l.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function Id(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jc={exports:{}},qo={},Dc={exports:{}},Fe={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Pg;function Yb(){if(Pg)return Fe;Pg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.iterator;function y(O){return O===null||typeof O!="object"?null:(O=p&&O[p]||O["@@iterator"],typeof O=="function"?O:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(O,G,A){this.props=O,this.context=G,this.refs=C,this.updater=A||w}E.prototype.isReactComponent={},E.prototype.setState=function(O,G){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,G,"setState")},E.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function P(){}P.prototype=E.prototype;function M(O,G,A){this.props=O,this.context=G,this.refs=C,this.updater=A||w}var T=M.prototype=new P;T.constructor=M,S(T,E.prototype),T.isPureReactComponent=!0;var D=Array.isArray,U=Object.prototype.hasOwnProperty,j={current:null},Y={key:!0,ref:!0,__self:!0,__source:!0};function W(O,G,A){var ee,ye={},ve=null,pe=null;if(G!=null)for(ee in G.ref!==void 0&&(pe=G.ref),G.key!==void 0&&(ve=""+G.key),G)U.call(G,ee)&&!Y.hasOwnProperty(ee)&&(ye[ee]=G[ee]);var Me=arguments.length-2;if(Me===1)ye.children=A;else if(1<Me){for(var me=Array(Me),Oe=0;Oe<Me;Oe++)me[Oe]=arguments[Oe+2];ye.children=me}if(O&&O.defaultProps)for(ee in Me=O.defaultProps,Me)ye[ee]===void 0&&(ye[ee]=Me[ee]);return{$$typeof:e,type:O,key:ve,ref:pe,props:ye,_owner:j.current}}function L(O,G){return{$$typeof:e,type:O.type,key:G,ref:O.ref,props:O.props,_owner:O._owner}}function N(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function X(O){var G={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(A){return G[A]})}var B=/\/+/g;function fe(O,G){return typeof O=="object"&&O!==null&&O.key!=null?X(""+O.key):G.toString(36)}function Z(O,G,A,ee,ye){var ve=typeof O;(ve==="undefined"||ve==="boolean")&&(O=null);var pe=!1;if(O===null)pe=!0;else switch(ve){case"string":case"number":pe=!0;break;case"object":switch(O.$$typeof){case e:case t:pe=!0}}if(pe)return pe=O,ye=ye(pe),O=ee===""?"."+fe(pe,0):ee,D(ye)?(A="",O!=null&&(A=O.replace(B,"$&/")+"/"),Z(ye,G,A,"",function(Oe){return Oe})):ye!=null&&(N(ye)&&(ye=L(ye,A+(!ye.key||pe&&pe.key===ye.key?"":(""+ye.key).replace(B,"$&/")+"/")+O)),G.push(ye)),1;if(pe=0,ee=ee===""?".":ee+":",D(O))for(var Me=0;Me<O.length;Me++){ve=O[Me];var me=ee+fe(ve,Me);pe+=Z(ve,G,A,me,ye)}else if(me=y(O),typeof me=="function")for(O=me.call(O),Me=0;!(ve=O.next()).done;)ve=ve.value,me=ee+fe(ve,Me++),pe+=Z(ve,G,A,me,ye);else if(ve==="object")throw G=String(O),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return pe}function te(O,G,A){if(O==null)return O;var ee=[],ye=0;return Z(O,ee,"","",function(ve){return G.call(A,ve,ye++)}),ee}function ge(O){if(O._status===-1){var G=O._result;G=G(),G.then(function(A){(O._status===0||O._status===-1)&&(O._status=1,O._result=A)},function(A){(O._status===0||O._status===-1)&&(O._status=2,O._result=A)}),O._status===-1&&(O._status=0,O._result=G)}if(O._status===1)return O._result.default;throw O._result}var Pe={current:null},Q={transition:null},de={ReactCurrentDispatcher:Pe,ReactCurrentBatchConfig:Q,ReactCurrentOwner:j};function R(){throw Error("act(...) is not supported in production builds of React.")}return Fe.Children={map:te,forEach:function(O,G,A){te(O,function(){G.apply(this,arguments)},A)},count:function(O){var G=0;return te(O,function(){G++}),G},toArray:function(O){return te(O,function(G){return G})||[]},only:function(O){if(!N(O))throw Error("React.Children.only expected to receive a single React element child.");return O}},Fe.Component=E,Fe.Fragment=n,Fe.Profiler=s,Fe.PureComponent=M,Fe.StrictMode=i,Fe.Suspense=f,Fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=de,Fe.act=R,Fe.cloneElement=function(O,G,A){if(O==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+O+".");var ee=S({},O.props),ye=O.key,ve=O.ref,pe=O._owner;if(G!=null){if(G.ref!==void 0&&(ve=G.ref,pe=j.current),G.key!==void 0&&(ye=""+G.key),O.type&&O.type.defaultProps)var Me=O.type.defaultProps;for(me in G)U.call(G,me)&&!Y.hasOwnProperty(me)&&(ee[me]=G[me]===void 0&&Me!==void 0?Me[me]:G[me])}var me=arguments.length-2;if(me===1)ee.children=A;else if(1<me){Me=Array(me);for(var Oe=0;Oe<me;Oe++)Me[Oe]=arguments[Oe+2];ee.children=Me}return{$$typeof:e,type:O.type,key:ye,ref:ve,props:ee,_owner:pe}},Fe.createContext=function(O){return O={$$typeof:a,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},O.Provider={$$typeof:l,_context:O},O.Consumer=O},Fe.createElement=W,Fe.createFactory=function(O){var G=W.bind(null,O);return G.type=O,G},Fe.createRef=function(){return{current:null}},Fe.forwardRef=function(O){return{$$typeof:c,render:O}},Fe.isValidElement=N,Fe.lazy=function(O){return{$$typeof:m,_payload:{_status:-1,_result:O},_init:ge}},Fe.memo=function(O,G){return{$$typeof:h,type:O,compare:G===void 0?null:G}},Fe.startTransition=function(O){var G=Q.transition;Q.transition={};try{O()}finally{Q.transition=G}},Fe.unstable_act=R,Fe.useCallback=function(O,G){return Pe.current.useCallback(O,G)},Fe.useContext=function(O){return Pe.current.useContext(O)},Fe.useDebugValue=function(){},Fe.useDeferredValue=function(O){return Pe.current.useDeferredValue(O)},Fe.useEffect=function(O,G){return Pe.current.useEffect(O,G)},Fe.useId=function(){return Pe.current.useId()},Fe.useImperativeHandle=function(O,G,A){return Pe.current.useImperativeHandle(O,G,A)},Fe.useInsertionEffect=function(O,G){return Pe.current.useInsertionEffect(O,G)},Fe.useLayoutEffect=function(O,G){return Pe.current.useLayoutEffect(O,G)},Fe.useMemo=function(O,G){return Pe.current.useMemo(O,G)},Fe.useReducer=function(O,G,A){return Pe.current.useReducer(O,G,A)},Fe.useRef=function(O){return Pe.current.useRef(O)},Fe.useState=function(O){return Pe.current.useState(O)},Fe.useSyncExternalStore=function(O,G,A){return Pe.current.useSyncExternalStore(O,G,A)},Fe.useTransition=function(){return Pe.current.useTransition()},Fe.version="18.3.1",Fe}var Tg;function jd(){return Tg||(Tg=1,Dc.exports=Yb()),Dc.exports}/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.production.min.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var Rg;function Gb(){if(Rg)return qo;Rg=1;var e=jd(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(c,f,h){var m,p={},y=null,w=null;h!==void 0&&(y=""+h),f.key!==void 0&&(y=""+f.key),f.ref!==void 0&&(w=f.ref);for(m in f)i.call(f,m)&&!l.hasOwnProperty(m)&&(p[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)p[m]===void 0&&(p[m]=f[m]);return{$$typeof:t,type:c,key:y,ref:w,props:p,_owner:s.current}}return qo.Fragment=n,qo.jsx=a,qo.jsxs=a,qo}var Mg;function Qb(){return Mg||(Mg=1,jc.exports=Gb()),jc.exports}var v=Qb(),$a={},_c={exports:{}},en={},Lc={exports:{}},Oc={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.min.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var Ag;function Zb(){return Ag||(Ag=1,function(e){function t(Q,de){var R=Q.length;Q.push(de);e:for(;0<R;){var O=R-1>>>1,G=Q[O];if(0<s(G,de))Q[O]=de,Q[R]=G,R=O;else break e}}function n(Q){return Q.length===0?null:Q[0]}function i(Q){if(Q.length===0)return null;var de=Q[0],R=Q.pop();if(R!==de){Q[0]=R;e:for(var O=0,G=Q.length,A=G>>>1;O<A;){var ee=2*(O+1)-1,ye=Q[ee],ve=ee+1,pe=Q[ve];if(0>s(ye,R))ve<G&&0>s(pe,ye)?(Q[O]=pe,Q[ve]=R,O=ve):(Q[O]=ye,Q[ee]=R,O=ee);else if(ve<G&&0>s(pe,R))Q[O]=pe,Q[ve]=R,O=ve;else break e}}return de}function s(Q,de){var R=Q.sortIndex-de.sortIndex;return R!==0?R:Q.id-de.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var a=Date,c=a.now();e.unstable_now=function(){return a.now()-c}}var f=[],h=[],m=1,p=null,y=3,w=!1,S=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(Q){for(var de=n(h);de!==null;){if(de.callback===null)i(h);else if(de.startTime<=Q)i(h),de.sortIndex=de.expirationTime,t(f,de);else break;de=n(h)}}function D(Q){if(C=!1,T(Q),!S)if(n(f)!==null)S=!0,ge(U);else{var de=n(h);de!==null&&Pe(D,de.startTime-Q)}}function U(Q,de){S=!1,C&&(C=!1,P(W),W=-1),w=!0;var R=y;try{for(T(de),p=n(f);p!==null&&(!(p.expirationTime>de)||Q&&!X());){var O=p.callback;if(typeof O=="function"){p.callback=null,y=p.priorityLevel;var G=O(p.expirationTime<=de);de=e.unstable_now(),typeof G=="function"?p.callback=G:p===n(f)&&i(f),T(de)}else i(f);p=n(f)}if(p!==null)var A=!0;else{var ee=n(h);ee!==null&&Pe(D,ee.startTime-de),A=!1}return A}finally{p=null,y=R,w=!1}}var j=!1,Y=null,W=-1,L=5,N=-1;function X(){return!(e.unstable_now()-N<L)}function B(){if(Y!==null){var Q=e.unstable_now();N=Q;var de=!0;try{de=Y(!0,Q)}finally{de?fe():(j=!1,Y=null)}}else j=!1}var fe;if(typeof M=="function")fe=function(){M(B)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,te=Z.port2;Z.port1.onmessage=B,fe=function(){te.postMessage(null)}}else fe=function(){E(B,0)};function ge(Q){Y=Q,j||(j=!0,fe())}function Pe(Q,de){W=E(function(){Q(e.unstable_now())},de)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){S||w||(S=!0,ge(U))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(Q){switch(y){case 1:case 2:case 3:var de=3;break;default:de=y}var R=y;y=de;try{return Q()}finally{y=R}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,de){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var R=y;y=Q;try{return de()}finally{y=R}},e.unstable_scheduleCallback=function(Q,de,R){var O=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?O+R:O):R=O,Q){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=R+G,Q={id:m++,callback:de,priorityLevel:Q,startTime:R,expirationTime:G,sortIndex:-1},R>O?(Q.sortIndex=R,t(h,Q),n(f)===null&&Q===n(h)&&(C?(P(W),W=-1):C=!0,Pe(D,R-O))):(Q.sortIndex=G,t(f,Q),S||w||(S=!0,ge(U))),Q},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(Q){var de=y;return function(){var R=y;y=de;try{return Q.apply(this,arguments)}finally{y=R}}}}(Oc)),Oc}var Ng;function Jb(){return Ng||(Ng=1,Lc.exports=Zb()),Lc.exports}/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.min.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var Ig;function eC(){if(Ig)return en;Ig=1;var e=jd(),t=Jb();function n(r){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function l(r,o){a(r,o),a(r+"Capture",o)}function a(r,o){for(s[r]=o,r=0;r<o.length;r++)i.add(o[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},p={};function y(r){return f.call(p,r)?!0:f.call(m,r)?!1:h.test(r)?p[r]=!0:(m[r]=!0,!1)}function w(r,o,u,d){if(u!==null&&u.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return d?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function S(r,o,u,d){if(o===null||typeof o>"u"||w(r,o,u,d))return!0;if(d)return!1;if(u!==null)switch(u.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function C(r,o,u,d,g,x,b){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=u,this.propertyName=r,this.type=o,this.sanitizeURL=x,this.removeEmptyString=b}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){E[r]=new C(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var o=r[0];E[o]=new C(o,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){E[r]=new C(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){E[r]=new C(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){E[r]=new C(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){E[r]=new C(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){E[r]=new C(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){E[r]=new C(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){E[r]=new C(r,5,!1,r.toLowerCase(),null,!1,!1)});var P=/[\-:]([a-z])/g;function M(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var o=r.replace(P,M);E[o]=new C(o,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var o=r.replace(P,M);E[o]=new C(o,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var o=r.replace(P,M);E[o]=new C(o,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){E[r]=new C(r,1,!1,r.toLowerCase(),null,!1,!1)}),E.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){E[r]=new C(r,1,!1,r.toLowerCase(),null,!0,!0)});function T(r,o,u,d){var g=E.hasOwnProperty(o)?E[o]:null;(g!==null?g.type!==0:d||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(S(o,u,g,d)&&(u=null),d||g===null?y(o)&&(u===null?r.removeAttribute(o):r.setAttribute(o,""+u)):g.mustUseProperty?r[g.propertyName]=u===null?g.type===3?!1:"":u:(o=g.attributeName,d=g.attributeNamespace,u===null?r.removeAttribute(o):(g=g.type,u=g===3||g===4&&u===!0?"":""+u,d?r.setAttributeNS(d,o,u):r.setAttribute(o,u))))}var D=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=Symbol.for("react.element"),j=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),N=Symbol.for("react.provider"),X=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),fe=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),Pe=Symbol.for("react.offscreen"),Q=Symbol.iterator;function de(r){return r===null||typeof r!="object"?null:(r=Q&&r[Q]||r["@@iterator"],typeof r=="function"?r:null)}var R=Object.assign,O;function G(r){if(O===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);O=o&&o[1]||""}return`
|
|
34
|
+
`+O+r}var A=!1;function ee(r,o){if(!r||A)return"";A=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(K){var d=K}Reflect.construct(r,[],o)}else{try{o.call()}catch(K){d=K}r.call(o.prototype)}else{try{throw Error()}catch(K){d=K}r()}}catch(K){if(K&&d&&typeof K.stack=="string"){for(var g=K.stack.split(`
|
|
35
|
+
`),x=d.stack.split(`
|
|
36
|
+
`),b=g.length-1,I=x.length-1;1<=b&&0<=I&&g[b]!==x[I];)I--;for(;1<=b&&0<=I;b--,I--)if(g[b]!==x[I]){if(b!==1||I!==1)do if(b--,I--,0>I||g[b]!==x[I]){var _=`
|
|
37
|
+
`+g[b].replace(" at new "," at ");return r.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",r.displayName)),_}while(1<=b&&0<=I);break}}}finally{A=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?G(r):""}function ye(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=ee(r.type,!1),r;case 11:return r=ee(r.type.render,!1),r;case 1:return r=ee(r.type,!0),r;default:return""}}function ve(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Y:return"Fragment";case j:return"Portal";case L:return"Profiler";case W:return"StrictMode";case fe:return"Suspense";case Z:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case X:return(r.displayName||"Context")+".Consumer";case N:return(r._context.displayName||"Context")+".Provider";case B:var o=r.render;return r=r.displayName,r||(r=o.displayName||o.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case te:return o=r.displayName||null,o!==null?o:ve(r.type)||"Memo";case ge:o=r._payload,r=r._init;try{return ve(r(o))}catch{}}return null}function pe(r){var o=r.type;switch(r.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=o.render,r=r.displayName||r.name||"",o.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ve(o);case 8:return o===W?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Me(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function me(r){var o=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Oe(r){var o=me(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,o),d=""+r[o];if(!r.hasOwnProperty(o)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var g=u.get,x=u.set;return Object.defineProperty(r,o,{configurable:!0,get:function(){return g.call(this)},set:function(b){d=""+b,x.call(this,b)}}),Object.defineProperty(r,o,{enumerable:u.enumerable}),{getValue:function(){return d},setValue:function(b){d=""+b},stopTracking:function(){r._valueTracker=null,delete r[o]}}}}function qe(r){r._valueTracker||(r._valueTracker=Oe(r))}function ut(r){if(!r)return!1;var o=r._valueTracker;if(!o)return!0;var u=o.getValue(),d="";return r&&(d=me(r)?r.checked?"true":"false":r.value),r=d,r!==u?(o.setValue(r),!0):!1}function mt(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function Ve(r,o){var u=o.checked;return R({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function bt(r,o){var u=o.defaultValue==null?"":o.defaultValue,d=o.checked!=null?o.checked:o.defaultChecked;u=Me(o.value!=null?o.value:u),r._wrapperState={initialChecked:d,initialValue:u,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Rt(r,o){o=o.checked,o!=null&&T(r,"checked",o,!1)}function it(r,o){Rt(r,o);var u=Me(o.value),d=o.type;if(u!=null)d==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}o.hasOwnProperty("value")?rn(r,o.type,u):o.hasOwnProperty("defaultValue")&&rn(r,o.type,Me(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(r.defaultChecked=!!o.defaultChecked)}function Bt(r,o,u){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var d=o.type;if(!(d!=="submit"&&d!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+r._wrapperState.initialValue,u||o===r.value||(r.value=o),r.defaultValue=o}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function rn(r,o,u){(o!=="number"||mt(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Mt=Array.isArray;function on(r,o,u,d){if(r=r.options,o){o={};for(var g=0;g<u.length;g++)o["$"+u[g]]=!0;for(u=0;u<r.length;u++)g=o.hasOwnProperty("$"+r[u].value),r[u].selected!==g&&(r[u].selected=g),g&&d&&(r[u].defaultSelected=!0)}else{for(u=""+Me(u),o=null,g=0;g<r.length;g++){if(r[g].value===u){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}o!==null||r[g].disabled||(o=r[g])}o!==null&&(o.selected=!0)}}function hn(r,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return R({},o,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Be(r,o){var u=o.value;if(u==null){if(u=o.children,o=o.defaultValue,u!=null){if(o!=null)throw Error(n(92));if(Mt(u)){if(1<u.length)throw Error(n(93));u=u[0]}o=u}o==null&&(o=""),u=o}r._wrapperState={initialValue:Me(u)}}function Gn(r,o){var u=Me(o.value),d=Me(o.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),o.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),d!=null&&(r.defaultValue=""+d)}function Qn(r){var o=r.textContent;o===r._wrapperState.initialValue&&o!==""&&o!==null&&(r.value=o)}function q(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function oe(r,o){return r==null||r==="http://www.w3.org/1999/xhtml"?q(o):r==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Ae,F=function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,u,d,g){MSApp.execUnsafeLocalFunction(function(){return r(o,u,d,g)})}:r}(function(r,o){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=o;else{for(Ae=Ae||document.createElement("div"),Ae.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ae.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;o.firstChild;)r.appendChild(o.firstChild)}});function J(r,o){if(o){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=o;return}}r.textContent=o}var we={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},V=["Webkit","ms","Moz","O"];Object.keys(we).forEach(function(r){V.forEach(function(o){o=o+r.charAt(0).toUpperCase()+r.substring(1),we[o]=we[r]})});function ue(r,o,u){return o==null||typeof o=="boolean"||o===""?"":u||typeof o!="number"||o===0||we.hasOwnProperty(r)&&we[r]?(""+o).trim():o+"px"}function ae(r,o){r=r.style;for(var u in o)if(o.hasOwnProperty(u)){var d=u.indexOf("--")===0,g=ue(u,o[u],d);u==="float"&&(u="cssFloat"),d?r.setProperty(u,g):r[u]=g}}var he=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Te(r,o){if(o){if(he[r]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function se(r,o){if(r.indexOf("-")===-1)return typeof o.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var De=null;function We(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var gt=null,ct=null,ot=null;function Ge(r){if(r=Io(r)){if(typeof gt!="function")throw Error(n(280));var o=r.stateNode;o&&(o=ra(o),gt(r.stateNode,r.type,o))}}function Dt(r){ct?ot?ot.push(r):ot=[r]:ct=r}function fr(){if(ct){var r=ct,o=ot;if(ot=ct=null,Ge(r),o)for(r=0;r<o.length;r++)Ge(o[r])}}function Kh(r,o){return r(o)}function qh(){}var Gl=!1;function Xh(r,o,u){if(Gl)return r(o,u);Gl=!0;try{return Kh(r,o,u)}finally{Gl=!1,(ct!==null||ot!==null)&&(qh(),fr())}}function co(r,o){var u=r.stateNode;if(u===null)return null;var d=ra(u);if(d===null)return null;u=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,o,typeof u));return u}var Ql=!1;if(c)try{var fo={};Object.defineProperty(fo,"passive",{get:function(){Ql=!0}}),window.addEventListener("test",fo,fo),window.removeEventListener("test",fo,fo)}catch{Ql=!1}function eS(r,o,u,d,g,x,b,I,_){var K=Array.prototype.slice.call(arguments,3);try{o.apply(u,K)}catch(re){this.onError(re)}}var ho=!1,_s=null,Ls=!1,Zl=null,tS={onError:function(r){ho=!0,_s=r}};function nS(r,o,u,d,g,x,b,I,_){ho=!1,_s=null,eS.apply(tS,arguments)}function rS(r,o,u,d,g,x,b,I,_){if(nS.apply(this,arguments),ho){if(ho){var K=_s;ho=!1,_s=null}else throw Error(n(198));Ls||(Ls=!0,Zl=K)}}function $r(r){var o=r,u=r;if(r.alternate)for(;o.return;)o=o.return;else{r=o;do o=r,(o.flags&4098)!==0&&(u=o.return),r=o.return;while(r)}return o.tag===3?u:null}function Yh(r){if(r.tag===13){var o=r.memoizedState;if(o===null&&(r=r.alternate,r!==null&&(o=r.memoizedState)),o!==null)return o.dehydrated}return null}function Gh(r){if($r(r)!==r)throw Error(n(188))}function iS(r){var o=r.alternate;if(!o){if(o=$r(r),o===null)throw Error(n(188));return o!==r?null:r}for(var u=r,d=o;;){var g=u.return;if(g===null)break;var x=g.alternate;if(x===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===x.child){for(x=g.child;x;){if(x===u)return Gh(g),r;if(x===d)return Gh(g),o;x=x.sibling}throw Error(n(188))}if(u.return!==d.return)u=g,d=x;else{for(var b=!1,I=g.child;I;){if(I===u){b=!0,u=g,d=x;break}if(I===d){b=!0,d=g,u=x;break}I=I.sibling}if(!b){for(I=x.child;I;){if(I===u){b=!0,u=x,d=g;break}if(I===d){b=!0,d=x,u=g;break}I=I.sibling}if(!b)throw Error(n(189))}}if(u.alternate!==d)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:o}function Qh(r){return r=iS(r),r!==null?Zh(r):null}function Zh(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var o=Zh(r);if(o!==null)return o;r=r.sibling}return null}var Jh=t.unstable_scheduleCallback,ep=t.unstable_cancelCallback,oS=t.unstable_shouldYield,sS=t.unstable_requestPaint,ht=t.unstable_now,aS=t.unstable_getCurrentPriorityLevel,Jl=t.unstable_ImmediatePriority,tp=t.unstable_UserBlockingPriority,Os=t.unstable_NormalPriority,lS=t.unstable_LowPriority,np=t.unstable_IdlePriority,Fs=null,On=null;function uS(r){if(On&&typeof On.onCommitFiberRoot=="function")try{On.onCommitFiberRoot(Fs,r,void 0,(r.current.flags&128)===128)}catch{}}var En=Math.clz32?Math.clz32:dS,cS=Math.log,fS=Math.LN2;function dS(r){return r>>>=0,r===0?32:31-(cS(r)/fS|0)|0}var zs=64,Vs=4194304;function po(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Bs(r,o){var u=r.pendingLanes;if(u===0)return 0;var d=0,g=r.suspendedLanes,x=r.pingedLanes,b=u&268435455;if(b!==0){var I=b&~g;I!==0?d=po(I):(x&=b,x!==0&&(d=po(x)))}else b=u&~g,b!==0?d=po(b):x!==0&&(d=po(x));if(d===0)return 0;if(o!==0&&o!==d&&(o&g)===0&&(g=d&-d,x=o&-o,g>=x||g===16&&(x&4194240)!==0))return o;if((d&4)!==0&&(d|=u&16),o=r.entangledLanes,o!==0)for(r=r.entanglements,o&=d;0<o;)u=31-En(o),g=1<<u,d|=r[u],o&=~g;return d}function hS(r,o){switch(r){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pS(r,o){for(var u=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,x=r.pendingLanes;0<x;){var b=31-En(x),I=1<<b,_=g[b];_===-1?((I&u)===0||(I&d)!==0)&&(g[b]=hS(I,o)):_<=o&&(r.expiredLanes|=I),x&=~I}}function eu(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function rp(){var r=zs;return zs<<=1,(zs&4194240)===0&&(zs=64),r}function tu(r){for(var o=[],u=0;31>u;u++)o.push(r);return o}function mo(r,o,u){r.pendingLanes|=o,o!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,o=31-En(o),r[o]=u}function mS(r,o){var u=r.pendingLanes&~o;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=o,r.mutableReadLanes&=o,r.entangledLanes&=o,o=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<u;){var g=31-En(u),x=1<<g;o[g]=0,d[g]=-1,r[g]=-1,u&=~x}}function nu(r,o){var u=r.entangledLanes|=o;for(r=r.entanglements;u;){var d=31-En(u),g=1<<d;g&o|r[d]&o&&(r[d]|=o),u&=~g}}var Ye=0;function ip(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var op,ru,sp,ap,lp,iu=!1,$s=[],dr=null,hr=null,pr=null,go=new Map,yo=new Map,mr=[],gS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function up(r,o){switch(r){case"focusin":case"focusout":dr=null;break;case"dragenter":case"dragleave":hr=null;break;case"mouseover":case"mouseout":pr=null;break;case"pointerover":case"pointerout":go.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":yo.delete(o.pointerId)}}function vo(r,o,u,d,g,x){return r===null||r.nativeEvent!==x?(r={blockedOn:o,domEventName:u,eventSystemFlags:d,nativeEvent:x,targetContainers:[g]},o!==null&&(o=Io(o),o!==null&&ru(o)),r):(r.eventSystemFlags|=d,o=r.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),r)}function yS(r,o,u,d,g){switch(o){case"focusin":return dr=vo(dr,r,o,u,d,g),!0;case"dragenter":return hr=vo(hr,r,o,u,d,g),!0;case"mouseover":return pr=vo(pr,r,o,u,d,g),!0;case"pointerover":var x=g.pointerId;return go.set(x,vo(go.get(x)||null,r,o,u,d,g)),!0;case"gotpointercapture":return x=g.pointerId,yo.set(x,vo(yo.get(x)||null,r,o,u,d,g)),!0}return!1}function cp(r){var o=Ur(r.target);if(o!==null){var u=$r(o);if(u!==null){if(o=u.tag,o===13){if(o=Yh(u),o!==null){r.blockedOn=o,lp(r.priority,function(){sp(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Us(r){if(r.blockedOn!==null)return!1;for(var o=r.targetContainers;0<o.length;){var u=su(r.domEventName,r.eventSystemFlags,o[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var d=new u.constructor(u.type,u);De=d,u.target.dispatchEvent(d),De=null}else return o=Io(u),o!==null&&ru(o),r.blockedOn=u,!1;o.shift()}return!0}function fp(r,o,u){Us(r)&&u.delete(o)}function vS(){iu=!1,dr!==null&&Us(dr)&&(dr=null),hr!==null&&Us(hr)&&(hr=null),pr!==null&&Us(pr)&&(pr=null),go.forEach(fp),yo.forEach(fp)}function xo(r,o){r.blockedOn===o&&(r.blockedOn=null,iu||(iu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,vS)))}function wo(r){function o(g){return xo(g,r)}if(0<$s.length){xo($s[0],r);for(var u=1;u<$s.length;u++){var d=$s[u];d.blockedOn===r&&(d.blockedOn=null)}}for(dr!==null&&xo(dr,r),hr!==null&&xo(hr,r),pr!==null&&xo(pr,r),go.forEach(o),yo.forEach(o),u=0;u<mr.length;u++)d=mr[u],d.blockedOn===r&&(d.blockedOn=null);for(;0<mr.length&&(u=mr[0],u.blockedOn===null);)cp(u),u.blockedOn===null&&mr.shift()}var yi=D.ReactCurrentBatchConfig,Ws=!0;function xS(r,o,u,d){var g=Ye,x=yi.transition;yi.transition=null;try{Ye=1,ou(r,o,u,d)}finally{Ye=g,yi.transition=x}}function wS(r,o,u,d){var g=Ye,x=yi.transition;yi.transition=null;try{Ye=4,ou(r,o,u,d)}finally{Ye=g,yi.transition=x}}function ou(r,o,u,d){if(Ws){var g=su(r,o,u,d);if(g===null)bu(r,o,d,Hs,u),up(r,d);else if(yS(g,r,o,u,d))d.stopPropagation();else if(up(r,d),o&4&&-1<gS.indexOf(r)){for(;g!==null;){var x=Io(g);if(x!==null&&op(x),x=su(r,o,u,d),x===null&&bu(r,o,d,Hs,u),x===g)break;g=x}g!==null&&d.stopPropagation()}else bu(r,o,d,null,u)}}var Hs=null;function su(r,o,u,d){if(Hs=null,r=We(d),r=Ur(r),r!==null)if(o=$r(r),o===null)r=null;else if(u=o.tag,u===13){if(r=Yh(o),r!==null)return r;r=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;r=null}else o!==r&&(r=null);return Hs=r,null}function dp(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(aS()){case Jl:return 1;case tp:return 4;case Os:case lS:return 16;case np:return 536870912;default:return 16}default:return 16}}var gr=null,au=null,Ks=null;function hp(){if(Ks)return Ks;var r,o=au,u=o.length,d,g="value"in gr?gr.value:gr.textContent,x=g.length;for(r=0;r<u&&o[r]===g[r];r++);var b=u-r;for(d=1;d<=b&&o[u-d]===g[x-d];d++);return Ks=g.slice(r,1<d?1-d:void 0)}function qs(r){var o=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&o===13&&(r=13)):r=o,r===10&&(r=13),32<=r||r===13?r:0}function Xs(){return!0}function pp(){return!1}function sn(r){function o(u,d,g,x,b){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=x,this.target=b,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(u=r[I],this[I]=u?u(x):x[I]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Xs:pp,this.isPropagationStopped=pp,this}return R(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Xs)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Xs)},persist:function(){},isPersistent:Xs}),o}var vi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lu=sn(vi),ko=R({},vi,{view:0,detail:0}),kS=sn(ko),uu,cu,So,Ys=R({},ko,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:du,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==So&&(So&&r.type==="mousemove"?(uu=r.screenX-So.screenX,cu=r.screenY-So.screenY):cu=uu=0,So=r),uu)},movementY:function(r){return"movementY"in r?r.movementY:cu}}),mp=sn(Ys),SS=R({},Ys,{dataTransfer:0}),bS=sn(SS),CS=R({},ko,{relatedTarget:0}),fu=sn(CS),ES=R({},vi,{animationName:0,elapsedTime:0,pseudoElement:0}),PS=sn(ES),TS=R({},vi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),RS=sn(TS),MS=R({},vi,{data:0}),gp=sn(MS),AS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},IS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jS(r){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(r):(r=IS[r])?!!o[r]:!1}function du(){return jS}var DS=R({},ko,{key:function(r){if(r.key){var o=AS[r.key]||r.key;if(o!=="Unidentified")return o}return r.type==="keypress"?(r=qs(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?NS[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:du,charCode:function(r){return r.type==="keypress"?qs(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?qs(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),_S=sn(DS),LS=R({},Ys,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yp=sn(LS),OS=R({},ko,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:du}),FS=sn(OS),zS=R({},vi,{propertyName:0,elapsedTime:0,pseudoElement:0}),VS=sn(zS),BS=R({},Ys,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),$S=sn(BS),US=[9,13,27,32],hu=c&&"CompositionEvent"in window,bo=null;c&&"documentMode"in document&&(bo=document.documentMode);var WS=c&&"TextEvent"in window&&!bo,vp=c&&(!hu||bo&&8<bo&&11>=bo),xp=" ",wp=!1;function kp(r,o){switch(r){case"keyup":return US.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sp(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var xi=!1;function HS(r,o){switch(r){case"compositionend":return Sp(o);case"keypress":return o.which!==32?null:(wp=!0,xp);case"textInput":return r=o.data,r===xp&&wp?null:r;default:return null}}function KS(r,o){if(xi)return r==="compositionend"||!hu&&kp(r,o)?(r=hp(),Ks=au=gr=null,xi=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return vp&&o.locale!=="ko"?null:o.data;default:return null}}var qS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function bp(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o==="input"?!!qS[r.type]:o==="textarea"}function Cp(r,o,u,d){Dt(d),o=ea(o,"onChange"),0<o.length&&(u=new lu("onChange","change",null,u,d),r.push({event:u,listeners:o}))}var Co=null,Eo=null;function XS(r){$p(r,0)}function Gs(r){var o=Ci(r);if(ut(o))return r}function YS(r,o){if(r==="change")return o}var Ep=!1;if(c){var pu;if(c){var mu="oninput"in document;if(!mu){var Pp=document.createElement("div");Pp.setAttribute("oninput","return;"),mu=typeof Pp.oninput=="function"}pu=mu}else pu=!1;Ep=pu&&(!document.documentMode||9<document.documentMode)}function Tp(){Co&&(Co.detachEvent("onpropertychange",Rp),Eo=Co=null)}function Rp(r){if(r.propertyName==="value"&&Gs(Eo)){var o=[];Cp(o,Eo,r,We(r)),Xh(XS,o)}}function GS(r,o,u){r==="focusin"?(Tp(),Co=o,Eo=u,Co.attachEvent("onpropertychange",Rp)):r==="focusout"&&Tp()}function QS(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Gs(Eo)}function ZS(r,o){if(r==="click")return Gs(o)}function JS(r,o){if(r==="input"||r==="change")return Gs(o)}function eb(r,o){return r===o&&(r!==0||1/r===1/o)||r!==r&&o!==o}var Pn=typeof Object.is=="function"?Object.is:eb;function Po(r,o){if(Pn(r,o))return!0;if(typeof r!="object"||r===null||typeof o!="object"||o===null)return!1;var u=Object.keys(r),d=Object.keys(o);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!f.call(o,g)||!Pn(r[g],o[g]))return!1}return!0}function Mp(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Ap(r,o){var u=Mp(r);r=0;for(var d;u;){if(u.nodeType===3){if(d=r+u.textContent.length,r<=o&&d>=o)return{node:u,offset:o-r};r=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Mp(u)}}function Np(r,o){return r&&o?r===o?!0:r&&r.nodeType===3?!1:o&&o.nodeType===3?Np(r,o.parentNode):"contains"in r?r.contains(o):r.compareDocumentPosition?!!(r.compareDocumentPosition(o)&16):!1:!1}function Ip(){for(var r=window,o=mt();o instanceof r.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)r=o.contentWindow;else break;o=mt(r.document)}return o}function gu(r){var o=r&&r.nodeName&&r.nodeName.toLowerCase();return o&&(o==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||o==="textarea"||r.contentEditable==="true")}function tb(r){var o=Ip(),u=r.focusedElem,d=r.selectionRange;if(o!==u&&u&&u.ownerDocument&&Np(u.ownerDocument.documentElement,u)){if(d!==null&&gu(u)){if(o=d.start,r=d.end,r===void 0&&(r=o),"selectionStart"in u)u.selectionStart=o,u.selectionEnd=Math.min(r,u.value.length);else if(r=(o=u.ownerDocument||document)&&o.defaultView||window,r.getSelection){r=r.getSelection();var g=u.textContent.length,x=Math.min(d.start,g);d=d.end===void 0?x:Math.min(d.end,g),!r.extend&&x>d&&(g=d,d=x,x=g),g=Ap(u,x);var b=Ap(u,d);g&&b&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==b.node||r.focusOffset!==b.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),r.removeAllRanges(),x>d?(r.addRange(o),r.extend(b.node,b.offset)):(o.setEnd(b.node,b.offset),r.addRange(o)))}}for(o=[],r=u;r=r.parentNode;)r.nodeType===1&&o.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<o.length;u++)r=o[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var nb=c&&"documentMode"in document&&11>=document.documentMode,wi=null,yu=null,To=null,vu=!1;function jp(r,o,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;vu||wi==null||wi!==mt(d)||(d=wi,"selectionStart"in d&&gu(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),To&&Po(To,d)||(To=d,d=ea(yu,"onSelect"),0<d.length&&(o=new lu("onSelect","select",null,o,u),r.push({event:o,listeners:d}),o.target=wi)))}function Qs(r,o){var u={};return u[r.toLowerCase()]=o.toLowerCase(),u["Webkit"+r]="webkit"+o,u["Moz"+r]="moz"+o,u}var ki={animationend:Qs("Animation","AnimationEnd"),animationiteration:Qs("Animation","AnimationIteration"),animationstart:Qs("Animation","AnimationStart"),transitionend:Qs("Transition","TransitionEnd")},xu={},Dp={};c&&(Dp=document.createElement("div").style,"AnimationEvent"in window||(delete ki.animationend.animation,delete ki.animationiteration.animation,delete ki.animationstart.animation),"TransitionEvent"in window||delete ki.transitionend.transition);function Zs(r){if(xu[r])return xu[r];if(!ki[r])return r;var o=ki[r],u;for(u in o)if(o.hasOwnProperty(u)&&u in Dp)return xu[r]=o[u];return r}var _p=Zs("animationend"),Lp=Zs("animationiteration"),Op=Zs("animationstart"),Fp=Zs("transitionend"),zp=new Map,Vp="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function yr(r,o){zp.set(r,o),l(o,[r])}for(var wu=0;wu<Vp.length;wu++){var ku=Vp[wu],rb=ku.toLowerCase(),ib=ku[0].toUpperCase()+ku.slice(1);yr(rb,"on"+ib)}yr(_p,"onAnimationEnd"),yr(Lp,"onAnimationIteration"),yr(Op,"onAnimationStart"),yr("dblclick","onDoubleClick"),yr("focusin","onFocus"),yr("focusout","onBlur"),yr(Fp,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ro="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ob=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ro));function Bp(r,o,u){var d=r.type||"unknown-event";r.currentTarget=u,rS(d,o,void 0,r),r.currentTarget=null}function $p(r,o){o=(o&4)!==0;for(var u=0;u<r.length;u++){var d=r[u],g=d.event;d=d.listeners;e:{var x=void 0;if(o)for(var b=d.length-1;0<=b;b--){var I=d[b],_=I.instance,K=I.currentTarget;if(I=I.listener,_!==x&&g.isPropagationStopped())break e;Bp(g,I,K),x=_}else for(b=0;b<d.length;b++){if(I=d[b],_=I.instance,K=I.currentTarget,I=I.listener,_!==x&&g.isPropagationStopped())break e;Bp(g,I,K),x=_}}}if(Ls)throw r=Zl,Ls=!1,Zl=null,r}function nt(r,o){var u=o[Mu];u===void 0&&(u=o[Mu]=new Set);var d=r+"__bubble";u.has(d)||(Up(o,r,2,!1),u.add(d))}function Su(r,o,u){var d=0;o&&(d|=4),Up(u,r,d,o)}var Js="_reactListening"+Math.random().toString(36).slice(2);function Mo(r){if(!r[Js]){r[Js]=!0,i.forEach(function(u){u!=="selectionchange"&&(ob.has(u)||Su(u,!1,r),Su(u,!0,r))});var o=r.nodeType===9?r:r.ownerDocument;o===null||o[Js]||(o[Js]=!0,Su("selectionchange",!1,o))}}function Up(r,o,u,d){switch(dp(o)){case 1:var g=xS;break;case 4:g=wS;break;default:g=ou}u=g.bind(null,o,u,r),g=void 0,!Ql||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(o,u,{capture:!0,passive:g}):r.addEventListener(o,u,!0):g!==void 0?r.addEventListener(o,u,{passive:g}):r.addEventListener(o,u,!1)}function bu(r,o,u,d,g){var x=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var b=d.tag;if(b===3||b===4){var I=d.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(b===4)for(b=d.return;b!==null;){var _=b.tag;if((_===3||_===4)&&(_=b.stateNode.containerInfo,_===g||_.nodeType===8&&_.parentNode===g))return;b=b.return}for(;I!==null;){if(b=Ur(I),b===null)return;if(_=b.tag,_===5||_===6){d=x=b;continue e}I=I.parentNode}}d=d.return}Xh(function(){var K=x,re=We(u),ie=[];e:{var ne=zp.get(r);if(ne!==void 0){var xe=lu,Se=r;switch(r){case"keypress":if(qs(u)===0)break e;case"keydown":case"keyup":xe=_S;break;case"focusin":Se="focus",xe=fu;break;case"focusout":Se="blur",xe=fu;break;case"beforeblur":case"afterblur":xe=fu;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=mp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=bS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=FS;break;case _p:case Lp:case Op:xe=PS;break;case Fp:xe=VS;break;case"scroll":xe=kS;break;case"wheel":xe=$S;break;case"copy":case"cut":case"paste":xe=RS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=yp}var Ee=(o&4)!==0,pt=!Ee&&r==="scroll",$=Ee?ne!==null?ne+"Capture":null:ne;Ee=[];for(var z=K,H;z!==null;){H=z;var ce=H.stateNode;if(H.tag===5&&ce!==null&&(H=ce,$!==null&&(ce=co(z,$),ce!=null&&Ee.push(Ao(z,ce,H)))),pt)break;z=z.return}0<Ee.length&&(ne=new xe(ne,Se,null,u,re),ie.push({event:ne,listeners:Ee}))}}if((o&7)===0){e:{if(ne=r==="mouseover"||r==="pointerover",xe=r==="mouseout"||r==="pointerout",ne&&u!==De&&(Se=u.relatedTarget||u.fromElement)&&(Ur(Se)||Se[Zn]))break e;if((xe||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,xe?(Se=u.relatedTarget||u.toElement,xe=K,Se=Se?Ur(Se):null,Se!==null&&(pt=$r(Se),Se!==pt||Se.tag!==5&&Se.tag!==6)&&(Se=null)):(xe=null,Se=K),xe!==Se)){if(Ee=mp,ce="onMouseLeave",$="onMouseEnter",z="mouse",(r==="pointerout"||r==="pointerover")&&(Ee=yp,ce="onPointerLeave",$="onPointerEnter",z="pointer"),pt=xe==null?ne:Ci(xe),H=Se==null?ne:Ci(Se),ne=new Ee(ce,z+"leave",xe,u,re),ne.target=pt,ne.relatedTarget=H,ce=null,Ur(re)===K&&(Ee=new Ee($,z+"enter",Se,u,re),Ee.target=H,Ee.relatedTarget=pt,ce=Ee),pt=ce,xe&&Se)t:{for(Ee=xe,$=Se,z=0,H=Ee;H;H=Si(H))z++;for(H=0,ce=$;ce;ce=Si(ce))H++;for(;0<z-H;)Ee=Si(Ee),z--;for(;0<H-z;)$=Si($),H--;for(;z--;){if(Ee===$||$!==null&&Ee===$.alternate)break t;Ee=Si(Ee),$=Si($)}Ee=null}else Ee=null;xe!==null&&Wp(ie,ne,xe,Ee,!1),Se!==null&&pt!==null&&Wp(ie,pt,Se,Ee,!0)}}e:{if(ne=K?Ci(K):window,xe=ne.nodeName&&ne.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ne.type==="file")var Re=YS;else if(bp(ne))if(Ep)Re=JS;else{Re=QS;var Ne=GS}else(xe=ne.nodeName)&&xe.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(Re=ZS);if(Re&&(Re=Re(r,K))){Cp(ie,Re,u,re);break e}Ne&&Ne(r,ne,K),r==="focusout"&&(Ne=ne._wrapperState)&&Ne.controlled&&ne.type==="number"&&rn(ne,"number",ne.value)}switch(Ne=K?Ci(K):window,r){case"focusin":(bp(Ne)||Ne.contentEditable==="true")&&(wi=Ne,yu=K,To=null);break;case"focusout":To=yu=wi=null;break;case"mousedown":vu=!0;break;case"contextmenu":case"mouseup":case"dragend":vu=!1,jp(ie,u,re);break;case"selectionchange":if(nb)break;case"keydown":case"keyup":jp(ie,u,re)}var Ie;if(hu)e:{switch(r){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else xi?kp(r,u)&&(_e="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(_e="onCompositionStart");_e&&(vp&&u.locale!=="ko"&&(xi||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&xi&&(Ie=hp()):(gr=re,au="value"in gr?gr.value:gr.textContent,xi=!0)),Ne=ea(K,_e),0<Ne.length&&(_e=new gp(_e,r,null,u,re),ie.push({event:_e,listeners:Ne}),Ie?_e.data=Ie:(Ie=Sp(u),Ie!==null&&(_e.data=Ie)))),(Ie=WS?HS(r,u):KS(r,u))&&(K=ea(K,"onBeforeInput"),0<K.length&&(re=new gp("onBeforeInput","beforeinput",null,u,re),ie.push({event:re,listeners:K}),re.data=Ie))}$p(ie,o)})}function Ao(r,o,u){return{instance:r,listener:o,currentTarget:u}}function ea(r,o){for(var u=o+"Capture",d=[];r!==null;){var g=r,x=g.stateNode;g.tag===5&&x!==null&&(g=x,x=co(r,u),x!=null&&d.unshift(Ao(r,x,g)),x=co(r,o),x!=null&&d.push(Ao(r,x,g))),r=r.return}return d}function Si(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Wp(r,o,u,d,g){for(var x=o._reactName,b=[];u!==null&&u!==d;){var I=u,_=I.alternate,K=I.stateNode;if(_!==null&&_===d)break;I.tag===5&&K!==null&&(I=K,g?(_=co(u,x),_!=null&&b.unshift(Ao(u,_,I))):g||(_=co(u,x),_!=null&&b.push(Ao(u,_,I)))),u=u.return}b.length!==0&&r.push({event:o,listeners:b})}var sb=/\r\n?/g,ab=/\u0000|\uFFFD/g;function Hp(r){return(typeof r=="string"?r:""+r).replace(sb,`
|
|
38
|
+
`).replace(ab,"")}function ta(r,o,u){if(o=Hp(o),Hp(r)!==o&&u)throw Error(n(425))}function na(){}var Cu=null,Eu=null;function Pu(r,o){return r==="textarea"||r==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Tu=typeof setTimeout=="function"?setTimeout:void 0,lb=typeof clearTimeout=="function"?clearTimeout:void 0,Kp=typeof Promise=="function"?Promise:void 0,ub=typeof queueMicrotask=="function"?queueMicrotask:typeof Kp<"u"?function(r){return Kp.resolve(null).then(r).catch(cb)}:Tu;function cb(r){setTimeout(function(){throw r})}function Ru(r,o){var u=o,d=0;do{var g=u.nextSibling;if(r.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"){if(d===0){r.removeChild(g),wo(o);return}d--}else u!=="$"&&u!=="$?"&&u!=="$!"||d++;u=g}while(u);wo(o)}function vr(r){for(;r!=null;r=r.nextSibling){var o=r.nodeType;if(o===1||o===3)break;if(o===8){if(o=r.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return r}function qp(r){r=r.previousSibling;for(var o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(o===0)return r;o--}else u==="/$"&&o++}r=r.previousSibling}return null}var bi=Math.random().toString(36).slice(2),Fn="__reactFiber$"+bi,No="__reactProps$"+bi,Zn="__reactContainer$"+bi,Mu="__reactEvents$"+bi,fb="__reactListeners$"+bi,db="__reactHandles$"+bi;function Ur(r){var o=r[Fn];if(o)return o;for(var u=r.parentNode;u;){if(o=u[Zn]||u[Fn]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(r=qp(r);r!==null;){if(u=r[Fn])return u;r=qp(r)}return o}r=u,u=r.parentNode}return null}function Io(r){return r=r[Fn]||r[Zn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function Ci(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function ra(r){return r[No]||null}var Au=[],Ei=-1;function xr(r){return{current:r}}function rt(r){0>Ei||(r.current=Au[Ei],Au[Ei]=null,Ei--)}function tt(r,o){Ei++,Au[Ei]=r.current,r.current=o}var wr={},_t=xr(wr),Yt=xr(!1),Wr=wr;function Pi(r,o){var u=r.type.contextTypes;if(!u)return wr;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===o)return d.__reactInternalMemoizedMaskedChildContext;var g={},x;for(x in u)g[x]=o[x];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=o,r.__reactInternalMemoizedMaskedChildContext=g),g}function Gt(r){return r=r.childContextTypes,r!=null}function ia(){rt(Yt),rt(_t)}function Xp(r,o,u){if(_t.current!==wr)throw Error(n(168));tt(_t,o),tt(Yt,u)}function Yp(r,o,u){var d=r.stateNode;if(o=o.childContextTypes,typeof d.getChildContext!="function")return u;d=d.getChildContext();for(var g in d)if(!(g in o))throw Error(n(108,pe(r)||"Unknown",g));return R({},u,d)}function oa(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||wr,Wr=_t.current,tt(_t,r),tt(Yt,Yt.current),!0}function Gp(r,o,u){var d=r.stateNode;if(!d)throw Error(n(169));u?(r=Yp(r,o,Wr),d.__reactInternalMemoizedMergedChildContext=r,rt(Yt),rt(_t),tt(_t,r)):rt(Yt),tt(Yt,u)}var Jn=null,sa=!1,Nu=!1;function Qp(r){Jn===null?Jn=[r]:Jn.push(r)}function hb(r){sa=!0,Qp(r)}function kr(){if(!Nu&&Jn!==null){Nu=!0;var r=0,o=Ye;try{var u=Jn;for(Ye=1;r<u.length;r++){var d=u[r];do d=d(!0);while(d!==null)}Jn=null,sa=!1}catch(g){throw Jn!==null&&(Jn=Jn.slice(r+1)),Jh(Jl,kr),g}finally{Ye=o,Nu=!1}}return null}var Ti=[],Ri=0,aa=null,la=0,pn=[],mn=0,Hr=null,er=1,tr="";function Kr(r,o){Ti[Ri++]=la,Ti[Ri++]=aa,aa=r,la=o}function Zp(r,o,u){pn[mn++]=er,pn[mn++]=tr,pn[mn++]=Hr,Hr=r;var d=er;r=tr;var g=32-En(d)-1;d&=~(1<<g),u+=1;var x=32-En(o)+g;if(30<x){var b=g-g%5;x=(d&(1<<b)-1).toString(32),d>>=b,g-=b,er=1<<32-En(o)+g|u<<g|d,tr=x+r}else er=1<<x|u<<g|d,tr=r}function Iu(r){r.return!==null&&(Kr(r,1),Zp(r,1,0))}function ju(r){for(;r===aa;)aa=Ti[--Ri],Ti[Ri]=null,la=Ti[--Ri],Ti[Ri]=null;for(;r===Hr;)Hr=pn[--mn],pn[mn]=null,tr=pn[--mn],pn[mn]=null,er=pn[--mn],pn[mn]=null}var an=null,ln=null,st=!1,Tn=null;function Jp(r,o){var u=xn(5,null,null,0);u.elementType="DELETED",u.stateNode=o,u.return=r,o=r.deletions,o===null?(r.deletions=[u],r.flags|=16):o.push(u)}function em(r,o){switch(r.tag){case 5:var u=r.type;return o=o.nodeType!==1||u.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(r.stateNode=o,an=r,ln=vr(o.firstChild),!0):!1;case 6:return o=r.pendingProps===""||o.nodeType!==3?null:o,o!==null?(r.stateNode=o,an=r,ln=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(u=Hr!==null?{id:er,overflow:tr}:null,r.memoizedState={dehydrated:o,treeContext:u,retryLane:1073741824},u=xn(18,null,null,0),u.stateNode=o,u.return=r,r.child=u,an=r,ln=null,!0):!1;default:return!1}}function Du(r){return(r.mode&1)!==0&&(r.flags&128)===0}function _u(r){if(st){var o=ln;if(o){var u=o;if(!em(r,o)){if(Du(r))throw Error(n(418));o=vr(u.nextSibling);var d=an;o&&em(r,o)?Jp(d,u):(r.flags=r.flags&-4097|2,st=!1,an=r)}}else{if(Du(r))throw Error(n(418));r.flags=r.flags&-4097|2,st=!1,an=r}}}function tm(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;an=r}function ua(r){if(r!==an)return!1;if(!st)return tm(r),st=!0,!1;var o;if((o=r.tag!==3)&&!(o=r.tag!==5)&&(o=r.type,o=o!=="head"&&o!=="body"&&!Pu(r.type,r.memoizedProps)),o&&(o=ln)){if(Du(r))throw nm(),Error(n(418));for(;o;)Jp(r,o),o=vr(o.nextSibling)}if(tm(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,o=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(o===0){ln=vr(r.nextSibling);break e}o--}else u!=="$"&&u!=="$!"&&u!=="$?"||o++}r=r.nextSibling}ln=null}}else ln=an?vr(r.stateNode.nextSibling):null;return!0}function nm(){for(var r=ln;r;)r=vr(r.nextSibling)}function Mi(){ln=an=null,st=!1}function Lu(r){Tn===null?Tn=[r]:Tn.push(r)}var pb=D.ReactCurrentBatchConfig;function jo(r,o,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var d=u.stateNode}if(!d)throw Error(n(147,r));var g=d,x=""+r;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===x?o.ref:(o=function(b){var I=g.refs;b===null?delete I[x]:I[x]=b},o._stringRef=x,o)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function ca(r,o){throw r=Object.prototype.toString.call(o),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":r))}function rm(r){var o=r._init;return o(r._payload)}function im(r){function o($,z){if(r){var H=$.deletions;H===null?($.deletions=[z],$.flags|=16):H.push(z)}}function u($,z){if(!r)return null;for(;z!==null;)o($,z),z=z.sibling;return null}function d($,z){for($=new Map;z!==null;)z.key!==null?$.set(z.key,z):$.set(z.index,z),z=z.sibling;return $}function g($,z){return $=Mr($,z),$.index=0,$.sibling=null,$}function x($,z,H){return $.index=H,r?(H=$.alternate,H!==null?(H=H.index,H<z?($.flags|=2,z):H):($.flags|=2,z)):($.flags|=1048576,z)}function b($){return r&&$.alternate===null&&($.flags|=2),$}function I($,z,H,ce){return z===null||z.tag!==6?(z=Tc(H,$.mode,ce),z.return=$,z):(z=g(z,H),z.return=$,z)}function _($,z,H,ce){var Re=H.type;return Re===Y?re($,z,H.props.children,ce,H.key):z!==null&&(z.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===ge&&rm(Re)===z.type)?(ce=g(z,H.props),ce.ref=jo($,z,H),ce.return=$,ce):(ce=Da(H.type,H.key,H.props,null,$.mode,ce),ce.ref=jo($,z,H),ce.return=$,ce)}function K($,z,H,ce){return z===null||z.tag!==4||z.stateNode.containerInfo!==H.containerInfo||z.stateNode.implementation!==H.implementation?(z=Rc(H,$.mode,ce),z.return=$,z):(z=g(z,H.children||[]),z.return=$,z)}function re($,z,H,ce,Re){return z===null||z.tag!==7?(z=ei(H,$.mode,ce,Re),z.return=$,z):(z=g(z,H),z.return=$,z)}function ie($,z,H){if(typeof z=="string"&&z!==""||typeof z=="number")return z=Tc(""+z,$.mode,H),z.return=$,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case U:return H=Da(z.type,z.key,z.props,null,$.mode,H),H.ref=jo($,null,z),H.return=$,H;case j:return z=Rc(z,$.mode,H),z.return=$,z;case ge:var ce=z._init;return ie($,ce(z._payload),H)}if(Mt(z)||de(z))return z=ei(z,$.mode,H,null),z.return=$,z;ca($,z)}return null}function ne($,z,H,ce){var Re=z!==null?z.key:null;if(typeof H=="string"&&H!==""||typeof H=="number")return Re!==null?null:I($,z,""+H,ce);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case U:return H.key===Re?_($,z,H,ce):null;case j:return H.key===Re?K($,z,H,ce):null;case ge:return Re=H._init,ne($,z,Re(H._payload),ce)}if(Mt(H)||de(H))return Re!==null?null:re($,z,H,ce,null);ca($,H)}return null}function xe($,z,H,ce,Re){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return $=$.get(H)||null,I(z,$,""+ce,Re);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case U:return $=$.get(ce.key===null?H:ce.key)||null,_(z,$,ce,Re);case j:return $=$.get(ce.key===null?H:ce.key)||null,K(z,$,ce,Re);case ge:var Ne=ce._init;return xe($,z,H,Ne(ce._payload),Re)}if(Mt(ce)||de(ce))return $=$.get(H)||null,re(z,$,ce,Re,null);ca(z,ce)}return null}function Se($,z,H,ce){for(var Re=null,Ne=null,Ie=z,_e=z=0,Pt=null;Ie!==null&&_e<H.length;_e++){Ie.index>_e?(Pt=Ie,Ie=null):Pt=Ie.sibling;var Ke=ne($,Ie,H[_e],ce);if(Ke===null){Ie===null&&(Ie=Pt);break}r&&Ie&&Ke.alternate===null&&o($,Ie),z=x(Ke,z,_e),Ne===null?Re=Ke:Ne.sibling=Ke,Ne=Ke,Ie=Pt}if(_e===H.length)return u($,Ie),st&&Kr($,_e),Re;if(Ie===null){for(;_e<H.length;_e++)Ie=ie($,H[_e],ce),Ie!==null&&(z=x(Ie,z,_e),Ne===null?Re=Ie:Ne.sibling=Ie,Ne=Ie);return st&&Kr($,_e),Re}for(Ie=d($,Ie);_e<H.length;_e++)Pt=xe(Ie,$,_e,H[_e],ce),Pt!==null&&(r&&Pt.alternate!==null&&Ie.delete(Pt.key===null?_e:Pt.key),z=x(Pt,z,_e),Ne===null?Re=Pt:Ne.sibling=Pt,Ne=Pt);return r&&Ie.forEach(function(Ar){return o($,Ar)}),st&&Kr($,_e),Re}function Ee($,z,H,ce){var Re=de(H);if(typeof Re!="function")throw Error(n(150));if(H=Re.call(H),H==null)throw Error(n(151));for(var Ne=Re=null,Ie=z,_e=z=0,Pt=null,Ke=H.next();Ie!==null&&!Ke.done;_e++,Ke=H.next()){Ie.index>_e?(Pt=Ie,Ie=null):Pt=Ie.sibling;var Ar=ne($,Ie,Ke.value,ce);if(Ar===null){Ie===null&&(Ie=Pt);break}r&&Ie&&Ar.alternate===null&&o($,Ie),z=x(Ar,z,_e),Ne===null?Re=Ar:Ne.sibling=Ar,Ne=Ar,Ie=Pt}if(Ke.done)return u($,Ie),st&&Kr($,_e),Re;if(Ie===null){for(;!Ke.done;_e++,Ke=H.next())Ke=ie($,Ke.value,ce),Ke!==null&&(z=x(Ke,z,_e),Ne===null?Re=Ke:Ne.sibling=Ke,Ne=Ke);return st&&Kr($,_e),Re}for(Ie=d($,Ie);!Ke.done;_e++,Ke=H.next())Ke=xe(Ie,$,_e,Ke.value,ce),Ke!==null&&(r&&Ke.alternate!==null&&Ie.delete(Ke.key===null?_e:Ke.key),z=x(Ke,z,_e),Ne===null?Re=Ke:Ne.sibling=Ke,Ne=Ke);return r&&Ie.forEach(function(qb){return o($,qb)}),st&&Kr($,_e),Re}function pt($,z,H,ce){if(typeof H=="object"&&H!==null&&H.type===Y&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case U:e:{for(var Re=H.key,Ne=z;Ne!==null;){if(Ne.key===Re){if(Re=H.type,Re===Y){if(Ne.tag===7){u($,Ne.sibling),z=g(Ne,H.props.children),z.return=$,$=z;break e}}else if(Ne.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===ge&&rm(Re)===Ne.type){u($,Ne.sibling),z=g(Ne,H.props),z.ref=jo($,Ne,H),z.return=$,$=z;break e}u($,Ne);break}else o($,Ne);Ne=Ne.sibling}H.type===Y?(z=ei(H.props.children,$.mode,ce,H.key),z.return=$,$=z):(ce=Da(H.type,H.key,H.props,null,$.mode,ce),ce.ref=jo($,z,H),ce.return=$,$=ce)}return b($);case j:e:{for(Ne=H.key;z!==null;){if(z.key===Ne)if(z.tag===4&&z.stateNode.containerInfo===H.containerInfo&&z.stateNode.implementation===H.implementation){u($,z.sibling),z=g(z,H.children||[]),z.return=$,$=z;break e}else{u($,z);break}else o($,z);z=z.sibling}z=Rc(H,$.mode,ce),z.return=$,$=z}return b($);case ge:return Ne=H._init,pt($,z,Ne(H._payload),ce)}if(Mt(H))return Se($,z,H,ce);if(de(H))return Ee($,z,H,ce);ca($,H)}return typeof H=="string"&&H!==""||typeof H=="number"?(H=""+H,z!==null&&z.tag===6?(u($,z.sibling),z=g(z,H),z.return=$,$=z):(u($,z),z=Tc(H,$.mode,ce),z.return=$,$=z),b($)):u($,z)}return pt}var Ai=im(!0),om=im(!1),fa=xr(null),da=null,Ni=null,Ou=null;function Fu(){Ou=Ni=da=null}function zu(r){var o=fa.current;rt(fa),r._currentValue=o}function Vu(r,o,u){for(;r!==null;){var d=r.alternate;if((r.childLanes&o)!==o?(r.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),r===u)break;r=r.return}}function Ii(r,o){da=r,Ou=Ni=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&o)!==0&&(Qt=!0),r.firstContext=null)}function gn(r){var o=r._currentValue;if(Ou!==r)if(r={context:r,memoizedValue:o,next:null},Ni===null){if(da===null)throw Error(n(308));Ni=r,da.dependencies={lanes:0,firstContext:r}}else Ni=Ni.next=r;return o}var qr=null;function Bu(r){qr===null?qr=[r]:qr.push(r)}function sm(r,o,u,d){var g=o.interleaved;return g===null?(u.next=u,Bu(o)):(u.next=g.next,g.next=u),o.interleaved=u,nr(r,d)}function nr(r,o){r.lanes|=o;var u=r.alternate;for(u!==null&&(u.lanes|=o),u=r,r=r.return;r!==null;)r.childLanes|=o,u=r.alternate,u!==null&&(u.childLanes|=o),u=r,r=r.return;return u.tag===3?u.stateNode:null}var Sr=!1;function $u(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function am(r,o){r=r.updateQueue,o.updateQueue===r&&(o.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function rr(r,o){return{eventTime:r,lane:o,tag:0,payload:null,callback:null,next:null}}function br(r,o,u){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(He&2)!==0){var g=d.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),d.pending=o,nr(r,u)}return g=d.interleaved,g===null?(o.next=o,Bu(d)):(o.next=g.next,g.next=o),d.interleaved=o,nr(r,u)}function ha(r,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194240)!==0)){var d=o.lanes;d&=r.pendingLanes,u|=d,o.lanes=u,nu(r,u)}}function lm(r,o){var u=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,x=null;if(u=u.firstBaseUpdate,u!==null){do{var b={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};x===null?g=x=b:x=x.next=b,u=u.next}while(u!==null);x===null?g=x=o:x=x.next=o}else g=x=o;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:x,shared:d.shared,effects:d.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=o:r.next=o,u.lastBaseUpdate=o}function pa(r,o,u,d){var g=r.updateQueue;Sr=!1;var x=g.firstBaseUpdate,b=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var _=I,K=_.next;_.next=null,b===null?x=K:b.next=K,b=_;var re=r.alternate;re!==null&&(re=re.updateQueue,I=re.lastBaseUpdate,I!==b&&(I===null?re.firstBaseUpdate=K:I.next=K,re.lastBaseUpdate=_))}if(x!==null){var ie=g.baseState;b=0,re=K=_=null,I=x;do{var ne=I.lane,xe=I.eventTime;if((d&ne)===ne){re!==null&&(re=re.next={eventTime:xe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Se=r,Ee=I;switch(ne=o,xe=u,Ee.tag){case 1:if(Se=Ee.payload,typeof Se=="function"){ie=Se.call(xe,ie,ne);break e}ie=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ee.payload,ne=typeof Se=="function"?Se.call(xe,ie,ne):Se,ne==null)break e;ie=R({},ie,ne);break e;case 2:Sr=!0}}I.callback!==null&&I.lane!==0&&(r.flags|=64,ne=g.effects,ne===null?g.effects=[I]:ne.push(I))}else xe={eventTime:xe,lane:ne,tag:I.tag,payload:I.payload,callback:I.callback,next:null},re===null?(K=re=xe,_=ie):re=re.next=xe,b|=ne;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;ne=I,I=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);if(re===null&&(_=ie),g.baseState=_,g.firstBaseUpdate=K,g.lastBaseUpdate=re,o=g.shared.interleaved,o!==null){g=o;do b|=g.lane,g=g.next;while(g!==o)}else x===null&&(g.shared.lanes=0);Gr|=b,r.lanes=b,r.memoizedState=ie}}function um(r,o,u){if(r=o.effects,o.effects=null,r!==null)for(o=0;o<r.length;o++){var d=r[o],g=d.callback;if(g!==null){if(d.callback=null,d=u,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var Do={},zn=xr(Do),_o=xr(Do),Lo=xr(Do);function Xr(r){if(r===Do)throw Error(n(174));return r}function Uu(r,o){switch(tt(Lo,o),tt(_o,r),tt(zn,Do),r=o.nodeType,r){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:oe(null,"");break;default:r=r===8?o.parentNode:o,o=r.namespaceURI||null,r=r.tagName,o=oe(o,r)}rt(zn),tt(zn,o)}function ji(){rt(zn),rt(_o),rt(Lo)}function cm(r){Xr(Lo.current);var o=Xr(zn.current),u=oe(o,r.type);o!==u&&(tt(_o,r),tt(zn,u))}function Wu(r){_o.current===r&&(rt(zn),rt(_o))}var at=xr(0);function ma(r){for(var o=r;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Hu=[];function Ku(){for(var r=0;r<Hu.length;r++)Hu[r]._workInProgressVersionPrimary=null;Hu.length=0}var ga=D.ReactCurrentDispatcher,qu=D.ReactCurrentBatchConfig,Yr=0,lt=null,wt=null,Ct=null,ya=!1,Oo=!1,Fo=0,mb=0;function Lt(){throw Error(n(321))}function Xu(r,o){if(o===null)return!1;for(var u=0;u<o.length&&u<r.length;u++)if(!Pn(r[u],o[u]))return!1;return!0}function Yu(r,o,u,d,g,x){if(Yr=x,lt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ga.current=r===null||r.memoizedState===null?xb:wb,r=u(d,g),Oo){x=0;do{if(Oo=!1,Fo=0,25<=x)throw Error(n(301));x+=1,Ct=wt=null,o.updateQueue=null,ga.current=kb,r=u(d,g)}while(Oo)}if(ga.current=wa,o=wt!==null&&wt.next!==null,Yr=0,Ct=wt=lt=null,ya=!1,o)throw Error(n(300));return r}function Gu(){var r=Fo!==0;return Fo=0,r}function Vn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?lt.memoizedState=Ct=r:Ct=Ct.next=r,Ct}function yn(){if(wt===null){var r=lt.alternate;r=r!==null?r.memoizedState:null}else r=wt.next;var o=Ct===null?lt.memoizedState:Ct.next;if(o!==null)Ct=o,wt=r;else{if(r===null)throw Error(n(310));wt=r,r={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Ct===null?lt.memoizedState=Ct=r:Ct=Ct.next=r}return Ct}function zo(r,o){return typeof o=="function"?o(r):o}function Qu(r){var o=yn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var d=wt,g=d.baseQueue,x=u.pending;if(x!==null){if(g!==null){var b=g.next;g.next=x.next,x.next=b}d.baseQueue=g=x,u.pending=null}if(g!==null){x=g.next,d=d.baseState;var I=b=null,_=null,K=x;do{var re=K.lane;if((Yr&re)===re)_!==null&&(_=_.next={lane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),d=K.hasEagerState?K.eagerState:r(d,K.action);else{var ie={lane:re,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};_===null?(I=_=ie,b=d):_=_.next=ie,lt.lanes|=re,Gr|=re}K=K.next}while(K!==null&&K!==x);_===null?b=d:_.next=I,Pn(d,o.memoizedState)||(Qt=!0),o.memoizedState=d,o.baseState=b,o.baseQueue=_,u.lastRenderedState=d}if(r=u.interleaved,r!==null){g=r;do x=g.lane,lt.lanes|=x,Gr|=x,g=g.next;while(g!==r)}else g===null&&(u.lanes=0);return[o.memoizedState,u.dispatch]}function Zu(r){var o=yn(),u=o.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var d=u.dispatch,g=u.pending,x=o.memoizedState;if(g!==null){u.pending=null;var b=g=g.next;do x=r(x,b.action),b=b.next;while(b!==g);Pn(x,o.memoizedState)||(Qt=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),u.lastRenderedState=x}return[x,d]}function fm(){}function dm(r,o){var u=lt,d=yn(),g=o(),x=!Pn(d.memoizedState,g);if(x&&(d.memoizedState=g,Qt=!0),d=d.queue,Ju(mm.bind(null,u,d,r),[r]),d.getSnapshot!==o||x||Ct!==null&&Ct.memoizedState.tag&1){if(u.flags|=2048,Vo(9,pm.bind(null,u,d,g,o),void 0,null),Et===null)throw Error(n(349));(Yr&30)!==0||hm(u,o,g)}return g}function hm(r,o,u){r.flags|=16384,r={getSnapshot:o,value:u},o=lt.updateQueue,o===null?(o={lastEffect:null,stores:null},lt.updateQueue=o,o.stores=[r]):(u=o.stores,u===null?o.stores=[r]:u.push(r))}function pm(r,o,u,d){o.value=u,o.getSnapshot=d,gm(o)&&ym(r)}function mm(r,o,u){return u(function(){gm(o)&&ym(r)})}function gm(r){var o=r.getSnapshot;r=r.value;try{var u=o();return!Pn(r,u)}catch{return!0}}function ym(r){var o=nr(r,1);o!==null&&Nn(o,r,1,-1)}function vm(r){var o=Vn();return typeof r=="function"&&(r=r()),o.memoizedState=o.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:r},o.queue=r,r=r.dispatch=vb.bind(null,lt,r),[o.memoizedState,r]}function Vo(r,o,u,d){return r={tag:r,create:o,destroy:u,deps:d,next:null},o=lt.updateQueue,o===null?(o={lastEffect:null,stores:null},lt.updateQueue=o,o.lastEffect=r.next=r):(u=o.lastEffect,u===null?o.lastEffect=r.next=r:(d=u.next,u.next=r,r.next=d,o.lastEffect=r)),r}function xm(){return yn().memoizedState}function va(r,o,u,d){var g=Vn();lt.flags|=r,g.memoizedState=Vo(1|o,u,void 0,d===void 0?null:d)}function xa(r,o,u,d){var g=yn();d=d===void 0?null:d;var x=void 0;if(wt!==null){var b=wt.memoizedState;if(x=b.destroy,d!==null&&Xu(d,b.deps)){g.memoizedState=Vo(o,u,x,d);return}}lt.flags|=r,g.memoizedState=Vo(1|o,u,x,d)}function wm(r,o){return va(8390656,8,r,o)}function Ju(r,o){return xa(2048,8,r,o)}function km(r,o){return xa(4,2,r,o)}function Sm(r,o){return xa(4,4,r,o)}function bm(r,o){if(typeof o=="function")return r=r(),o(r),function(){o(null)};if(o!=null)return r=r(),o.current=r,function(){o.current=null}}function Cm(r,o,u){return u=u!=null?u.concat([r]):null,xa(4,4,bm.bind(null,o,r),u)}function ec(){}function Em(r,o){var u=yn();o=o===void 0?null:o;var d=u.memoizedState;return d!==null&&o!==null&&Xu(o,d[1])?d[0]:(u.memoizedState=[r,o],r)}function Pm(r,o){var u=yn();o=o===void 0?null:o;var d=u.memoizedState;return d!==null&&o!==null&&Xu(o,d[1])?d[0]:(r=r(),u.memoizedState=[r,o],r)}function Tm(r,o,u){return(Yr&21)===0?(r.baseState&&(r.baseState=!1,Qt=!0),r.memoizedState=u):(Pn(u,o)||(u=rp(),lt.lanes|=u,Gr|=u,r.baseState=!0),o)}function gb(r,o){var u=Ye;Ye=u!==0&&4>u?u:4,r(!0);var d=qu.transition;qu.transition={};try{r(!1),o()}finally{Ye=u,qu.transition=d}}function Rm(){return yn().memoizedState}function yb(r,o,u){var d=Tr(r);if(u={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null},Mm(r))Am(o,u);else if(u=sm(r,o,u,d),u!==null){var g=Ut();Nn(u,r,d,g),Nm(u,o,d)}}function vb(r,o,u){var d=Tr(r),g={lane:d,action:u,hasEagerState:!1,eagerState:null,next:null};if(Mm(r))Am(o,g);else{var x=r.alternate;if(r.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var b=o.lastRenderedState,I=x(b,u);if(g.hasEagerState=!0,g.eagerState=I,Pn(I,b)){var _=o.interleaved;_===null?(g.next=g,Bu(o)):(g.next=_.next,_.next=g),o.interleaved=g;return}}catch{}finally{}u=sm(r,o,g,d),u!==null&&(g=Ut(),Nn(u,r,d,g),Nm(u,o,d))}}function Mm(r){var o=r.alternate;return r===lt||o!==null&&o===lt}function Am(r,o){Oo=ya=!0;var u=r.pending;u===null?o.next=o:(o.next=u.next,u.next=o),r.pending=o}function Nm(r,o,u){if((u&4194240)!==0){var d=o.lanes;d&=r.pendingLanes,u|=d,o.lanes=u,nu(r,u)}}var wa={readContext:gn,useCallback:Lt,useContext:Lt,useEffect:Lt,useImperativeHandle:Lt,useInsertionEffect:Lt,useLayoutEffect:Lt,useMemo:Lt,useReducer:Lt,useRef:Lt,useState:Lt,useDebugValue:Lt,useDeferredValue:Lt,useTransition:Lt,useMutableSource:Lt,useSyncExternalStore:Lt,useId:Lt,unstable_isNewReconciler:!1},xb={readContext:gn,useCallback:function(r,o){return Vn().memoizedState=[r,o===void 0?null:o],r},useContext:gn,useEffect:wm,useImperativeHandle:function(r,o,u){return u=u!=null?u.concat([r]):null,va(4194308,4,bm.bind(null,o,r),u)},useLayoutEffect:function(r,o){return va(4194308,4,r,o)},useInsertionEffect:function(r,o){return va(4,2,r,o)},useMemo:function(r,o){var u=Vn();return o=o===void 0?null:o,r=r(),u.memoizedState=[r,o],r},useReducer:function(r,o,u){var d=Vn();return o=u!==void 0?u(o):o,d.memoizedState=d.baseState=o,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:o},d.queue=r,r=r.dispatch=yb.bind(null,lt,r),[d.memoizedState,r]},useRef:function(r){var o=Vn();return r={current:r},o.memoizedState=r},useState:vm,useDebugValue:ec,useDeferredValue:function(r){return Vn().memoizedState=r},useTransition:function(){var r=vm(!1),o=r[0];return r=gb.bind(null,r[1]),Vn().memoizedState=r,[o,r]},useMutableSource:function(){},useSyncExternalStore:function(r,o,u){var d=lt,g=Vn();if(st){if(u===void 0)throw Error(n(407));u=u()}else{if(u=o(),Et===null)throw Error(n(349));(Yr&30)!==0||hm(d,o,u)}g.memoizedState=u;var x={value:u,getSnapshot:o};return g.queue=x,wm(mm.bind(null,d,x,r),[r]),d.flags|=2048,Vo(9,pm.bind(null,d,x,u,o),void 0,null),u},useId:function(){var r=Vn(),o=Et.identifierPrefix;if(st){var u=tr,d=er;u=(d&~(1<<32-En(d)-1)).toString(32)+u,o=":"+o+"R"+u,u=Fo++,0<u&&(o+="H"+u.toString(32)),o+=":"}else u=mb++,o=":"+o+"r"+u.toString(32)+":";return r.memoizedState=o},unstable_isNewReconciler:!1},wb={readContext:gn,useCallback:Em,useContext:gn,useEffect:Ju,useImperativeHandle:Cm,useInsertionEffect:km,useLayoutEffect:Sm,useMemo:Pm,useReducer:Qu,useRef:xm,useState:function(){return Qu(zo)},useDebugValue:ec,useDeferredValue:function(r){var o=yn();return Tm(o,wt.memoizedState,r)},useTransition:function(){var r=Qu(zo)[0],o=yn().memoizedState;return[r,o]},useMutableSource:fm,useSyncExternalStore:dm,useId:Rm,unstable_isNewReconciler:!1},kb={readContext:gn,useCallback:Em,useContext:gn,useEffect:Ju,useImperativeHandle:Cm,useInsertionEffect:km,useLayoutEffect:Sm,useMemo:Pm,useReducer:Zu,useRef:xm,useState:function(){return Zu(zo)},useDebugValue:ec,useDeferredValue:function(r){var o=yn();return wt===null?o.memoizedState=r:Tm(o,wt.memoizedState,r)},useTransition:function(){var r=Zu(zo)[0],o=yn().memoizedState;return[r,o]},useMutableSource:fm,useSyncExternalStore:dm,useId:Rm,unstable_isNewReconciler:!1};function Rn(r,o){if(r&&r.defaultProps){o=R({},o),r=r.defaultProps;for(var u in r)o[u]===void 0&&(o[u]=r[u]);return o}return o}function tc(r,o,u,d){o=r.memoizedState,u=u(d,o),u=u==null?o:R({},o,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var ka={isMounted:function(r){return(r=r._reactInternals)?$r(r)===r:!1},enqueueSetState:function(r,o,u){r=r._reactInternals;var d=Ut(),g=Tr(r),x=rr(d,g);x.payload=o,u!=null&&(x.callback=u),o=br(r,x,g),o!==null&&(Nn(o,r,g,d),ha(o,r,g))},enqueueReplaceState:function(r,o,u){r=r._reactInternals;var d=Ut(),g=Tr(r),x=rr(d,g);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=br(r,x,g),o!==null&&(Nn(o,r,g,d),ha(o,r,g))},enqueueForceUpdate:function(r,o){r=r._reactInternals;var u=Ut(),d=Tr(r),g=rr(u,d);g.tag=2,o!=null&&(g.callback=o),o=br(r,g,d),o!==null&&(Nn(o,r,d,u),ha(o,r,d))}};function Im(r,o,u,d,g,x,b){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,x,b):o.prototype&&o.prototype.isPureReactComponent?!Po(u,d)||!Po(g,x):!0}function jm(r,o,u){var d=!1,g=wr,x=o.contextType;return typeof x=="object"&&x!==null?x=gn(x):(g=Gt(o)?Wr:_t.current,d=o.contextTypes,x=(d=d!=null)?Pi(r,g):wr),o=new o(u,x),r.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ka,r.stateNode=o,o._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=x),o}function Dm(r,o,u,d){r=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,d),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,d),o.state!==r&&ka.enqueueReplaceState(o,o.state,null)}function nc(r,o,u,d){var g=r.stateNode;g.props=u,g.state=r.memoizedState,g.refs={},$u(r);var x=o.contextType;typeof x=="object"&&x!==null?g.context=gn(x):(x=Gt(o)?Wr:_t.current,g.context=Pi(r,x)),g.state=r.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(tc(r,o,x,u),g.state=r.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&ka.enqueueReplaceState(g,g.state,null),pa(r,u,g,d),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function Di(r,o){try{var u="",d=o;do u+=ye(d),d=d.return;while(d);var g=u}catch(x){g=`
|
|
39
|
+
Error generating stack: `+x.message+`
|
|
40
|
+
`+x.stack}return{value:r,source:o,stack:g,digest:null}}function rc(r,o,u){return{value:r,source:null,stack:u??null,digest:o??null}}function ic(r,o){try{console.error(o.value)}catch(u){setTimeout(function(){throw u})}}var Sb=typeof WeakMap=="function"?WeakMap:Map;function _m(r,o,u){u=rr(-1,u),u.tag=3,u.payload={element:null};var d=o.value;return u.callback=function(){Ra||(Ra=!0,xc=d),ic(r,o)},u}function Lm(r,o,u){u=rr(-1,u),u.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var g=o.value;u.payload=function(){return d(g)},u.callback=function(){ic(r,o)}}var x=r.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(u.callback=function(){ic(r,o),typeof d!="function"&&(Er===null?Er=new Set([this]):Er.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})}),u}function Om(r,o,u){var d=r.pingCache;if(d===null){d=r.pingCache=new Sb;var g=new Set;d.set(o,g)}else g=d.get(o),g===void 0&&(g=new Set,d.set(o,g));g.has(u)||(g.add(u),r=Lb.bind(null,r,o,u),o.then(r,r))}function Fm(r){do{var o;if((o=r.tag===13)&&(o=r.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return r;r=r.return}while(r!==null);return null}function zm(r,o,u,d,g){return(r.mode&1)===0?(r===o?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(o=rr(-1,1),o.tag=2,br(u,o,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var bb=D.ReactCurrentOwner,Qt=!1;function $t(r,o,u,d){o.child=r===null?om(o,null,u,d):Ai(o,r.child,u,d)}function Vm(r,o,u,d,g){u=u.render;var x=o.ref;return Ii(o,g),d=Yu(r,o,u,d,x,g),u=Gu(),r!==null&&!Qt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,ir(r,o,g)):(st&&u&&Iu(o),o.flags|=1,$t(r,o,d,g),o.child)}function Bm(r,o,u,d,g){if(r===null){var x=u.type;return typeof x=="function"&&!Pc(x)&&x.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(o.tag=15,o.type=x,$m(r,o,x,d,g)):(r=Da(u.type,null,d,o,o.mode,g),r.ref=o.ref,r.return=o,o.child=r)}if(x=r.child,(r.lanes&g)===0){var b=x.memoizedProps;if(u=u.compare,u=u!==null?u:Po,u(b,d)&&r.ref===o.ref)return ir(r,o,g)}return o.flags|=1,r=Mr(x,d),r.ref=o.ref,r.return=o,o.child=r}function $m(r,o,u,d,g){if(r!==null){var x=r.memoizedProps;if(Po(x,d)&&r.ref===o.ref)if(Qt=!1,o.pendingProps=d=x,(r.lanes&g)!==0)(r.flags&131072)!==0&&(Qt=!0);else return o.lanes=r.lanes,ir(r,o,g)}return oc(r,o,u,d,g)}function Um(r,o,u){var d=o.pendingProps,g=d.children,x=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(Li,un),un|=u;else{if((u&1073741824)===0)return r=x!==null?x.baseLanes|u:u,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:r,cachePool:null,transitions:null},o.updateQueue=null,tt(Li,un),un|=r,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=x!==null?x.baseLanes:u,tt(Li,un),un|=d}else x!==null?(d=x.baseLanes|u,o.memoizedState=null):d=u,tt(Li,un),un|=d;return $t(r,o,g,u),o.child}function Wm(r,o){var u=o.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(o.flags|=512,o.flags|=2097152)}function oc(r,o,u,d,g){var x=Gt(u)?Wr:_t.current;return x=Pi(o,x),Ii(o,g),u=Yu(r,o,u,d,x,g),d=Gu(),r!==null&&!Qt?(o.updateQueue=r.updateQueue,o.flags&=-2053,r.lanes&=~g,ir(r,o,g)):(st&&d&&Iu(o),o.flags|=1,$t(r,o,u,g),o.child)}function Hm(r,o,u,d,g){if(Gt(u)){var x=!0;oa(o)}else x=!1;if(Ii(o,g),o.stateNode===null)ba(r,o),jm(o,u,d),nc(o,u,d,g),d=!0;else if(r===null){var b=o.stateNode,I=o.memoizedProps;b.props=I;var _=b.context,K=u.contextType;typeof K=="object"&&K!==null?K=gn(K):(K=Gt(u)?Wr:_t.current,K=Pi(o,K));var re=u.getDerivedStateFromProps,ie=typeof re=="function"||typeof b.getSnapshotBeforeUpdate=="function";ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(I!==d||_!==K)&&Dm(o,b,d,K),Sr=!1;var ne=o.memoizedState;b.state=ne,pa(o,d,b,g),_=o.memoizedState,I!==d||ne!==_||Yt.current||Sr?(typeof re=="function"&&(tc(o,u,re,d),_=o.memoizedState),(I=Sr||Im(o,u,I,d,ne,_,K))?(ie||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=_),b.props=d,b.state=_,b.context=K,d=I):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{b=o.stateNode,am(r,o),I=o.memoizedProps,K=o.type===o.elementType?I:Rn(o.type,I),b.props=K,ie=o.pendingProps,ne=b.context,_=u.contextType,typeof _=="object"&&_!==null?_=gn(_):(_=Gt(u)?Wr:_t.current,_=Pi(o,_));var xe=u.getDerivedStateFromProps;(re=typeof xe=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(I!==ie||ne!==_)&&Dm(o,b,d,_),Sr=!1,ne=o.memoizedState,b.state=ne,pa(o,d,b,g);var Se=o.memoizedState;I!==ie||ne!==Se||Yt.current||Sr?(typeof xe=="function"&&(tc(o,u,xe,d),Se=o.memoizedState),(K=Sr||Im(o,u,K,d,ne,Se,_)||!1)?(re||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,Se,_),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,Se,_)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||I===r.memoizedProps&&ne===r.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&ne===r.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=Se),b.props=d,b.state=Se,b.context=_,d=K):(typeof b.componentDidUpdate!="function"||I===r.memoizedProps&&ne===r.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&ne===r.memoizedState||(o.flags|=1024),d=!1)}return sc(r,o,u,d,x,g)}function sc(r,o,u,d,g,x){Wm(r,o);var b=(o.flags&128)!==0;if(!d&&!b)return g&&Gp(o,u,!1),ir(r,o,x);d=o.stateNode,bb.current=o;var I=b&&typeof u.getDerivedStateFromError!="function"?null:d.render();return o.flags|=1,r!==null&&b?(o.child=Ai(o,r.child,null,x),o.child=Ai(o,null,I,x)):$t(r,o,I,x),o.memoizedState=d.state,g&&Gp(o,u,!0),o.child}function Km(r){var o=r.stateNode;o.pendingContext?Xp(r,o.pendingContext,o.pendingContext!==o.context):o.context&&Xp(r,o.context,!1),Uu(r,o.containerInfo)}function qm(r,o,u,d,g){return Mi(),Lu(g),o.flags|=256,$t(r,o,u,d),o.child}var ac={dehydrated:null,treeContext:null,retryLane:0};function lc(r){return{baseLanes:r,cachePool:null,transitions:null}}function Xm(r,o,u){var d=o.pendingProps,g=at.current,x=!1,b=(o.flags&128)!==0,I;if((I=b)||(I=r!==null&&r.memoizedState===null?!1:(g&2)!==0),I?(x=!0,o.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),tt(at,g&1),r===null)return _u(o),r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((o.mode&1)===0?o.lanes=1:r.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(b=d.children,r=d.fallback,x?(d=o.mode,x=o.child,b={mode:"hidden",children:b},(d&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=b):x=_a(b,d,0,null),r=ei(r,d,u,null),x.return=o,r.return=o,x.sibling=r,o.child=x,o.child.memoizedState=lc(u),o.memoizedState=ac,r):uc(o,b));if(g=r.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return Cb(r,o,b,d,I,g,u);if(x){x=d.fallback,b=o.mode,g=r.child,I=g.sibling;var _={mode:"hidden",children:d.children};return(b&1)===0&&o.child!==g?(d=o.child,d.childLanes=0,d.pendingProps=_,o.deletions=null):(d=Mr(g,_),d.subtreeFlags=g.subtreeFlags&14680064),I!==null?x=Mr(I,x):(x=ei(x,b,u,null),x.flags|=2),x.return=o,d.return=o,d.sibling=x,o.child=d,d=x,x=o.child,b=r.child.memoizedState,b=b===null?lc(u):{baseLanes:b.baseLanes|u,cachePool:null,transitions:b.transitions},x.memoizedState=b,x.childLanes=r.childLanes&~u,o.memoizedState=ac,d}return x=r.child,r=x.sibling,d=Mr(x,{mode:"visible",children:d.children}),(o.mode&1)===0&&(d.lanes=u),d.return=o,d.sibling=null,r!==null&&(u=o.deletions,u===null?(o.deletions=[r],o.flags|=16):u.push(r)),o.child=d,o.memoizedState=null,d}function uc(r,o){return o=_a({mode:"visible",children:o},r.mode,0,null),o.return=r,r.child=o}function Sa(r,o,u,d){return d!==null&&Lu(d),Ai(o,r.child,null,u),r=uc(o,o.pendingProps.children),r.flags|=2,o.memoizedState=null,r}function Cb(r,o,u,d,g,x,b){if(u)return o.flags&256?(o.flags&=-257,d=rc(Error(n(422))),Sa(r,o,b,d)):o.memoizedState!==null?(o.child=r.child,o.flags|=128,null):(x=d.fallback,g=o.mode,d=_a({mode:"visible",children:d.children},g,0,null),x=ei(x,g,b,null),x.flags|=2,d.return=o,x.return=o,d.sibling=x,o.child=d,(o.mode&1)!==0&&Ai(o,r.child,null,b),o.child.memoizedState=lc(b),o.memoizedState=ac,x);if((o.mode&1)===0)return Sa(r,o,b,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var I=d.dgst;return d=I,x=Error(n(419)),d=rc(x,d,void 0),Sa(r,o,b,d)}if(I=(b&r.childLanes)!==0,Qt||I){if(d=Et,d!==null){switch(b&-b){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|b))!==0?0:g,g!==0&&g!==x.retryLane&&(x.retryLane=g,nr(r,g),Nn(d,r,g,-1))}return Ec(),d=rc(Error(n(421))),Sa(r,o,b,d)}return g.data==="$?"?(o.flags|=128,o.child=r.child,o=Ob.bind(null,r),g._reactRetry=o,null):(r=x.treeContext,ln=vr(g.nextSibling),an=o,st=!0,Tn=null,r!==null&&(pn[mn++]=er,pn[mn++]=tr,pn[mn++]=Hr,er=r.id,tr=r.overflow,Hr=o),o=uc(o,d.children),o.flags|=4096,o)}function Ym(r,o,u){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o),Vu(r.return,o,u)}function cc(r,o,u,d,g){var x=r.memoizedState;x===null?r.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=d,x.tail=u,x.tailMode=g)}function Gm(r,o,u){var d=o.pendingProps,g=d.revealOrder,x=d.tail;if($t(r,o,d.children,u),d=at.current,(d&2)!==0)d=d&1|2,o.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=o.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Ym(r,u,o);else if(r.tag===19)Ym(r,u,o);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===o)break e;for(;r.sibling===null;){if(r.return===null||r.return===o)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(tt(at,d),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(u=o.child,g=null;u!==null;)r=u.alternate,r!==null&&ma(r)===null&&(g=u),u=u.sibling;u=g,u===null?(g=o.child,o.child=null):(g=u.sibling,u.sibling=null),cc(o,!1,g,u,x);break;case"backwards":for(u=null,g=o.child,o.child=null;g!==null;){if(r=g.alternate,r!==null&&ma(r)===null){o.child=g;break}r=g.sibling,g.sibling=u,u=g,g=r}cc(o,!0,u,null,x);break;case"together":cc(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ba(r,o){(o.mode&1)===0&&r!==null&&(r.alternate=null,o.alternate=null,o.flags|=2)}function ir(r,o,u){if(r!==null&&(o.dependencies=r.dependencies),Gr|=o.lanes,(u&o.childLanes)===0)return null;if(r!==null&&o.child!==r.child)throw Error(n(153));if(o.child!==null){for(r=o.child,u=Mr(r,r.pendingProps),o.child=u,u.return=o;r.sibling!==null;)r=r.sibling,u=u.sibling=Mr(r,r.pendingProps),u.return=o;u.sibling=null}return o.child}function Eb(r,o,u){switch(o.tag){case 3:Km(o),Mi();break;case 5:cm(o);break;case 1:Gt(o.type)&&oa(o);break;case 4:Uu(o,o.stateNode.containerInfo);break;case 10:var d=o.type._context,g=o.memoizedProps.value;tt(fa,d._currentValue),d._currentValue=g;break;case 13:if(d=o.memoizedState,d!==null)return d.dehydrated!==null?(tt(at,at.current&1),o.flags|=128,null):(u&o.child.childLanes)!==0?Xm(r,o,u):(tt(at,at.current&1),r=ir(r,o,u),r!==null?r.sibling:null);tt(at,at.current&1);break;case 19:if(d=(u&o.childLanes)!==0,(r.flags&128)!==0){if(d)return Gm(r,o,u);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),tt(at,at.current),d)break;return null;case 22:case 23:return o.lanes=0,Um(r,o,u)}return ir(r,o,u)}var Qm,fc,Zm,Jm;Qm=function(r,o){for(var u=o.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===o)break;for(;u.sibling===null;){if(u.return===null||u.return===o)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},fc=function(){},Zm=function(r,o,u,d){var g=r.memoizedProps;if(g!==d){r=o.stateNode,Xr(zn.current);var x=null;switch(u){case"input":g=Ve(r,g),d=Ve(r,d),x=[];break;case"select":g=R({},g,{value:void 0}),d=R({},d,{value:void 0}),x=[];break;case"textarea":g=hn(r,g),d=hn(r,d),x=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=na)}Te(u,d);var b;u=null;for(K in g)if(!d.hasOwnProperty(K)&&g.hasOwnProperty(K)&&g[K]!=null)if(K==="style"){var I=g[K];for(b in I)I.hasOwnProperty(b)&&(u||(u={}),u[b]="")}else K!=="dangerouslySetInnerHTML"&&K!=="children"&&K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&K!=="autoFocus"&&(s.hasOwnProperty(K)?x||(x=[]):(x=x||[]).push(K,null));for(K in d){var _=d[K];if(I=g?.[K],d.hasOwnProperty(K)&&_!==I&&(_!=null||I!=null))if(K==="style")if(I){for(b in I)!I.hasOwnProperty(b)||_&&_.hasOwnProperty(b)||(u||(u={}),u[b]="");for(b in _)_.hasOwnProperty(b)&&I[b]!==_[b]&&(u||(u={}),u[b]=_[b])}else u||(x||(x=[]),x.push(K,u)),u=_;else K==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,I=I?I.__html:void 0,_!=null&&I!==_&&(x=x||[]).push(K,_)):K==="children"?typeof _!="string"&&typeof _!="number"||(x=x||[]).push(K,""+_):K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&(s.hasOwnProperty(K)?(_!=null&&K==="onScroll"&&nt("scroll",r),x||I===_||(x=[])):(x=x||[]).push(K,_))}u&&(x=x||[]).push("style",u);var K=x;(o.updateQueue=K)&&(o.flags|=4)}},Jm=function(r,o,u,d){u!==d&&(o.flags|=4)};function Bo(r,o){if(!st)switch(r.tailMode){case"hidden":o=r.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?o||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Ot(r){var o=r.alternate!==null&&r.alternate.child===r.child,u=0,d=0;if(o)for(var g=r.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=u,o}function Pb(r,o,u){var d=o.pendingProps;switch(ju(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ot(o),null;case 1:return Gt(o.type)&&ia(),Ot(o),null;case 3:return d=o.stateNode,ji(),rt(Yt),rt(_t),Ku(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(ua(o)?o.flags|=4:r===null||r.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Tn!==null&&(Sc(Tn),Tn=null))),fc(r,o),Ot(o),null;case 5:Wu(o);var g=Xr(Lo.current);if(u=o.type,r!==null&&o.stateNode!=null)Zm(r,o,u,d,g),r.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!d){if(o.stateNode===null)throw Error(n(166));return Ot(o),null}if(r=Xr(zn.current),ua(o)){d=o.stateNode,u=o.type;var x=o.memoizedProps;switch(d[Fn]=o,d[No]=x,r=(o.mode&1)!==0,u){case"dialog":nt("cancel",d),nt("close",d);break;case"iframe":case"object":case"embed":nt("load",d);break;case"video":case"audio":for(g=0;g<Ro.length;g++)nt(Ro[g],d);break;case"source":nt("error",d);break;case"img":case"image":case"link":nt("error",d),nt("load",d);break;case"details":nt("toggle",d);break;case"input":bt(d,x),nt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!x.multiple},nt("invalid",d);break;case"textarea":Be(d,x),nt("invalid",d)}Te(u,x),g=null;for(var b in x)if(x.hasOwnProperty(b)){var I=x[b];b==="children"?typeof I=="string"?d.textContent!==I&&(x.suppressHydrationWarning!==!0&&ta(d.textContent,I,r),g=["children",I]):typeof I=="number"&&d.textContent!==""+I&&(x.suppressHydrationWarning!==!0&&ta(d.textContent,I,r),g=["children",""+I]):s.hasOwnProperty(b)&&I!=null&&b==="onScroll"&&nt("scroll",d)}switch(u){case"input":qe(d),Bt(d,x,!0);break;case"textarea":qe(d),Qn(d);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(d.onclick=na)}d=g,o.updateQueue=d,d!==null&&(o.flags|=4)}else{b=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=q(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=b.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=b.createElement(u,{is:d.is}):(r=b.createElement(u),u==="select"&&(b=r,d.multiple?b.multiple=!0:d.size&&(b.size=d.size))):r=b.createElementNS(r,u),r[Fn]=o,r[No]=d,Qm(r,o,!1,!1),o.stateNode=r;e:{switch(b=se(u,d),u){case"dialog":nt("cancel",r),nt("close",r),g=d;break;case"iframe":case"object":case"embed":nt("load",r),g=d;break;case"video":case"audio":for(g=0;g<Ro.length;g++)nt(Ro[g],r);g=d;break;case"source":nt("error",r),g=d;break;case"img":case"image":case"link":nt("error",r),nt("load",r),g=d;break;case"details":nt("toggle",r),g=d;break;case"input":bt(r,d),g=Ve(r,d),nt("invalid",r);break;case"option":g=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},g=R({},d,{value:void 0}),nt("invalid",r);break;case"textarea":Be(r,d),g=hn(r,d),nt("invalid",r);break;default:g=d}Te(u,g),I=g;for(x in I)if(I.hasOwnProperty(x)){var _=I[x];x==="style"?ae(r,_):x==="dangerouslySetInnerHTML"?(_=_?_.__html:void 0,_!=null&&F(r,_)):x==="children"?typeof _=="string"?(u!=="textarea"||_!=="")&&J(r,_):typeof _=="number"&&J(r,""+_):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(s.hasOwnProperty(x)?_!=null&&x==="onScroll"&&nt("scroll",r):_!=null&&T(r,x,_,b))}switch(u){case"input":qe(r),Bt(r,d,!1);break;case"textarea":qe(r),Qn(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Me(d.value));break;case"select":r.multiple=!!d.multiple,x=d.value,x!=null?on(r,!!d.multiple,x,!1):d.defaultValue!=null&&on(r,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=na)}switch(u){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Ot(o),null;case 6:if(r&&o.stateNode!=null)Jm(r,o,r.memoizedProps,d);else{if(typeof d!="string"&&o.stateNode===null)throw Error(n(166));if(u=Xr(Lo.current),Xr(zn.current),ua(o)){if(d=o.stateNode,u=o.memoizedProps,d[Fn]=o,(x=d.nodeValue!==u)&&(r=an,r!==null))switch(r.tag){case 3:ta(d.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&ta(d.nodeValue,u,(r.mode&1)!==0)}x&&(o.flags|=4)}else d=(u.nodeType===9?u:u.ownerDocument).createTextNode(d),d[Fn]=o,o.stateNode=d}return Ot(o),null;case 13:if(rt(at),d=o.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(st&&ln!==null&&(o.mode&1)!==0&&(o.flags&128)===0)nm(),Mi(),o.flags|=98560,x=!1;else if(x=ua(o),d!==null&&d.dehydrated!==null){if(r===null){if(!x)throw Error(n(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[Fn]=o}else Mi(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Ot(o),x=!1}else Tn!==null&&(Sc(Tn),Tn=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=u,o):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(o.child.flags|=8192,(o.mode&1)!==0&&(r===null||(at.current&1)!==0?kt===0&&(kt=3):Ec())),o.updateQueue!==null&&(o.flags|=4),Ot(o),null);case 4:return ji(),fc(r,o),r===null&&Mo(o.stateNode.containerInfo),Ot(o),null;case 10:return zu(o.type._context),Ot(o),null;case 17:return Gt(o.type)&&ia(),Ot(o),null;case 19:if(rt(at),x=o.memoizedState,x===null)return Ot(o),null;if(d=(o.flags&128)!==0,b=x.rendering,b===null)if(d)Bo(x,!1);else{if(kt!==0||r!==null&&(r.flags&128)!==0)for(r=o.child;r!==null;){if(b=ma(r),b!==null){for(o.flags|=128,Bo(x,!1),d=b.updateQueue,d!==null&&(o.updateQueue=d,o.flags|=4),o.subtreeFlags=0,d=u,u=o.child;u!==null;)x=u,r=d,x.flags&=14680066,b=x.alternate,b===null?(x.childLanes=0,x.lanes=r,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=b.childLanes,x.lanes=b.lanes,x.child=b.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=b.memoizedProps,x.memoizedState=b.memoizedState,x.updateQueue=b.updateQueue,x.type=b.type,r=b.dependencies,x.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return tt(at,at.current&1|2),o.child}r=r.sibling}x.tail!==null&&ht()>Oi&&(o.flags|=128,d=!0,Bo(x,!1),o.lanes=4194304)}else{if(!d)if(r=ma(b),r!==null){if(o.flags|=128,d=!0,u=r.updateQueue,u!==null&&(o.updateQueue=u,o.flags|=4),Bo(x,!0),x.tail===null&&x.tailMode==="hidden"&&!b.alternate&&!st)return Ot(o),null}else 2*ht()-x.renderingStartTime>Oi&&u!==1073741824&&(o.flags|=128,d=!0,Bo(x,!1),o.lanes=4194304);x.isBackwards?(b.sibling=o.child,o.child=b):(u=x.last,u!==null?u.sibling=b:o.child=b,x.last=b)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=ht(),o.sibling=null,u=at.current,tt(at,d?u&1|2:u&1),o):(Ot(o),null);case 22:case 23:return Cc(),d=o.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(o.flags|=8192),d&&(o.mode&1)!==0?(un&1073741824)!==0&&(Ot(o),o.subtreeFlags&6&&(o.flags|=8192)):Ot(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function Tb(r,o){switch(ju(o),o.tag){case 1:return Gt(o.type)&&ia(),r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 3:return ji(),rt(Yt),rt(_t),Ku(),r=o.flags,(r&65536)!==0&&(r&128)===0?(o.flags=r&-65537|128,o):null;case 5:return Wu(o),null;case 13:if(rt(at),r=o.memoizedState,r!==null&&r.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Mi()}return r=o.flags,r&65536?(o.flags=r&-65537|128,o):null;case 19:return rt(at),null;case 4:return ji(),null;case 10:return zu(o.type._context),null;case 22:case 23:return Cc(),null;case 24:return null;default:return null}}var Ca=!1,Ft=!1,Rb=typeof WeakSet=="function"?WeakSet:Set,ke=null;function _i(r,o){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(d){ft(r,o,d)}else u.current=null}function dc(r,o,u){try{u()}catch(d){ft(r,o,d)}}var eg=!1;function Mb(r,o){if(Cu=Ws,r=Ip(),gu(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,x=d.focusNode;d=d.focusOffset;try{u.nodeType,x.nodeType}catch{u=null;break e}var b=0,I=-1,_=-1,K=0,re=0,ie=r,ne=null;t:for(;;){for(var xe;ie!==u||g!==0&&ie.nodeType!==3||(I=b+g),ie!==x||d!==0&&ie.nodeType!==3||(_=b+d),ie.nodeType===3&&(b+=ie.nodeValue.length),(xe=ie.firstChild)!==null;)ne=ie,ie=xe;for(;;){if(ie===r)break t;if(ne===u&&++K===g&&(I=b),ne===x&&++re===d&&(_=b),(xe=ie.nextSibling)!==null)break;ie=ne,ne=ie.parentNode}ie=xe}u=I===-1||_===-1?null:{start:I,end:_}}else u=null}u=u||{start:0,end:0}}else u=null;for(Eu={focusedElem:r,selectionRange:u},Ws=!1,ke=o;ke!==null;)if(o=ke,r=o.child,(o.subtreeFlags&1028)!==0&&r!==null)r.return=o,ke=r;else for(;ke!==null;){o=ke;try{var Se=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var Ee=Se.memoizedProps,pt=Se.memoizedState,$=o.stateNode,z=$.getSnapshotBeforeUpdate(o.elementType===o.type?Ee:Rn(o.type,Ee),pt);$.__reactInternalSnapshotBeforeUpdate=z}break;case 3:var H=o.stateNode.containerInfo;H.nodeType===1?H.textContent="":H.nodeType===9&&H.documentElement&&H.removeChild(H.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ce){ft(o,o.return,ce)}if(r=o.sibling,r!==null){r.return=o.return,ke=r;break}ke=o.return}return Se=eg,eg=!1,Se}function $o(r,o,u){var d=o.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&r)===r){var x=g.destroy;g.destroy=void 0,x!==void 0&&dc(o,u,x)}g=g.next}while(g!==d)}}function Ea(r,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var u=o=o.next;do{if((u.tag&r)===r){var d=u.create;u.destroy=d()}u=u.next}while(u!==o)}}function hc(r){var o=r.ref;if(o!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof o=="function"?o(r):o.current=r}}function tg(r){var o=r.alternate;o!==null&&(r.alternate=null,tg(o)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(o=r.stateNode,o!==null&&(delete o[Fn],delete o[No],delete o[Mu],delete o[fb],delete o[db])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function ng(r){return r.tag===5||r.tag===3||r.tag===4}function rg(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||ng(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function pc(r,o,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,o?u.nodeType===8?u.parentNode.insertBefore(r,o):u.insertBefore(r,o):(u.nodeType===8?(o=u.parentNode,o.insertBefore(r,u)):(o=u,o.appendChild(r)),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=na));else if(d!==4&&(r=r.child,r!==null))for(pc(r,o,u),r=r.sibling;r!==null;)pc(r,o,u),r=r.sibling}function mc(r,o,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,o?u.insertBefore(r,o):u.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(mc(r,o,u),r=r.sibling;r!==null;)mc(r,o,u),r=r.sibling}var At=null,Mn=!1;function Cr(r,o,u){for(u=u.child;u!==null;)ig(r,o,u),u=u.sibling}function ig(r,o,u){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(Fs,u)}catch{}switch(u.tag){case 5:Ft||_i(u,o);case 6:var d=At,g=Mn;At=null,Cr(r,o,u),At=d,Mn=g,At!==null&&(Mn?(r=At,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):At.removeChild(u.stateNode));break;case 18:At!==null&&(Mn?(r=At,u=u.stateNode,r.nodeType===8?Ru(r.parentNode,u):r.nodeType===1&&Ru(r,u),wo(r)):Ru(At,u.stateNode));break;case 4:d=At,g=Mn,At=u.stateNode.containerInfo,Mn=!0,Cr(r,o,u),At=d,Mn=g;break;case 0:case 11:case 14:case 15:if(!Ft&&(d=u.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var x=g,b=x.destroy;x=x.tag,b!==void 0&&((x&2)!==0||(x&4)!==0)&&dc(u,o,b),g=g.next}while(g!==d)}Cr(r,o,u);break;case 1:if(!Ft&&(_i(u,o),d=u.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=u.memoizedProps,d.state=u.memoizedState,d.componentWillUnmount()}catch(I){ft(u,o,I)}Cr(r,o,u);break;case 21:Cr(r,o,u);break;case 22:u.mode&1?(Ft=(d=Ft)||u.memoizedState!==null,Cr(r,o,u),Ft=d):Cr(r,o,u);break;default:Cr(r,o,u)}}function og(r){var o=r.updateQueue;if(o!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new Rb),o.forEach(function(d){var g=Fb.bind(null,r,d);u.has(d)||(u.add(d),d.then(g,g))})}}function An(r,o){var u=o.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d];try{var x=r,b=o,I=b;e:for(;I!==null;){switch(I.tag){case 5:At=I.stateNode,Mn=!1;break e;case 3:At=I.stateNode.containerInfo,Mn=!0;break e;case 4:At=I.stateNode.containerInfo,Mn=!0;break e}I=I.return}if(At===null)throw Error(n(160));ig(x,b,g),At=null,Mn=!1;var _=g.alternate;_!==null&&(_.return=null),g.return=null}catch(K){ft(g,o,K)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)sg(o,r),o=o.sibling}function sg(r,o){var u=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(An(o,r),Bn(r),d&4){try{$o(3,r,r.return),Ea(3,r)}catch(Ee){ft(r,r.return,Ee)}try{$o(5,r,r.return)}catch(Ee){ft(r,r.return,Ee)}}break;case 1:An(o,r),Bn(r),d&512&&u!==null&&_i(u,u.return);break;case 5:if(An(o,r),Bn(r),d&512&&u!==null&&_i(u,u.return),r.flags&32){var g=r.stateNode;try{J(g,"")}catch(Ee){ft(r,r.return,Ee)}}if(d&4&&(g=r.stateNode,g!=null)){var x=r.memoizedProps,b=u!==null?u.memoizedProps:x,I=r.type,_=r.updateQueue;if(r.updateQueue=null,_!==null)try{I==="input"&&x.type==="radio"&&x.name!=null&&Rt(g,x),se(I,b);var K=se(I,x);for(b=0;b<_.length;b+=2){var re=_[b],ie=_[b+1];re==="style"?ae(g,ie):re==="dangerouslySetInnerHTML"?F(g,ie):re==="children"?J(g,ie):T(g,re,ie,K)}switch(I){case"input":it(g,x);break;case"textarea":Gn(g,x);break;case"select":var ne=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!x.multiple;var xe=x.value;xe!=null?on(g,!!x.multiple,xe,!1):ne!==!!x.multiple&&(x.defaultValue!=null?on(g,!!x.multiple,x.defaultValue,!0):on(g,!!x.multiple,x.multiple?[]:"",!1))}g[No]=x}catch(Ee){ft(r,r.return,Ee)}}break;case 6:if(An(o,r),Bn(r),d&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,x=r.memoizedProps;try{g.nodeValue=x}catch(Ee){ft(r,r.return,Ee)}}break;case 3:if(An(o,r),Bn(r),d&4&&u!==null&&u.memoizedState.isDehydrated)try{wo(o.containerInfo)}catch(Ee){ft(r,r.return,Ee)}break;case 4:An(o,r),Bn(r);break;case 13:An(o,r),Bn(r),g=r.child,g.flags&8192&&(x=g.memoizedState!==null,g.stateNode.isHidden=x,!x||g.alternate!==null&&g.alternate.memoizedState!==null||(vc=ht())),d&4&&og(r);break;case 22:if(re=u!==null&&u.memoizedState!==null,r.mode&1?(Ft=(K=Ft)||re,An(o,r),Ft=K):An(o,r),Bn(r),d&8192){if(K=r.memoizedState!==null,(r.stateNode.isHidden=K)&&!re&&(r.mode&1)!==0)for(ke=r,re=r.child;re!==null;){for(ie=ke=re;ke!==null;){switch(ne=ke,xe=ne.child,ne.tag){case 0:case 11:case 14:case 15:$o(4,ne,ne.return);break;case 1:_i(ne,ne.return);var Se=ne.stateNode;if(typeof Se.componentWillUnmount=="function"){d=ne,u=ne.return;try{o=d,Se.props=o.memoizedProps,Se.state=o.memoizedState,Se.componentWillUnmount()}catch(Ee){ft(d,u,Ee)}}break;case 5:_i(ne,ne.return);break;case 22:if(ne.memoizedState!==null){ug(ie);continue}}xe!==null?(xe.return=ne,ke=xe):ug(ie)}re=re.sibling}e:for(re=null,ie=r;;){if(ie.tag===5){if(re===null){re=ie;try{g=ie.stateNode,K?(x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(I=ie.stateNode,_=ie.memoizedProps.style,b=_!=null&&_.hasOwnProperty("display")?_.display:null,I.style.display=ue("display",b))}catch(Ee){ft(r,r.return,Ee)}}}else if(ie.tag===6){if(re===null)try{ie.stateNode.nodeValue=K?"":ie.memoizedProps}catch(Ee){ft(r,r.return,Ee)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===r)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===r)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===r)break e;re===ie&&(re=null),ie=ie.return}re===ie&&(re=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:An(o,r),Bn(r),d&4&&og(r);break;case 21:break;default:An(o,r),Bn(r)}}function Bn(r){var o=r.flags;if(o&2){try{e:{for(var u=r.return;u!==null;){if(ng(u)){var d=u;break e}u=u.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(J(g,""),d.flags&=-33);var x=rg(r);mc(r,x,g);break;case 3:case 4:var b=d.stateNode.containerInfo,I=rg(r);pc(r,I,b);break;default:throw Error(n(161))}}catch(_){ft(r,r.return,_)}r.flags&=-3}o&4096&&(r.flags&=-4097)}function Ab(r,o,u){ke=r,ag(r)}function ag(r,o,u){for(var d=(r.mode&1)!==0;ke!==null;){var g=ke,x=g.child;if(g.tag===22&&d){var b=g.memoizedState!==null||Ca;if(!b){var I=g.alternate,_=I!==null&&I.memoizedState!==null||Ft;I=Ca;var K=Ft;if(Ca=b,(Ft=_)&&!K)for(ke=g;ke!==null;)b=ke,_=b.child,b.tag===22&&b.memoizedState!==null?cg(g):_!==null?(_.return=b,ke=_):cg(g);for(;x!==null;)ke=x,ag(x),x=x.sibling;ke=g,Ca=I,Ft=K}lg(r)}else(g.subtreeFlags&8772)!==0&&x!==null?(x.return=g,ke=x):lg(r)}}function lg(r){for(;ke!==null;){var o=ke;if((o.flags&8772)!==0){var u=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Ft||Ea(5,o);break;case 1:var d=o.stateNode;if(o.flags&4&&!Ft)if(u===null)d.componentDidMount();else{var g=o.elementType===o.type?u.memoizedProps:Rn(o.type,u.memoizedProps);d.componentDidUpdate(g,u.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&um(o,x,d);break;case 3:var b=o.updateQueue;if(b!==null){if(u=null,o.child!==null)switch(o.child.tag){case 5:u=o.child.stateNode;break;case 1:u=o.child.stateNode}um(o,b,u)}break;case 5:var I=o.stateNode;if(u===null&&o.flags&4){u=I;var _=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":_.autoFocus&&u.focus();break;case"img":_.src&&(u.src=_.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var K=o.alternate;if(K!==null){var re=K.memoizedState;if(re!==null){var ie=re.dehydrated;ie!==null&&wo(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Ft||o.flags&512&&hc(o)}catch(ne){ft(o,o.return,ne)}}if(o===r){ke=null;break}if(u=o.sibling,u!==null){u.return=o.return,ke=u;break}ke=o.return}}function ug(r){for(;ke!==null;){var o=ke;if(o===r){ke=null;break}var u=o.sibling;if(u!==null){u.return=o.return,ke=u;break}ke=o.return}}function cg(r){for(;ke!==null;){var o=ke;try{switch(o.tag){case 0:case 11:case 15:var u=o.return;try{Ea(4,o)}catch(_){ft(o,u,_)}break;case 1:var d=o.stateNode;if(typeof d.componentDidMount=="function"){var g=o.return;try{d.componentDidMount()}catch(_){ft(o,g,_)}}var x=o.return;try{hc(o)}catch(_){ft(o,x,_)}break;case 5:var b=o.return;try{hc(o)}catch(_){ft(o,b,_)}}}catch(_){ft(o,o.return,_)}if(o===r){ke=null;break}var I=o.sibling;if(I!==null){I.return=o.return,ke=I;break}ke=o.return}}var Nb=Math.ceil,Pa=D.ReactCurrentDispatcher,gc=D.ReactCurrentOwner,vn=D.ReactCurrentBatchConfig,He=0,Et=null,yt=null,Nt=0,un=0,Li=xr(0),kt=0,Uo=null,Gr=0,Ta=0,yc=0,Wo=null,Zt=null,vc=0,Oi=1/0,or=null,Ra=!1,xc=null,Er=null,Ma=!1,Pr=null,Aa=0,Ho=0,wc=null,Na=-1,Ia=0;function Ut(){return(He&6)!==0?ht():Na!==-1?Na:Na=ht()}function Tr(r){return(r.mode&1)===0?1:(He&2)!==0&&Nt!==0?Nt&-Nt:pb.transition!==null?(Ia===0&&(Ia=rp()),Ia):(r=Ye,r!==0||(r=window.event,r=r===void 0?16:dp(r.type)),r)}function Nn(r,o,u,d){if(50<Ho)throw Ho=0,wc=null,Error(n(185));mo(r,u,d),((He&2)===0||r!==Et)&&(r===Et&&((He&2)===0&&(Ta|=u),kt===4&&Rr(r,Nt)),Jt(r,d),u===1&&He===0&&(o.mode&1)===0&&(Oi=ht()+500,sa&&kr()))}function Jt(r,o){var u=r.callbackNode;pS(r,o);var d=Bs(r,r===Et?Nt:0);if(d===0)u!==null&&ep(u),r.callbackNode=null,r.callbackPriority=0;else if(o=d&-d,r.callbackPriority!==o){if(u!=null&&ep(u),o===1)r.tag===0?hb(dg.bind(null,r)):Qp(dg.bind(null,r)),ub(function(){(He&6)===0&&kr()}),u=null;else{switch(ip(d)){case 1:u=Jl;break;case 4:u=tp;break;case 16:u=Os;break;case 536870912:u=np;break;default:u=Os}u=wg(u,fg.bind(null,r))}r.callbackPriority=o,r.callbackNode=u}}function fg(r,o){if(Na=-1,Ia=0,(He&6)!==0)throw Error(n(327));var u=r.callbackNode;if(Fi()&&r.callbackNode!==u)return null;var d=Bs(r,r===Et?Nt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||o)o=ja(r,d);else{o=d;var g=He;He|=2;var x=pg();(Et!==r||Nt!==o)&&(or=null,Oi=ht()+500,Zr(r,o));do try{Db();break}catch(I){hg(r,I)}while(!0);Fu(),Pa.current=x,He=g,yt!==null?o=0:(Et=null,Nt=0,o=kt)}if(o!==0){if(o===2&&(g=eu(r),g!==0&&(d=g,o=kc(r,g))),o===1)throw u=Uo,Zr(r,0),Rr(r,d),Jt(r,ht()),u;if(o===6)Rr(r,d);else{if(g=r.current.alternate,(d&30)===0&&!Ib(g)&&(o=ja(r,d),o===2&&(x=eu(r),x!==0&&(d=x,o=kc(r,x))),o===1))throw u=Uo,Zr(r,0),Rr(r,d),Jt(r,ht()),u;switch(r.finishedWork=g,r.finishedLanes=d,o){case 0:case 1:throw Error(n(345));case 2:Jr(r,Zt,or);break;case 3:if(Rr(r,d),(d&130023424)===d&&(o=vc+500-ht(),10<o)){if(Bs(r,0)!==0)break;if(g=r.suspendedLanes,(g&d)!==d){Ut(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=Tu(Jr.bind(null,r,Zt,or),o);break}Jr(r,Zt,or);break;case 4:if(Rr(r,d),(d&4194240)===d)break;for(o=r.eventTimes,g=-1;0<d;){var b=31-En(d);x=1<<b,b=o[b],b>g&&(g=b),d&=~x}if(d=g,d=ht()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*Nb(d/1960))-d,10<d){r.timeoutHandle=Tu(Jr.bind(null,r,Zt,or),d);break}Jr(r,Zt,or);break;case 5:Jr(r,Zt,or);break;default:throw Error(n(329))}}}return Jt(r,ht()),r.callbackNode===u?fg.bind(null,r):null}function kc(r,o){var u=Wo;return r.current.memoizedState.isDehydrated&&(Zr(r,o).flags|=256),r=ja(r,o),r!==2&&(o=Zt,Zt=u,o!==null&&Sc(o)),r}function Sc(r){Zt===null?Zt=r:Zt.push.apply(Zt,r)}function Ib(r){for(var o=r;;){if(o.flags&16384){var u=o.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var d=0;d<u.length;d++){var g=u[d],x=g.getSnapshot;g=g.value;try{if(!Pn(x(),g))return!1}catch{return!1}}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===r)break;for(;o.sibling===null;){if(o.return===null||o.return===r)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Rr(r,o){for(o&=~yc,o&=~Ta,r.suspendedLanes|=o,r.pingedLanes&=~o,r=r.expirationTimes;0<o;){var u=31-En(o),d=1<<u;r[u]=-1,o&=~d}}function dg(r){if((He&6)!==0)throw Error(n(327));Fi();var o=Bs(r,0);if((o&1)===0)return Jt(r,ht()),null;var u=ja(r,o);if(r.tag!==0&&u===2){var d=eu(r);d!==0&&(o=d,u=kc(r,d))}if(u===1)throw u=Uo,Zr(r,0),Rr(r,o),Jt(r,ht()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=o,Jr(r,Zt,or),Jt(r,ht()),null}function bc(r,o){var u=He;He|=1;try{return r(o)}finally{He=u,He===0&&(Oi=ht()+500,sa&&kr())}}function Qr(r){Pr!==null&&Pr.tag===0&&(He&6)===0&&Fi();var o=He;He|=1;var u=vn.transition,d=Ye;try{if(vn.transition=null,Ye=1,r)return r()}finally{Ye=d,vn.transition=u,He=o,(He&6)===0&&kr()}}function Cc(){un=Li.current,rt(Li)}function Zr(r,o){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,lb(u)),yt!==null)for(u=yt.return;u!==null;){var d=u;switch(ju(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&ia();break;case 3:ji(),rt(Yt),rt(_t),Ku();break;case 5:Wu(d);break;case 4:ji();break;case 13:rt(at);break;case 19:rt(at);break;case 10:zu(d.type._context);break;case 22:case 23:Cc()}u=u.return}if(Et=r,yt=r=Mr(r.current,null),Nt=un=o,kt=0,Uo=null,yc=Ta=Gr=0,Zt=Wo=null,qr!==null){for(o=0;o<qr.length;o++)if(u=qr[o],d=u.interleaved,d!==null){u.interleaved=null;var g=d.next,x=u.pending;if(x!==null){var b=x.next;x.next=g,d.next=b}u.pending=d}qr=null}return r}function hg(r,o){do{var u=yt;try{if(Fu(),ga.current=wa,ya){for(var d=lt.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}ya=!1}if(Yr=0,Ct=wt=lt=null,Oo=!1,Fo=0,gc.current=null,u===null||u.return===null){kt=1,Uo=o,yt=null;break}e:{var x=r,b=u.return,I=u,_=o;if(o=Nt,I.flags|=32768,_!==null&&typeof _=="object"&&typeof _.then=="function"){var K=_,re=I,ie=re.tag;if((re.mode&1)===0&&(ie===0||ie===11||ie===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var xe=Fm(b);if(xe!==null){xe.flags&=-257,zm(xe,b,I,x,o),xe.mode&1&&Om(x,K,o),o=xe,_=K;var Se=o.updateQueue;if(Se===null){var Ee=new Set;Ee.add(_),o.updateQueue=Ee}else Se.add(_);break e}else{if((o&1)===0){Om(x,K,o),Ec();break e}_=Error(n(426))}}else if(st&&I.mode&1){var pt=Fm(b);if(pt!==null){(pt.flags&65536)===0&&(pt.flags|=256),zm(pt,b,I,x,o),Lu(Di(_,I));break e}}x=_=Di(_,I),kt!==4&&(kt=2),Wo===null?Wo=[x]:Wo.push(x),x=b;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var $=_m(x,_,o);lm(x,$);break e;case 1:I=_;var z=x.type,H=x.stateNode;if((x.flags&128)===0&&(typeof z.getDerivedStateFromError=="function"||H!==null&&typeof H.componentDidCatch=="function"&&(Er===null||!Er.has(H)))){x.flags|=65536,o&=-o,x.lanes|=o;var ce=Lm(x,I,o);lm(x,ce);break e}}x=x.return}while(x!==null)}gg(u)}catch(Re){o=Re,yt===u&&u!==null&&(yt=u=u.return);continue}break}while(!0)}function pg(){var r=Pa.current;return Pa.current=wa,r===null?wa:r}function Ec(){(kt===0||kt===3||kt===2)&&(kt=4),Et===null||(Gr&268435455)===0&&(Ta&268435455)===0||Rr(Et,Nt)}function ja(r,o){var u=He;He|=2;var d=pg();(Et!==r||Nt!==o)&&(or=null,Zr(r,o));do try{jb();break}catch(g){hg(r,g)}while(!0);if(Fu(),He=u,Pa.current=d,yt!==null)throw Error(n(261));return Et=null,Nt=0,kt}function jb(){for(;yt!==null;)mg(yt)}function Db(){for(;yt!==null&&!oS();)mg(yt)}function mg(r){var o=xg(r.alternate,r,un);r.memoizedProps=r.pendingProps,o===null?gg(r):yt=o,gc.current=null}function gg(r){var o=r;do{var u=o.alternate;if(r=o.return,(o.flags&32768)===0){if(u=Pb(u,o,un),u!==null){yt=u;return}}else{if(u=Tb(u,o),u!==null){u.flags&=32767,yt=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{kt=6,yt=null;return}}if(o=o.sibling,o!==null){yt=o;return}yt=o=r}while(o!==null);kt===0&&(kt=5)}function Jr(r,o,u){var d=Ye,g=vn.transition;try{vn.transition=null,Ye=1,_b(r,o,u,d)}finally{vn.transition=g,Ye=d}return null}function _b(r,o,u,d){do Fi();while(Pr!==null);if((He&6)!==0)throw Error(n(327));u=r.finishedWork;var g=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var x=u.lanes|u.childLanes;if(mS(r,x),r===Et&&(yt=Et=null,Nt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||Ma||(Ma=!0,wg(Os,function(){return Fi(),null})),x=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||x){x=vn.transition,vn.transition=null;var b=Ye;Ye=1;var I=He;He|=4,gc.current=null,Mb(r,u),sg(u,r),tb(Eu),Ws=!!Cu,Eu=Cu=null,r.current=u,Ab(u),sS(),He=I,Ye=b,vn.transition=x}else r.current=u;if(Ma&&(Ma=!1,Pr=r,Aa=g),x=r.pendingLanes,x===0&&(Er=null),uS(u.stateNode),Jt(r,ht()),o!==null)for(d=r.onRecoverableError,u=0;u<o.length;u++)g=o[u],d(g.value,{componentStack:g.stack,digest:g.digest});if(Ra)throw Ra=!1,r=xc,xc=null,r;return(Aa&1)!==0&&r.tag!==0&&Fi(),x=r.pendingLanes,(x&1)!==0?r===wc?Ho++:(Ho=0,wc=r):Ho=0,kr(),null}function Fi(){if(Pr!==null){var r=ip(Aa),o=vn.transition,u=Ye;try{if(vn.transition=null,Ye=16>r?16:r,Pr===null)var d=!1;else{if(r=Pr,Pr=null,Aa=0,(He&6)!==0)throw Error(n(331));var g=He;for(He|=4,ke=r.current;ke!==null;){var x=ke,b=x.child;if((ke.flags&16)!==0){var I=x.deletions;if(I!==null){for(var _=0;_<I.length;_++){var K=I[_];for(ke=K;ke!==null;){var re=ke;switch(re.tag){case 0:case 11:case 15:$o(8,re,x)}var ie=re.child;if(ie!==null)ie.return=re,ke=ie;else for(;ke!==null;){re=ke;var ne=re.sibling,xe=re.return;if(tg(re),re===K){ke=null;break}if(ne!==null){ne.return=xe,ke=ne;break}ke=xe}}}var Se=x.alternate;if(Se!==null){var Ee=Se.child;if(Ee!==null){Se.child=null;do{var pt=Ee.sibling;Ee.sibling=null,Ee=pt}while(Ee!==null)}}ke=x}}if((x.subtreeFlags&2064)!==0&&b!==null)b.return=x,ke=b;else e:for(;ke!==null;){if(x=ke,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:$o(9,x,x.return)}var $=x.sibling;if($!==null){$.return=x.return,ke=$;break e}ke=x.return}}var z=r.current;for(ke=z;ke!==null;){b=ke;var H=b.child;if((b.subtreeFlags&2064)!==0&&H!==null)H.return=b,ke=H;else e:for(b=z;ke!==null;){if(I=ke,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Ea(9,I)}}catch(Re){ft(I,I.return,Re)}if(I===b){ke=null;break e}var ce=I.sibling;if(ce!==null){ce.return=I.return,ke=ce;break e}ke=I.return}}if(He=g,kr(),On&&typeof On.onPostCommitFiberRoot=="function")try{On.onPostCommitFiberRoot(Fs,r)}catch{}d=!0}return d}finally{Ye=u,vn.transition=o}}return!1}function yg(r,o,u){o=Di(u,o),o=_m(r,o,1),r=br(r,o,1),o=Ut(),r!==null&&(mo(r,1,o),Jt(r,o))}function ft(r,o,u){if(r.tag===3)yg(r,r,u);else for(;o!==null;){if(o.tag===3){yg(o,r,u);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Er===null||!Er.has(d))){r=Di(u,r),r=Lm(o,r,1),o=br(o,r,1),r=Ut(),o!==null&&(mo(o,1,r),Jt(o,r));break}}o=o.return}}function Lb(r,o,u){var d=r.pingCache;d!==null&&d.delete(o),o=Ut(),r.pingedLanes|=r.suspendedLanes&u,Et===r&&(Nt&u)===u&&(kt===4||kt===3&&(Nt&130023424)===Nt&&500>ht()-vc?Zr(r,0):yc|=u),Jt(r,o)}function vg(r,o){o===0&&((r.mode&1)===0?o=1:(o=Vs,Vs<<=1,(Vs&130023424)===0&&(Vs=4194304)));var u=Ut();r=nr(r,o),r!==null&&(mo(r,o,u),Jt(r,u))}function Ob(r){var o=r.memoizedState,u=0;o!==null&&(u=o.retryLane),vg(r,u)}function Fb(r,o){var u=0;switch(r.tag){case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(o),vg(r,u)}var xg;xg=function(r,o,u){if(r!==null)if(r.memoizedProps!==o.pendingProps||Yt.current)Qt=!0;else{if((r.lanes&u)===0&&(o.flags&128)===0)return Qt=!1,Eb(r,o,u);Qt=(r.flags&131072)!==0}else Qt=!1,st&&(o.flags&1048576)!==0&&Zp(o,la,o.index);switch(o.lanes=0,o.tag){case 2:var d=o.type;ba(r,o),r=o.pendingProps;var g=Pi(o,_t.current);Ii(o,u),g=Yu(null,o,d,r,g,u);var x=Gu();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Gt(d)?(x=!0,oa(o)):x=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,$u(o),g.updater=ka,o.stateNode=g,g._reactInternals=o,nc(o,d,r,u),o=sc(null,o,d,!0,x,u)):(o.tag=0,st&&x&&Iu(o),$t(null,o,g,u),o=o.child),o;case 16:d=o.elementType;e:{switch(ba(r,o),r=o.pendingProps,g=d._init,d=g(d._payload),o.type=d,g=o.tag=Vb(d),r=Rn(d,r),g){case 0:o=oc(null,o,d,r,u);break e;case 1:o=Hm(null,o,d,r,u);break e;case 11:o=Vm(null,o,d,r,u);break e;case 14:o=Bm(null,o,d,Rn(d.type,r),u);break e}throw Error(n(306,d,""))}return o;case 0:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Rn(d,g),oc(r,o,d,g,u);case 1:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Rn(d,g),Hm(r,o,d,g,u);case 3:e:{if(Km(o),r===null)throw Error(n(387));d=o.pendingProps,x=o.memoizedState,g=x.element,am(r,o),pa(o,d,null,u);var b=o.memoizedState;if(d=b.element,x.isDehydrated)if(x={element:d,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){g=Di(Error(n(423)),o),o=qm(r,o,d,u,g);break e}else if(d!==g){g=Di(Error(n(424)),o),o=qm(r,o,d,u,g);break e}else for(ln=vr(o.stateNode.containerInfo.firstChild),an=o,st=!0,Tn=null,u=om(o,null,d,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Mi(),d===g){o=ir(r,o,u);break e}$t(r,o,d,u)}o=o.child}return o;case 5:return cm(o),r===null&&_u(o),d=o.type,g=o.pendingProps,x=r!==null?r.memoizedProps:null,b=g.children,Pu(d,g)?b=null:x!==null&&Pu(d,x)&&(o.flags|=32),Wm(r,o),$t(r,o,b,u),o.child;case 6:return r===null&&_u(o),null;case 13:return Xm(r,o,u);case 4:return Uu(o,o.stateNode.containerInfo),d=o.pendingProps,r===null?o.child=Ai(o,null,d,u):$t(r,o,d,u),o.child;case 11:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Rn(d,g),Vm(r,o,d,g,u);case 7:return $t(r,o,o.pendingProps,u),o.child;case 8:return $t(r,o,o.pendingProps.children,u),o.child;case 12:return $t(r,o,o.pendingProps.children,u),o.child;case 10:e:{if(d=o.type._context,g=o.pendingProps,x=o.memoizedProps,b=g.value,tt(fa,d._currentValue),d._currentValue=b,x!==null)if(Pn(x.value,b)){if(x.children===g.children&&!Yt.current){o=ir(r,o,u);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var I=x.dependencies;if(I!==null){b=x.child;for(var _=I.firstContext;_!==null;){if(_.context===d){if(x.tag===1){_=rr(-1,u&-u),_.tag=2;var K=x.updateQueue;if(K!==null){K=K.shared;var re=K.pending;re===null?_.next=_:(_.next=re.next,re.next=_),K.pending=_}}x.lanes|=u,_=x.alternate,_!==null&&(_.lanes|=u),Vu(x.return,u,o),I.lanes|=u;break}_=_.next}}else if(x.tag===10)b=x.type===o.type?null:x.child;else if(x.tag===18){if(b=x.return,b===null)throw Error(n(341));b.lanes|=u,I=b.alternate,I!==null&&(I.lanes|=u),Vu(b,u,o),b=x.sibling}else b=x.child;if(b!==null)b.return=x;else for(b=x;b!==null;){if(b===o){b=null;break}if(x=b.sibling,x!==null){x.return=b.return,b=x;break}b=b.return}x=b}$t(r,o,g.children,u),o=o.child}return o;case 9:return g=o.type,d=o.pendingProps.children,Ii(o,u),g=gn(g),d=d(g),o.flags|=1,$t(r,o,d,u),o.child;case 14:return d=o.type,g=Rn(d,o.pendingProps),g=Rn(d.type,g),Bm(r,o,d,g,u);case 15:return $m(r,o,o.type,o.pendingProps,u);case 17:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Rn(d,g),ba(r,o),o.tag=1,Gt(d)?(r=!0,oa(o)):r=!1,Ii(o,u),jm(o,d,g),nc(o,d,g,u),sc(null,o,d,!0,r,u);case 19:return Gm(r,o,u);case 22:return Um(r,o,u)}throw Error(n(156,o.tag))};function wg(r,o){return Jh(r,o)}function zb(r,o,u,d){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xn(r,o,u,d){return new zb(r,o,u,d)}function Pc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Vb(r){if(typeof r=="function")return Pc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===B)return 11;if(r===te)return 14}return 2}function Mr(r,o){var u=r.alternate;return u===null?(u=xn(r.tag,o,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=o,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,o=r.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function Da(r,o,u,d,g,x){var b=2;if(d=r,typeof r=="function")Pc(r)&&(b=1);else if(typeof r=="string")b=5;else e:switch(r){case Y:return ei(u.children,g,x,o);case W:b=8,g|=8;break;case L:return r=xn(12,u,o,g|2),r.elementType=L,r.lanes=x,r;case fe:return r=xn(13,u,o,g),r.elementType=fe,r.lanes=x,r;case Z:return r=xn(19,u,o,g),r.elementType=Z,r.lanes=x,r;case Pe:return _a(u,g,x,o);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case N:b=10;break e;case X:b=9;break e;case B:b=11;break e;case te:b=14;break e;case ge:b=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return o=xn(b,u,o,g),o.elementType=r,o.type=d,o.lanes=x,o}function ei(r,o,u,d){return r=xn(7,r,d,o),r.lanes=u,r}function _a(r,o,u,d){return r=xn(22,r,d,o),r.elementType=Pe,r.lanes=u,r.stateNode={isHidden:!1},r}function Tc(r,o,u){return r=xn(6,r,null,o),r.lanes=u,r}function Rc(r,o,u){return o=xn(4,r.children!==null?r.children:[],r.key,o),o.lanes=u,o.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},o}function Bb(r,o,u,d,g){this.tag=o,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tu(0),this.expirationTimes=tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tu(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Mc(r,o,u,d,g,x,b,I,_){return r=new Bb(r,o,u,I,_),o===1?(o=1,x===!0&&(o|=8)):o=0,x=xn(3,null,null,o),r.current=x,x.stateNode=r,x.memoizedState={element:d,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},$u(x),r}function $b(r,o,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:d==null?null:""+d,children:r,containerInfo:o,implementation:u}}function kg(r){if(!r)return wr;r=r._reactInternals;e:{if($r(r)!==r||r.tag!==1)throw Error(n(170));var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Gt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(Gt(u))return Yp(r,u,o)}return o}function Sg(r,o,u,d,g,x,b,I,_){return r=Mc(u,d,!0,r,g,x,b,I,_),r.context=kg(null),u=r.current,d=Ut(),g=Tr(u),x=rr(d,g),x.callback=o??null,br(u,x,g),r.current.lanes=g,mo(r,g,d),Jt(r,d),r}function La(r,o,u,d){var g=o.current,x=Ut(),b=Tr(g);return u=kg(u),o.context===null?o.context=u:o.pendingContext=u,o=rr(x,b),o.payload={element:r},d=d===void 0?null:d,d!==null&&(o.callback=d),r=br(g,o,b),r!==null&&(Nn(r,g,b,x),ha(r,g,b)),b}function Oa(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function bg(r,o){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<o?u:o}}function Ac(r,o){bg(r,o),(r=r.alternate)&&bg(r,o)}function Ub(){return null}var Cg=typeof reportError=="function"?reportError:function(r){console.error(r)};function Nc(r){this._internalRoot=r}Fa.prototype.render=Nc.prototype.render=function(r){var o=this._internalRoot;if(o===null)throw Error(n(409));La(r,o,null,null)},Fa.prototype.unmount=Nc.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var o=r.containerInfo;Qr(function(){La(null,r,null,null)}),o[Zn]=null}};function Fa(r){this._internalRoot=r}Fa.prototype.unstable_scheduleHydration=function(r){if(r){var o=ap();r={blockedOn:null,target:r,priority:o};for(var u=0;u<mr.length&&o!==0&&o<mr[u].priority;u++);mr.splice(u,0,r),u===0&&cp(r)}};function Ic(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function za(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function Eg(){}function Wb(r,o,u,d,g){if(g){if(typeof d=="function"){var x=d;d=function(){var K=Oa(b);x.call(K)}}var b=Sg(o,d,r,0,null,!1,!1,"",Eg);return r._reactRootContainer=b,r[Zn]=b.current,Mo(r.nodeType===8?r.parentNode:r),Qr(),b}for(;g=r.lastChild;)r.removeChild(g);if(typeof d=="function"){var I=d;d=function(){var K=Oa(_);I.call(K)}}var _=Mc(r,0,!1,null,null,!1,!1,"",Eg);return r._reactRootContainer=_,r[Zn]=_.current,Mo(r.nodeType===8?r.parentNode:r),Qr(function(){La(o,_,u,d)}),_}function Va(r,o,u,d,g){var x=u._reactRootContainer;if(x){var b=x;if(typeof g=="function"){var I=g;g=function(){var _=Oa(b);I.call(_)}}La(o,b,r,g)}else b=Wb(u,o,r,g,d);return Oa(b)}op=function(r){switch(r.tag){case 3:var o=r.stateNode;if(o.current.memoizedState.isDehydrated){var u=po(o.pendingLanes);u!==0&&(nu(o,u|1),Jt(o,ht()),(He&6)===0&&(Oi=ht()+500,kr()))}break;case 13:Qr(function(){var d=nr(r,1);if(d!==null){var g=Ut();Nn(d,r,1,g)}}),Ac(r,1)}},ru=function(r){if(r.tag===13){var o=nr(r,134217728);if(o!==null){var u=Ut();Nn(o,r,134217728,u)}Ac(r,134217728)}},sp=function(r){if(r.tag===13){var o=Tr(r),u=nr(r,o);if(u!==null){var d=Ut();Nn(u,r,o,d)}Ac(r,o)}},ap=function(){return Ye},lp=function(r,o){var u=Ye;try{return Ye=r,o()}finally{Ye=u}},gt=function(r,o,u){switch(o){case"input":if(it(r,u),o=u.name,u.type==="radio"&&o!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<u.length;o++){var d=u[o];if(d!==r&&d.form===r.form){var g=ra(d);if(!g)throw Error(n(90));ut(d),it(d,g)}}}break;case"textarea":Gn(r,u);break;case"select":o=u.value,o!=null&&on(r,!!u.multiple,o,!1)}},Kh=bc,qh=Qr;var Hb={usingClientEntryPoint:!1,Events:[Io,Ci,ra,Dt,fr,bc]},Ko={findFiberByHostInstance:Ur,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Kb={bundleType:Ko.bundleType,version:Ko.version,rendererPackageName:Ko.rendererPackageName,rendererConfig:Ko.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:D.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Qh(r),r===null?null:r.stateNode},findFiberByHostInstance:Ko.findFiberByHostInstance||Ub,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ba=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ba.isDisabled&&Ba.supportsFiber)try{Fs=Ba.inject(Kb),On=Ba}catch{}}return en.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hb,en.createPortal=function(r,o){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ic(o))throw Error(n(200));return $b(r,o,null,u)},en.createRoot=function(r,o){if(!Ic(r))throw Error(n(299));var u=!1,d="",g=Cg;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=Mc(r,1,!1,null,null,u,!1,d,g),r[Zn]=o.current,Mo(r.nodeType===8?r.parentNode:r),new Nc(o)},en.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var o=r._reactInternals;if(o===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Qh(o),r=r===null?null:r.stateNode,r},en.flushSync=function(r){return Qr(r)},en.hydrate=function(r,o,u){if(!za(o))throw Error(n(200));return Va(null,r,o,!0,u)},en.hydrateRoot=function(r,o,u){if(!Ic(r))throw Error(n(405));var d=u!=null&&u.hydratedSources||null,g=!1,x="",b=Cg;if(u!=null&&(u.unstable_strictMode===!0&&(g=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onRecoverableError!==void 0&&(b=u.onRecoverableError)),o=Sg(o,null,r,1,u??null,g,!1,x,b),r[Zn]=o.current,Mo(r),d)for(r=0;r<d.length;r++)u=d[r],g=u._getVersion,g=g(u._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[u,g]:o.mutableSourceEagerHydrationData.push(u,g);return new Fa(o)},en.render=function(r,o,u){if(!za(o))throw Error(n(200));return Va(null,r,o,!1,u)},en.unmountComponentAtNode=function(r){if(!za(r))throw Error(n(40));return r._reactRootContainer?(Qr(function(){Va(null,null,r,!1,function(){r._reactRootContainer=null,r[Zn]=null})}),!0):!1},en.unstable_batchedUpdates=bc,en.unstable_renderSubtreeIntoContainer=function(r,o,u,d){if(!za(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Va(r,o,u,!1,d)},en.version="18.3.1-next-f1338f8080-20240426",en}var jg;function Ax(){if(jg)return _c.exports;jg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),_c.exports=eC(),_c.exports}var Dg;function tC(){if(Dg)return $a;Dg=1;var e=Ax();return $a.createRoot=e.createRoot,$a.hydrateRoot=e.hydrateRoot,$a}var nC=tC(),k=jd();const rC=Id(k),bs=Xb({__proto__:null,default:rC},[k]),Dd=k.createContext({});function Ll(e){const t=k.useRef(null);return t.current===null&&(t.current=e()),t.current}const iC=typeof window<"u",_d=iC?k.useLayoutEffect:k.useEffect,Ol=k.createContext(null);function Ld(e,t){e.indexOf(t)===-1&&e.push(t)}function vl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const qn=(e,t,n)=>n>t?t:n<e?e:n;let Fl=()=>{};const Lr={},Nx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Ix=e=>typeof e=="object"&&e!==null,jx=e=>/^0[^.\s]+$/u.test(e);function Dx(e){let t;return()=>(t===void 0&&(t=e()),t)}const bn=e=>e,Cs=(...e)=>e.reduce((t,n)=>i=>n(t(i))),fs=(e,t,n)=>{const i=t-e;return i?(n-e)/i:1};class Od{constructor(){this.subscriptions=[]}add(t){return Ld(this.subscriptions,t),()=>vl(this.subscriptions,t)}notify(t,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,i);else for(let l=0;l<s;l++){const a=this.subscriptions[l];a&&a(t,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const fn=e=>e*1e3,Sn=e=>e/1e3,_x=(e,t)=>t?e*(1e3/t):0,Lx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,oC=1e-7,sC=12;function aC(e,t,n,i,s){let l,a,c=0;do a=t+(n-t)/2,l=Lx(a,i,s)-e,l>0?n=a:t=a;while(Math.abs(l)>oC&&++c<sC);return a}function Es(e,t,n,i){if(e===t&&n===i)return bn;const s=l=>aC(l,0,1,e,n);return l=>l===0||l===1?l:Lx(s(l),t,i)}const Ox=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Fx=e=>t=>1-e(1-t),zx=Es(.33,1.53,.69,.99),Fd=Fx(zx),Vx=Ox(Fd),Bx=e=>e>=1?1:(e*=2)<1?.5*Fd(e):.5*(2-Math.pow(2,-10*(e-1))),zd=e=>1-Math.sin(Math.acos(e)),$x=Fx(zd),Ux=Ox(zd),lC=Es(.42,0,1,1),uC=Es(0,0,.58,1),Wx=Es(.42,0,.58,1),cC=e=>Array.isArray(e)&&typeof e[0]!="number",Hx=e=>Array.isArray(e)&&typeof e[0]=="number",fC={linear:bn,easeIn:lC,easeInOut:Wx,easeOut:uC,circIn:zd,circInOut:Ux,circOut:$x,backIn:Fd,backInOut:Vx,backOut:zx,anticipate:Bx},dC=e=>typeof e=="string",_g=e=>{if(Hx(e)){Fl(e.length===4);const[t,n,i,s]=e;return Es(t,n,i,s)}else if(dC(e))return fC[e];return e},Ua=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function hC(e){let t=new Set,n=new Set,i=!1,s=!1;const l=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(h){l.has(h)&&(f.schedule(h),e()),h(a)}const f={schedule:(h,m=!1,p=!1)=>{const w=p&&i?t:n;return m&&l.add(h),w.add(h),h},cancel:h=>{n.delete(h),l.delete(h)},process:h=>{if(a=h,i){s=!0;return}i=!0;const m=t;t=n,n=m,t.forEach(c),t.clear(),i=!1,s&&(s=!1,f.process(h))}};return f}const pC=40;function Kx(e,t){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},l=()=>n=!0,a=Ua.reduce((T,D)=>(T[D]=hC(l),T),{}),{setup:c,read:f,resolveKeyframes:h,preUpdate:m,update:p,preRender:y,render:w,postRender:S}=a,C=()=>{const T=Lr.useManualTiming,D=T?s.timestamp:performance.now();n=!1,T||(s.delta=i?1e3/60:Math.max(Math.min(D-s.timestamp,pC),1)),s.timestamp=D,s.isProcessing=!0,c.process(s),f.process(s),h.process(s),m.process(s),p.process(s),y.process(s),w.process(s),S.process(s),s.isProcessing=!1,n&&t&&(i=!1,e(C))},E=()=>{n=!0,i=!0,s.isProcessing||e(C)};return{schedule:Ua.reduce((T,D)=>{const U=a[D];return T[D]=(j,Y=!1,W=!1)=>(n||E(),U.schedule(j,Y,W)),T},{}),cancel:T=>{for(let D=0;D<Ua.length;D++)a[Ua[D]].cancel(T)},state:s,steps:a}}const{schedule:Je,cancel:Or,state:It,steps:Fc}=Kx(typeof requestAnimationFrame<"u"?requestAnimationFrame:bn,!0);let il;function mC(){il=void 0}const Kt={now:()=>(il===void 0&&Kt.set(It.isProcessing||Lr.useManualTiming?It.timestamp:performance.now()),il),set:e=>{il=e,queueMicrotask(mC)}},qx=e=>t=>typeof t=="string"&&t.startsWith(e),Xx=qx("--"),gC=qx("var(--"),Vd=e=>gC(e)?yC.test(e.split("/*")[0].trim()):!1,yC=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Lg(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const ro={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ds={...ro,transform:e=>qn(0,1,e)},Wa={...ro,default:1},ns=e=>Math.round(e*1e5)/1e5,Bd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function vC(e){return e==null}const xC=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$d=(e,t)=>n=>!!(typeof n=="string"&&xC.test(n)&&n.startsWith(e)||t&&!vC(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yx=(e,t,n)=>i=>{if(typeof i!="string")return i;const[s,l,a,c]=i.match(Bd);return{[e]:parseFloat(s),[t]:parseFloat(l),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},wC=e=>qn(0,255,e),zc={...ro,transform:e=>Math.round(wC(e))},li={test:$d("rgb","red"),parse:Yx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:i=1})=>"rgba("+zc.transform(e)+", "+zc.transform(t)+", "+zc.transform(n)+", "+ns(ds.transform(i))+")"};function kC(e){let t="",n="",i="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),i=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),i=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,i+=i,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Pf={test:$d("#"),parse:kC,transform:li.transform},Ps=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sr=Ps("deg"),Kn=Ps("%"),be=Ps("px"),SC=Ps("vh"),bC=Ps("vw"),Og={...Kn,parse:e=>Kn.parse(e)/100,transform:e=>Kn.transform(e*100)},Xi={test:$d("hsl","hue"),parse:Yx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:i=1})=>"hsla("+Math.round(e)+", "+Kn.transform(ns(t))+", "+Kn.transform(ns(n))+", "+ns(ds.transform(i))+")"},xt={test:e=>li.test(e)||Pf.test(e)||Xi.test(e),parse:e=>li.test(e)?li.parse(e):Xi.test(e)?Xi.parse(e):Pf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?li.transform(e):Xi.transform(e),getAnimatableNone:e=>{const t=xt.parse(e);return t.alpha=0,xt.transform(t)}},CC=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function EC(e){return isNaN(e)&&typeof e=="string"&&(e.match(Bd)?.length||0)+(e.match(CC)?.length||0)>0}const Gx="number",Qx="color",PC="var",TC="var(",Fg="${}",RC=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zi(e){const t=e.toString(),n=[],i={color:[],number:[],var:[]},s=[];let l=0;const c=t.replace(RC,f=>(xt.test(f)?(i.color.push(l),s.push(Qx),n.push(xt.parse(f))):f.startsWith(TC)?(i.var.push(l),s.push(PC),n.push(f)):(i.number.push(l),s.push(Gx),n.push(parseFloat(f))),++l,Fg)).split(Fg);return{values:n,split:c,indexes:i,types:s}}function MC(e){return Zi(e).values}function Zx({split:e,types:t}){const n=e.length;return i=>{let s="";for(let l=0;l<n;l++)if(s+=e[l],i[l]!==void 0){const a=t[l];a===Gx?s+=ns(i[l]):a===Qx?s+=xt.transform(i[l]):s+=i[l]}return s}}function AC(e){return Zx(Zi(e))}const NC=e=>typeof e=="number"?0:xt.test(e)?xt.getAnimatableNone(e):e,IC=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:NC(e);function jC(e){const t=Zi(e);return Zx(t)(t.values.map((i,s)=>IC(i,t.split[s])))}const Dn={test:EC,parse:MC,createTransformer:AC,getAnimatableNone:jC};function Vc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function DC({hue:e,saturation:t,lightness:n,alpha:i}){e/=360,t/=100,n/=100;let s=0,l=0,a=0;if(!t)s=l=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,f=2*n-c;s=Vc(f,c,e+1/3),l=Vc(f,c,e),a=Vc(f,c,e-1/3)}return{red:Math.round(s*255),green:Math.round(l*255),blue:Math.round(a*255),alpha:i}}function xl(e,t){return n=>n>0?t:e}const Ze=(e,t,n)=>e+(t-e)*n,Bc=(e,t,n)=>{const i=e*e,s=n*(t*t-i)+i;return s<0?0:Math.sqrt(s)},_C=[Pf,li,Xi],LC=e=>_C.find(t=>t.test(e));function zg(e){const t=LC(e);if(!t)return!1;let n=t.parse(e);return t===Xi&&(n=DC(n)),n}const Vg=(e,t)=>{const n=zg(e),i=zg(t);if(!n||!i)return xl(e,t);const s={...n};return l=>(s.red=Bc(n.red,i.red,l),s.green=Bc(n.green,i.green,l),s.blue=Bc(n.blue,i.blue,l),s.alpha=Ze(n.alpha,i.alpha,l),li.transform(s))},Tf=new Set(["none","hidden"]);function OC(e,t){return Tf.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function FC(e,t){return n=>Ze(e,t,n)}function Ud(e){return typeof e=="number"?FC:typeof e=="string"?Vd(e)?xl:xt.test(e)?Vg:BC:Array.isArray(e)?Jx:typeof e=="object"?xt.test(e)?Vg:zC:xl}function Jx(e,t){const n=[...e],i=n.length,s=e.map((l,a)=>Ud(l)(l,t[a]));return l=>{for(let a=0;a<i;a++)n[a]=s[a](l);return n}}function zC(e,t){const n={...e,...t},i={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(i[s]=Ud(e[s])(e[s],t[s]));return s=>{for(const l in i)n[l]=i[l](s);return n}}function VC(e,t){const n=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const l=t.types[s],a=e.indexes[l][i[l]],c=e.values[a]??0;n[s]=c,i[l]++}return n}const BC=(e,t)=>{const n=Dn.createTransformer(t),i=Zi(e),s=Zi(t);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Tf.has(e)&&!s.values.length||Tf.has(t)&&!i.values.length?OC(e,t):Cs(Jx(VC(i,s),s.values),n):xl(e,t)};function ew(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ze(e,t,n):Ud(e)(e,t)}const $C=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Je.update(t,n),stop:()=>Or(t),now:()=>It.isProcessing?It.timestamp:Kt.now()}},tw=(e,t,n=10)=>{let i="";const s=Math.max(Math.round(t/n),2);for(let l=0;l<s;l++)i+=Math.round(e(l/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},wl=2e4;function Wd(e){let t=0;const n=50;let i=e.next(t);for(;!i.done&&t<wl;)t+=n,i=e.next(t);return t>=wl?1/0:t}function UC(e,t=100,n){const i=n({...e,keyframes:[0,t]}),s=Math.min(Wd(i),wl);return{type:"keyframes",ease:l=>i.next(s*l).value/t,duration:Sn(s)}}const dt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Rf(e,t){return e*Math.sqrt(1-t*t)}const WC=12;function HC(e,t,n){let i=n;for(let s=1;s<WC;s++)i=i-e(i)/t(i);return i}const $c=.001;function KC({duration:e=dt.duration,bounce:t=dt.bounce,velocity:n=dt.velocity,mass:i=dt.mass}){let s,l,a=1-t;a=qn(dt.minDamping,dt.maxDamping,a),e=qn(dt.minDuration,dt.maxDuration,Sn(e)),a<1?(s=h=>{const m=h*a,p=m*e,y=m-n,w=Rf(h,a),S=Math.exp(-p);return $c-y/w*S},l=h=>{const p=h*a*e,y=p*n+n,w=Math.pow(a,2)*Math.pow(h,2)*e,S=Math.exp(-p),C=Rf(Math.pow(h,2),a);return(-s(h)+$c>0?-1:1)*((y-w)*S)/C}):(s=h=>{const m=Math.exp(-h*e),p=(h-n)*e+1;return-$c+m*p},l=h=>{const m=Math.exp(-h*e),p=(n-h)*(e*e);return m*p});const c=5/e,f=HC(s,l,c);if(e=fn(e),isNaN(f))return{stiffness:dt.stiffness,damping:dt.damping,duration:e};{const h=Math.pow(f,2)*i;return{stiffness:h,damping:a*2*Math.sqrt(i*h),duration:e}}}const qC=["duration","bounce"],XC=["stiffness","damping","mass"];function Bg(e,t){return t.some(n=>e[n]!==void 0)}function YC(e){let t={velocity:dt.velocity,stiffness:dt.stiffness,damping:dt.damping,mass:dt.mass,isResolvedFromDuration:!1,...e};if(!Bg(e,XC)&&Bg(e,qC))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,l=2*qn(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:dt.mass,stiffness:s,damping:l}}else{const n=KC({...e,velocity:0});t={...t,...n,mass:dt.mass},t.isResolvedFromDuration=!0}return t}function kl(e=dt.visualDuration,t=dt.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:i,restDelta:s}=n;const l=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:l},{stiffness:f,damping:h,mass:m,duration:p,velocity:y,isResolvedFromDuration:w}=YC({...n,velocity:-Sn(n.velocity||0)}),S=y||0,C=h/(2*Math.sqrt(f*m)),E=a-l,P=Sn(Math.sqrt(f/m)),M=Math.abs(E)<5;i||(i=M?dt.restSpeed.granular:dt.restSpeed.default),s||(s=M?dt.restDelta.granular:dt.restDelta.default);let T,D,U,j,Y,W;if(C<1)U=Rf(P,C),j=(S+C*P*E)/U,T=N=>{const X=Math.exp(-C*P*N);return a-X*(j*Math.sin(U*N)+E*Math.cos(U*N))},Y=C*P*j+E*U,W=C*P*E-j*U,D=N=>Math.exp(-C*P*N)*(Y*Math.sin(U*N)+W*Math.cos(U*N));else if(C===1){T=X=>a-Math.exp(-P*X)*(E+(S+P*E)*X);const N=S+P*E;D=X=>Math.exp(-P*X)*(P*N*X-S)}else{const N=P*Math.sqrt(C*C-1);T=Z=>{const te=Math.exp(-C*P*Z),ge=Math.min(N*Z,300);return a-te*((S+C*P*E)*Math.sinh(ge)+N*E*Math.cosh(ge))/N};const X=(S+C*P*E)/N,B=C*P*X-E*N,fe=C*P*E-X*N;D=Z=>{const te=Math.exp(-C*P*Z),ge=Math.min(N*Z,300);return te*(B*Math.sinh(ge)+fe*Math.cosh(ge))}}const L={calculatedDuration:w&&p||null,velocity:N=>fn(D(N)),next:N=>{if(!w&&C<1){const B=Math.exp(-C*P*N),fe=Math.sin(U*N),Z=Math.cos(U*N),te=a-B*(j*fe+E*Z),ge=fn(B*(Y*fe+W*Z));return c.done=Math.abs(ge)<=i&&Math.abs(a-te)<=s,c.value=c.done?a:te,c}const X=T(N);if(w)c.done=N>=p;else{const B=fn(D(N));c.done=Math.abs(B)<=i&&Math.abs(a-X)<=s}return c.value=c.done?a:X,c},toString:()=>{const N=Math.min(Wd(L),wl),X=tw(B=>L.next(N*B).value,N,30);return N+"ms "+X},toTransition:()=>{}};return L}kl.applyToOptions=e=>{const t=UC(e,100,kl);return e.ease=t.ease,e.duration=fn(t.duration),e.type="keyframes",e};const GC=5;function nw(e,t,n){const i=Math.max(t-GC,0);return _x(n-e(i),t-i)}function Mf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:l=500,modifyTarget:a,min:c,max:f,restDelta:h=.5,restSpeed:m}){const p=e[0],y={done:!1,value:p},w=W=>c!==void 0&&W<c||f!==void 0&&W>f,S=W=>c===void 0?f:f===void 0||Math.abs(c-W)<Math.abs(f-W)?c:f;let C=n*t;const E=p+C,P=a===void 0?E:a(E);P!==E&&(C=P-p);const M=W=>-C*Math.exp(-W/i),T=W=>P+M(W),D=W=>{const L=M(W),N=T(W);y.done=Math.abs(L)<=h,y.value=y.done?P:N};let U,j;const Y=W=>{w(y.value)&&(U=W,j=kl({keyframes:[y.value,S(y.value)],velocity:nw(T,W,y.value),damping:s,stiffness:l,restDelta:h,restSpeed:m}))};return Y(0),{calculatedDuration:null,next:W=>{let L=!1;return!j&&U===void 0&&(L=!0,D(W),Y(W)),U!==void 0&&W>=U?j.next(W-U):(!L&&D(W),y)}}}function QC(e,t,n){const i=[],s=n||Lr.mix||ew,l=e.length-1;for(let a=0;a<l;a++){let c=s(e[a],e[a+1]);if(t){const f=Array.isArray(t)?t[a]||bn:t;c=Cs(f,c)}i.push(c)}return i}function ZC(e,t,{clamp:n=!0,ease:i,mixer:s}={}){const l=e.length;if(Fl(l===t.length),l===1)return()=>t[0];if(l===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[l-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=QC(t,i,s),f=c.length,h=m=>{if(a&&m<e[0])return t[0];let p=0;if(f>1)for(;p<e.length-2&&!(m<e[p+1]);p++);const y=fs(e[p],e[p+1],m);return c[p](y)};return n?m=>h(qn(e[0],e[l-1],m)):h}function JC(e,t){const n=e[e.length-1];for(let i=1;i<=t;i++){const s=fs(0,t,i);e.push(Ze(n,1,s))}}function eE(e){const t=[0];return JC(t,e.length-1),t}function tE(e,t){return e.map(n=>n*t)}function nE(e,t){return e.map(()=>t||Wx).splice(0,e.length-1)}function rs({duration:e=300,keyframes:t,times:n,ease:i="easeInOut"}){const s=cC(i)?i.map(_g):_g(i),l={done:!1,value:t[0]},a=tE(n&&n.length===t.length?n:eE(t),e),c=ZC(a,t,{ease:Array.isArray(s)?s:nE(t,s)});return{calculatedDuration:e,next:f=>(l.value=c(f),l.done=f>=e,l)}}const rE=e=>e!==null;function zl(e,{repeat:t,repeatType:n="loop"},i,s=1){const l=e.filter(rE),c=s<0||t&&n!=="loop"&&t%2===1?0:l.length-1;return!c||i===void 0?l[c]:i}const iE={decay:Mf,inertia:Mf,tween:rs,keyframes:rs,spring:kl};function rw(e){typeof e.type=="string"&&(e.type=iE[e.type])}class Hd{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const oE=e=>e/100;class Sl extends Hd{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Kt.now()&&this.tick(Kt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;rw(t);const{type:n=rs,repeat:i=0,repeatDelay:s=0,repeatType:l,velocity:a=0}=t;let{keyframes:c}=t;const f=n||rs;f!==rs&&typeof c[0]!="number"&&(this.mixKeyframes=Cs(oE,ew(c[0],c[1])),c=[0,100]);const h=f({...t,keyframes:c});l==="mirror"&&(this.mirroredGenerator=f({...t,keyframes:[...c].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=Wd(h));const{calculatedDuration:m}=h;this.calculatedDuration=m,this.resolvedDuration=m+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=h}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:l,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:f}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:m,repeat:p,repeatType:y,repeatDelay:w,type:S,onUpdate:C,finalKeyframe:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const P=this.currentTime-h*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?P<0:P>s;this.currentTime=Math.max(P,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let T=this.currentTime,D=i;if(p){const W=Math.min(this.currentTime,s)/c;let L=Math.floor(W),N=W%1;!N&&W>=1&&(N=1),N===1&&L--,L=Math.min(L,p+1),!!(L%2)&&(y==="reverse"?(N=1-N,w&&(N-=w/c)):y==="mirror"&&(D=a)),T=qn(0,1,N)*c}let U;M?(this.delayState.value=m[0],U=this.delayState):U=D.next(T),l&&!M&&(U.value=l(U.value));let{done:j}=U;!M&&f!==null&&(j=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const Y=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return Y&&S!==Mf&&(U.value=zl(m,this.options,E,this.speed)),C&&C(U.value),Y&&this.finish(),U}then(t,n){return this.finished.then(t,n)}get duration(){return Sn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sn(t)}get time(){return Sn(this.currentTime)}set time(t){t=fn(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return nw(i=>this.generator.next(i).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(Kt.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=Sn(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=$C,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Kt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function sE(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ui=e=>e*180/Math.PI,Af=e=>{const t=ui(Math.atan2(e[1],e[0]));return Nf(t)},aE={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Af,rotateZ:Af,skewX:e=>ui(Math.atan(e[1])),skewY:e=>ui(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Nf=e=>(e=e%360,e<0&&(e+=360),e),$g=Af,Ug=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Wg=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),lE={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ug,scaleY:Wg,scale:e=>(Ug(e)+Wg(e))/2,rotateX:e=>Nf(ui(Math.atan2(e[6],e[5]))),rotateY:e=>Nf(ui(Math.atan2(-e[2],e[0]))),rotateZ:$g,rotate:$g,skewX:e=>ui(Math.atan(e[4])),skewY:e=>ui(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function If(e){return e.includes("scale")?1:0}function jf(e,t){if(!e||e==="none")return If(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=lE,s=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=aE,s=c}if(!s)return If(t);const l=i[t],a=s[1].split(",").map(cE);return typeof l=="function"?l(a):a[l]}const uE=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return jf(n,t)};function cE(e){return parseFloat(e.trim())}const io=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],oo=new Set([...io,"pathRotation"]),Hg=e=>e===ro||e===be,fE=new Set(["x","y","z"]),dE=io.filter(e=>!fE.has(e));function hE(e){const t=[];return dE.forEach(n=>{const i=e.getValue(n);i!==void 0&&(t.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),t}const Dr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:i})=>{const s=e.max-e.min;return i==="border-box"?s:s-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>jf(t,"x"),y:(e,{transform:t})=>jf(t,"y")};Dr.translateX=Dr.x;Dr.translateY=Dr.y;const ci=new Set;let Df=!1,_f=!1,Lf=!1;function iw(){if(_f){const e=Array.from(ci).filter(i=>i.needsMeasurement),t=new Set(e.map(i=>i.element)),n=new Map;t.forEach(i=>{const s=hE(i);s.length&&(n.set(i,s),i.render())}),e.forEach(i=>i.measureInitialState()),t.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([l,a])=>{i.getValue(l)?.set(a)})}),e.forEach(i=>i.measureEndState()),e.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}_f=!1,Df=!1,ci.forEach(e=>e.complete(Lf)),ci.clear()}function ow(){ci.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_f=!0)})}function pE(){Lf=!0,ow(),iw(),Lf=!1}class Kd{constructor(t,n,i,s,l,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=i,this.motionValue=s,this.element=l,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(ci.add(this),Df||(Df=!0,Je.read(ow),Je.resolveKeyframes(iw))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:i,motionValue:s}=this;if(t[0]===null){const l=s?.get(),a=t[t.length-1];if(l!==void 0)t[0]=l;else if(i&&n){const c=i.readValue(n,a);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=a),s&&l===void 0&&s.set(t[0])}sE(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ci.delete(this)}cancel(){this.state==="scheduled"&&(ci.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const mE=e=>e.startsWith("--");function sw(e,t,n){mE(t)?e.style.setProperty(t,n):e.style[t]=n}const gE={};function aw(e,t){const n=Dx(e);return()=>gE[t]??n()}const yE=aw(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),lw=aw(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),es=([e,t,n,i])=>`cubic-bezier(${e}, ${t}, ${n}, ${i})`,Kg={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:es([0,.65,.55,1]),circOut:es([.55,0,1,.45]),backIn:es([.31,.01,.66,-.59]),backOut:es([.33,1.53,.69,.99])};function uw(e,t){if(e)return typeof e=="function"?lw()?tw(e,t):"ease-out":Hx(e)?es(e):Array.isArray(e)?e.map(n=>uw(n,t)||Kg.easeOut):Kg[e]}function vE(e,t,n,{delay:i=0,duration:s=300,repeat:l=0,repeatType:a="loop",ease:c="easeOut",times:f}={},h=void 0){const m={[t]:n};f&&(m.offset=f);const p=uw(c,s);Array.isArray(p)&&(m.easing=p);const y={delay:i,duration:s,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:l+1,direction:a==="reverse"?"alternate":"normal"};return h&&(y.pseudoElement=h),e.animate(m,y)}function cw(e){return typeof e=="function"&&"applyToOptions"in e}function xE({type:e,...t}){return cw(e)&&lw()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class fw extends Hd{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:l,allowFlatten:a=!1,finalKeyframe:c,onComplete:f}=t;this.isPseudoElement=!!l,this.allowFlatten=a,this.options=t,Fl(typeof t.type!="string");const h=xE(t);this.animation=vE(n,i,s,h,l),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!l){const m=zl(s,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(m),sw(n,i,m),this.animation.cancel()}f?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Sn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Sn(t)}get time(){return Sn(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=fn(t),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&yE()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),bn):s(this)}}const dw={anticipate:Bx,backInOut:Vx,circInOut:Ux};function wE(e){return e in dw}function kE(e){typeof e.ease=="string"&&wE(e.ease)&&(e.ease=dw[e.ease])}const Uc=10;class SE extends fw{constructor(t){kE(t),rw(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:l,...a}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const c=new Sl({...a,autoplay:!1}),f=Math.max(Uc,Kt.now()-this.startTime),h=qn(0,Uc,f-Uc),m=c.sample(f).value,{name:p}=this.options;l&&p&&sw(l,p,m),n.setWithVelocity(c.sample(Math.max(0,f-h)).value,m,h),c.stop()}}const qg=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dn.test(e)||e==="0")&&!e.startsWith("url("));function bE(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function CE(e,t,n,i){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const l=e[e.length-1],a=qg(s,t),c=qg(l,t);return!a||!c?!1:bE(e)||(n==="spring"||cw(n))&&i}function Of(e){e.duration=0,e.type="keyframes"}const hw=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),EE=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function PE(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&EE.test(e[t]))return!0;return!1}const TE=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),RE=Dx(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ME(e){const{motionValue:t,name:n,repeatDelay:i,repeatType:s,damping:l,type:a,keyframes:c}=e,f=t?.owner?.current;if(!(f instanceof HTMLElement)&&!(f instanceof SVGElement))return!1;const{onUpdate:h,transformTemplate:m}=t.owner.getProps();return RE()&&n&&(hw.has(n)||TE.has(n)&&PE(c))&&(n!=="transform"||!m)&&!h&&!i&&s!=="mirror"&&l!==0&&a!=="inertia"}const AE=40;class NE extends Hd{constructor({autoplay:t=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:l=0,repeatType:a="loop",keyframes:c,name:f,motionValue:h,element:m,...p}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Kt.now();const y={autoplay:t,delay:n,type:i,repeat:s,repeatDelay:l,repeatType:a,name:f,motionValue:h,element:m,...p},w=m?.KeyframeResolver||Kd;this.keyframeResolver=new w(c,(S,C,E)=>this.onKeyframesResolved(S,C,y,!E),f,h,m),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:l,type:a,velocity:c,delay:f,isHandoff:h,onUpdate:m}=i;this.resolvedAt=Kt.now();let p=!0;CE(t,l,a,c)||(p=!1,(Lr.instantAnimations||!f)&&m?.(zl(t,i,n)),t[0]=t[t.length-1],Of(i),i.repeat=0);const w={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>AE?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},S=p&&!h&&ME(w),C=w.motionValue?.owner?.current;let E;if(S)try{E=new SE({...w,element:C})}catch{E=new Sl(w)}else E=new Sl(w);E.finished.then(()=>{this.notifyFinished()}).catch(bn),this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),pE()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function pw(e,t,n,i=0,s=1){const l=Array.from(e).sort((h,m)=>h.sortNodePosition(m)).indexOf(t),a=e.size,c=(a-1)*i;return typeof n=="function"?n(l,a):s===1?l*i:c-l*i}const Xg=30,IE=e=>!isNaN(parseFloat(e));class jE{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=Kt.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Kt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=IE(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Od);const i=this.events[t].add(n);return t==="change"?()=>{i(),Je.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Kt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Xg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Xg);return _x(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ji(e,t){return new jE(e,t)}function qd(e,t){if(e?.inherit&&t){const{inherit:n,...i}=e;return{...t,...i}}return e}function Xd(e,t){const n=e?.[t]??e?.default??e;return n!==e?qd(n,e):n}const DE={type:"spring",stiffness:500,damping:25,restSpeed:10},_E=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LE={type:"keyframes",duration:.8},OE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},FE=(e,{keyframes:t})=>t.length>2?LE:oo.has(e)?e.startsWith("scale")?_E(t[1]):DE:OE,zE=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function VE(e){for(const t in e)if(!zE.has(t))return!0;return!1}const Yd=(e,t,n,i={},s,l)=>a=>{const c=Xd(i,e)||{},f=c.delay||i.delay||0;let{elapsed:h=0}=i;h=h-fn(f);const m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-h,onUpdate:y=>{t.set(y),c.onUpdate&&c.onUpdate(y)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:l?void 0:s};VE(c)||Object.assign(m,FE(e,m)),m.duration&&(m.duration=fn(m.duration)),m.repeatDelay&&(m.repeatDelay=fn(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let p=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(Of(m),m.delay===0&&(p=!0)),(Lr.instantAnimations||Lr.skipAnimations||s?.shouldSkipAnimations||c.skipAnimations)&&(p=!0,Of(m),m.delay=0),m.allowFlatten=!c.type&&!c.ease,p&&!l&&t.get()!==void 0){const y=zl(m.keyframes,c);if(y!==void 0){Je.update(()=>{m.onUpdate(y),m.onComplete()});return}}return c.isSync?new Sl(m):new NE(m)},BE=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $E(e){const t=BE.exec(e);if(!t)return[,];const[,n,i,s]=t;return[`--${n??i}`,s]}function mw(e,t,n=1){const[i,s]=$E(e);if(!i)return;const l=window.getComputedStyle(t).getPropertyValue(i);if(l){const a=l.trim();return Nx(a)?parseFloat(a):a}return Vd(s)?mw(s,t,n+1):s}function Yg(e){const t=[{},{}];return e?.values.forEach((n,i)=>{t[0][i]=n.get(),t[1][i]=n.getVelocity()}),t}function Gd(e,t,n,i){if(typeof t=="function"){const[s,l]=Yg(i);t=t(n!==void 0?n:e.custom,s,l)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,l]=Yg(i);t=t(n!==void 0?n:e.custom,s,l)}return t}function fi(e,t,n){const i=e.getProps();return Gd(i,t,n!==void 0?n:i.custom,e)}const gw=new Set(["width","height","top","left","right","bottom",...io]),Ff=e=>Array.isArray(e);function UE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ji(n))}function WE(e){return Ff(e)?e[e.length-1]||0:e}function HE(e,t){const n=fi(e,t);let{transitionEnd:i={},transition:s={},...l}=n||{};l={...l,...i};for(const a in l){const c=WE(l[a]);UE(e,a,c)}}const jt=e=>!!(e&&e.getVelocity);function KE(e){return!!(jt(e)&&e.add)}function zf(e,t){const n=e.getValue("willChange");if(KE(n))return n.add(t);if(!n&&Lr.WillChange){const i=new Lr.WillChange("auto");e.addValue("willChange",i),i.add(t)}}function Qd(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const qE="framerAppearId",yw="data-"+Qd(qE);function vw(e){return e.props[yw]}function XE({protectedKeys:e,needsAnimating:t},n){const i=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,i}function xw(e,t,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:l,transitionEnd:a,...c}=t;const f=e.getDefaultTransition();l=l?qd(l,f):f;const h=l?.reduceMotion,m=l?.skipAnimations;i&&(l=i);const p=[],y=s&&e.animationState&&e.animationState.getState()[s],w=l?.path;w&&w.animateVisualElement(e,c,l,n,p);for(const S in c){const C=e.getValue(S,e.latestValues[S]??null),E=c[S];if(E===void 0||y&&XE(y,S))continue;const P={delay:n,...Xd(l||{},S)};m&&(P.skipAnimations=!0);const M=C.get();if(M!==void 0&&!C.isAnimating()&&!Array.isArray(E)&&E===M&&!P.velocity){Je.update(()=>C.set(E));continue}let T=!1;if(window.MotionHandoffAnimation){const j=vw(e);if(j){const Y=window.MotionHandoffAnimation(j,S,Je);Y!==null&&(P.startTime=Y,T=!0)}}zf(e,S);const D=h??e.shouldReduceMotion;C.start(Yd(S,C,E,D&&gw.has(S)?{type:!1}:P,e,T));const U=C.animation;U&&p.push(U)}if(a){const S=()=>Je.update(()=>{a&&HE(e,a)});p.length?Promise.all(p).then(S):S()}return p}function Vf(e,t,n={}){const i=fi(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const l=i?()=>Promise.all(xw(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:p}=s;return YE(e,t,f,h,m,p,n)}:()=>Promise.resolve(),{when:c}=s;if(c){const[f,h]=c==="beforeChildren"?[l,a]:[a,l];return f().then(()=>h())}else return Promise.all([l(),a(n.delay)])}function YE(e,t,n=0,i=0,s=0,l=1,a){const c=[];for(const f of e.variantChildren)f.notify("AnimationStart",t),c.push(Vf(f,t,{...a,delay:n+(typeof i=="function"?0:i)+pw(e.variantChildren,f,i,s,l)}).then(()=>f.notify("AnimationComplete",t)));return Promise.all(c)}function GE(e,t,n={}){e.notify("AnimationStart",t);let i;if(Array.isArray(t)){const s=t.map(l=>Vf(e,l,n));i=Promise.all(s)}else if(typeof t=="string")i=Vf(e,t,n);else{const s=typeof t=="function"?fi(e,t,n.custom):t;i=Promise.all(xw(e,s,n))}return i.then(()=>{e.notify("AnimationComplete",t)})}const QE={test:e=>e==="auto",parse:e=>e},ww=e=>t=>t.test(e),kw=[ro,be,Kn,sr,bC,SC,QE],Gg=e=>kw.find(ww(e));function ZE(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jx(e):!0}const JE=new Set(["brightness","contrast","saturate","opacity"]);function eP(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[i]=n.match(Bd)||[];if(!i)return e;const s=n.replace(i,"");let l=JE.has(t)?1:0;return i!==n&&(l*=100),t+"("+l+s+")"}const tP=/\b([a-z-]*)\(.*?\)/gu,Bf={...Dn,getAnimatableNone:e=>{const t=e.match(tP);return t?t.map(eP).join(" "):e}},$f={...Dn,getAnimatableNone:e=>{const t=Dn.parse(e);return Dn.createTransformer(e)(t.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Qg={...ro,transform:Math.round},nP={rotate:sr,pathRotation:sr,rotateX:sr,rotateY:sr,rotateZ:sr,scale:Wa,scaleX:Wa,scaleY:Wa,scaleZ:Wa,skew:sr,skewX:sr,skewY:sr,distance:be,translateX:be,translateY:be,translateZ:be,x:be,y:be,z:be,perspective:be,transformPerspective:be,opacity:ds,originX:Og,originY:Og,originZ:be},bl={borderWidth:be,borderTopWidth:be,borderRightWidth:be,borderBottomWidth:be,borderLeftWidth:be,borderRadius:be,borderTopLeftRadius:be,borderTopRightRadius:be,borderBottomRightRadius:be,borderBottomLeftRadius:be,width:be,maxWidth:be,height:be,maxHeight:be,top:be,right:be,bottom:be,left:be,inset:be,insetBlock:be,insetBlockStart:be,insetBlockEnd:be,insetInline:be,insetInlineStart:be,insetInlineEnd:be,padding:be,paddingTop:be,paddingRight:be,paddingBottom:be,paddingLeft:be,paddingBlock:be,paddingBlockStart:be,paddingBlockEnd:be,paddingInline:be,paddingInlineStart:be,paddingInlineEnd:be,margin:be,marginTop:be,marginRight:be,marginBottom:be,marginLeft:be,marginBlock:be,marginBlockStart:be,marginBlockEnd:be,marginInline:be,marginInlineStart:be,marginInlineEnd:be,fontSize:be,backgroundPositionX:be,backgroundPositionY:be,...nP,zIndex:Qg,fillOpacity:ds,strokeOpacity:ds,numOctaves:Qg},rP={...bl,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:Bf,WebkitFilter:Bf,mask:$f,WebkitMask:$f},Sw=e=>rP[e],iP=new Set([Bf,$f]);function bw(e,t){let n=Sw(e);return iP.has(n)||(n=Dn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const oP=new Set(["auto","none","0"]);function sP(e,t,n){let i=0,s;for(;i<e.length&&!s;){const l=e[i];typeof l=="string"&&!oP.has(l)&&Zi(l).values.length&&(s=e[i]),i++}if(s&&n)for(const l of t)e[l]=bw(n,s)}class aP extends Kd{constructor(t,n,i,s,l){super(t,n,i,s,l,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let m=0;m<t.length;m++){let p=t[m];if(typeof p=="string"&&(p=p.trim(),Vd(p))){const y=mw(p,n.current);y!==void 0&&(t[m]=y),m===t.length-1&&(this.finalKeyframe=p)}}if(this.resolveNoneKeyframes(),!gw.has(i)||t.length!==2)return;const[s,l]=t,a=Gg(s),c=Gg(l),f=Lg(s),h=Lg(l);if(f!==h&&Dr[i]){this.needsMeasurement=!0;return}if(a!==c)if(Hg(a)&&Hg(c))for(let m=0;m<t.length;m++){const p=t[m];typeof p=="string"&&(t[m]=parseFloat(p))}else Dr[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,i=[];for(let s=0;s<t.length;s++)(t[s]===null||ZE(t[s]))&&i.push(s);i.length&&sP(t,i,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:i}=this;if(!t||!t.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Dr[i](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(i,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const l=i.length-1,a=i[l];i[l]=Dr[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([c,f])=>{t.getValue(c).set(f)}),this.resolveNoneKeyframes()}}const Zd=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Cw(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const s=n?.[e]??i.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e).filter(i=>i!=null)}const Uf=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ol(e){return Ix(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Jd}=Kx(queueMicrotask,!1),jn={x:!1,y:!1};function Ew(){return jn.x||jn.y}function lP(e){return e==="x"||e==="y"?jn[e]?null:(jn[e]=!0,()=>{jn[e]=!1}):jn.x||jn.y?null:(jn.x=jn.y=!0,()=>{jn.x=jn.y=!1})}function Pw(e,t){const n=Cw(e),i=new AbortController,s={passive:!0,...t,signal:i.signal};return[n,s,()=>i.abort()]}function uP(e){return!(e.pointerType==="touch"||Ew())}function cP(e,t,n={}){const[i,s,l]=Pw(e,n);return i.forEach(a=>{let c=!1,f=!1,h;const m=()=>{a.removeEventListener("pointerleave",S)},p=E=>{h&&(h(E),h=void 0),m()},y=E=>{c=!1,window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),f&&(f=!1,p(E))},w=()=>{c=!0,window.addEventListener("pointerup",y,s),window.addEventListener("pointercancel",y,s)},S=E=>{if(E.pointerType!=="touch"){if(c){f=!0;return}p(E)}},C=E=>{if(!uP(E))return;f=!1;const P=t(a,E);typeof P=="function"&&(h=P,a.addEventListener("pointerleave",S,s))};a.addEventListener("pointerenter",C,s),a.addEventListener("pointerdown",w,s)}),l}const Tw=(e,t)=>t?e===t?!0:Tw(e,t.parentElement):!1,eh=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,fP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function dP(e){return fP.has(e.tagName)||e.isContentEditable===!0}const hP=new Set(["INPUT","SELECT","TEXTAREA"]);function pP(e){return hP.has(e.tagName)||e.isContentEditable===!0}const sl=new WeakSet;function Zg(e){return t=>{t.key==="Enter"&&e(t)}}function Wc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const mP=(e,t)=>{const n=e.currentTarget;if(!n)return;const i=Zg(()=>{if(sl.has(n))return;Wc(n,"down");const s=Zg(()=>{Wc(n,"up")}),l=()=>Wc(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",l,t)});n.addEventListener("keydown",i,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),t)};function Jg(e){return eh(e)&&!Ew()}const ey=new WeakSet;function gP(e,t,n={}){const[i,s,l]=Pw(e,n),a=c=>{const f=c.currentTarget;if(!Jg(c)||ey.has(c))return;sl.add(f),n.stopPropagation&&ey.add(c);const h=t(f,c),m={...s,capture:!0},p=(S,C)=>{window.removeEventListener("pointerup",y,m),window.removeEventListener("pointercancel",w,m),sl.has(f)&&sl.delete(f),Jg(S)&&typeof h=="function"&&h(S,{success:C})},y=S=>{p(S,f===window||f===document||n.useGlobalTarget||Tw(f,S.target))},w=S=>{p(S,!1)};window.addEventListener("pointerup",y,m),window.addEventListener("pointercancel",w,m)};return i.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,s),ol(c)&&(c.addEventListener("focus",h=>mP(h,s)),!dP(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),l}function th(e){return Ix(e)&&"ownerSVGElement"in e}const al=new WeakMap;let ll;const Rw=(e,t,n)=>(i,s)=>s&&s[0]?s[0][e+"Size"]:th(i)&&"getBBox"in i?i.getBBox()[t]:i[n],yP=Rw("inline","width","offsetWidth"),vP=Rw("block","height","offsetHeight");function xP({target:e,borderBoxSize:t}){al.get(e)?.forEach(n=>{n(e,{get width(){return yP(e,t)},get height(){return vP(e,t)}})})}function wP(e){e.forEach(xP)}function kP(){typeof ResizeObserver>"u"||(ll=new ResizeObserver(wP))}function SP(e,t){ll||kP();const n=Cw(e);return n.forEach(i=>{let s=al.get(i);s||(s=new Set,al.set(i,s)),s.add(t),ll?.observe(i)}),()=>{n.forEach(i=>{const s=al.get(i);s?.delete(t),s?.size||ll?.unobserve(i)})}}const ul=new Set;let Yi;function bP(){Yi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ul.forEach(t=>t(e))},window.addEventListener("resize",Yi)}function CP(e){return ul.add(e),Yi||bP(),()=>{ul.delete(e),!ul.size&&typeof Yi=="function"&&(window.removeEventListener("resize",Yi),Yi=void 0)}}function ty(e,t){return typeof e=="function"?CP(e):SP(e,t)}function EP(e){return th(e)&&e.tagName==="svg"}const PP=[...kw,xt,Dn],TP=e=>PP.find(ww(e)),ny=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gi=()=>({x:ny(),y:ny()}),ry=()=>({min:0,max:0}),St=()=>({x:ry(),y:ry()}),RP=new WeakMap;function Vl(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function hs(e){return typeof e=="string"||Array.isArray(e)}const nh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],rh=["initial",...nh];function Bl(e){return Vl(e.animate)||rh.some(t=>hs(e[t]))}function Mw(e){return!!(Bl(e)||e.variants)}function MP(e,t,n){for(const i in t){const s=t[i],l=n[i];if(jt(s))e.addValue(i,s);else if(jt(l))e.addValue(i,Ji(s,{owner:e}));else if(l!==s)if(e.hasValue(i)){const a=e.getValue(i);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(i);e.addValue(i,Ji(a!==void 0?a:s,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const Wf={current:null},Aw={current:!1},AP=typeof window<"u";function NP(){if(Aw.current=!0,!!AP)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Wf.current=e.matches;e.addEventListener("change",t),t()}else Wf.current=!1}const iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Cl={};function Nw(e){Cl=e}function IP(){return Cl}class jP{scrapeMotionValuesFromProps(t,n,i){return{}}constructor({parent:t,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:l,blockInitialAnimation:a,visualState:c},f={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Kd,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=Kt.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,Je.render(this.render,!1,!0))};const{latestValues:h,renderState:m}=c;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=m,this.parent=t,this.props=n,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=l,this.options=f,this.blockInitialAnimation=!!a,this.isControllingVariants=Bl(n),this.isVariantNode=Mw(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...y}=this.scrapeMotionValuesFromProps(n,{},this);for(const w in y){const S=y[w];h[w]!==void 0&&jt(S)&&S.set(h[w])}}mount(t){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=t,RP.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Aw.current||NP(),this.shouldReduceMotion=Wf.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Or(this.notifyUpdate),Or(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&hw.has(t)&&this.current instanceof HTMLElement){const{factory:a,keyframes:c,times:f,ease:h,duration:m}=n.accelerate,p=new fw({element:this.current,name:t,keyframes:c,times:f,ease:h,duration:fn(m)}),y=a(p);this.valueSubscriptions.set(t,()=>{y(),p.cancel()});return}const i=oo.has(t);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Je.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let l;typeof window<"u"&&window.MotionCheckAppearSync&&(l=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),l&&l()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Cl){const n=Cl[t];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[t]&&s&&i(this.props)&&(this.features[t]=new s(this)),this.features[t]){const l=this.features[t];l.isMounted?l.update():(l.mount(),l.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):St()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<iy.length;i++){const s=iy[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const l="on"+s,a=t[l];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=MP(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const i=this.values.get(t);n!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return i===void 0&&n!==void 0&&(i=Ji(n===null?void 0:n,{owner:this}),this.addValue(t,i)),i}readValue(t,n){let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Nx(i)||jx(i))?i=parseFloat(i):!TP(i)&&Dn.test(n)&&(i=bw(t,n)),this.setBaseTarget(t,jt(i)?i.get():i)),jt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const l=Gd(this.props,n,this.presenceContext?.custom);l&&(i=l[t])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!jt(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Od),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Jd.render(this.render)}}class Iw extends jP{constructor(){super(...arguments),this.KeyframeResolver=aP}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const i=t.style;return i?i[n]:void 0}removeValueFromRenderState(t,{vars:n,style:i}){delete n[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;jt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Vr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function jw({top:e,left:t,right:n,bottom:i}){return{x:{min:t,max:n},y:{min:e,max:i}}}function DP({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function _P(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),i=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Hc(e){return e===void 0||e===1}function Hf({scale:e,scaleX:t,scaleY:n}){return!Hc(e)||!Hc(t)||!Hc(n)}function oi(e){return Hf(e)||Dw(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Dw(e){return oy(e.x)||oy(e.y)}function oy(e){return e&&e!=="0%"}function El(e,t,n){const i=e-n,s=t*i;return n+s}function sy(e,t,n,i,s){return s!==void 0&&(e=El(e,s,i)),El(e,n,i)+t}function Kf(e,t=0,n=1,i,s){e.min=sy(e.min,t,n,i,s),e.max=sy(e.max,t,n,i,s)}function _w(e,{x:t,y:n}){Kf(e.x,t.translate,t.scale,t.originPoint),Kf(e.y,n.translate,n.scale,n.originPoint)}const ay=.999999999999,ly=1.0000000000001;function LP(e,t,n,i=!1){const s=n.length;if(!s)return;t.x=t.y=1;let l,a;for(let c=0;c<s;c++){l=n[c],a=l.projectionDelta;const{visualElement:f}=l.options;f&&f.props.style&&f.props.style.display==="contents"||(i&&l.options.layoutScroll&&l.scroll&&l!==l.root&&(Wn(e.x,-l.scroll.offset.x),Wn(e.y,-l.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,_w(e,a)),i&&oi(l.latestValues)&&cl(e,l.latestValues,l.layout?.layoutBox))}t.x<ly&&t.x>ay&&(t.x=1),t.y<ly&&t.y>ay&&(t.y=1)}function Wn(e,t){e.min+=t,e.max+=t}function uy(e,t,n,i,s=.5){const l=Ze(e.min,e.max,s);Kf(e,t,n,l,i)}function cy(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function cl(e,t,n){const i=n??e;uy(e.x,cy(t.x,i.x),t.scaleX,t.scale,t.originX),uy(e.y,cy(t.y,i.y),t.scaleY,t.scale,t.originY)}function Lw(e,t){return jw(_P(e.getBoundingClientRect(),t))}function OP(e,t,n){const i=Lw(e,n),{scroll:s}=t;return s&&(Wn(i.x,s.offset.x),Wn(i.y,s.offset.y)),i}const FP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zP=io.length;function VP(e,t,n){let i="",s=!0;for(let a=0;a<zP;a++){const c=io[a],f=e[c];if(f===void 0)continue;let h=!0;if(typeof f=="number")h=f===(c.startsWith("scale")?1:0);else{const m=parseFloat(f);h=c.startsWith("scale")?m===1:m===0}if(!h||n){const m=Uf(f,bl[c]);if(!h){s=!1;const p=FP[c]||c;i+=`${p}(${m}) `}n&&(t[c]=m)}}const l=e.pathRotation;return l&&(s=!1,i+=`rotate(${Uf(l,bl.pathRotation)}) `),i=i.trim(),n?i=n(t,s?"":i):s&&(i="none"),i}function ih(e,t,n){const{style:i,vars:s,transformOrigin:l}=e;let a=!1,c=!1;for(const f in t){const h=t[f];if(oo.has(f)){a=!0;continue}else if(Xx(f)){s[f]=h;continue}else{const m=Uf(h,bl[f]);f.startsWith("origin")?(c=!0,l[f]=m):i[f]=m}}if(t.transform||(a||n?i.transform=VP(t,e.transform,n):i.transform&&(i.transform="none")),c){const{originX:f="50%",originY:h="50%",originZ:m=0}=l;i.transformOrigin=`${f} ${h} ${m}`}}function Ow(e,{style:t,vars:n},i,s){const l=e.style;let a;for(a in t)l[a]=t[a];s?.applyProjectionStyles(l,i);for(a in n)l.setProperty(a,n[a])}function fy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Xo={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(be.test(e))e=parseFloat(e);else return e;const n=fy(e,t.target.x),i=fy(e,t.target.y);return`${n}% ${i}%`}},BP={correct:(e,{treeScale:t,projectionDelta:n})=>{const i=e,s=Dn.parse(e);if(s.length>5)return i;const l=Dn.createTransformer(e),a=typeof s[0]!="number"?1:0,c=n.x.scale*t.x,f=n.y.scale*t.y;s[0+a]/=c,s[1+a]/=f;const h=Ze(c,f,.5);return typeof s[2+a]=="number"&&(s[2+a]/=h),typeof s[3+a]=="number"&&(s[3+a]/=h),l(s)}},qf={borderRadius:{...Xo,applyTo:[...Zd]},borderTopLeftRadius:Xo,borderTopRightRadius:Xo,borderBottomLeftRadius:Xo,borderBottomRightRadius:Xo,boxShadow:BP};function Fw(e,{layout:t,layoutId:n}){return oo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!qf[e]||e==="opacity")}function oh(e,t,n){const i=e.style,s=t?.style,l={};if(!i)return l;for(const a in i)(jt(i[a])||s&&jt(s[a])||Fw(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(l[a]=i[a]);return l}function $P(e){return window.getComputedStyle(e)}class UP extends Iw{constructor(){super(...arguments),this.type="html",this.renderInstance=Ow}mount(t){Fl(!!t.style),super.mount(t)}readValueFromInstance(t,n){if(oo.has(n))return this.projection?.isProjecting?If(n):uE(t,n);{const i=$P(t),s=(Xx(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Lw(t,n)}build(t,n,i){ih(t,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,i){return oh(t,n,i)}}const WP={offset:"stroke-dashoffset",array:"stroke-dasharray"},HP={offset:"strokeDashoffset",array:"strokeDasharray"};function KP(e,t,n=1,i=0,s=!0){e.pathLength=1;const l=s?WP:HP;e[l.offset]=`${-i}`,e[l.array]=`${t} ${n}`}const qP=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function zw(e,{attrX:t,attrY:n,attrScale:i,pathLength:s,pathSpacing:l=1,pathOffset:a=0,...c},f,h,m){if(ih(e,c,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:y}=e;p.transform&&(y.transform=p.transform,delete p.transform),(y.transform||p.transformOrigin)&&(y.transformOrigin=p.transformOrigin??"50% 50%",delete p.transformOrigin),y.transform&&(y.transformBox=m?.transformBox??"fill-box",delete p.transformBox);for(const w of qP)p[w]!==void 0&&(y[w]=p[w],delete p[w]);t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),i!==void 0&&(p.scale=i),s!==void 0&&KP(p,s,l,a,!1)}const Vw=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Bw=e=>typeof e=="string"&&e.toLowerCase()==="svg";function XP(e,t,n,i){Ow(e,t,void 0,i);for(const s in t.attrs)e.setAttribute(Vw.has(s)?s:Qd(s),t.attrs[s])}function $w(e,t,n){const i=oh(e,t,n);for(const s in e)if(jt(e[s])||jt(t[s])){const l=io.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[l]=e[s]}return i}class YP extends Iw{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=St}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(oo.has(n)){const i=Sw(n);return i&&i.default||0}return n=Vw.has(n)?n:Qd(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,i){return $w(t,n,i)}build(t,n,i){zw(t,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,n,i,s){XP(t,n,i,s)}mount(t){this.isSVGTag=Bw(t.tagName),super.mount(t)}}const GP=rh.length;function Uw(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Uw(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<GP;n++){const i=rh[n],s=e.props[i];(hs(s)||s===!1)&&(t[i]=s)}return t}function Ww(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++)if(t[i]!==e[i])return!1;return!0}const QP=[...nh].reverse(),ZP=nh.length;function JP(e){return t=>Promise.all(t.map(({animation:n,options:i})=>GE(e,n,i)))}function eT(e){let t=JP(e),n=dy(),i=!0,s=!1;const l=h=>(m,p)=>{const y=fi(e,p,h==="exit"?e.presenceContext?.custom:void 0);if(y){const{transition:w,transitionEnd:S,...C}=y;m={...m,...C,...S}}return m};function a(h){t=h(e)}function c(h){const{props:m}=e,p=Uw(e.parent)||{},y=[],w=new Set;let S={},C=1/0;for(let P=0;P<ZP;P++){const M=QP[P],T=n[M],D=m[M]!==void 0?m[M]:p[M],U=hs(D),j=M===h?T.isActive:null;j===!1&&(C=P);let Y=D===p[M]&&D!==m[M]&&U;if(Y&&(i||s)&&e.manuallyAnimateOnMount&&(Y=!1),T.protectedKeys={...S},!T.isActive&&j===null||!D&&!T.prevProp||Vl(D)||typeof D=="boolean")continue;if(M==="exit"&&T.isActive&&j!==!0){T.prevResolvedValues&&(S={...S,...T.prevResolvedValues});continue}const W=tT(T.prevProp,D);let L=W||M===h&&T.isActive&&!Y&&U||P>C&&U,N=!1;const X=Array.isArray(D)?D:[D];let B=X.reduce(l(M),{});j===!1&&(B={});const{prevResolvedValues:fe={}}=T,Z={...fe,...B},te=Q=>{L=!0,w.has(Q)&&(N=!0,w.delete(Q)),T.needsAnimating[Q]=!0;const de=e.getValue(Q);de&&(de.liveStyle=!1)};for(const Q in Z){const de=B[Q],R=fe[Q];if(S.hasOwnProperty(Q))continue;let O=!1;Ff(de)&&Ff(R)?O=!Ww(de,R)||W:O=de!==R,O?de!=null?te(Q):w.add(Q):de!==void 0&&w.has(Q)?te(Q):T.protectedKeys[Q]=!0}T.prevProp=D,T.prevResolvedValues=B,T.isActive&&(S={...S,...B}),(i||s)&&e.blockInitialAnimation&&(L=!1);const ge=Y&&W;L&&(!ge||N)&&y.push(...X.map(Q=>{const de={type:M};if(typeof Q=="string"&&(i||s)&&!ge&&e.manuallyAnimateOnMount&&e.parent){const{parent:R}=e,O=fi(R,Q);if(R.enteringChildren&&O){const{delayChildren:G}=O.transition||{};de.delay=pw(R.enteringChildren,e,G)}}return{animation:Q,options:de}}))}if(w.size){const P={};if(typeof m.initial!="boolean"){const M=fi(e,Array.isArray(m.initial)?m.initial[0]:m.initial);M&&M.transition&&(P.transition=M.transition)}w.forEach(M=>{const T=e.getBaseTarget(M),D=e.getValue(M);D&&(D.liveStyle=!0),P[M]=T??null}),y.push({animation:P})}let E=!!y.length;return i&&(m.initial===!1||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(E=!1),i=!1,s=!1,E?t(y):Promise.resolve()}function f(h,m){if(n[h].isActive===m)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(h,m)),n[h].isActive=m;const p=c(h);for(const y in n)n[y].protectedKeys={};return p}return{animateChanges:c,setActive:f,setAnimateFunction:a,getState:()=>n,reset:()=>{n=dy(),s=!0}}}function tT(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ww(t,e):!1}function ti(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dy(){return{animate:ti(!0),whileInView:ti(),whileHover:ti(),whileTap:ti(),whileDrag:ti(),whileFocus:ti(),exit:ti()}}function Xf(e,t){e.min=t.min,e.max=t.max}function In(e,t){Xf(e.x,t.x),Xf(e.y,t.y)}function hy(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Hw=1e-4,nT=1-Hw,rT=1+Hw,Kw=.01,iT=0-Kw,oT=0+Kw;function qt(e){return e.max-e.min}function sT(e,t,n){return Math.abs(e-t)<=n}function py(e,t,n,i=.5){e.origin=i,e.originPoint=Ze(t.min,t.max,e.origin),e.scale=qt(n)/qt(t),e.translate=Ze(n.min,n.max,e.origin)-e.originPoint,(e.scale>=nT&&e.scale<=rT||isNaN(e.scale))&&(e.scale=1),(e.translate>=iT&&e.translate<=oT||isNaN(e.translate))&&(e.translate=0)}function is(e,t,n,i){py(e.x,t.x,n.x,i?i.originX:void 0),py(e.y,t.y,n.y,i?i.originY:void 0)}function my(e,t,n,i=0){const s=i?Ze(n.min,n.max,i):n.min;e.min=s+t.min,e.max=e.min+qt(t)}function aT(e,t,n,i){my(e.x,t.x,n.x,i?.x),my(e.y,t.y,n.y,i?.y)}function gy(e,t,n,i=0){const s=i?Ze(n.min,n.max,i):n.min;e.min=t.min-s,e.max=e.min+qt(t)}function Pl(e,t,n,i){gy(e.x,t.x,n.x,i?.x),gy(e.y,t.y,n.y,i?.y)}function yy(e,t,n,i,s){return e-=t,e=El(e,1/n,i),s!==void 0&&(e=El(e,1/s,i)),e}function lT(e,t=0,n=1,i=.5,s,l=e,a=e){if(Kn.test(t)&&(t=parseFloat(t),t=Ze(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=Ze(l.min,l.max,i);e===l&&(c-=t),e.min=yy(e.min,t,n,c,s),e.max=yy(e.max,t,n,c,s)}function vy(e,t,[n,i,s],l,a){lT(e,t[n],t[i],t[s],t.scale,l,a)}const uT=["x","scaleX","originX"],cT=["y","scaleY","originY"];function xy(e,t,n,i){vy(e.x,t,uT,n?n.x:void 0,i?i.x:void 0),vy(e.y,t,cT,n?n.y:void 0,i?i.y:void 0)}function wy(e){return e.translate===0&&e.scale===1}function qw(e){return wy(e.x)&&wy(e.y)}function ky(e,t){return e.min===t.min&&e.max===t.max}function fT(e,t){return ky(e.x,t.x)&&ky(e.y,t.y)}function Sy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Xw(e,t){return Sy(e.x,t.x)&&Sy(e.y,t.y)}function by(e){return qt(e.x)/qt(e.y)}function Cy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $n(e){return[e("x"),e("y")]}function dT(e,t,n){let i="";const s=e.x.translate/t.x,l=e.y.translate/t.y,a=n?.z||0;if((s||l||a)&&(i=`translate3d(${s}px, ${l}px, ${a}px) `),(t.x!==1||t.y!==1)&&(i+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:h,rotate:m,pathRotation:p,rotateX:y,rotateY:w,skewX:S,skewY:C}=n;h&&(i=`perspective(${h}px) ${i}`),m&&(i+=`rotate(${m}deg) `),p&&(i+=`rotate(${p}deg) `),y&&(i+=`rotateX(${y}deg) `),w&&(i+=`rotateY(${w}deg) `),S&&(i+=`skewX(${S}deg) `),C&&(i+=`skewY(${C}deg) `)}const c=e.x.scale*t.x,f=e.y.scale*t.y;return(c!==1||f!==1)&&(i+=`scale(${c}, ${f})`),i||"none"}const hT=Zd.length,Ey=e=>typeof e=="string"?parseFloat(e):e,Py=e=>typeof e=="number"||be.test(e);function pT(e,t,n,i,s,l){s?(e.opacity=Ze(0,n.opacity??1,mT(i)),e.opacityExit=Ze(t.opacity??1,0,gT(i))):l&&(e.opacity=Ze(t.opacity??1,n.opacity??1,i));for(let a=0;a<hT;a++){const c=Zd[a];let f=Ty(t,c),h=Ty(n,c);if(f===void 0&&h===void 0)continue;f||(f=0),h||(h=0),f===0||h===0||Py(f)===Py(h)?(e[c]=Math.max(Ze(Ey(f),Ey(h),i),0),(Kn.test(h)||Kn.test(f))&&(e[c]+="%")):e[c]=h}(t.rotate||n.rotate)&&(e.rotate=Ze(t.rotate||0,n.rotate||0,i))}function Ty(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const mT=Yw(0,.5,$x),gT=Yw(.5,.95,bn);function Yw(e,t,n){return i=>i<e?0:i>t?1:n(fs(e,t,i))}function yT(e,t,n){const i=jt(e)?e:Ji(e);return i.start(Yd("",i,t,n)),i.animation}function ps(e,t,n,i={passive:!0}){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}const vT=(e,t)=>e.depth-t.depth;class xT{constructor(){this.children=[],this.isDirty=!1}add(t){Ld(this.children,t),this.isDirty=!0}remove(t){vl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(vT),this.isDirty=!1,this.children.forEach(t)}}function wT(e,t){const n=Kt.now(),i=({timestamp:s})=>{const l=s-n;l>=t&&(Or(i),e(l-t))};return Je.setup(i,!0),()=>Or(i)}function fl(e){return jt(e)?e.get():e}class kT{constructor(){this.members=[]}add(t){Ld(this.members,t);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===t||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(vl(this.members,i),i.unmount())}t.scheduleRender()}remove(t){if(vl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){for(let n=this.members.indexOf(t)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(t,n){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.updateSnapshot(),t.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:l}=t.options;(s===void 0||s!==l)&&(t.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const dl={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Kc=["","X","Y","Z"],ST=1e3;let bT=0;function qc(e,t,n,i){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),i&&(i[e]=0))}function Gw(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vw(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:l}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Je,!(s||l))}const{parent:i}=e;i&&!i.hasCheckedOptimisedAppear&&Gw(i)}function Qw({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(a={},c=t?.()){this.id=bT++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(PT),this.nodes.forEach(IT),this.nodes.forEach(jT),this.nodes.forEach(TT)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let f=0;f<this.path.length;f++)this.path[f].shouldResetTransform=!0;this.root===this&&(this.nodes=new xT)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Od),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const f=this.eventHandlers.get(a);f&&f.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=th(a)&&!EP(a),this.instance=a;const{layoutId:c,layout:f,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(f||c)&&(this.isLayoutDirty=!0),e){let m,p=0;const y=()=>this.root.updateBlockedByResize=!1;Je.read(()=>{p=window.innerWidth}),e(a,()=>{const w=window.innerWidth;w!==p&&(p=w,this.root.updateBlockedByResize=!0,m&&m(),m=wT(y,250),dl.hasAnimatedSinceResize&&(dl.hasAnimatedSinceResize=!1,this.nodes.forEach(Ay)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||f)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:p,hasRelativeLayoutChanged:y,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const S=this.options.transition||h.getDefaultTransition()||FT,{onLayoutAnimationStart:C,onLayoutAnimationComplete:E}=h.getProps(),P=!this.targetLayout||!Xw(this.targetLayout,w),M=!p&&y;if(this.options.layoutRoot||this.resumeFrom||M||p&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const T={...Xd(S,"layout"),onPlay:C,onComplete:E};(h.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T),this.setAnimationOrigin(m,M,T.path)}else p||Ay(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Or(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(DT),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Gw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const p=this.path[m];p.shouldResetTransform=!0,(typeof p.latestValues.x=="string"||typeof p.latestValues.y=="string")&&(p.isLayoutDirty=!0),p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:f}=this.options;if(c===void 0&&!f)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const f=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),f&&this.nodes.forEach(MT),this.nodes.forEach(Ry);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(My);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(AT),this.nodes.forEach(NT),this.nodes.forEach(CT),this.nodes.forEach(ET)):this.nodes.forEach(My),this.clearAllSnapshots();const c=Kt.now();It.delta=qn(0,1e3/60,c-It.timestamp),It.timestamp=c,It.isProcessing=!0,Fc.update.process(It),Fc.preRender.process(It),Fc.render.process(It),It.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Jd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(RT),this.sharedNodes.forEach(_T)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Je.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Je.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!qt(this.snapshot.measuredBox.x)&&!qt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let f=0;f<this.path.length;f++)this.path[f].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=St()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&this.instance){const f=i(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:f,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:f}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!qw(this.projectionDelta),f=this.getTransformTemplate(),h=f?f(this.latestValues,""):void 0,m=h!==this.prevTransformTemplateValue;a&&this.instance&&(c||oi(this.latestValues)||m)&&(s(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let f=this.removeElementScroll(c);return a&&(f=this.removeTransform(f)),zT(f),{animationId:this.root.animationId,measuredBox:c,layoutBox:f,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return St();const c=a.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(VT))){const{scroll:h}=this.root;h&&(Wn(c.x,h.offset.x),Wn(c.y,h.offset.y))}return c}removeElementScroll(a){const c=St();if(In(c,a),this.scroll?.wasRoot)return c;for(let f=0;f<this.path.length;f++){const h=this.path[f],{scroll:m,options:p}=h;h!==this.root&&m&&p.layoutScroll&&(m.wasRoot&&In(c,a),Wn(c.x,m.offset.x),Wn(c.y,m.offset.y))}return c}applyTransform(a,c=!1,f){const h=f||St();In(h,a);for(let m=0;m<this.path.length;m++){const p=this.path[m];!c&&p.options.layoutScroll&&p.scroll&&p!==p.root&&(Wn(h.x,-p.scroll.offset.x),Wn(h.y,-p.scroll.offset.y)),oi(p.latestValues)&&cl(h,p.latestValues,p.layout?.layoutBox)}return oi(this.latestValues)&&cl(h,this.latestValues,this.layout?.layoutBox),h}removeTransform(a){const c=St();In(c,a);for(let f=0;f<this.path.length;f++){const h=this.path[f];if(!oi(h.latestValues))continue;let m;h.instance&&(Hf(h.latestValues)&&h.updateSnapshot(),m=St(),In(m,h.measurePageBox())),xy(c,h.latestValues,h.snapshot?.layoutBox,m)}return oi(this.latestValues)&&xy(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==It.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const f=!!this.resumingFrom||this!==c;if(!(a||f&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:p}=this.options;if(!this.layout||!(m||p))return;this.resolvedRelativeTargetAt=It.timestamp;const y=this.getClosestProjectingParent();y&&this.linkedParentVersion!==y.layoutVersion&&!y.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&y&&y.layout?this.createRelativeTarget(y,this.layout.layoutBox,y.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=St(),this.targetWithTransforms=St()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),aT(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):In(this.target,this.layout.layoutBox),_w(this.target,this.targetDelta)):In(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?this.createRelativeTarget(y,this.target,y.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Hf(this.parent.latestValues)||Dw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,c,f){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=St(),this.relativeTargetOrigin=St(),Pl(this.relativeTargetOrigin,c,f,this.options.layoutAnchor||void 0),In(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const a=this.getLead(),c=!!this.resumingFrom||this!==a;let f=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(f=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(f=!1),this.resolvedRelativeTargetAt===It.timestamp&&(f=!1),f)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;In(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,y=this.treeScale.y;LP(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=St());const{target:w}=a;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hy(this.prevProjectionDelta.x,this.projectionDelta.x),hy(this.prevProjectionDelta.y,this.projectionDelta.y)),is(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==y||!Cy(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cy(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){if(this.options.visualElement?.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Gi(),this.projectionDelta=Gi(),this.projectionDeltaWithTransform=Gi()}setAnimationOrigin(a,c=!1,f){const h=this.snapshot,m=h?h.latestValues:{},p={...this.latestValues},y=Gi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const w=St(),S=h?h.source:void 0,C=this.layout?this.layout.source:void 0,E=S!==C,P=this.getStack(),M=!P||P.members.length<=1,T=!!(E&&!M&&this.options.crossfade===!0&&!this.path.some(OT));this.animationProgress=0;let D;const U=f?.interpolateProjection(a);this.mixTargetDelta=j=>{const Y=j/1e3,W=U?.(Y);W?(y.x.translate=W.x,y.x.scale=Ze(a.x.scale,1,Y),y.x.origin=a.x.origin,y.x.originPoint=a.x.originPoint,y.y.translate=W.y,y.y.scale=Ze(a.y.scale,1,Y),y.y.origin=a.y.origin,y.y.originPoint=a.y.originPoint):(Ny(y.x,a.x,Y),Ny(y.y,a.y,Y)),this.setTargetDelta(y),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Pl(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),LT(this.relativeTarget,this.relativeTargetOrigin,w,Y),D&&fT(this.relativeTarget,D)&&(this.isProjectionDirty=!1),D||(D=St()),In(D,this.relativeTarget)),E&&(this.animationValues=p,pT(p,m,this.latestValues,Y,T,M)),W&&W.rotate!==void 0&&(this.animationValues||(this.animationValues=p),this.animationValues.pathRotation=W.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=Y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Or(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Je.update(()=>{dl.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ji(0)),this.motionValue.jump(0,!1),this.currentAnimation=yT(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ST),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:f,layout:h,latestValues:m}=a;if(!(!c||!f||!h)){if(this!==a&&this.layout&&h&&Zw(this.options.animationType,this.layout.layoutBox,h.layoutBox)){f=this.target||St();const p=qt(this.layout.layoutBox.x);f.x.min=a.target.x.min,f.x.max=f.x.min+p;const y=qt(this.layout.layoutBox.y);f.y.min=a.target.y.min,f.y.max=f.y.min+y}In(c,f),cl(c,m),is(this.projectionDeltaWithTransform,this.layoutCorrected,c,m)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new kT),this.sharedNodes.get(a).add(c);const h=c.options.initialPromotionConfig;c.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){const{layoutId:a}=this.options;return a?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:a}=this.options;return a?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:f}={}){const h=this.getStack();h&&h.promote(this,f),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:f}=a;if((f.z||f.rotate||f.rotateX||f.rotateY||f.rotateZ||f.skewX||f.skewY)&&(c=!0),!c)return;const h={};f.z&&qc("z",a,h,this.animationValues);for(let m=0;m<Kc.length;m++)qc(`rotate${Kc[m]}`,a,h,this.animationValues),qc(`skew${Kc[m]}`,a,h,this.animationValues);a.render();for(const m in h)a.setStaticValue(m,h[m]),this.animationValues&&(this.animationValues[m]=h[m]);a.scheduleRender()}applyProjectionStyles(a,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const f=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=fl(c?.pointerEvents)||"",a.transform=f?f(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=fl(c?.pointerEvents)||""),this.hasProjected&&!oi(this.latestValues)&&(a.transform=f?f({},""):"none",this.hasProjected=!1);return}a.visibility="";const m=h.animationValues||h.latestValues;this.applyTransformsToTarget();let p=dT(this.projectionDeltaWithTransform,this.treeScale,m);f&&(p=f(m,p)),a.transform=p;const{x:y,y:w}=this.projectionDelta;a.transformOrigin=`${y.origin*100}% ${w.origin*100}% 0`,h.animationValues?a.opacity=h===this?m.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:m.opacityExit:a.opacity=h===this?m.opacity!==void 0?m.opacity:"":m.opacityExit!==void 0?m.opacityExit:0;for(const S in qf){if(m[S]===void 0)continue;const{correct:C,applyTo:E,isCSSVariable:P}=qf[S],M=p==="none"?m[S]:C(m[S],h);if(E){const T=E.length;for(let D=0;D<T;D++)a[E[D]]=M}else P?this.options.visualElement.renderState.vars[S]=M:a[S]=M}this.options.layoutId&&(a.pointerEvents=h===this?fl(c?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>a.currentAnimation?.stop()),this.root.nodes.forEach(Ry),this.root.sharedNodes.clear()}}}function CT(e){e.updateLayout()}function ET(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=e.layout,{animationType:s}=e.options,l=t.source!==e.layout.source;if(s==="size")$n(m=>{const p=l?t.measuredBox[m]:t.layoutBox[m],y=qt(p);p.min=n[m].min,p.max=p.min+y});else if(s==="x"||s==="y"){const m=s==="x"?"y":"x";Xf(l?t.measuredBox[m]:t.layoutBox[m],n[m])}else Zw(s,t.layoutBox,n)&&$n(m=>{const p=l?t.measuredBox[m]:t.layoutBox[m],y=qt(n[m]);p.max=p.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+y)});const a=Gi();is(a,n,t.layoutBox);const c=Gi();l?is(c,e.applyTransform(i,!0),t.measuredBox):is(c,n,t.layoutBox);const f=!qw(a);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:p,layout:y}=m;if(p&&y){const w=e.options.layoutAnchor||void 0,S=St();Pl(S,t.layoutBox,p.layoutBox,w);const C=St();Pl(C,n,y.layoutBox,w),Xw(S,C)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=C,e.relativeTargetOrigin=S,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:f,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function PT(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function TT(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function RT(e){e.clearSnapshot()}function Ry(e){e.clearMeasurements()}function MT(e){e.isLayoutDirty=!0,e.updateLayout()}function My(e){e.isLayoutDirty=!1}function AT(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function NT(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ay(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function IT(e){e.resolveTargetDelta()}function jT(e){e.calcProjection()}function DT(e){e.resetSkewAndRotation()}function _T(e){e.removeLeadSnapshot()}function Ny(e,t,n){e.translate=Ze(t.translate,0,n),e.scale=Ze(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Iy(e,t,n,i){e.min=Ze(t.min,n.min,i),e.max=Ze(t.max,n.max,i)}function LT(e,t,n,i){Iy(e.x,t.x,n.x,i),Iy(e.y,t.y,n.y,i)}function OT(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const FT={duration:.45,ease:[.4,0,.1,1]},jy=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Dy=jy("applewebkit/")&&!jy("chrome/")?Math.round:bn;function _y(e){e.min=Dy(e.min),e.max=Dy(e.max)}function zT(e){_y(e.x),_y(e.y)}function Zw(e,t,n){return e==="position"||e==="preserve-aspect"&&!sT(by(t),by(n),.2)}function VT(e){return e!==e.root&&e.scroll?.wasRoot}const BT=Qw({attachResizeListener:(e,t)=>ps(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Xc={current:void 0},Jw=Qw({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xc.current){const e=new BT({});e.mount(window),e.setOptions({layoutScroll:!0}),Xc.current=e}return Xc.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),ms=k.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ly(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function $T(...e){return t=>{let n=!1;const i=e.map(s=>{const l=Ly(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():Ly(e[s],null)}}}}function UT(...e){return k.useCallback($T(...e),e)}class WT extends k.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(ol(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=ol(i)&&i.offsetWidth||0,l=ol(i)&&i.offsetHeight||0,a=getComputedStyle(n),c=this.props.sizeRef.current;c.height=parseFloat(a.height),c.width=parseFloat(a.width),c.top=n.offsetTop,c.left=n.offsetLeft,c.right=s-c.width-c.left,c.bottom=l-c.height-c.top,c.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function HT({children:e,isPresent:t,anchorX:n,anchorY:i,root:s,pop:l}){const a=k.useId(),c=k.useRef(null),f=k.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=k.useContext(ms),m=l!==!1?e.props?.ref??e?.ref:void 0,p=UT(c,m);return k.useInsertionEffect(()=>{const{width:y,height:w,top:S,left:C,right:E,bottom:P,direction:M}=f.current;if(t||l===!1||!c.current||!y||!w)return;const T=M==="rtl",D=n==="left"?T?`right: ${E}`:`left: ${C}`:T?`left: ${C}`:`right: ${E}`,U=i==="bottom"?`bottom: ${P}`:`top: ${S}`;c.current.dataset.motionPopId=a;const j=document.createElement("style");h&&(j.nonce=h);const Y=s??document.head;return Y.appendChild(j),j.sheet&&j.sheet.insertRule(`
|
|
41
|
+
[data-motion-pop-id="${a}"] {
|
|
42
|
+
position: absolute !important;
|
|
43
|
+
width: ${y}px !important;
|
|
44
|
+
height: ${w}px !important;
|
|
45
|
+
${D}px !important;
|
|
46
|
+
${U}px !important;
|
|
47
|
+
}
|
|
48
|
+
`),()=>{c.current?.removeAttribute("data-motion-pop-id"),Y.contains(j)&&Y.removeChild(j)}},[t]),v.jsx(WT,{isPresent:t,childRef:c,sizeRef:f,pop:l,children:l===!1?e:k.cloneElement(e,{ref:p})})}const KT=({children:e,initial:t,isPresent:n,onExitComplete:i,custom:s,presenceAffectsLayout:l,mode:a,anchorX:c,anchorY:f,root:h})=>{const m=Ll(qT),p=k.useId(),y=k.useRef(n),w=k.useRef(i);_d(()=>{y.current=n,w.current=i});let S=!0,C=k.useMemo(()=>(S=!1,{id:p,initial:t,isPresent:n,custom:s,onExitComplete:E=>{m.set(E,!0);for(const P of m.values())if(!P)return;i&&i()},register:E=>(m.set(E,!1),()=>{m.delete(E),!y.current&&!m.size&&w.current?.()})}),[n,m,i]);return l&&S&&(C={...C}),k.useMemo(()=>{m.forEach((E,P)=>m.set(P,!1))},[n]),k.useEffect(()=>{!n&&!m.size&&i&&i()},[n]),e=v.jsx(HT,{pop:a==="popLayout",isPresent:n,anchorX:c,anchorY:f,root:h,children:e}),v.jsx(Ol.Provider,{value:C,children:e})};function qT(){return new Map}function e0(e=!0){const t=k.useContext(Ol);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=t,l=k.useId();k.useEffect(()=>{if(e)return s(l)},[e]);const a=k.useCallback(()=>e&&i&&i(l),[l,i,e]);return!n&&i?[!1,a]:[!0]}const Ha=e=>e.key||"";function Oy(e){const t=[];return k.Children.forEach(e,n=>{k.isValidElement(n)&&t.push(n)}),t}const XT=({children:e,custom:t,initial:n=!0,onExitComplete:i,presenceAffectsLayout:s=!0,mode:l="sync",propagate:a=!1,anchorX:c="left",anchorY:f="top",root:h})=>{const[m,p]=e0(a),y=k.useMemo(()=>Oy(e),[e]),w=a&&!m?[]:y.map(Ha),S=k.useRef(!0),C=k.useRef(y),E=Ll(()=>new Map),P=k.useRef(new Set),[M,T]=k.useState(y),[D,U]=k.useState(y);_d(()=>{S.current=!1,C.current=y;for(let W=0;W<D.length;W++){const L=Ha(D[W]);w.includes(L)?(E.delete(L),P.current.delete(L)):E.get(L)!==!0&&E.set(L,!1)}},[D,w.length,w.join("-")]);const j=[];if(y!==M){let W=[...y];for(let L=0;L<D.length;L++){const N=D[L],X=Ha(N);w.includes(X)||(W.splice(L,0,N),j.push(N))}return l==="wait"&&j.length&&(W=j),U(Oy(W)),T(y),null}const{forceRender:Y}=k.useContext(Dd);return v.jsx(v.Fragment,{children:D.map(W=>{const L=Ha(W),N=a&&!m?!1:y===D||w.includes(L),X=()=>{if(P.current.has(L))return;if(E.has(L))P.current.add(L),E.set(L,!0);else return;let B=!0;E.forEach(fe=>{fe||(B=!1)}),B&&(Y?.(),U(C.current),a&&p?.(),i&&i())};return v.jsx(KT,{isPresent:N,initial:!S.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:l,root:h,onExitComplete:N?void 0:X,anchorX:c,anchorY:f,children:W},L)})})},t0=k.createContext({strict:!1}),Fy={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let zy=!1;function YT(){if(zy)return;const e={};for(const t in Fy)e[t]={isEnabled:n=>Fy[t].some(i=>!!n[i])};Nw(e),zy=!0}function n0(){return YT(),IP()}function GT(e){const t=n0();for(const n in e)t[n]={...t[n],...e[n]};Nw(t)}const QT=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Tl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||QT.has(e)}let r0=e=>!Tl(e);function i0(e){typeof e=="function"&&(r0=t=>t.startsWith("on")?!Tl(t):e(t))}try{i0(require("@emotion/is-prop-valid").default)}catch{}function ZT(e,t,n){const i={};for(const s in e)s==="values"&&typeof e.values=="object"||jt(e[s])||(r0(s)||n===!0&&Tl(s)||!t&&!Tl(s)||e.draggable&&s.startsWith("onDrag"))&&(i[s]=e[s]);return i}function JT({children:e,isValidProp:t,...n}){t&&i0(t);const i=k.useContext(ms);n={...i,...n},n.transition=qd(n.transition,i.transition),n.isStatic=Ll(()=>n.isStatic);const s=k.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return v.jsx(ms.Provider,{value:s,children:e})}const $l=k.createContext({});function eR(e,t){if(Bl(e)){const{initial:n,animate:i}=e;return{initial:n===!1||hs(n)?n:void 0,animate:hs(i)?i:void 0}}return e.inherit!==!1?t:{}}function tR(e){const{initial:t,animate:n}=eR(e,k.useContext($l));return k.useMemo(()=>({initial:t,animate:n}),[Vy(t),Vy(n)])}function Vy(e){return Array.isArray(e)?e.join(" "):e}const sh=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function o0(e,t,n){for(const i in t)!jt(t[i])&&!Fw(i,n)&&(e[i]=t[i])}function nR({transformTemplate:e},t){return k.useMemo(()=>{const n=sh();return ih(n,t,e),Object.assign({},n.vars,n.style)},[t])}function rR(e,t){const n=e.style||{},i={};return o0(i,n,e),Object.assign(i,nR(e,t)),i}function iR(e,t){const n={},i=rR(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const s0=()=>({...sh(),attrs:{}});function oR(e,t,n,i){const s=k.useMemo(()=>{const l=s0();return zw(l,t,Bw(i),e.transformTemplate,e.style),{...l.attrs,style:{...l.style}}},[t]);if(e.style){const l={};o0(l,e.style,e),s.style={...l,...s.style}}return s}const sR=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ah(e){return typeof e!="string"||e.includes("-")?!1:!!(sR.indexOf(e)>-1||/[A-Z]/u.test(e))}function aR(e,t,n,{latestValues:i},s,l=!1,a){const f=(a??ah(e)?oR:iR)(t,i,s,e),h=ZT(t,typeof e=="string",l),m=e!==k.Fragment?{...h,...f,ref:n}:{},{children:p}=t,y=k.useMemo(()=>jt(p)?p.get():p,[p]);return k.createElement(e,{...m,children:y})}function lR({scrapeMotionValuesFromProps:e,createRenderState:t},n,i,s){return{latestValues:uR(n,i,s,e),renderState:t()}}function uR(e,t,n,i){const s={},l=i(e,{});for(const y in l)s[y]=fl(l[y]);let{initial:a,animate:c}=e;const f=Bl(e),h=Mw(e);t&&h&&!f&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let m=n?n.initial===!1:!1;m=m||a===!1;const p=m?c:a;if(p&&typeof p!="boolean"&&!Vl(p)){const y=Array.isArray(p)?p:[p];for(let w=0;w<y.length;w++){const S=Gd(e,y[w]);if(S){const{transitionEnd:C,transition:E,...P}=S;for(const M in P){let T=P[M];if(Array.isArray(T)){const D=m?T.length-1:0;T=T[D]}T!==null&&(s[M]=T)}for(const M in C)s[M]=C[M]}}}return s}const a0=e=>(t,n)=>{const i=k.useContext($l),s=k.useContext(Ol),l=()=>lR(e,t,i,s);return n?l():Ll(l)},cR=a0({scrapeMotionValuesFromProps:oh,createRenderState:sh}),fR=a0({scrapeMotionValuesFromProps:$w,createRenderState:s0}),dR=Symbol.for("motionComponentSymbol");function hR(e,t,n){const i=k.useRef(n);k.useInsertionEffect(()=>{i.current=n});const s=k.useRef(null);return k.useCallback(l=>{l&&e.onMount?.(l),t&&(l?t.mount(l):t.unmount());const a=i.current;if(typeof a=="function")if(l){const c=a(l);typeof c=="function"&&(s.current=c)}else s.current?(s.current(),s.current=null):a(l);else a&&(a.current=l)},[t])}const l0=k.createContext({});function Hi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pR(e,t,n,i,s,l){const{visualElement:a}=k.useContext($l),c=k.useContext(t0),f=k.useContext(Ol),h=k.useContext(ms),m=h.reducedMotion,p=h.skipAnimations,y=k.useRef(null),w=k.useRef(!1);i=i||c.renderer,!y.current&&i&&(y.current=i(e,{visualState:t,parent:a,props:n,presenceContext:f,blockInitialAnimation:f?f.initial===!1:!1,reducedMotionConfig:m,skipAnimations:p,isSVG:l}),w.current&&y.current&&(y.current.manuallyAnimateOnMount=!0));const S=y.current,C=k.useContext(l0);S&&!S.projection&&s&&(S.type==="html"||S.type==="svg")&&mR(y.current,n,s,C);const E=k.useRef(!1);k.useInsertionEffect(()=>{S&&E.current&&S.update(n,f)});const P=n[yw],M=k.useRef(!!P&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(P)&&window.MotionHasOptimisedAnimation?.(P));return _d(()=>{w.current=!0,S&&(E.current=!0,window.MotionIsMounted=!0,S.updateFeatures(),S.scheduleRenderMicrotask(),M.current&&S.animationState&&S.animationState.animateChanges())}),k.useEffect(()=>{S&&(!M.current&&S.animationState&&S.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(P)}),M.current=!1),S.enteringChildren=void 0)}),S}function mR(e,t,n,i){const{layoutId:s,layout:l,drag:a,dragConstraints:c,layoutScroll:f,layoutRoot:h,layoutAnchor:m,layoutCrossfade:p}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:u0(e.parent)),e.projection.setOptions({layoutId:s,layout:l,alwaysMeasureLayout:!!a||c&&Hi(c),visualElement:e,animationType:typeof l=="string"?l:"both",initialPromotionConfig:i,crossfade:p,layoutScroll:f,layoutRoot:h,layoutAnchor:m})}function u0(e){if(e)return e.options.allowProjection!==!1?e.projection:u0(e.parent)}function Yc(e,{forwardMotionProps:t=!1,type:n}={},i,s){i&>(i);const l=n?n==="svg":ah(e),a=l?fR:cR;function c(h,m){let p;const y={...k.useContext(ms),...h,layoutId:gR(h)},{isStatic:w}=y,S=tR(h),C=a(h,w);if(!w&&typeof window<"u"){yR();const E=vR(y);p=E.MeasureLayout,S.visualElement=pR(e,C,y,s,E.ProjectionNode,l)}return v.jsxs($l.Provider,{value:S,children:[p&&S.visualElement?v.jsx(p,{visualElement:S.visualElement,...y}):null,aR(e,h,hR(C,S.visualElement,m),C,w,t,l)]})}c.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const f=k.forwardRef(c);return f[dR]=e,f}function gR({layoutId:e}){const t=k.useContext(Dd).id;return t&&e!==void 0?t+"-"+e:e}function yR(e,t){k.useContext(t0).strict}function vR(e){const t=n0(),{drag:n,layout:i}=t;if(!n&&!i)return{};const s={...n,...i};return{MeasureLayout:n?.isEnabled(e)||i?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function xR(e,t){if(typeof Proxy>"u")return Yc;const n=new Map,i=(l,a)=>Yc(l,a,e,t),s=(l,a)=>i(l,a);return new Proxy(s,{get:(l,a)=>a==="create"?i:(n.has(a)||n.set(a,Yc(a,void 0,e,t)),n.get(a))})}const wR=(e,t)=>t.isSVG??ah(e)?new YP(t):new UP(t,{allowProjection:e!==k.Fragment});class kR extends Vr{constructor(t){super(t),t.animationState||(t.animationState=eT(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Vl(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let SR=0;class bR extends Vr{constructor(){super(...arguments),this.id=SR++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;if(t&&i===!1){if(this.isExitComplete){const{initial:l,custom:a}=this.node.getProps();if(typeof l=="string"||typeof l=="object"&&l!==null&&!Array.isArray(l)){const c=fi(this.node,l,a);if(c){const{transition:f,transitionEnd:h,...m}=c;for(const p in m)this.node.getValue(p)?.jump(m[p])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const CR={animation:{Feature:kR},exit:{Feature:bR}};function Ts(e){return{point:{x:e.pageX,y:e.pageY}}}const ER=e=>t=>eh(t)&&e(t,Ts(t));function os(e,t,n,i){return ps(e,t,ER(n),i)}const c0=({current:e})=>e?e.ownerDocument.defaultView:null,By=(e,t)=>Math.abs(e-t);function PR(e,t){const n=By(e.x,t.x),i=By(e.y,t.y);return Math.sqrt(n**2+i**2)}const $y=new Set(["auto","scroll"]);class f0{constructor(t,n,{transformPagePoint:i,contextWindow:s=window,dragSnapToOrigin:l=!1,distanceThreshold:a=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=S=>{this.handleScroll(S.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ka(this.lastRawMoveEventInfo,this.transformPagePoint));const S=Gc(this.lastMoveEventInfo,this.history),C=this.startEvent!==null,E=PR(S.offset,{x:0,y:0})>=this.distanceThreshold;if(!C&&!E)return;const{point:P}=S,{timestamp:M}=It;this.history.push({...P,timestamp:M});const{onStart:T,onMove:D}=this.handlers;C||(T&&T(this.lastMoveEvent,S),this.startEvent=this.lastMoveEvent),D&&D(this.lastMoveEvent,S)},this.handlePointerMove=(S,C)=>{this.lastMoveEvent=S,this.lastRawMoveEventInfo=C,this.lastMoveEventInfo=Ka(C,this.transformPagePoint),Je.update(this.updatePoint,!0)},this.handlePointerUp=(S,C)=>{this.end();const{onEnd:E,onSessionEnd:P,resumeAnimation:M}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&M&&M(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Gc(S.type==="pointercancel"?this.lastMoveEventInfo:Ka(C,this.transformPagePoint),this.history);this.startEvent&&E&&E(S,T),P&&P(S,T)},!eh(t))return;this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=s||window;const f=Ts(t),h=Ka(f,this.transformPagePoint),{point:m}=h,{timestamp:p}=It;this.history=[{...m,timestamp:p}];const{onSessionStart:y}=n;y&&y(t,Gc(h,this.history));const w={passive:!0,capture:!0};this.removeListeners=Cs(os(this.contextWindow,"pointermove",this.handlePointerMove,w),os(this.contextWindow,"pointerup",this.handlePointerUp,w),os(this.contextWindow,"pointercancel",this.handlePointerUp,w)),c&&this.startScrollTracking(c)}startScrollTracking(t){let n=t.parentElement;for(;n;){const i=getComputedStyle(n);($y.has(i.overflowX)||$y.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const i=t===window,s=i?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},l={x:s.x-n.x,y:s.y-n.y};l.x===0&&l.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=l.x,this.lastMoveEventInfo.point.y+=l.y):this.history.length>0&&(this.history[0].x-=l.x,this.history[0].y-=l.y),this.scrollPositions.set(t,s),Je.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Or(this.updatePoint)}}function Ka(e,t){return t?{point:t(e.point)}:e}function Uy(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Gc({point:e},t){return{point:e,delta:Uy(e,d0(t)),offset:Uy(e,TR(t)),velocity:RR(t,.1)}}function TR(e){return e[0]}function d0(e){return e[e.length-1]}function RR(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,i=null;const s=d0(e);for(;n>=0&&(i=e[n],!(s.timestamp-i.timestamp>fn(t)));)n--;if(!i)return{x:0,y:0};i===e[0]&&e.length>2&&s.timestamp-i.timestamp>fn(t)*2&&(i=e[1]);const l=Sn(s.timestamp-i.timestamp);if(l===0)return{x:0,y:0};const a={x:(s.x-i.x)/l,y:(s.y-i.y)/l};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function MR(e,{min:t,max:n},i){return t!==void 0&&e<t?e=i?Ze(t,e,i.min):Math.max(e,t):n!==void 0&&e>n&&(e=i?Ze(n,e,i.max):Math.min(e,n)),e}function Wy(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function AR(e,{top:t,left:n,bottom:i,right:s}){return{x:Wy(e.x,n,s),y:Wy(e.y,t,i)}}function Hy(e,t){let n=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,i]=[i,n]),{min:n,max:i}}function NR(e,t){return{x:Hy(e.x,t.x),y:Hy(e.y,t.y)}}function IR(e,t){let n=.5;const i=qt(e),s=qt(t);return s>i?n=fs(t.min,t.max-i,e.min):i>s&&(n=fs(e.min,e.max-s,t.min)),qn(0,1,n)}function jR(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Yf=.35;function DR(e=Yf){return e===!1?e=0:e===!0&&(e=Yf),{x:Ky(e,"left","right"),y:Ky(e,"top","bottom")}}function Ky(e,t,n){return{min:qy(e,t),max:qy(e,n)}}function qy(e,t){return typeof e=="number"?e:e[t]||0}const _R=new WeakMap;class LR{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=St(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const l=p=>{n&&this.snapToCursor(Ts(p).point),this.stopAnimation()},a=(p,y)=>{const{drag:w,dragPropagation:S,onDragStart:C}=this.getProps();if(w&&!S&&(this.openDragLock&&this.openDragLock(),this.openDragLock=lP(w),!this.openDragLock))return;this.latestPointerEvent=p,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$n(P=>{let M=this.getAxisMotionValue(P).get()||0;if(Kn.test(M)){const{projection:T}=this.visualElement;if(T&&T.layout){const D=T.layout.layoutBox[P];D&&(M=qt(D)*(parseFloat(M)/100))}}this.originPoint[P]=M}),C&&Je.update(()=>C(p,y),!1,!0),zf(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},c=(p,y)=>{this.latestPointerEvent=p,this.latestPanInfo=y;const{dragPropagation:w,dragDirectionLock:S,onDirectionLock:C,onDrag:E}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:P}=y;if(S&&this.currentDirection===null){this.currentDirection=FR(P),this.currentDirection!==null&&C&&C(this.currentDirection);return}this.updateAxis("x",y.point,P),this.updateAxis("y",y.point,P),this.visualElement.render(),E&&Je.update(()=>E(p,y),!1,!0)},f=(p,y)=>{this.latestPointerEvent=p,this.latestPanInfo=y,this.stop(p,y),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:p}=this.getProps();(p||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:m}=this.getProps();this.panSession=new f0(t,{onSessionStart:l,onStart:a,onMove:c,onSessionEnd:f,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:m,distanceThreshold:i,contextWindow:c0(this.visualElement),element:this.visualElement.current})}stop(t,n){const i=t||this.latestPointerEvent,s=n||this.latestPanInfo,l=this.isDragging;if(this.cancel(),!l||!s||!i)return;const{velocity:a}=s;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&Je.postRender(()=>c(i,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,i){const{drag:s}=this.getProps();if(!i||!qa(t,s,this.currentDirection))return;const l=this.getAxisMotionValue(t);let a=this.originPoint[t]+i[t];this.constraints&&this.constraints[t]&&(a=MR(a,this.constraints[t],this.elastic[t])),l.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&Hi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&i?this.constraints=AR(i.layoutBox,t):this.constraints=!1,this.elastic=DR(n),s!==this.constraints&&!Hi(t)&&i&&this.constraints&&!this.hasMutatedConstraints&&$n(l=>{this.constraints!==!1&&this.getAxisMotionValue(l)&&(this.constraints[l]=jR(i.layoutBox[l],this.constraints[l]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Hi(t))return!1;const i=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;s.root&&(s.root.scroll=void 0,s.root.updateScroll());const l=OP(i,s.root,this.visualElement.getTransformPagePoint());let a=NR(s.layout.layoutBox,l);if(n){const c=n(DP(a));this.hasMutatedConstraints=!!c,c&&(a=jw(c))}return a}startAnimation(t){const{drag:n,dragMomentum:i,dragElastic:s,dragTransition:l,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),f=this.constraints||{},h=$n(m=>{if(!qa(m,n,this.currentDirection))return;let p=f&&f[m]||{};(a===!0||a===m)&&(p={min:0,max:0});const y=s?200:1e6,w=s?40:1e7,S={type:"inertia",velocity:i?t[m]:0,bounceStiffness:y,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...l,...p};return this.startAxisValueAnimation(m,S)});return Promise.all(h).then(c)}startAxisValueAnimation(t,n){const i=this.getAxisMotionValue(t);return zf(this.visualElement,t),i.start(Yd(t,i,0,n,this.visualElement,!1))}stopAnimation(){$n(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps()[n];return s||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){$n(n=>{const{drag:i}=this.getProps();if(!qa(n,i,this.currentDirection))return;const{projection:s}=this.visualElement,l=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:c}=s.layout.layoutBox[n],f=l.get()||0;l.set(t[n]-Ze(a,c,.5)+f)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!Hi(n)||!i||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};$n(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const f=c.get();s[a]=IR({min:f,max:f},this.constraints[a])}});const{transformTemplate:l}=this.visualElement.getProps();this.visualElement.current.style.transform=l?l({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),$n(a=>{if(!qa(a,t,null))return;const c=this.getAxisMotionValue(a),{min:f,max:h}=this.constraints[a];c.set(Ze(f,h,s[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_R.set(this.visualElement,this);const t=this.visualElement.current,n=os(t,"pointerdown",h=>{const{drag:m,dragListener:p=!0}=this.getProps(),y=h.target,w=y!==t&&pP(y);m&&p&&!w&&this.start(h)});let i;const s=()=>{const{dragConstraints:h}=this.getProps();Hi(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),i||(i=OR(t,h.current,()=>this.scalePositionWithinConstraints())))},{projection:l}=this.visualElement,a=l.addEventListener("measure",s);l&&!l.layout&&(l.root&&l.root.updateScroll(),l.updateLayout()),Je.read(s);const c=ps(window,"resize",()=>this.scalePositionWithinConstraints()),f=l.addEventListener("didUpdate",({delta:h,hasLayoutChanged:m})=>{this.isDragging&&m&&($n(p=>{const y=this.getAxisMotionValue(p);y&&(this.originPoint[p]+=h[p].translate,y.set(y.get()+h[p].translate))}),this.visualElement.render())});return()=>{c(),n(),a(),f&&f(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:s=!1,dragConstraints:l=!1,dragElastic:a=Yf,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:l,dragElastic:a,dragMomentum:c}}}function Xy(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function OR(e,t,n){const i=ty(e,Xy(n)),s=ty(t,Xy(n));return()=>{i(),s()}}function qa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function FR(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class zR extends Vr{constructor(t){super(t),this.removeGroupControls=bn,this.removeListeners=bn,this.controls=new LR(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bn}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Qc=e=>(t,n)=>{e&&Je.update(()=>e(t,n),!1,!0)};class VR extends Vr{constructor(){super(...arguments),this.removePointerDownListener=bn}onPointerDown(t){this.session=new f0(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:c0(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:i,onPanEnd:s}=this.node.getProps();return{onSessionStart:Qc(t),onStart:Qc(n),onMove:Qc(i),onEnd:(l,a)=>{delete this.session,s&&Je.postRender(()=>s(l,a))}}}mount(){this.removePointerDownListener=os(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Zc=!1;class BR extends k.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i,layoutId:s}=this.props,{projection:l}=t;l&&(n.group&&n.group.add(l),i&&i.register&&s&&i.register(l),Zc&&l.root.didUpdate(),l.addEventListener("animationComplete",()=>{this.safeToRemove()}),l.setOptions({...l.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),dl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:i,drag:s,isPresent:l}=this.props,{projection:a}=i;return a&&(a.isPresent=l,t.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),Zc=!0,s||t.layoutDependency!==n||n===void 0||t.isPresent!==l?a.willUpdate():this.safeToRemove(),t.isPresent!==l&&(l?a.promote():a.relegate()||Je.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:i}=t;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),Jd.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:s}=t;Zc=!0,s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),i&&i.deregister&&i.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function h0(e){const[t,n]=e0(),i=k.useContext(Dd);return v.jsx(BR,{...e,layoutGroup:i,switchLayoutGroup:k.useContext(l0),isPresent:t,safeToRemove:n})}const $R={pan:{Feature:VR},drag:{Feature:zR,ProjectionNode:Jw,MeasureLayout:h0}};function Yy(e,t,n){const{props:i}=e;e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,l=i[s];l&&Je.postRender(()=>l(t,Ts(t)))}class UR extends Vr{mount(){const{current:t}=this.node;t&&(this.unmount=cP(t,(n,i)=>(Yy(this.node,i,"Start"),s=>Yy(this.node,s,"End"))))}unmount(){}}class WR extends Vr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Cs(ps(this.node.current,"focus",()=>this.onFocus()),ps(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Gy(e,t,n){const{props:i}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&i.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),l=i[s];l&&Je.postRender(()=>l(t,Ts(t)))}class HR extends Vr{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=gP(t,(s,l)=>(Gy(this.node,l,"Start"),(a,{success:c})=>Gy(this.node,a,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:i?.tap===!1})}unmount(){}}const Gf=new WeakMap,Jc=new WeakMap,KR=e=>{const t=Gf.get(e.target);t&&t(e)},qR=e=>{e.forEach(KR)};function XR({root:e,...t}){const n=e||document;Jc.has(n)||Jc.set(n,{});const i=Jc.get(n),s=JSON.stringify(t);return i[s]||(i[s]=new IntersectionObserver(qR,{root:e,...t})),i[s]}function YR(e,t,n){const i=XR(t);return Gf.set(e,n),i.observe(e),()=>{Gf.delete(e),i.unobserve(e)}}const GR={some:0,all:1};class QR extends Vr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:n,margin:i,amount:s="some",once:l}=t,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof s=="number"?s:GR[s]},c=f=>{const{isIntersecting:h}=f;if(this.isInView===h||(this.isInView=h,l&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:m,onViewportLeave:p}=this.node.getProps(),y=h?m:p;y&&y(f)};this.stopObserver=YR(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ZR(t,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function ZR({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const JR={inView:{Feature:QR},tap:{Feature:HR},focus:{Feature:WR},hover:{Feature:UR}},eM={layout:{ProjectionNode:Jw,MeasureLayout:h0}},tM={...CR,...JR,...$R,...eM},ss=xR(tM,wR);class Qf extends Error{constructor(t,n){super(n),this.status=t}}function nM(e){let t="";for(let i=0;i<e.length;i+=32768)t+=String.fromCharCode(...e.subarray(i,i+32768));return btoa(t)}function rM(e=globalThis.fetch.bind(globalThis)){async function t(n,i){const s=(i?.method??"GET").toUpperCase(),a=await e(n,{...i,cache:"no-store",credentials:"same-origin",headers:s!=="GET"&&s!=="HEAD"?{"content-type":"application/json","X-Ours-Messenger-CSRF":"1",...i?.headers}:i?.headers}),c=await a.text();let f=null;if(c)try{f=JSON.parse(c)}catch{throw new Qf(a.status,a.ok?"Server returned an invalid response":`HTTP ${a.status}`)}if(!a.ok){const h=f&&typeof f=="object"&&"error"in f&&f.error&&typeof f.error=="object"&&"message"in f.error&&typeof f.error.message=="string"?f.error.message:`HTTP ${a.status}`;throw new Qf(a.status,h)}return f}return{identity:()=>t("/api/identity"),setBio:n=>t("/api/identity/bio",{method:"POST",body:JSON.stringify({bio:n})}),buildInfo:()=>t("/api/build-info"),identities:()=>t("/api/identities"),contacts:()=>t("/api/contacts"),invites:()=>t("/api/invites"),conversation:(n,i,s)=>t(`/api/conversations/${encodeURIComponent(n)}/page?limit=50${i?`&before=${encodeURIComponent(i)}`:""}`,{signal:s}),markRead:n=>t(`/api/conversations/${encodeURIComponent(n)}/read`,{method:"POST"}),send:(n,i,s,l)=>t("/api/messages/send",{method:"POST",signal:l,body:JSON.stringify({contact:n,text:i,...s?{reply_to_wire_id:s}:{}})}),sendFile:async(n,i,s,l,a)=>t("/api/messages/send-file",{method:"POST",body:JSON.stringify({contact:n,data_base64:nM(new Uint8Array(await i.arrayBuffer())),filename:s,mime:l,...a?{reply_to_wire_id:a}:{}})}),files:n=>t(`/api/conversations/${encodeURIComponent(n)}/files`),fetchFiles:n=>t("/api/files/fetch",{method:"POST",body:JSON.stringify({wire_ids:n})}),mediaUrl:n=>`/api/media/${encodeURIComponent(n)}`,createInvite:(n="one_time",i)=>t("/api/invites",{method:"POST",body:JSON.stringify({mode:n,...i?{name:i}:{}})}),addContact:(n,i)=>t("/api/contacts/add",{method:"POST",body:JSON.stringify({invite:n,...i?{name:i}:{}})}),renameContact:(n,i)=>t("/api/contacts/rename",{method:"POST",body:JSON.stringify({contact:n,name:i})}),removeContact:n=>t("/api/contacts/remove",{method:"POST",body:JSON.stringify({contact:n})}),revokeInvite:n=>t("/api/invites/revoke",{method:"POST",body:JSON.stringify({invite_id:n})}),respondToIntroduction:(n,i)=>t("/api/contacts/introductions",{method:"POST",body:JSON.stringify({contact:n,action:i})}),vapidPublicKey:()=>t("/api/push/vapid-public-key"),ensurePush:n=>t("/api/push/subscriptions/ensure",{method:"POST",body:JSON.stringify(n)}),deletePush:n=>t("/api/push/subscriptions/delete",{method:"POST",body:JSON.stringify({binding_id:n})})}}const Xe=rM(),Zf="ours-messenger-live-event";function p0(e){window.dispatchEvent(new CustomEvent(Zf,{detail:e}))}function iM(e){const t=n=>{const i=n.detail;i?.v===1&&e(i)};return window.addEventListener(Zf,t),()=>window.removeEventListener(Zf,t)}function oM(e,t){const n=new EventSource("/api/events");let i=!1;t("connecting"),n.onopen=()=>{i=!0,t("live")},n.onerror=()=>t(i?"retrying":"connecting");const s=l=>{n.addEventListener(l,a=>{try{const c=JSON.parse(a.data);c&&c.v===1&&e({...c,type:l})}catch{}})};return s("sync_required"),s("message_received"),s("receipt_received"),s("file_received"),()=>n.close()}function sM(e=window.location){return`${e.protocol==="https:"?"wss:":"ws:"}//${e.host}/api/presence`}function aM(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e;if(t.type!=="event"||!t.event||typeof t.event!="object")return null;const n=t.event;return n.v===1?n:null}function lM(e){let t=!1,n=null,i,s=1e3,l=0;const a=()=>{i!==void 0&&clearTimeout(i),i=void 0;const m=n;n=null,m&&m.readyState<WebSocket.CLOSING&&m.close(1e3,"hidden")},c=()=>{if(t||document.visibilityState!=="visible")return;e.onState?.("retrying");const m=s;s=Math.min(3e4,s*2),i=setTimeout(()=>{i=void 0,f()},m)},f=async()=>{if(a(),t||document.visibilityState!=="visible")return;const m=++l;e.onState?.("connecting");try{const[p,y]=await Promise.all([e.identity(),e.registration.pushManager.getSubscription()]);if(t||m!==l||document.visibilityState!=="visible")return;const w=y?.toJSON(),S=y?.endpoint,C=w?.keys?.auth;if(!S||!C)return;const E=new WebSocket(sM());n=E,E.onopen=()=>E.send(JSON.stringify({identity:p.cid,endpoint:S,auth:C})),E.onmessage=P=>{let M;try{M=JSON.parse(String(P.data))}catch{return}if(M?.ok===!0){s=1e3,e.onState?.("live");return}const T=aM(M);T&&e.onEvent(T)},E.onclose=()=>{n===E&&(n=null),m===l&&c()},E.onerror=()=>E.close()}catch{m===l&&c()}},h=()=>{l++,document.visibilityState==="visible"?(s=1e3,f()):a()};return document.addEventListener("visibilitychange",h),window.addEventListener("pagehide",a),f(),()=>{t=!0,l++,document.removeEventListener("visibilitychange",h),window.removeEventListener("pagehide",a),a()}}function uM(e,t){return t.visibility==="visible"&&t.appRoute==="chats"&&t.selectedContactCid===e&&(t.desktopLayout||t.mobileDetailOpen)&&!t.conversationCoveringDialogOpen}class cM{#e=new Map;request(t,n){let i=this.#e.get(t);return i?.running?(i.rerun=!0,i.running):(i??={running:null,rerun:!1},this.#e.set(t,i),i.running=(async()=>{do i.rerun=!1,await n();while(i.rerun)})().finally(()=>{i.running=null,i.rerun||this.#e.delete(t)}),i.running)}}function Qy(e){if(e==="/"||e==="/chats"||e==="/chats/")return{name:"chats",contactCid:null};const t=/^\/chats\/([^/]+)\/contact\/?$/.exec(e);if(t)try{const i=decodeURIComponent(t[1]);if(i)return{name:"contact",contactCid:i}}catch{}const n=/^\/chats\/([^/]+)\/?$/.exec(e);if(n)try{const i=decodeURIComponent(n[1]);if(i)return{name:"chats",contactCid:i}}catch{}return{name:"not_found",pathname:e}}function ni(e){return e?`/chats/${encodeURIComponent(e)}`:"/chats"}function fM(e){return`/chats/${encodeURIComponent(e)}/contact`}function dM(e){return typeof e=="object"&&e!==null&&e.oursMessenger===!0?"back":"replace"}const Zy={read:2,delivered:1};function Jy(e){return e&&Object.hasOwn(Zy,e)?Zy[e]:0}function Jf(e,t){return Jy(t)>Jy(e)?t:e}const hM=()=>({contacts:[],pending:[]});function pM(e){return{identity:null,contacts:hM(),route:e,pages:{},pendingSends:{},drafts:{},replies:{},connection:"connecting",search:"",mobileDetailOpen:e.name==="chats"&&e.contactCid!==null||e.name==="contact",coveringDialog:!1,dialogBusy:!1,generatedInvite:null,sendingDialog:null,error:null,loaded:!1}}function si(e,t){return`${e}:${t}`}function ri(e){return e.route.name==="chats"||e.route.name==="contact"?e.route.contactCid:null}function ar(e,t){return e.identity?e.pages[si(e.identity.cid,t)]??null:null}function mM(e,t){const n=Jf(e.receipt,t.receipt);return n===t.receipt?t:{...t,receipt:n}}function zi(e,t){const n=[...e],i=new Map;n.forEach((s,l)=>{s.wire_id&&i.set(s.wire_id,l)});for(const s of t){const l=s.wire_id?i.get(s.wire_id):void 0;l===void 0?(s.wire_id&&i.set(s.wire_id,n.length),n.push(s)):n[l]=mM(n[l],s)}return n}function ev(e,t){switch(t.type){case"snapshot":{const n=e.identity!==null&&e.identity.cid!==t.identity.cid;return{...e,identity:t.identity,contacts:t.contacts,loaded:!0,error:null,...n?{pages:{},pendingSends:{},drafts:{},replies:{},sendingDialog:null,generatedInvite:null,coveringDialog:!1,dialogBusy:!1}:{}}}case"contacts":return{...e,contacts:t.contacts};case"page":{if(!e.identity)return e;const n=si(e.identity.cid,t.contactCid),i=e.pages[n],s=e.pendingSends[n]??[],l=new Set(t.page.messages.map(y=>y.wire_id)),a=s.filter(y=>!l.has(y.wire_id)),c=new Map(i?.messages.map(y=>[y.wire_id,y.receipt])??[]),f=i?t.page.messages.map(y=>{const w=Jf(c.get(y.wire_id)??null,y.receipt);return w===y.receipt?y:{...y,receipt:w}}):t.page.messages,h=i&&i.messages.length>50?{...t.page,messages:zi(i.messages,f),hasMore:i.hasMore,nextBefore:i.nextBefore}:{...t.page,messages:f},m=zi(h.messages,a),p={...h,messages:m,total:Math.max(h.total+a.length,m.length)};return{...e,pages:{...e.pages,[n]:p},pendingSends:{...e.pendingSends,[n]:a.length?a:void 0}}}case"sent_message":{if(!e.identity)return e;const n=si(e.identity.cid,t.contactCid),i=e.pages[n];if(i?.messages.some(a=>a.wire_id===t.message.wire_id))return e;const s=zi(e.pendingSends[n]??[],[t.message]);if(!i)return{...e,pendingSends:{...e.pendingSends,[n]:s}};const l=zi(i.messages,[t.message]);return{...e,pages:{...e.pages,[n]:{...i,messages:l,total:Math.max(i.total+1,l.length)}},pendingSends:{...e.pendingSends,[n]:s}}}case"receipt":{if(!e.identity)return e;const n=si(e.identity.cid,t.contactCid),i=e.pages[n],s=e.pendingSends[n],l=new Set(t.wireIds),a=h=>{let m=!1;const p=h.map(y=>{if(!y.wire_id||!l.has(y.wire_id))return y;const w=Jf(y.receipt,t.kind);return w===y.receipt?y:(m=!0,{...y,receipt:w})});return m?p:h},c=i?a(i.messages):void 0,f=s?a(s):void 0;return c===i?.messages&&f===s?e:{...e,pages:i&&c?{...e.pages,[n]:{...i,messages:c}}:e.pages,pendingSends:s&&f?{...e.pendingSends,[n]:f}:e.pendingSends}}case"older_page":{if(!e.identity)return e;const n=si(e.identity.cid,t.contactCid),i=e.pages[n];if(!i)return e;const s=zi(zi(t.page.messages,t.newer),i.messages),l={...t.page,preview:i.preview,total:Math.max(t.page.total,i.total,s.length),messages:s};return{...e,pages:{...e.pages,[n]:l}}}case"route":return{...e,route:t.route,mobileDetailOpen:t.mobileDetailOpen??(t.route.name==="chats"&&t.route.contactCid!==null||t.route.name==="contact")};case"connection":return{...e,connection:t.connection};case"search":return{...e,search:t.search};case"draft":return e.identity?{...e,drafts:{...e.drafts,[si(e.identity.cid,t.contactCid)]:t.value}}:e;case"reply":return e.identity?{...e,replies:{...e.replies,[si(e.identity.cid,t.contactCid)]:t.wireId??void 0}}:e;case"sending":return{...e,sendingDialog:t.dialog};case"dialog":return{...e,coveringDialog:t.open,dialogBusy:t.open?e.dialogBusy:!1,generatedInvite:t.open?e.generatedInvite:null,error:null};case"dialog_busy":return{...e,dialogBusy:t.busy};case"generated_invite":return{...e,generatedInvite:t.blob};case"error":return{...e,error:t.message}}}function gM(e,t,n){return!e||t?"ignore":n?"defer":"reload"}function Rs(){return{api:Xe,notification:globalThis.Notification,navigator}}function jr(e,t,n){return new Promise((i,s)=>{const l=setTimeout(()=>s(new Error(`${n} did not complete within ${t/1e3}s — try again`)),t);e.then(a=>{clearTimeout(l),i(a)},a=>{clearTimeout(l),s(a)})})}async function yM(e,t={}){let n=null,i=!1,s=!1;const l="serviceWorker"in navigator&&window.isSecureContext,a=()=>e({supported:l,offline:!navigator.onLine,updateAvailable:i,registration:n}),c=()=>a(),f=()=>a(),h=()=>{document.visibilityState==="visible"&&n?.update().catch(()=>{})},m=w=>{if(w.data?.type==="ours-push-repair-required"){window.dispatchEvent(new Event("ours-push-repair-required"));return}if(w.data?.type==="ours-push-foreground"){const S=w.data.contact_id,C=w.data.wire_id,E=w.data.kind;typeof S=="string"&&typeof C=="string"&&p0({v:1,type:E==="file"?"file_received":"message_received",contact_id:S,wire_id:C,date:new Date().toISOString()})}},p=l&&!!navigator.serviceWorker.controller,y=()=>{const w=gM(p,s,t.shouldDeferReload?.()??!1);if(w!=="ignore"){if(w==="defer"){i=!0,a();return}s=!0,(t.reload??(()=>location.reload()))()}};if(window.addEventListener("online",c),window.addEventListener("offline",f),document.addEventListener("visibilitychange",h),navigator.serviceWorker?.addEventListener("message",m),navigator.serviceWorker?.addEventListener("controllerchange",y),l){n=await navigator.serviceWorker.register("/sw.js",{scope:"/",updateViaCache:"none"}),await navigator.serviceWorker.ready;const w=S=>S?.addEventListener("statechange",()=>{S.state==="installed"&&navigator.serviceWorker.controller&&(i=!0,a())});w(n.installing),n.addEventListener("updatefound",()=>w(n?.installing??null)),n.update().catch(()=>{})}return a(),()=>{window.removeEventListener("online",c),window.removeEventListener("offline",f),document.removeEventListener("visibilitychange",h),navigator.serviceWorker?.removeEventListener("message",m),navigator.serviceWorker?.removeEventListener("controllerchange",y)}}async function tv(e,t=()=>location.reload(),n=navigator.serviceWorker){const i=e.waiting;if(!i){t();return}await jr(new Promise(s=>{let l=!1;const a=()=>{l||(l=!0,n.removeEventListener("controllerchange",a),t(),s())};n.addEventListener("controllerchange",a),i.postMessage({type:"SKIP_WAITING"})}),1e4,"service-worker update")}function vM(e){const t="=".repeat((4-e.length%4)%4),n=atob((e+t).replaceAll("-","+").replaceAll("_","/")),i=new Uint8Array(n.length);for(let s=0;s<n.length;s++)i[s]=n.charCodeAt(s);return i}function xM(e){return e?e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength):null}function nv(e,t){const n=xM(e);return!!n&&n.length===t.length&&n.every((i,s)=>i===t[s])}function ed(e=navigator.userAgent){return/iP(?:hone|ad|od)/.test(e)}function td(e=navigator,t=window){return ed(e.userAgent)&&(e.standalone===!0||t.matchMedia("(display-mode: standalone)").matches)}function wM(){return ed()&&!td()?"On iPhone or iPad, tap Share → Add to Home Screen, then open messenger from its Home Screen icon (iOS 16.4 or later).":!("Notification"in window)||!window.PushManager||!("serviceWorker"in navigator)?"Notifications require a current secure browser with service-worker and Web Push support.":Notification.permission==="denied"?ed()?"Allow messenger in iOS Settings → Notifications, then return and choose Repair.":"Allow notifications in this site’s browser settings, then return and choose Repair.":null}function kM(e={}){const t=e.notification??Rs().notification;if(!t)return Promise.reject(new Error("notification permission is unavailable"));const n=new Promise((i,s)=>{let l=!1;const a=c=>{if(l)return;const f=c??t.permission;f!=="granted"&&f!=="denied"&&f!=="default"||(l=!0,i(f))};try{const c=t.requestPermission(a);c&&typeof c.then=="function"&&c.then(a,s)}catch(c){s(c)}});return jr(n,e.timeoutMs??15e3,"notification permission")}function m0(e,t){return!!e&&!!e.pushManager&&!!t.notification&&!!t.navigator.serviceWorker}function di(e,t={}){return{status:e,preview:"full",...t}}async function SM(e,t,n){let i=await jr(e.pushManager.getSubscription(),5e3,"push subscription lookup");if((n||i?.options.applicationServerKey&&!nv(i.options.applicationServerKey,t))&&(i&&await jr(i.unsubscribe(),5e3,"stale push unsubscribe"),i=null),i&&nv(i.options.applicationServerKey,t))return i;try{return await jr(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push subscribe")}catch(s){const l=await e.pushManager.getSubscription();if(!l)throw s;return await jr(l.unsubscribe(),5e3,"stale push unsubscribe"),jr(e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t}),15e3,"push repair")}}async function g0(e,t,n,i){const s=await i.api.vapidPublicKey(),a=await jr(Promise.resolve(i.navigator.serviceWorker.ready),1e4,"service-worker readiness")??e,c=vM(s.publicKey),h=(await SM(a,c,n)).toJSON();if(!h.endpoint||!h.keys?.p256dh||!h.keys.auth)throw new Error("browser returned an incomplete push subscription");const m=await i.api.ensurePush({...h,label:i.navigator.userAgent.slice(0,160),...t===void 0?{}:{preview:t}});if(m.status!=="on"||m.fingerprint!==s.fingerprint||m.configEpoch!==s.configEpoch)throw new Error("server did not acknowledge the current Web Push configuration");return di("on",{bindingId:m.binding_id,fingerprint:m.fingerprint,configEpoch:m.configEpoch,preview:m.preview})}async function rv(e,t=Rs()){return m0(e,t)?t.notification.permission!=="granted"?di("needs-permission",{blocked:t.notification.permission==="denied"}):await e.pushManager.getSubscription()?g0(e,void 0,!1,t):di("off"):di("unsupported")}async function y0(e,t={},n=Rs()){if(!m0(e,n))return di("unsupported");const i=await kM({notification:n.notification});return i!=="granted"?di("needs-permission",{blocked:i==="denied"}):g0(e,t.preview??"full",t.forceFresh??!1,n)}const bM=(e,t,n=Rs())=>y0(e,{preview:t,forceFresh:!0},n);async function CM(e,t,n=Rs()){const i=await e.pushManager.getSubscription(),s=[];if(t.bindingId)try{await n.api.deletePush(t.bindingId)}catch(l){s.push(l)}if(i)try{await i.unsubscribe()}catch(l){s.push(l)}if(s.length)throw new Error("notification disable did not fully converge — choose Repair and try again");return di("off",{preview:t.preview})}function EM(e=15e3){if(!("serviceWorker"in navigator))return()=>{};let t;const n=()=>{const l={type:"ours-visibility",state:document.visibilityState,ts:Date.now(),iosStandalone:td()};navigator.serviceWorker.ready.then(a=>{(navigator.serviceWorker.controller??a.active)?.postMessage(l)}).catch(()=>{})},i=()=>{n(),t!==void 0&&clearInterval(t),t=document.visibilityState==="visible"?setInterval(n,e):void 0,document.visibilityState==="visible"&&v0()},s=l=>{l.data?.type!=="ours-visibility-query"||!l.ports?.[0]||l.ports[0].postMessage({type:"ours-visibility-reply",state:document.visibilityState,iosStandalone:td()})};return document.addEventListener("visibilitychange",i),navigator.serviceWorker.addEventListener("message",s),i(),()=>{document.removeEventListener("visibilitychange",i),navigator.serviceWorker.removeEventListener("message",s),t!==void 0&&clearInterval(t)}}async function v0(){try{if(!("serviceWorker"in navigator))return;const t=await(await navigator.serviceWorker.getRegistration())?.getNotifications()??[];for(const n of t)n.close();"clearAppBadge"in navigator&&await navigator.clearAppBadge()}catch{}}/**
|
|
49
|
+
* @license lucide-react v0.468.0 - ISC
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the ISC license.
|
|
52
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/const PM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x0=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
|
|
54
|
+
* @license lucide-react v0.468.0 - ISC
|
|
55
|
+
*
|
|
56
|
+
* This source code is licensed under the ISC license.
|
|
57
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
58
|
+
*/var TM={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"};/**
|
|
59
|
+
* @license lucide-react v0.468.0 - ISC
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the ISC license.
|
|
62
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
+
*/const RM=k.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:a,...c},f)=>k.createElement("svg",{ref:f,...TM,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:x0("lucide",s),...c},[...a.map(([h,m])=>k.createElement(h,m)),...Array.isArray(l)?l:[l]]));/**
|
|
64
|
+
* @license lucide-react v0.468.0 - ISC
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the ISC license.
|
|
67
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/const $e=(e,t)=>{const n=k.forwardRef(({className:i,...s},l)=>k.createElement(RM,{ref:l,iconNode:t,className:x0(`lucide-${PM(e)}`,i),...s}));return n.displayName=`${e}`,n};/**
|
|
69
|
+
* @license lucide-react v0.468.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/const MM=$e("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
74
|
+
* @license lucide-react v0.468.0 - ISC
|
|
75
|
+
*
|
|
76
|
+
* This source code is licensed under the ISC license.
|
|
77
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
+
*/const AM=$e("Bolt",[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/**
|
|
79
|
+
* @license lucide-react v0.468.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* This source code is licensed under the ISC license.
|
|
82
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
+
*/const NM=$e("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
|
|
84
|
+
* @license lucide-react v0.468.0 - ISC
|
|
85
|
+
*
|
|
86
|
+
* This source code is licensed under the ISC license.
|
|
87
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
+
*/const iv=$e("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
|
|
89
|
+
* @license lucide-react v0.468.0 - ISC
|
|
90
|
+
*
|
|
91
|
+
* This source code is licensed under the ISC license.
|
|
92
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
+
*/const IM=$e("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
94
|
+
* @license lucide-react v0.468.0 - ISC
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the ISC license.
|
|
97
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/const jM=$e("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
99
|
+
* @license lucide-react v0.468.0 - ISC
|
|
100
|
+
*
|
|
101
|
+
* This source code is licensed under the ISC license.
|
|
102
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
+
*/const DM=$e("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
104
|
+
* @license lucide-react v0.468.0 - ISC
|
|
105
|
+
*
|
|
106
|
+
* This source code is licensed under the ISC license.
|
|
107
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
+
*/const _M=$e("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/**
|
|
109
|
+
* @license lucide-react v0.468.0 - ISC
|
|
110
|
+
*
|
|
111
|
+
* This source code is licensed under the ISC license.
|
|
112
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
+
*/const LM=$e("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
114
|
+
* @license lucide-react v0.468.0 - ISC
|
|
115
|
+
*
|
|
116
|
+
* This source code is licensed under the ISC license.
|
|
117
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
+
*/const OM=$e("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"}]]);/**
|
|
119
|
+
* @license lucide-react v0.468.0 - ISC
|
|
120
|
+
*
|
|
121
|
+
* This source code is licensed under the ISC license.
|
|
122
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
+
*/const FM=$e("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
124
|
+
* @license lucide-react v0.468.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/const zM=$e("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
129
|
+
* @license lucide-react v0.468.0 - ISC
|
|
130
|
+
*
|
|
131
|
+
* This source code is licensed under the ISC license.
|
|
132
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
+
*/const ov=$e("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
134
|
+
* @license lucide-react v0.468.0 - ISC
|
|
135
|
+
*
|
|
136
|
+
* This source code is licensed under the ISC license.
|
|
137
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
+
*/const VM=$e("Grid2x2",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 12h18",key:"1i2n21"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]);/**
|
|
139
|
+
* @license lucide-react v0.468.0 - ISC
|
|
140
|
+
*
|
|
141
|
+
* This source code is licensed under the ISC license.
|
|
142
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
+
*/const BM=$e("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/**
|
|
144
|
+
* @license lucide-react v0.468.0 - ISC
|
|
145
|
+
*
|
|
146
|
+
* This source code is licensed under the ISC license.
|
|
147
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
+
*/const $M=$e("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
149
|
+
* @license lucide-react v0.468.0 - ISC
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the ISC license.
|
|
152
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
+
*/const UM=$e("LockKeyhole",[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]]);/**
|
|
154
|
+
* @license lucide-react v0.468.0 - ISC
|
|
155
|
+
*
|
|
156
|
+
* This source code is licensed under the ISC license.
|
|
157
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
+
*/const WM=$e("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
159
|
+
* @license lucide-react v0.468.0 - ISC
|
|
160
|
+
*
|
|
161
|
+
* This source code is licensed under the ISC license.
|
|
162
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
+
*/const HM=$e("MessageCircleReply",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}],["path",{d:"M7 12h7a2 2 0 0 1 2 2v1",key:"1gheu4"}]]);/**
|
|
164
|
+
* @license lucide-react v0.468.0 - ISC
|
|
165
|
+
*
|
|
166
|
+
* This source code is licensed under the ISC license.
|
|
167
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
+
*/const KM=$e("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/**
|
|
169
|
+
* @license lucide-react v0.468.0 - ISC
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the ISC license.
|
|
172
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/const qM=$e("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
|
|
174
|
+
* @license lucide-react v0.468.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* This source code is licensed under the ISC license.
|
|
177
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
+
*/const XM=$e("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
179
|
+
* @license lucide-react v0.468.0 - ISC
|
|
180
|
+
*
|
|
181
|
+
* This source code is licensed under the ISC license.
|
|
182
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
+
*/const YM=$e("Paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486",key:"1pkts6"}]]);/**
|
|
184
|
+
* @license lucide-react v0.468.0 - ISC
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the ISC license.
|
|
187
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
+
*/const GM=$e("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"}]]);/**
|
|
189
|
+
* @license lucide-react v0.468.0 - ISC
|
|
190
|
+
*
|
|
191
|
+
* This source code is licensed under the ISC license.
|
|
192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
+
*/const QM=$e("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
194
|
+
* @license lucide-react v0.468.0 - ISC
|
|
195
|
+
*
|
|
196
|
+
* This source code is licensed under the ISC license.
|
|
197
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
+
*/const ZM=$e("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
|
|
199
|
+
* @license lucide-react v0.468.0 - ISC
|
|
200
|
+
*
|
|
201
|
+
* This source code is licensed under the ISC license.
|
|
202
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
+
*/const JM=$e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
204
|
+
* @license lucide-react v0.468.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/const e2=$e("SendHorizontal",[["path",{d:"M3.714 3.048a.498.498 0 0 0-.683.627l2.843 7.627a2 2 0 0 1 0 1.396l-2.842 7.627a.498.498 0 0 0 .682.627l18-8.5a.5.5 0 0 0 0-.904z",key:"117uat"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
|
|
209
|
+
* @license lucide-react v0.468.0 - ISC
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the ISC license.
|
|
212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
+
*/const t2=$e("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
|
|
214
|
+
* @license lucide-react v0.468.0 - ISC
|
|
215
|
+
*
|
|
216
|
+
* This source code is licensed under the ISC license.
|
|
217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
+
*/const n2=$e("ShieldCheck",[["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"}]]);/**
|
|
219
|
+
* @license lucide-react v0.468.0 - ISC
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the ISC license.
|
|
222
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
+
*/const r2=$e("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
|
|
224
|
+
* @license lucide-react v0.468.0 - ISC
|
|
225
|
+
*
|
|
226
|
+
* This source code is licensed under the ISC license.
|
|
227
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
+
*/const i2=$e("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
229
|
+
* @license lucide-react v0.468.0 - ISC
|
|
230
|
+
*
|
|
231
|
+
* This source code is licensed under the ISC license.
|
|
232
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
+
*/const o2=$e("UserRoundPlus",[["path",{d:"M2 21a8 8 0 0 1 13.292-6",key:"bjp14o"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M22 19h-6",key:"vcuq98"}]]);/**
|
|
234
|
+
* @license lucide-react v0.468.0 - ISC
|
|
235
|
+
*
|
|
236
|
+
* This source code is licensed under the ISC license.
|
|
237
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
+
*/const s2=$e("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);/**
|
|
239
|
+
* @license lucide-react v0.468.0 - ISC
|
|
240
|
+
*
|
|
241
|
+
* This source code is licensed under the ISC license.
|
|
242
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
+
*/const a2=$e("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),l2={app:VM,back:MM,bolt:AM,chat:KM,check:IM,chevron:DM,chevronDown:jM,close:a2,clusters:iv,copy:OM,download:FM,edit:GM,inbox:BM,link:$M,lock:UM,mic:qM,maximize:WM,minus:XM,monitor:ov,monitorEye:ov,more:zM,paperclip:YM,pause:_M,play:LM,plus:QM,refresh:ZM,reply:HM,search:JM,send:e2,settings:t2,shield:n2,sliders:r2,trash:i2,user:s2,invite:o2,agent:NM,network:iv};function Ce(e){const{name:t,size:n=18,stroke:i=1.8,fill:s=!1,style:l,className:a}=e,c=l2[t];return c?v.jsx(c,{className:"ic "+(a||""),width:n,height:n,strokeWidth:i,fill:s?"currentColor":"none",style:l,"aria-hidden":"true"}):null}function w0(e){if(typeof e!="string")return null;const t=/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?/.exec(e.trim());if(!t)return null;const n=t[7]?t[7].slice(0,3).padEnd(3,"0"):"000";return`${t[1]}-${t[2]}-${t[3]}T${t[4]}:${t[5]}:${t[6]}.${n}Z`}function Rl(e){const t=w0(e);if(t){const i=Date.parse(t);if(!Number.isNaN(i))return i}const n=new Date(e).getTime();return Number.isNaN(n)?0:n}function u2(e){const t=w0(e);if(t){const i=new Date(t);if(!Number.isNaN(i.getTime()))return i}const n=new Date(e);return Number.isNaN(n.getTime())?null:n}const Yo="room",c2="room_",Ml="ours-cowork-room:",sv="ours-cowork:",av="ours-cowork-",lv="cowork-room-",nd=/^[0-7][0-9a-hjkmnp-tv-z]{25}$/,f2=/^[a-z0-9]+(?:-[a-z0-9]+)*$/,d2=25,h2=64,p2=80,uv=1e3,gs=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Wt=e=>typeof e=="string"&&e.length>0;function m2(e,t){if(typeof e!="string")return null;const n=e.trim();if(!n.startsWith("{")||!n.endsWith("}"))return null;let i;try{i=JSON.parse(n)}catch{return null}return!gs(i)||i.version!==1||!Wt(i.kind)||!i.kind.startsWith(c2)||!Wt(i.room_id)||t&&!Wt(i.signature)?null:i}function g2(e){const t=gs(e.author)?e.author:{};return{name:Wt(t.display_name)?t.display_name:"",role:Wt(t.role)?t.role:""}}function ef(e){const n=Array.from(String(e)).slice(0,p2).join("").replace(/^room_/,"").split("_").filter(Boolean);return n.length===0?"Room notice":n.join(" ").replace(/^./,i=>i.toUpperCase())}function y2(e){if(!gs(e))return null;const t=Wt(e.kind)?e.kind:"",n=g2(e),i=typeof e.text=="string"?e.text:"",s=Number.isSafeInteger(e.briefing_version)&&e.briefing_version>0?e.briefing_version:null,l={roomName:k0(e.room_name)??"",authoredAt:Wt(e.at)?e.at:""};switch(t){case"room_msg":return n.role===Yo?Ir(t,"Room message",i||"Room notice",{...l,authoredBy:n.name}):{variant:"chat",kind:t,author:n.name||"Unknown member",role:n.role,label:"",text:i,...l};case"room_briefing":return Ir(t,s===null?"Room briefing":`Room briefing · v${s}`,i||"The room briefing was updated.",{...l,authoredBy:n.name,presentation:"briefing"});case"room_role_briefing":{const a=Wt(e.briefing_role)?e.briefing_role:"",c=["Role briefing",a,s===null?"":`v${s}`].filter(Boolean).join(" · ");return Ir(t,c,i||"Your role briefing was updated.",{...l,authoredBy:n.name,presentation:"role",details:a?[`Role: ${a}`]:[]})}case"room_membership":{const a=gs(e.membership)?e.membership:{},c=[Wt(a.action)?`Status: ${w2(a.action)}`:"",Wt(a.alias)?`Member: ${a.alias}`:"",Wt(a.role)?`Role: ${a.role}`:"",Number.isSafeInteger(a.epoch)&&a.epoch>=0?`Epoch: ${a.epoch}`:""].filter(Boolean);return Ir(t,"Membership",i||C2(a),{...l,authoredBy:n.name,presentation:"membership",details:c})}case"room_file":{const a=Wt(e.filename)?e.filename:"Shared file",c=[Wt(e.mime)?`Type: ${e.mime}`:"",Number.isSafeInteger(e.size)&&e.size>=0?`Size: ${k2(e.size)}`:"",Wt(e.sha256)?`SHA-256: ${S2(e.sha256)}`:""].filter(Boolean);return Ir(t,"Room file",a,{...l,authoredBy:n.name,role:n.role,presentation:"file",details:c})}case"room_not_member":return Ir(t,"Room access","You are no longer a member of this room.",{...l,presentation:"lifecycle",details:["Status: Removed"]});default:return i?{variant:n.role&&n.role!==Yo?"chat":"system",kind:t,author:n.role&&n.role!==Yo?n.name||"Unknown member":"",role:n.role&&n.role!==Yo?n.role:"",label:n.role&&n.role!==Yo?"":ef(t),text:b2(i),...l}:Ir(t,ef(t),`${ef(t)} from the room.`,l)}}function v2(e,t){if(!x2(e))return null;const n=ch(e)?.roomId??null,i=lh(e),s=uh(e),l=m2(t,n===null&&s===null);return l!==null&&n!==null&&l.room_id!==n||l!==null&&i!==null&&l.room_id!==i?cv("Room provenance mismatch"):y2(l)}function k0(e){if(typeof e!="string"||/[\p{Cc}\p{Cf}]/u.test(e))return null;const t=e.trim().normalize("NFC"),n=Array.from(t).length;return n>=1&&n<=h2?t:null}function lh(e){if(typeof e!="string"||!e.startsWith(lv))return null;const t=e.slice(lv.length);return nd.test(t)?t:null}function uh(e){return typeof e!="string"||!e.startsWith(sv)?null:k0(e.slice(sv.length))}function ch(e){if(typeof e!="string"||!e.startsWith(av))return null;const t=e.slice(av.length);if(nd.test(t))return{roomId:t,slug:null};const n=t.slice(-26),i=t.at(-27),s=t.slice(0,-27);return i!=="-"||!nd.test(n)||s.length<1||s.length>d2?null:f2.test(s)?{roomId:n,slug:s}:null}function x2(e){const t=String(e??"").trim();return t.startsWith(Ml)&&t.slice(Ml.length).trim().length>0||uh(e)!==null||ch(e)!==null||lh(e)!==null}function Ir(e,t,n,i={}){return{variant:"system",kind:e,author:"",role:"",label:t,text:n,...i}}function w2(e){return String(e).replace(/_/g," ").replace(/^./,t=>t.toUpperCase())}function k2(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KiB`:`${(e/(1024*1024)).toFixed(1)} MiB`}function S2(e){const t=String(e);return t.length<=20?t:`${t.slice(0,12)}…${t.slice(-6)}`}function b2(e){const t=Array.from(String(e));return t.length<=uv?t.join(""):`${t.slice(0,uv).join("")}…`}function cv(e){return Ir("room_invalid","Room notice","This room envelope could not be displayed safely.",{presentation:"lifecycle",details:[`Status: ${e}`]})}function C2(e){if(!gs(e))return"The room membership changed.";const t=Wt(e.alias)?e.alias:"A member";return e.action==="remove"?`${t} left the room.`:"The room membership changed."}function E2(e){if(!e)return"";const t=e.variant==="chat"?e.author:e.label,n=P2(e.text);return t?n?`${t} · ${n}`:t:n}function P2(e){return String(e??"").replace(/\s+/g," ").trim()}function T2(e){const t=String(e??"").trim();if(t.startsWith(Ml))return t.slice(Ml.length).trim()||null;const n=uh(e);if(n!==null)return n;const i=ch(e);if(i?.slug)return i.slug.replace(/-/g," ").replace(/[a-z]/,a=>a.toUpperCase());if(i)return`Room ${i.roomId.slice(0,8)}`;const s=lh(e);return s===null?null:`Room ${s.slice(0,8)}`}const fh=u2;function rd(e){const t=e.trim().split(/\s+/).filter(Boolean);if(!t.length)return"?";const n=i=>Array.from(i).find(s=>/[\p{L}\p{N}]/u.test(s))??Array.from(i)[0]??"";if(t.length===1){const i=Array.from(t[0]),s=i.filter(l=>/[\p{L}\p{N}]/u.test(l));return(s.length?s.slice(0,2).join(""):i[0]??"?").toUpperCase()}return(n(t[0])+n(t.at(-1)??"")).toUpperCase()}function R2(e){const t=fh(e);if(!t)return"";const n=new Date;return t.toDateString()===n.toDateString()?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):t.toLocaleDateString([],{month:"short",day:"numeric"})}function ys(e){const t=fh(e);return t?t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}function M2(e){const t=fh(e);return t?t.toLocaleString():e}function S0(e){return e.length<=14?e:`${e.slice(0,8)}…${e.slice(-4)}`}function A2(e){return/^[0-9A-Fa-f]{40,}$/.test(e.trim())}function N2(e,t,n){const i=(e??"").trim(),s=T2(i);return s||(i&&!A2(i)?i:i?S0(i):"Unnamed")}function Al(e){return e.display_name?.trim()||N2(e.name)}const I2="x-ours-kind=voice-message",b0="voice-message-",ts=20*1024*1024;let vs=null,id=[];const dh=new Map;function j2(e){vs=e;for(const t of id)t(e);id=[]}function fv(e){for(const t of e)dh.set(t.wire_id,{id:t.wire_id,dir:t.dir,filename:t.filename,mime:t.mime,size:t.size,date:t.date,available:t.available,logicalName:t.logical_name,version:t.version,transcription:t.transcription})}function D2(){dh.clear()}function C0(e){return dh.get(e)??null}function _2(e){return vs?.url(e)??null}function L2(e){return`${e}; ${I2}`}function eo(e,t){return/x-ours-kind\s*=\s*voice-message/i.test(e)||t.toLowerCase().startsWith(b0)&&e.toLowerCase().startsWith("audio/")}function O2(e,t){const n=e??"file",i=t??"";return eo(i,n)?"🎤 Voice message":i.toLowerCase().startsWith("image/")?"🖼 Photo":`📎 ${n}`}async function Ul(e){return(vs??await new Promise(n=>id.push(n))).bytes(e)}async function F2(e){if(!vs)throw new Error("Media provider is not ready");await vs.fetch(e)}function Fr(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function z2(e,t=!1){return e==="read"?{state:"read",label:"read",glyph:"✓✓"}:e==="delivered"?{state:"delivered",label:"delivered",glyph:"✓✓"}:t?{state:"untracked",label:"sent, and cannot report delivery",glyph:"✓"}:{state:"sent",label:"sent",glyph:"✓"}}function E0({receipt:e,content:t="Message",receiptless:n=!1}){const i=z2(e,n);return v.jsx("span",{className:"ticks"+(i.state==="read"?" read":""),"data-receipt-status":i.state,role:"img","aria-label":`${t} ${i.label}`,title:i.label,children:i.glyph})}function dv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(t);for(;s!==-1;)i++,s=n.indexOf(t,s+t.length);return i}const Ht=Br(/[A-Za-z]/),zt=Br(/[\dA-Za-z]/),V2=Br(/[#-'*+\--9=?A-Z^-~]/);function Nl(e){return e!==null&&(e<32||e===127)}const od=Br(/\d/),B2=Br(/[\dA-Fa-f]/),$2=Br(/[!-/:-@[-`{-~]/);function je(e){return e!==null&&e<-2}function et(e){return e!==null&&(e<0||e===32)}function ze(e){return e===-2||e===-1||e===32}const Wl=Br(/\p{P}|\p{S}/u),pi=Br(/\s/);function Br(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function U2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const Hl=function(e){if(e==null)return q2;if(typeof e=="function")return Kl(e);if(typeof e=="object")return Array.isArray(e)?W2(e):H2(e);if(typeof e=="string")return K2(e);throw new Error("Expected function, string, or object as test")};function W2(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Hl(e[n]);return Kl(i);function i(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function H2(e){const t=e;return Kl(n);function n(i){const s=i;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function K2(e){return Kl(t);function t(n){return n&&n.type===e}}function Kl(e){return t;function t(n,i,s){return!!(X2(n)&&e.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function q2(){return!0}function X2(e){return e!==null&&typeof e=="object"&&"type"in e}const P0=[],Y2=!0,sd=!1,G2="skip";function T0(e,t,n,i){let s;typeof t=="function"&&typeof n!="function"?(i=n,n=t):s=t;const l=Hl(s),a=i?-1:1;c(e,void 0,[])();function c(f,h,m){const p=f&&typeof f=="object"?f:{};if(typeof p.type=="string"){const w=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(f.type+(w?"<"+w+">":""))+")"})}return y;function y(){let w=P0,S,C,E;if((!t||l(f,h,m[m.length-1]||void 0))&&(w=Q2(n(f,m)),w[0]===sd))return w;if("children"in f&&f.children){const P=f;if(P.children&&w[0]!==G2)for(C=(i?P.children.length:-1)+a,E=m.concat(P);C>-1&&C<P.children.length;){const M=P.children[C];if(S=c(M,C,E)(),S[0]===sd)return S;C=typeof S[1]=="number"?S[1]:C+a}}return w}}}function Q2(e){return Array.isArray(e)?e:typeof e=="number"?[Y2,e]:e==null?P0:[e]}function Z2(e,t,n){const s=Hl((n||{}).ignore||[]),l=J2(t);let a=-1;for(;++a<l.length;)T0(e,"text",c);function c(h,m){let p=-1,y;for(;++p<m.length;){const w=m[p],S=y?y.children:void 0;if(s(w,S?S.indexOf(w):void 0,y))return;y=w}if(y)return f(h,m)}function f(h,m){const p=m[m.length-1],y=l[a][0],w=l[a][1];let S=0;const E=p.children.indexOf(h);let P=!1,M=[];y.lastIndex=0;let T=y.exec(h.value);for(;T;){const D=T.index,U={index:T.index,input:T.input,stack:[...m,h]};let j=w(...T,U);if(typeof j=="string"&&(j=j.length>0?{type:"text",value:j}:void 0),j===!1?y.lastIndex=D+1:(S!==D&&M.push({type:"text",value:h.value.slice(S,D)}),Array.isArray(j)?M.push(...j):j&&M.push(j),S=D+T[0].length,P=!0),!y.global)break;T=y.exec(h.value)}return P?(S<h.value.length&&M.push({type:"text",value:h.value.slice(S)}),p.children.splice(E,1,...M)):M=[h],E+M.length}}function J2(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const s=n[i];t.push([eA(s[0]),tA(s[1])])}return t}function eA(e){return typeof e=="string"?new RegExp(U2(e),"g"):e}function tA(e){return typeof e=="function"?e:function(){return e}}const tf="phrasing",nf=["autolink","link","image","label"];function nA(){return{transforms:[uA],enter:{literalAutolink:iA,literalAutolinkEmail:rf,literalAutolinkHttp:rf,literalAutolinkWww:rf},exit:{literalAutolink:lA,literalAutolinkEmail:aA,literalAutolinkHttp:oA,literalAutolinkWww:sA}}}function rA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:tf,notInConstruct:nf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:tf,notInConstruct:nf},{character:":",before:"[ps]",after:"\\/",inConstruct:tf,notInConstruct:nf}]}}function iA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function rf(e){this.config.enter.autolinkProtocol.call(this,e)}function oA(e){this.config.exit.autolinkProtocol.call(this,e)}function sA(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function aA(e){this.config.exit.autolinkEmail.call(this,e)}function lA(e){this.exit(e)}function uA(e){Z2(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cA],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,fA]],{ignore:["link","linkReference"]})}function cA(e,t,n,i,s){let l="";if(!R0(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!dA(n)))return!1;const a=hA(n+i);if(!a[0])return!1;const c={type:"link",title:null,url:l+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[c,{type:"text",value:a[1]}]:c}function fA(e,t,n,i){return!R0(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function dA(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function hA(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const s=dv(e,"(");let l=dv(e,")");for(;i!==-1&&s>l;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),l++;return[e,n]}function R0(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||pi(n)||Wl(n))&&(!t||n!==47)}function _n(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}M0.peek=SA;function pA(){this.buffer()}function mA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function gA(){this.buffer()}function yA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_n(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xA(e){this.exit(e)}function wA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=_n(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kA(e){this.exit(e)}function SA(){return"["}function M0(e,t,n,i){const s=n.createTracker(i);let l=s.move("[^");const a=n.enter("footnoteReference"),c=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),c(),a(),l+=s.move("]"),l}function bA(){return{enter:{gfmFootnoteCallString:pA,gfmFootnoteCall:mA,gfmFootnoteDefinitionLabelString:gA,gfmFootnoteDefinition:yA},exit:{gfmFootnoteCallString:vA,gfmFootnoteCall:xA,gfmFootnoteDefinitionLabelString:wA,gfmFootnoteDefinition:kA}}}function CA(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:M0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,s,l,a){const c=l.createTracker(a);let f=c.move("[^");const h=l.enter("footnoteDefinition"),m=l.enter("label");return f+=c.move(l.safe(l.associationId(i),{before:f,after:"]"})),m(),f+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
244
|
+
`:" ")+l.indentLines(l.containerFlow(i,c.current()),t?A0:EA))),h(),f}}function EA(e,t,n){return t===0?e:A0(e,t,n)}function A0(e,t,n){return(n?"":" ")+e}const PA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];N0.peek=NA;function TA(){return{canContainEols:["delete"],enter:{strikethrough:MA},exit:{strikethrough:AA}}}function RA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:PA}],handlers:{delete:N0}}}function MA(e){this.enter({type:"delete",children:[]},e)}function AA(e){this.exit(e)}function N0(e,t,n,i){const s=n.createTracker(i),l=n.enter("strikethrough");let a=s.move("~~");return a+=n.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),l(),a}function NA(){return"~"}function IA(e){return e.length}function jA(e,t){const n=t||{},i=(n.align||[]).concat(),s=n.stringLength||IA,l=[],a=[],c=[],f=[];let h=0,m=-1;for(;++m<e.length;){const C=[],E=[];let P=-1;for(e[m].length>h&&(h=e[m].length);++P<e[m].length;){const M=DA(e[m][P]);if(n.alignDelimiters!==!1){const T=s(M);E[P]=T,(f[P]===void 0||T>f[P])&&(f[P]=T)}C.push(M)}a[m]=C,c[m]=E}let p=-1;if(typeof i=="object"&&"length"in i)for(;++p<h;)l[p]=hv(i[p]);else{const C=hv(i);for(;++p<h;)l[p]=C}p=-1;const y=[],w=[];for(;++p<h;){const C=l[p];let E="",P="";C===99?(E=":",P=":"):C===108?E=":":C===114&&(P=":");let M=n.alignDelimiters===!1?1:Math.max(1,f[p]-E.length-P.length);const T=E+"-".repeat(M)+P;n.alignDelimiters!==!1&&(M=E.length+M+P.length,M>f[p]&&(f[p]=M),w[p]=M),y[p]=T}a.splice(1,0,y),c.splice(1,0,w),m=-1;const S=[];for(;++m<a.length;){const C=a[m],E=c[m];p=-1;const P=[];for(;++p<h;){const M=C[p]||"";let T="",D="";if(n.alignDelimiters!==!1){const U=f[p]-(E[p]||0),j=l[p];j===114?T=" ".repeat(U):j===99?U%2?(T=" ".repeat(U/2+.5),D=" ".repeat(U/2-.5)):(T=" ".repeat(U/2),D=T):D=" ".repeat(U)}n.delimiterStart!==!1&&!p&&P.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&M==="")&&(n.delimiterStart!==!1||p)&&P.push(" "),n.alignDelimiters!==!1&&P.push(T),P.push(M),n.alignDelimiters!==!1&&P.push(D),n.padding!==!1&&P.push(" "),(n.delimiterEnd!==!1||p!==h-1)&&P.push("|")}S.push(n.delimiterEnd===!1?P.join("").replace(/ +$/,""):P.join(""))}return S.join(`
|
|
245
|
+
`)}function DA(e){return e==null?"":String(e)}function hv(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function _A(e,t,n,i){const s=n.enter("blockquote"),l=n.createTracker(i);l.move("> "),l.shift(2);const a=n.indentLines(n.containerFlow(e,l.current()),LA);return s(),a}function LA(e,t,n){return">"+(n?"":" ")+e}function OA(e,t){return pv(e,t.inConstruct,!0)&&!pv(e,t.notInConstruct,!1)}function pv(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function mv(e,t,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
246
|
+
`&&OA(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
247
|
+
`}function FA(e,t){const n=String(e);let i=n.indexOf(t),s=i,l=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++l>a&&(a=l):l=1,s=i+t.length,i=n.indexOf(t,s);return a}function zA(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function VA(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function BA(e,t,n,i){const s=VA(n),l=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(zA(e,n)){const p=n.enter("codeIndented"),y=n.indentLines(l,$A);return p(),y}const c=n.createTracker(i),f=s.repeat(Math.max(FA(l,s)+1,3)),h=n.enter("codeFenced");let m=c.move(f);if(e.lang){const p=n.enter(`codeFencedLang${a}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
|
|
248
|
+
`,encode:["`"],...c.current()})),p()}return m+=c.move(`
|
|
249
|
+
`),l&&(m+=c.move(l+`
|
|
250
|
+
`)),m+=c.move(f),h(),m}function $A(e,t,n){return(n?"":" ")+e}function hh(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function UA(e,t,n,i){const s=hh(n),l=s==='"'?"Quote":"Apostrophe",a=n.enter("definition");let c=n.enter("label");const f=n.createTracker(i);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
251
|
+
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=f.move(" "+s),h+=f.move(n.safe(e.title,{before:h,after:s,...f.current()})),h+=f.move(s),c()),a(),h}function WA(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function xs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function to(e){if(e===null||et(e)||pi(e))return 1;if(Wl(e))return 2}function Il(e,t,n){const i=to(e),s=to(t);return i===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}I0.peek=HA;function I0(e,t,n,i){const s=WA(n),l=n.enter("emphasis"),a=n.createTracker(i),c=a.move(s);let f=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const h=f.charCodeAt(0),m=Il(i.before.charCodeAt(i.before.length-1),h,s);m.inside&&(f=xs(h)+f.slice(1));const p=f.charCodeAt(f.length-1),y=Il(i.after.charCodeAt(0),p,s);y.inside&&(f=f.slice(0,-1)+xs(p));const w=a.move(s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+f+w}function HA(e,t,n){return n.options.emphasis||"*"}function ph(e,t,n,i){let s,l,a;typeof t=="function"&&typeof n!="function"?(l=void 0,a=t,s=n):(l=t,a=n,s=i),T0(e,l,c,s);function c(f,h){const m=h[h.length-1],p=m?m.children.indexOf(f):void 0;return a(f,p,m)}}const KA={};function mh(e,t){const n=KA,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return j0(e,i,s)}function j0(e,t,n){if(qA(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return gv(e.children,t,n)}return Array.isArray(e)?gv(e,t,n):""}function gv(e,t,n){const i=[];let s=-1;for(;++s<e.length;)i[s]=j0(e[s],t,n);return i.join("")}function qA(e){return!!(e&&typeof e=="object")}function XA(e,t){let n=!1;return ph(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,sd}),!!((!e.depth||e.depth<3)&&mh(e)&&(t.options.setext||n))}function YA(e,t,n,i){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(i);if(XA(e,n)){const m=n.enter("headingSetext"),p=n.enter("phrasing"),y=n.containerPhrasing(e,{...l.current(),before:`
|
|
252
|
+
`,after:`
|
|
253
|
+
`});return p(),m(),y+`
|
|
254
|
+
`+(s===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
255
|
+
`))+1))}const a="#".repeat(s),c=n.enter("headingAtx"),f=n.enter("phrasing");l.move(a+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
256
|
+
`,...l.current()});return/^[\t ]/.test(h)&&(h=xs(h.charCodeAt(0))+h.slice(1)),h=h?a+" "+h:a,n.options.closeAtx&&(h+=" "+a),f(),c(),h}D0.peek=GA;function D0(e){return e.value||""}function GA(){return"<"}_0.peek=QA;function _0(e,t,n,i){const s=hh(n),l=s==='"'?"Quote":"Apostrophe",a=n.enter("image");let c=n.enter("label");const f=n.createTracker(i);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${l}`),h+=f.move(" "+s),h+=f.move(n.safe(e.title,{before:h,after:s,...f.current()})),h+=f.move(s),c()),h+=f.move(")"),a(),h}function QA(){return"!"}L0.peek=ZA;function L0(e,t,n,i){const s=e.referenceType,l=n.enter("imageReference");let a=n.enter("label");const c=n.createTracker(i);let f=c.move("![");const h=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return a(),n.stack=m,l(),s==="full"||!h||h!==p?f+=c.move(p+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function ZA(){return"!"}O0.peek=JA;function O0(e,t,n){let i=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++l<n.unsafe.length;){const a=n.unsafe[l],c=n.compilePattern(a);let f;if(a.atBreak)for(;f=c.exec(i);){let h=f.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(f.index+1)}}return s+i+s}function JA(){return"`"}function F0(e,t){const n=mh(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}z0.peek=eN;function z0(e,t,n,i){const s=hh(n),l=s==='"'?"Quote":"Apostrophe",a=n.createTracker(i);let c,f;if(F0(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),c(),n.stack=m,p}c=n.enter("link"),f=n.enter("label");let h=a.move("[");return h+=a.move(n.containerPhrasing(e,{before:h,after:"](",...a.current()})),h+=a.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=a.move("<"),h+=a.move(n.safe(e.url,{before:h,after:">",...a.current()})),h+=a.move(">")):(f=n.enter("destinationRaw"),h+=a.move(n.safe(e.url,{before:h,after:e.title?" ":")",...a.current()}))),f(),e.title&&(f=n.enter(`title${l}`),h+=a.move(" "+s),h+=a.move(n.safe(e.title,{before:h,after:s,...a.current()})),h+=a.move(s),f()),h+=a.move(")"),c(),h}function eN(e,t,n){return F0(e,n)?"<":"["}V0.peek=tN;function V0(e,t,n,i){const s=e.referenceType,l=n.enter("linkReference");let a=n.enter("label");const c=n.createTracker(i);let f=c.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),a();const m=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return a(),n.stack=m,l(),s==="full"||!h||h!==p?f+=c.move(p+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function tN(){return"["}function gh(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nN(e){const t=gh(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function rN(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function B0(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function iN(e,t,n,i){const s=n.enter("list"),l=n.bulletCurrent;let a=e.ordered?rN(n):gh(n);const c=e.ordered?a==="."?")":".":nN(n);let f=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),B0(n)===a&&m){let p=-1;for(;++p<e.children.length;){const y=e.children[p];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(a=c),n.bulletCurrent=a;const h=n.containerFlow(e,i);return n.bulletLastUsed=a,n.bulletCurrent=l,s(),h}function oN(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function sN(e,t,n,i){const s=oN(n);let l=n.bulletCurrent||gh(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let a=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const c=n.createTracker(i);c.move(l+" ".repeat(a-l.length)),c.shift(a);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return f(),h;function m(p,y,w){return y?(w?"":" ".repeat(a))+p:(w?l:l+" ".repeat(a-l.length))+p}}function aN(e,t,n,i){const s=n.enter("paragraph"),l=n.enter("phrasing"),a=n.containerPhrasing(e,i);return l(),s(),a}const lN=Hl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function uN(e,t,n,i){return(e.children.some(function(a){return lN(a)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function cN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$0.peek=fN;function $0(e,t,n,i){const s=cN(n),l=n.enter("strong"),a=n.createTracker(i),c=a.move(s+s);let f=a.move(n.containerPhrasing(e,{after:s,before:c,...a.current()}));const h=f.charCodeAt(0),m=Il(i.before.charCodeAt(i.before.length-1),h,s);m.inside&&(f=xs(h)+f.slice(1));const p=f.charCodeAt(f.length-1),y=Il(i.after.charCodeAt(0),p,s);y.inside&&(f=f.slice(0,-1)+xs(p));const w=a.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+f+w}function fN(e,t,n){return n.options.strong||"*"}function dN(e,t,n,i){return n.safe(e.value,i)}function hN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function pN(e,t,n){const i=(B0(n)+(n.options.ruleSpaces?" ":"")).repeat(hN(n));return n.options.ruleSpaces?i.slice(0,-1):i}const U0={blockquote:_A,break:mv,code:BA,definition:UA,emphasis:I0,hardBreak:mv,heading:YA,html:D0,image:_0,imageReference:L0,inlineCode:O0,link:z0,linkReference:V0,list:iN,listItem:sN,paragraph:aN,root:uN,strong:$0,text:dN,thematicBreak:pN},yv=document.createElement("i");function yh(e){const t="&"+e+";";yv.innerHTML=t;const n=yv.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function W0(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const mN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gN(e){return e.replace(mN,yN)}function yN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return W0(n.slice(l?2:1),l?16:10)}return yh(n)||e}function vN(){return{enter:{table:xN,tableData:vv,tableHeader:vv,tableRow:kN},exit:{codeText:SN,table:wN,tableData:of,tableHeader:of,tableRow:of}}}function xN(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function wN(e){this.exit(e),this.data.inTable=void 0}function kN(e){this.enter({type:"tableRow",children:[]},e)}function of(e){this.exit(e)}function vv(e){this.enter({type:"tableCell",children:[]},e)}function SN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,bN));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function bN(e,t){return t==="|"?t:e}function CN(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
257
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:a,tableCell:f,tableRow:c}};function a(w,S,C,E){return h(m(w,C,E),w.align)}function c(w,S,C,E){const P=p(w,C,E),M=h([P]);return M.slice(0,M.indexOf(`
|
|
258
|
+
`))}function f(w,S,C,E){const P=C.enter("tableCell"),M=C.enter("phrasing"),T=C.containerPhrasing(w,{...E,before:l,after:l});return M(),P(),T}function h(w,S){return jA(w,{align:S,alignDelimiters:i,padding:n,stringLength:s})}function m(w,S,C){const E=w.children;let P=-1;const M=[],T=S.enter("table");for(;++P<E.length;)M[P]=p(E[P],S,C);return T(),M}function p(w,S,C){const E=w.children;let P=-1;const M=[],T=S.enter("tableRow");for(;++P<E.length;)M[P]=f(E[P],w,S,C);return T(),M}function y(w,S,C){let E=U0.inlineCode(w,S,C);return C.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function EN(){return{exit:{taskListCheckValueChecked:xv,taskListCheckValueUnchecked:xv,paragraph:TN}}}function PN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:RN}}}function xv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const s=t.children;let l=-1,a;for(;++l<s.length;){const c=s[l];if(c.type==="paragraph"){a=c;break}}a===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function RN(e,t,n,i){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);l&&c.move(a);let f=U0.listItem(e,t,n,{...i,...c.current()});return l&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(m){return m+a}}function H0(){return[nA(),bA(),TA(),vN(),EN()]}function MN(e){return{extensions:[rA(),CA(e),RA(),CN(e),PN()]}}function dn(e,t,n,i){const s=e.length;let l=0,a;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,i.length<1e4)a=Array.from(i),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<i.length;)a=i.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function wn(e,t){return e.length>0?(dn(e,e.length,0,t),e):t}const wv={}.hasOwnProperty;function K0(e){const t={};let n=-1;for(;++n<e.length;)AN(t,e[n]);return t}function AN(e,t){let n;for(n in t){const s=(wv.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){wv.call(s,a)||(s[a]=[]);const c=l[a];NN(s[a],Array.isArray(c)?c:c?[c]:[])}}}function NN(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);dn(e,0,0,i)}function so(e){const t=[];let n=-1,i=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&zt(e.charCodeAt(n+1))&&zt(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const c=e.charCodeAt(n+1);l<56320&&c>56319&&c<57344?(a=String.fromCharCode(l,c),s=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(i,n),encodeURIComponent(a)),i=n+s+1,a=""),s&&(n+=s,s=0)}return t.join("")+e.slice(i)}function Ue(e,t,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(f){return ze(f)?(e.enter(n),c(f)):t(f)}function c(f){return ze(f)&&l++<s?(e.consume(f),c):(e.exit(n),t(f))}}const IN={tokenize:jN};function jN(e){const t=e.attempt(this.parser.constructs.contentInitial,i,s);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ue(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),l(c)}function l(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,a(c)}function a(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return je(c)?(e.consume(c),e.exit("chunkText"),l):(e.consume(c),a)}}const DN={tokenize:_N},kv={tokenize:LN};function _N(e){const t=this,n=[];let i=0,s,l,a;return c;function c(T){if(i<n.length){const D=n[i];return t.containerState=D[1],e.attempt(D[0].continuation,f,h)(T)}return h(T)}function f(T){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&M();const D=t.events.length;let U=D,j;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){j=t.events[U][1].end;break}P(i);let Y=D;for(;Y<t.events.length;)t.events[Y][1].end={...j},Y++;return dn(t.events,U+1,0,t.events.slice(D)),t.events.length=Y,h(T)}return c(T)}function h(T){if(i===n.length){if(!s)return y(T);if(s.currentConstruct&&s.currentConstruct.concrete)return S(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kv,m,p)(T)}function m(T){return s&&M(),P(i),y(T)}function p(T){return t.parser.lazy[t.now().line]=i!==n.length,a=t.now().offset,S(T)}function y(T){return t.containerState={},e.attempt(kv,w,S)(T)}function w(T){return i++,n.push([t.currentConstruct,t.containerState]),y(T)}function S(T){if(T===null){s&&M(),P(0),e.consume(T);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),C(T)}function C(T){if(T===null){E(e.exit("chunkFlow"),!0),P(0),e.consume(T);return}return je(T)?(e.consume(T),E(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(T),C)}function E(T,D){const U=t.sliceStream(T);if(D&&U.push(null),T.previous=l,l&&(l.next=T),l=T,s.defineSkip(T.start),s.write(U),t.parser.lazy[T.start.line]){let j=s.events.length;for(;j--;)if(s.events[j][1].start.offset<a&&(!s.events[j][1].end||s.events[j][1].end.offset>a))return;const Y=t.events.length;let W=Y,L,N;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(L){N=t.events[W][1].end;break}L=!0}for(P(i),j=Y;j<t.events.length;)t.events[j][1].end={...N},j++;dn(t.events,W+1,0,t.events.slice(Y)),t.events.length=j}}function P(T){let D=n.length;for(;D-- >T;){const U=n[D];t.containerState=U[1],U[0].exit.call(t,e)}n.length=T}function M(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function LN(e,t,n){return Ue(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ql(e,t,n){const i=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!i.includes(l)&&(t=l(t,n),i.push(l))}return t}const ad={name:"attention",resolveAll:ON,tokenize:FN};function ON(e,t){let n=-1,i,s,l,a,c,f,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[i][1].end},y={...e[n][1].start};Sv(p,-f),Sv(y,f),a={type:f>1?"strongSequence":"emphasisSequence",start:p,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...a.start},end:{...c.end}},e[i][1].end={...a.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=wn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=wn(h,[["enter",s,t],["enter",a,t],["exit",a,t],["enter",l,t]]),h=wn(h,ql(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=wn(h,[["exit",l,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=wn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,dn(e,i-1,n-i+3,h),n=i+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function FN(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=to(i);let l;return a;function a(f){return l=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===l)return e.consume(f),c;const h=e.exit("attentionSequence"),m=to(f),p=!m||m===2&&s||n.includes(f),y=!s||s===2&&m||n.includes(i);return h._open=!!(l===42?p:p&&(s||!y)),h._close=!!(l===42?y:y&&(m||!p)),t(f)}}function Sv(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zN={name:"autolink",tokenize:VN};function VN(e,t,n){let i=0;return s;function s(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(w){return Ht(w)?(e.consume(w),a):w===64?n(w):h(w)}function a(w){return w===43||w===45||w===46||zt(w)?(i=1,c(w)):h(w)}function c(w){return w===58?(e.consume(w),i=0,f):(w===43||w===45||w===46||zt(w))&&i++<32?(e.consume(w),c):(i=0,h(w))}function f(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||Nl(w)?n(w):(e.consume(w),f)}function h(w){return w===64?(e.consume(w),m):V2(w)?(e.consume(w),h):n(w)}function m(w){return zt(w)?p(w):n(w)}function p(w){return w===46?(e.consume(w),i=0,m):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):y(w)}function y(w){if((w===45||zt(w))&&i++<63){const S=w===45?y:p;return e.consume(w),S}return n(w)}}const Ms={partial:!0,tokenize:BN};function BN(e,t,n){return i;function i(l){return ze(l)?Ue(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||je(l)?t(l):n(l)}}const q0={continuation:{tokenize:UN},exit:WN,name:"blockQuote",tokenize:$N};function $N(e,t,n){const i=this;return s;function s(a){if(a===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return ze(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function UN(e,t,n){const i=this;return s;function s(a){return ze(a)?Ue(e,l,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(q0,t,n)(a)}}function WN(e){e.exit("blockQuote")}const X0={name:"characterEscape",tokenize:HN};function HN(e,t,n){return i;function i(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return $2(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const Y0={name:"characterReference",tokenize:KN};function KN(e,t,n){const i=this;let s=0,l,a;return c;function c(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),f}function f(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),l=31,a=zt,m(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=B2,m):(e.enter("characterReferenceValue"),l=7,a=od,m(p))}function m(p){if(p===59&&s){const y=e.exit("characterReferenceValue");return a===zt&&!yh(i.sliceSerialize(y))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&s++<l?(e.consume(p),m):n(p)}}const bv={partial:!0,tokenize:XN},Cv={concrete:!0,name:"codeFenced",tokenize:qN};function qN(e,t,n){const i=this,s={partial:!0,tokenize:U};let l=0,a=0,c;return f;function f(j){return h(j)}function h(j){const Y=i.events[i.events.length-1];return l=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,c=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(j)}function m(j){return j===c?(a++,e.consume(j),m):a<3?n(j):(e.exit("codeFencedFenceSequence"),ze(j)?Ue(e,p,"whitespace")(j):p(j))}function p(j){return j===null||je(j)?(e.exit("codeFencedFence"),i.interrupt?t(j):e.check(bv,C,D)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(j))}function y(j){return j===null||je(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(j)):ze(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,w,"whitespace")(j)):j===96&&j===c?n(j):(e.consume(j),y)}function w(j){return j===null||je(j)?p(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(j))}function S(j){return j===null||je(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(j)):j===96&&j===c?n(j):(e.consume(j),S)}function C(j){return e.attempt(s,D,E)(j)}function E(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),P}function P(j){return l>0&&ze(j)?Ue(e,M,"linePrefix",l+1)(j):M(j)}function M(j){return j===null||je(j)?e.check(bv,C,D)(j):(e.enter("codeFlowValue"),T(j))}function T(j){return j===null||je(j)?(e.exit("codeFlowValue"),M(j)):(e.consume(j),T)}function D(j){return e.exit("codeFenced"),t(j)}function U(j,Y,W){let L=0;return N;function N(te){return j.enter("lineEnding"),j.consume(te),j.exit("lineEnding"),X}function X(te){return j.enter("codeFencedFence"),ze(te)?Ue(j,B,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):B(te)}function B(te){return te===c?(j.enter("codeFencedFenceSequence"),fe(te)):W(te)}function fe(te){return te===c?(L++,j.consume(te),fe):L>=a?(j.exit("codeFencedFenceSequence"),ze(te)?Ue(j,Z,"whitespace")(te):Z(te)):W(te)}function Z(te){return te===null||je(te)?(j.exit("codeFencedFence"),Y(te)):W(te)}}}function XN(e,t,n){const i=this;return s;function s(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}const sf={name:"codeIndented",tokenize:GN},YN={partial:!0,tokenize:QN};function GN(e,t,n){const i=this;return s;function s(h){return e.enter("codeIndented"),Ue(e,l,"linePrefix",5)(h)}function l(h){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?a(h):n(h)}function a(h){return h===null?f(h):je(h)?e.attempt(YN,a,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||je(h)?(e.exit("codeFlowValue"),a(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function QN(e,t,n){const i=this;return s;function s(a){return i.parser.lazy[i.now().line]?n(a):je(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Ue(e,l,"linePrefix",5)(a)}function l(a){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):je(a)?s(a):n(a)}}const ZN={name:"codeText",previous:eI,resolve:JN,tokenize:tI};function JN(e){let t=e.length-4,n=3,i,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)s===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(s=i):(i===t||e[i][1].type==="lineEnding")&&(e[s][1].type="codeTextData",i!==s+2&&(e[s][1].end=e[i-1][1].end,e.splice(s+2,i-s-2),t-=i-s-2,i=s+2),s=void 0);return e}function eI(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function tI(e,t,n){let i=0,s,l;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),c(p)}function c(p){return p===96?(e.consume(p),i++,c):(e.exit("codeTextSequence"),f(p))}function f(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),f):p===96?(l=e.enter("codeTextSequence"),s=0,m(p)):je(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||je(p)?(e.exit("codeTextData"),f(p)):(e.consume(p),h)}function m(p){return p===96?(e.consume(p),s++,m):s===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(l.type="codeTextData",h(p))}}class nI{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&Go(this.left,i),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Go(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Go(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Go(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Go(this.left,n.reverse())}}}function Go(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function G0(e){const t={};let n=-1,i,s,l,a,c,f,h;const m=new nI(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(i=m.get(n),n&&i[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,l=0,l<f.length&&f[l][1].type==="lineEndingBlank"&&(l+=2),l<f.length&&f[l][1].type==="content"))for(;++l<f.length&&f[l][1].type!=="content";)f[l][1].type==="chunkText"&&(f[l][1]._isInFirstContentOfListItem=!0,l++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,rI(m,n)),n=t[n],h=!0);else if(i[1]._container){for(l=n,s=void 0;l--;)if(a=m.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(s&&(m.get(s)[1].type="lineEndingBlank"),a[1].type="lineEnding",s=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;s&&(i[1].end={...m.get(s)[1].start},c=m.slice(s,n),c.unshift(i),m.splice(s,n-s+1,c))}}return dn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function rI(e,t){const n=e.get(t)[1],i=e.get(t)[2];let s=t-1;const l=[];let a=n._tokenizer;a||(a=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const c=a.events,f=[],h={};let m,p,y=-1,w=n,S=0,C=0;const E=[C];for(;w;){for(;e.get(++s)[1]!==w;);l.push(s),w._tokenizer||(m=i.sliceStream(w),w.next||m.push(null),p&&a.defineSkip(w.start),w._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(m),w._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=w,w=w.next}for(w=n;++y<c.length;)c[y][0]==="exit"&&c[y-1][0]==="enter"&&c[y][1].type===c[y-1][1].type&&c[y][1].start.line!==c[y][1].end.line&&(C=y+1,E.push(C),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(a.events=[],w?(w._tokenizer=void 0,w.previous=void 0):E.pop(),y=E.length;y--;){const P=c.slice(E[y],E[y+1]),M=l.pop();f.push([M,M+P.length-1]),e.splice(M,2,P)}for(f.reverse(),y=-1;++y<f.length;)h[S+f[y][0]]=S+f[y][1],S+=f[y][1]-f[y][0]-1;return h}const iI={resolve:sI,tokenize:aI},oI={partial:!0,tokenize:lI};function sI(e){return G0(e),e}function aI(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?l(c):je(c)?e.check(oI,a,l)(c):(e.consume(c),s)}function l(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function a(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function lI(e,t,n){const i=this;return s;function s(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ue(e,l,"linePrefix")}function l(a){if(a===null||je(a))return n(a);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(a):e.interrupt(i.parser.constructs.flow,n,t)(a)}}function Q0(e,t,n,i,s,l,a,c,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return p;function p(P){return P===60?(e.enter(i),e.enter(s),e.enter(l),e.consume(P),e.exit(l),y):P===null||P===32||P===41||Nl(P)?n(P):(e.enter(i),e.enter(a),e.enter(c),e.enter("chunkString",{contentType:"string"}),C(P))}function y(P){return P===62?(e.enter(l),e.consume(P),e.exit(l),e.exit(s),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),w(P))}function w(P){return P===62?(e.exit("chunkString"),e.exit(c),y(P)):P===null||P===60||je(P)?n(P):(e.consume(P),P===92?S:w)}function S(P){return P===60||P===62||P===92?(e.consume(P),w):w(P)}function C(P){return!m&&(P===null||P===41||et(P))?(e.exit("chunkString"),e.exit(c),e.exit(a),e.exit(i),t(P)):m<h&&P===40?(e.consume(P),m++,C):P===41?(e.consume(P),m--,C):P===null||P===32||P===40||Nl(P)?n(P):(e.consume(P),P===92?E:C)}function E(P){return P===40||P===41||P===92?(e.consume(P),C):C(P)}}function Z0(e,t,n,i,s,l){const a=this;let c=0,f;return h;function h(w){return e.enter(i),e.enter(s),e.consume(w),e.exit(s),e.enter(l),m}function m(w){return c>999||w===null||w===91||w===93&&!f||w===94&&!c&&"_hiddenFootnoteSupport"in a.parser.constructs?n(w):w===93?(e.exit(l),e.enter(s),e.consume(w),e.exit(s),e.exit(i),t):je(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||w===91||w===93||je(w)||c++>999?(e.exit("chunkString"),m(w)):(e.consume(w),f||(f=!ze(w)),w===92?y:p)}function y(w){return w===91||w===92||w===93?(e.consume(w),c++,p):p(w)}}function J0(e,t,n,i,s,l){let a;return c;function c(y){return y===34||y===39||y===40?(e.enter(i),e.enter(s),e.consume(y),e.exit(s),a=y===40?41:y,f):n(y)}function f(y){return y===a?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),t):(e.enter(l),h(y))}function h(y){return y===a?(e.exit(l),f(a)):y===null?n(y):je(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Ue(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===a||y===null||je(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?p:m)}function p(y){return y===a||y===92?(e.consume(y),m):m(y)}}function as(e,t){let n;return i;function i(s){return je(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,i):ze(s)?Ue(e,i,n?"linePrefix":"lineSuffix")(s):t(s)}}const uI={name:"definition",tokenize:fI},cI={partial:!0,tokenize:dI};function fI(e,t,n){const i=this;let s;return l;function l(w){return e.enter("definition"),a(w)}function a(w){return Z0.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function c(w){return s=_n(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),f):n(w)}function f(w){return et(w)?as(e,h)(w):h(w)}function h(w){return Q0(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return e.attempt(cI,p,p)(w)}function p(w){return ze(w)?Ue(e,y,"whitespace")(w):y(w)}function y(w){return w===null||je(w)?(e.exit("definition"),i.parser.defined.push(s),t(w)):n(w)}}function dI(e,t,n){return i;function i(c){return et(c)?as(e,s)(c):n(c)}function s(c){return J0(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function l(c){return ze(c)?Ue(e,a,"whitespace")(c):a(c)}function a(c){return c===null||je(c)?t(c):n(c)}}const hI={name:"hardBreakEscape",tokenize:pI};function pI(e,t,n){return i;function i(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return je(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const mI={name:"headingAtx",resolve:gI,tokenize:yI};function gI(e,t){let n=e.length-2,i=3,s,l;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},l={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},dn(e,i,n-i+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function yI(e,t,n){let i=0;return s;function s(m){return e.enter("atxHeading"),l(m)}function l(m){return e.enter("atxHeadingSequence"),a(m)}function a(m){return m===35&&i++<6?(e.consume(m),a):m===null||et(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||je(m)?(e.exit("atxHeading"),t(m)):ze(m)?Ue(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||et(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const vI=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ev=["pre","script","style","textarea"],xI={concrete:!0,name:"htmlFlow",resolveTo:SI,tokenize:bI},wI={partial:!0,tokenize:EI},kI={partial:!0,tokenize:CI};function SI(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function bI(e,t,n){const i=this;let s,l,a,c,f;return h;function h(A){return m(A)}function m(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),p}function p(A){return A===33?(e.consume(A),y):A===47?(e.consume(A),l=!0,C):A===63?(e.consume(A),s=3,i.interrupt?t:R):Ht(A)?(e.consume(A),a=String.fromCharCode(A),E):n(A)}function y(A){return A===45?(e.consume(A),s=2,w):A===91?(e.consume(A),s=5,c=0,S):Ht(A)?(e.consume(A),s=4,i.interrupt?t:R):n(A)}function w(A){return A===45?(e.consume(A),i.interrupt?t:R):n(A)}function S(A){const ee="CDATA[";return A===ee.charCodeAt(c++)?(e.consume(A),c===ee.length?i.interrupt?t:B:S):n(A)}function C(A){return Ht(A)?(e.consume(A),a=String.fromCharCode(A),E):n(A)}function E(A){if(A===null||A===47||A===62||et(A)){const ee=A===47,ye=a.toLowerCase();return!ee&&!l&&Ev.includes(ye)?(s=1,i.interrupt?t(A):B(A)):vI.includes(a.toLowerCase())?(s=6,ee?(e.consume(A),P):i.interrupt?t(A):B(A)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(A):l?M(A):T(A))}return A===45||zt(A)?(e.consume(A),a+=String.fromCharCode(A),E):n(A)}function P(A){return A===62?(e.consume(A),i.interrupt?t:B):n(A)}function M(A){return ze(A)?(e.consume(A),M):N(A)}function T(A){return A===47?(e.consume(A),N):A===58||A===95||Ht(A)?(e.consume(A),D):ze(A)?(e.consume(A),T):N(A)}function D(A){return A===45||A===46||A===58||A===95||zt(A)?(e.consume(A),D):U(A)}function U(A){return A===61?(e.consume(A),j):ze(A)?(e.consume(A),U):T(A)}function j(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),f=A,Y):ze(A)?(e.consume(A),j):W(A)}function Y(A){return A===f?(e.consume(A),f=null,L):A===null||je(A)?n(A):(e.consume(A),Y)}function W(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||et(A)?U(A):(e.consume(A),W)}function L(A){return A===47||A===62||ze(A)?T(A):n(A)}function N(A){return A===62?(e.consume(A),X):n(A)}function X(A){return A===null||je(A)?B(A):ze(A)?(e.consume(A),X):n(A)}function B(A){return A===45&&s===2?(e.consume(A),ge):A===60&&s===1?(e.consume(A),Pe):A===62&&s===4?(e.consume(A),O):A===63&&s===3?(e.consume(A),R):A===93&&s===5?(e.consume(A),de):je(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(wI,G,fe)(A)):A===null||je(A)?(e.exit("htmlFlowData"),fe(A)):(e.consume(A),B)}function fe(A){return e.check(kI,Z,G)(A)}function Z(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),te}function te(A){return A===null||je(A)?fe(A):(e.enter("htmlFlowData"),B(A))}function ge(A){return A===45?(e.consume(A),R):B(A)}function Pe(A){return A===47?(e.consume(A),a="",Q):B(A)}function Q(A){if(A===62){const ee=a.toLowerCase();return Ev.includes(ee)?(e.consume(A),O):B(A)}return Ht(A)&&a.length<8?(e.consume(A),a+=String.fromCharCode(A),Q):B(A)}function de(A){return A===93?(e.consume(A),R):B(A)}function R(A){return A===62?(e.consume(A),O):A===45&&s===2?(e.consume(A),R):B(A)}function O(A){return A===null||je(A)?(e.exit("htmlFlowData"),G(A)):(e.consume(A),O)}function G(A){return e.exit("htmlFlow"),t(A)}}function CI(e,t,n){const i=this;return s;function s(a){return je(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):n(a)}function l(a){return i.parser.lazy[i.now().line]?n(a):t(a)}}function EI(e,t,n){return i;function i(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ms,t,n)}}const PI={name:"htmlText",tokenize:TI};function TI(e,t,n){const i=this;let s,l,a;return c;function c(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),f}function f(R){return R===33?(e.consume(R),h):R===47?(e.consume(R),U):R===63?(e.consume(R),T):Ht(R)?(e.consume(R),W):n(R)}function h(R){return R===45?(e.consume(R),m):R===91?(e.consume(R),l=0,S):Ht(R)?(e.consume(R),M):n(R)}function m(R){return R===45?(e.consume(R),w):n(R)}function p(R){return R===null?n(R):R===45?(e.consume(R),y):je(R)?(a=p,Pe(R)):(e.consume(R),p)}function y(R){return R===45?(e.consume(R),w):p(R)}function w(R){return R===62?ge(R):R===45?y(R):p(R)}function S(R){const O="CDATA[";return R===O.charCodeAt(l++)?(e.consume(R),l===O.length?C:S):n(R)}function C(R){return R===null?n(R):R===93?(e.consume(R),E):je(R)?(a=C,Pe(R)):(e.consume(R),C)}function E(R){return R===93?(e.consume(R),P):C(R)}function P(R){return R===62?ge(R):R===93?(e.consume(R),P):C(R)}function M(R){return R===null||R===62?ge(R):je(R)?(a=M,Pe(R)):(e.consume(R),M)}function T(R){return R===null?n(R):R===63?(e.consume(R),D):je(R)?(a=T,Pe(R)):(e.consume(R),T)}function D(R){return R===62?ge(R):T(R)}function U(R){return Ht(R)?(e.consume(R),j):n(R)}function j(R){return R===45||zt(R)?(e.consume(R),j):Y(R)}function Y(R){return je(R)?(a=Y,Pe(R)):ze(R)?(e.consume(R),Y):ge(R)}function W(R){return R===45||zt(R)?(e.consume(R),W):R===47||R===62||et(R)?L(R):n(R)}function L(R){return R===47?(e.consume(R),ge):R===58||R===95||Ht(R)?(e.consume(R),N):je(R)?(a=L,Pe(R)):ze(R)?(e.consume(R),L):ge(R)}function N(R){return R===45||R===46||R===58||R===95||zt(R)?(e.consume(R),N):X(R)}function X(R){return R===61?(e.consume(R),B):je(R)?(a=X,Pe(R)):ze(R)?(e.consume(R),X):L(R)}function B(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),s=R,fe):je(R)?(a=B,Pe(R)):ze(R)?(e.consume(R),B):(e.consume(R),Z)}function fe(R){return R===s?(e.consume(R),s=void 0,te):R===null?n(R):je(R)?(a=fe,Pe(R)):(e.consume(R),fe)}function Z(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||et(R)?L(R):(e.consume(R),Z)}function te(R){return R===47||R===62||et(R)?L(R):n(R)}function ge(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function Pe(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),Q}function Q(R){return ze(R)?Ue(e,de,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):de(R)}function de(R){return e.enter("htmlTextData"),a(R)}}const vh={name:"labelEnd",resolveAll:NI,resolveTo:II,tokenize:jI},RI={tokenize:DI},MI={tokenize:_I},AI={tokenize:LI};function NI(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const s=i.type==="labelImage"?4:2;i.type="data",t+=s}}return e.length!==n.length&&dn(e,0,e.length,n),e}function II(e,t){let n=e.length,i=0,s,l,a,c;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(a=n);const f={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[l][1].start},end:{...e[a][1].end}},m={type:"labelText",start:{...e[l+i+2][1].end},end:{...e[a-2][1].start}};return c=[["enter",f,t],["enter",h,t]],c=wn(c,e.slice(l+1,l+i+3)),c=wn(c,[["enter",m,t]]),c=wn(c,ql(t.parser.constructs.insideSpan.null,e.slice(l+i+4,a-3),t)),c=wn(c,[["exit",m,t],e[a-2],e[a-1],["exit",h,t]]),c=wn(c,e.slice(a+1)),c=wn(c,[["exit",f,t]]),dn(e,l,e.length,c),e}function jI(e,t,n){const i=this;let s=i.events.length,l,a;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){l=i.events[s][1];break}return c;function c(y){return l?l._inactive?p(y):(a=i.parser.defined.includes(_n(i.sliceSerialize({start:l.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),f):n(y)}function f(y){return y===40?e.attempt(RI,m,a?m:p)(y):y===91?e.attempt(MI,m,a?h:p)(y):a?m(y):p(y)}function h(y){return e.attempt(AI,m,p)(y)}function m(y){return t(y)}function p(y){return l._balanced=!0,n(y)}}function DI(e,t,n){return i;function i(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),s}function s(p){return et(p)?as(e,l)(p):l(p)}function l(p){return p===41?m(p):Q0(e,a,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return et(p)?as(e,f)(p):m(p)}function c(p){return n(p)}function f(p){return p===34||p===39||p===40?J0(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function h(p){return et(p)?as(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function _I(e,t,n){const i=this;return s;function s(c){return Z0.call(i,e,l,a,"reference","referenceMarker","referenceString")(c)}function l(c){return i.parser.defined.includes(_n(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function a(c){return n(c)}}function LI(e,t,n){return i;function i(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const OI={name:"labelStartImage",resolveAll:vh.resolveAll,tokenize:FI};function FI(e,t,n){const i=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),l}function l(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),a):n(c)}function a(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const zI={name:"labelStartLink",resolveAll:vh.resolveAll,tokenize:VI};function VI(e,t,n){const i=this;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):t(a)}}const af={name:"lineEnding",tokenize:BI};function BI(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}const hl={name:"thematicBreak",tokenize:$I};function $I(e,t,n){let i=0,s;return l;function l(h){return e.enter("thematicBreak"),a(h)}function a(h){return s=h,c(h)}function c(h){return h===s?(e.enter("thematicBreakSequence"),f(h)):i>=3&&(h===null||je(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===s?(e.consume(h),i++,f):(e.exit("thematicBreakSequence"),ze(h)?Ue(e,c,"whitespace")(h):c(h))}}const tn={continuation:{tokenize:KI},exit:XI,name:"list",tokenize:HI},UI={partial:!0,tokenize:YI},WI={partial:!0,tokenize:qI};function HI(e,t,n){const i=this,s=i.events[i.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return c;function c(w){const S=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:od(w)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(hl,n,h)(w):h(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(w)}return n(w)}function f(w){return od(w)&&++a<10?(e.consume(w),f):(!i.interrupt||a<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),h(w)):n(w)}function h(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(Ms,i.interrupt?n:m,e.attempt(UI,y,p))}function m(w){return i.containerState.initialBlankLine=!0,l++,y(w)}function p(w){return ze(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),y):n(w)}function y(w){return i.containerState.size=l+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function KI(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Ms,s,l);function s(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Ue(e,t,"listItemIndent",i.containerState.size+1)(c)}function l(c){return i.containerState.furtherBlankLines||!ze(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,a(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(WI,t,a)(c))}function a(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Ue(e,e.attempt(tn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function qI(e,t,n){const i=this;return Ue(e,s,"listItemIndent",i.containerState.size+1);function s(l){const a=i.events[i.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===i.containerState.size?t(l):n(l)}}function XI(e){e.exit(this.containerState.type)}function YI(e,t,n){const i=this;return Ue(e,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const a=i.events[i.events.length-1];return!ze(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const Pv={name:"setextUnderline",resolveTo:GI,tokenize:QI};function GI(e,t){let n=e.length,i,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const a={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",a,t]),e.splice(l+1,0,["exit",e[i][1],t]),e[i][1].end={...e[l][1].end}):e[i][1]=a,e.push(["exit",a,t]),e}function QI(e,t,n){const i=this;let s;return l;function l(h){let m=i.events.length,p;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){p=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(e.enter("setextHeadingLine"),s=h,a(h)):n(h)}function a(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===s?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),ze(h)?Ue(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||je(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ZI={tokenize:JI};function JI(e){const t=this,n=e.attempt(Ms,i,e.attempt(this.parser.constructs.flowInitial,s,Ue(e,e.attempt(this.parser.constructs.flow,s,e.attempt(iI,s)),"linePrefix")));return n;function i(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ej={resolveAll:t1()},tj=e1("string"),nj=e1("text");function e1(e){return{resolveAll:t1(e==="text"?rj:void 0),tokenize:t};function t(n){const i=this,s=this.parser.constructs[e],l=n.attempt(s,a,c);return a;function a(m){return h(m)?l(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return h(m)?(n.exit("data"),l(m)):(n.consume(m),f)}function h(m){if(m===null)return!0;const p=s[m];let y=-1;if(p)for(;++y<p.length;){const w=p[y];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function t1(e){return t;function t(n,i){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,i):n}}function rj(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const i=e[n-1][1],s=t.sliceStream(i);let l=s.length,a=-1,c=0,f;for(;l--;){const h=s[l];if(typeof h=="string"){for(a=h.length;h.charCodeAt(a-1)===32;)c++,a--;if(a)break;a=-1}else if(h===-2)f=!0,c++;else if(h!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?a:i.start._bufferIndex+a,_index:i.start._index+l,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const ij={42:tn,43:tn,45:tn,48:tn,49:tn,50:tn,51:tn,52:tn,53:tn,54:tn,55:tn,56:tn,57:tn,62:q0},oj={91:uI},sj={[-2]:sf,[-1]:sf,32:sf},aj={35:mI,42:hl,45:[Pv,hl],60:xI,61:Pv,95:hl,96:Cv,126:Cv},lj={38:Y0,92:X0},uj={[-5]:af,[-4]:af,[-3]:af,33:OI,38:Y0,42:ad,60:[zN,PI],91:zI,92:[hI,X0],93:vh,95:ad,96:ZN},cj={null:[ad,ej]},fj={null:[42,95]},dj={null:[]},hj=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:fj,contentInitial:oj,disable:dj,document:ij,flow:aj,flowInitial:sj,insideSpan:cj,string:lj,text:uj},Symbol.toStringTag,{value:"Module"}));function pj(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let a=[],c=[];const f={attempt:Y(U),check:Y(j),consume:M,enter:T,exit:D,interrupt:Y(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:C,events:[],now:S,parser:e,previous:null,sliceSerialize:y,sliceStream:w,write:p};let m=t.tokenize.call(h,f);return t.resolveAll&&l.push(t),h;function p(X){return a=wn(a,X),E(),a[a.length-1]!==null?[]:(W(t,0),h.events=ql(l,h.events,h),h.events)}function y(X,B){return gj(w(X),B)}function w(X){return mj(a,X)}function S(){const{_bufferIndex:X,_index:B,line:fe,column:Z,offset:te}=i;return{_bufferIndex:X,_index:B,line:fe,column:Z,offset:te}}function C(X){s[X.line]=X.column,N()}function E(){let X;for(;i._index<a.length;){const B=a[i._index];if(typeof B=="string")for(X=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===X&&i._bufferIndex<B.length;)P(B.charCodeAt(i._bufferIndex));else P(B)}}function P(X){m=m(X)}function M(X){je(X)?(i.line++,i.column=1,i.offset+=X===-3?2:1,N()):X!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===a[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=X}function T(X,B){const fe=B||{};return fe.type=X,fe.start=S(),h.events.push(["enter",fe,h]),c.push(fe),fe}function D(X){const B=c.pop();return B.end=S(),h.events.push(["exit",B,h]),B}function U(X,B){W(X,B.from)}function j(X,B){B.restore()}function Y(X,B){return fe;function fe(Z,te,ge){let Pe,Q,de,R;return Array.isArray(Z)?G(Z):"tokenize"in Z?G([Z]):O(Z);function O(ve){return pe;function pe(Me){const me=Me!==null&&ve[Me],Oe=Me!==null&&ve.null,qe=[...Array.isArray(me)?me:me?[me]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return G(qe)(Me)}}function G(ve){return Pe=ve,Q=0,ve.length===0?ge:A(ve[Q])}function A(ve){return pe;function pe(Me){return R=L(),de=ve,ve.partial||(h.currentConstruct=ve),ve.name&&h.parser.constructs.disable.null.includes(ve.name)?ye():ve.tokenize.call(B?Object.assign(Object.create(h),B):h,f,ee,ye)(Me)}}function ee(ve){return X(de,R),te}function ye(ve){return R.restore(),++Q<Pe.length?A(Pe[Q]):ge}}}function W(X,B){X.resolveAll&&!l.includes(X)&&l.push(X),X.resolve&&dn(h.events,B,h.events.length-B,X.resolve(h.events.slice(B),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function L(){const X=S(),B=h.previous,fe=h.currentConstruct,Z=h.events.length,te=Array.from(c);return{from:Z,restore:ge};function ge(){i=X,h.previous=B,h.currentConstruct=fe,h.events.length=Z,c=te,N()}}function N(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function mj(e,t){const n=t.start._index,i=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let a;if(n===s)a=[e[n].slice(i,l)];else{if(a=e.slice(n,s),i>-1){const c=a[0];typeof c=="string"?a[0]=c.slice(i):a.shift()}l>0&&a.push(e[s].slice(0,l))}return a}function gj(e,t){let n=-1;const i=[];let s;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
|
|
259
|
+
`;break}case-3:{a=`\r
|
|
260
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&s)continue;a=" ";break}default:a=String.fromCharCode(l)}s=l===-2,i.push(a)}return i.join("")}function yj(e){const i={constructs:K0([hj,...(e||{}).extensions||[]]),content:s(IN),defined:[],document:s(DN),flow:s(ZI),lazy:{},string:s(tj),text:s(nj)};return i;function s(l){return a;function a(c){return pj(i,l,c)}}}function vj(e){for(;!G0(e););return e}const Tv=/[\0\t\n\r]/g;function xj(){let e=1,t="",n=!0,i;return s;function s(l,a,c){const f=[];let h,m,p,y,w;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l)),p=0,t="",n&&(l.charCodeAt(0)===65279&&p++,n=void 0);p<l.length;){if(Tv.lastIndex=p,h=Tv.exec(l),y=h&&h.index!==void 0?h.index:l.length,w=l.charCodeAt(y),!h){t=l.slice(p);break}if(w===10&&p===y&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),p<y&&(f.push(l.slice(p,y)),e+=y-p),w){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}p=y+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}function ls(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Rv(e.position):"start"in e||"end"in e?Rv(e):"line"in e||"column"in e?ld(e):""}function ld(e){return Mv(e&&e.line)+":"+Mv(e&&e.column)}function Rv(e){return ld(e&&e.start)+"-"+ld(e&&e.end)}function Mv(e){return e&&typeof e=="number"?e:1}const n1={}.hasOwnProperty;function r1(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),wj(n)(vj(yj(n).document().write(xj()(e,t,!0))))}function wj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(rn),autolinkProtocol:L,autolinkEmail:L,atxHeading:l(bt),blockQuote:l(Oe),characterEscape:L,characterReference:L,codeFenced:l(qe),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:l(qe,a),codeText:l(ut,a),codeTextData:L,data:L,codeFlowValue:L,definition:l(mt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:l(Ve),hardBreakEscape:l(Rt),hardBreakTrailing:l(Rt),htmlFlow:l(it,a),htmlFlowData:L,htmlText:l(it,a),htmlTextData:L,image:l(Bt),label:a,link:l(rn),listItem:l(on),listItemValue:y,listOrdered:l(Mt,p),listUnordered:l(Mt),paragraph:l(hn),reference:A,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:l(bt),strong:l(Be),thematicBreak:l(Qn)},exit:{atxHeading:f(),atxHeadingSequence:U,autolink:f(),autolinkEmail:me,autolinkProtocol:Me,blockQuote:f(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:ve,characterReference:pe,codeFenced:f(E),codeFencedFence:C,codeFencedFenceInfo:w,codeFencedFenceMeta:S,codeFlowValue:N,codeIndented:f(P),codeText:f(te),codeTextData:N,data:N,definition:f(),definitionDestinationString:D,definitionLabelString:M,definitionTitleString:T,emphasis:f(),hardBreakEscape:f(B),hardBreakTrailing:f(B),htmlFlow:f(fe),htmlFlowData:N,htmlText:f(Z),htmlTextData:N,image:f(Pe),label:de,labelText:Q,lineEnding:X,link:f(ge),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ee,resourceDestinationString:R,resourceTitleString:O,resource:G,setextHeading:f(W),setextHeadingLineSequence:Y,setextHeadingText:j,strong:f(),thematicBreak:f()}};i1(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(q){let oe={type:"root",children:[]};const Ae={stack:[oe],tokenStack:[],config:t,enter:c,exit:h,buffer:a,resume:m,data:n},F=[];let J=-1;for(;++J<q.length;)if(q[J][1].type==="listOrdered"||q[J][1].type==="listUnordered")if(q[J][0]==="enter")F.push(J);else{const we=F.pop();J=s(q,we,J)}for(J=-1;++J<q.length;){const we=t[q[J][0]];n1.call(we,q[J][1].type)&&we[q[J][1].type].call(Object.assign({sliceSerialize:q[J][2].sliceSerialize},Ae),q[J][1])}if(Ae.tokenStack.length>0){const we=Ae.tokenStack[Ae.tokenStack.length-1];(we[1]||Av).call(Ae,void 0,we[0])}for(oe.position={start:Nr(q.length>0?q[0][1].start:{line:1,column:1,offset:0}),end:Nr(q.length>0?q[q.length-2][1].end:{line:1,column:1,offset:0})},J=-1;++J<t.transforms.length;)oe=t.transforms[J](oe)||oe;return oe}function s(q,oe,Ae){let F=oe-1,J=-1,we=!1,V,ue,ae,he;for(;++F<=Ae;){const Te=q[F];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Te[0]==="enter"?J++:J--,he=void 0;break}case"lineEndingBlank":{Te[0]==="enter"&&(V&&!he&&!J&&!ae&&(ae=F),he=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:he=void 0}if(!J&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||J===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(V){let se=F;for(ue=void 0;se--;){const De=q[se];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;ue&&(q[ue][1].type="lineEndingBlank",we=!0),De[1].type="lineEnding",ue=se}else if(!(De[1].type==="linePrefix"||De[1].type==="blockQuotePrefix"||De[1].type==="blockQuotePrefixWhitespace"||De[1].type==="blockQuoteMarker"||De[1].type==="listItemIndent"))break}ae&&(!ue||ae<ue)&&(V._spread=!0),V.end=Object.assign({},ue?q[ue][1].start:Te[1].end),q.splice(ue||F,0,["exit",V,Te[2]]),F++,Ae++}if(Te[1].type==="listItemPrefix"){const se={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};V=se,q.splice(F,0,["enter",se,Te[2]]),F++,Ae++,ae=void 0,he=!0}}}return q[oe][1]._spread=we,Ae}function l(q,oe){return Ae;function Ae(F){c.call(this,q(F),F),oe&&oe.call(this,F)}}function a(){this.stack.push({type:"fragment",children:[]})}function c(q,oe,Ae){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([oe,Ae||void 0]),q.position={start:Nr(oe.start),end:void 0}}function f(q){return oe;function oe(Ae){q&&q.call(this,Ae),h.call(this,Ae)}}function h(q,oe){const Ae=this.stack.pop(),F=this.tokenStack.pop();if(F)F[0].type!==q.type&&(oe?oe.call(this,q,F[0]):(F[1]||Av).call(this,q,F[0]));else throw new Error("Cannot close `"+q.type+"` ("+ls({start:q.start,end:q.end})+"): it’s not open");Ae.position.end=Nr(q.end)}function m(){return mh(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function y(q){if(this.data.expectingFirstListItemValue){const oe=this.stack[this.stack.length-2];oe.start=Number.parseInt(this.sliceSerialize(q),10),this.data.expectingFirstListItemValue=void 0}}function w(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.lang=q}function S(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.meta=q}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function P(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=q.replace(/(\r?\n|\r)$/g,"")}function M(q){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=oe,Ae.identifier=_n(this.sliceSerialize(q)).toLowerCase()}function T(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.title=q}function D(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.url=q}function U(q){const oe=this.stack[this.stack.length-1];if(!oe.depth){const Ae=this.sliceSerialize(q).length;oe.depth=Ae}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function Y(q){const oe=this.stack[this.stack.length-1];oe.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function L(q){const Ae=this.stack[this.stack.length-1].children;let F=Ae[Ae.length-1];(!F||F.type!=="text")&&(F=Gn(),F.position={start:Nr(q.start),end:void 0},Ae.push(F)),this.stack.push(F)}function N(q){const oe=this.stack.pop();oe.value+=this.sliceSerialize(q),oe.position.end=Nr(q.end)}function X(q){const oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=oe.children[oe.children.length-1];Ae.position.end=Nr(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(oe.type)&&(L.call(this,q),N.call(this,q))}function B(){this.data.atHardBreak=!0}function fe(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=q}function Z(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=q}function te(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.value=q}function ge(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=oe,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function Pe(){const q=this.stack[this.stack.length-1];if(this.data.inReference){const oe=this.data.referenceType||"shortcut";q.type+="Reference",q.referenceType=oe,delete q.url,delete q.title}else delete q.identifier,delete q.label;this.data.referenceType=void 0}function Q(q){const oe=this.sliceSerialize(q),Ae=this.stack[this.stack.length-2];Ae.label=gN(oe),Ae.identifier=_n(oe).toLowerCase()}function de(){const q=this.stack[this.stack.length-1],oe=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const F=q.children;Ae.children=F}else Ae.alt=oe}function R(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.url=q}function O(){const q=this.resume(),oe=this.stack[this.stack.length-1];oe.title=q}function G(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ee(q){const oe=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=oe,Ae.identifier=_n(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function ye(q){this.data.characterReferenceType=q.type}function ve(q){const oe=this.sliceSerialize(q),Ae=this.data.characterReferenceType;let F;Ae?(F=W0(oe,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):F=yh(oe);const J=this.stack[this.stack.length-1];J.value+=F}function pe(q){const oe=this.stack.pop();oe.position.end=Nr(q.end)}function Me(q){N.call(this,q);const oe=this.stack[this.stack.length-1];oe.url=this.sliceSerialize(q)}function me(q){N.call(this,q);const oe=this.stack[this.stack.length-1];oe.url="mailto:"+this.sliceSerialize(q)}function Oe(){return{type:"blockquote",children:[]}}function qe(){return{type:"code",lang:null,meta:null,value:""}}function ut(){return{type:"inlineCode",value:""}}function mt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ve(){return{type:"emphasis",children:[]}}function bt(){return{type:"heading",depth:0,children:[]}}function Rt(){return{type:"break"}}function it(){return{type:"html",value:""}}function Bt(){return{type:"image",title:null,url:"",alt:null}}function rn(){return{type:"link",title:null,url:"",children:[]}}function Mt(q){return{type:"list",ordered:q.type==="listOrdered",start:null,spread:q._spread,children:[]}}function on(q){return{type:"listItem",spread:q._spread,checked:null,children:[]}}function hn(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function Gn(){return{type:"text",value:""}}function Qn(){return{type:"thematicBreak"}}}function Nr(e){return{line:e.line,column:e.column,offset:e.offset}}function i1(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?i1(e,i):kj(e,i)}}function kj(e,t){let n;for(n in t)if(n1.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function Av(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ls({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ls({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ls({start:t.start,end:t.end})+") is still open")}const Sj={tokenize:Rj,partial:!0},o1={tokenize:Mj,partial:!0},s1={tokenize:Aj,partial:!0},a1={tokenize:Nj,partial:!0},bj={tokenize:Ij,partial:!0},l1={name:"wwwAutolink",tokenize:Pj,previous:c1},u1={name:"protocolAutolink",tokenize:Tj,previous:f1},cr={name:"emailAutolink",tokenize:Ej,previous:d1},Xn={};function Cj(){return{text:Xn}}let ii=48;for(;ii<123;)Xn[ii]=cr,ii++,ii===58?ii=65:ii===91&&(ii=97);Xn[43]=cr;Xn[45]=cr;Xn[46]=cr;Xn[95]=cr;Xn[72]=[cr,u1];Xn[104]=[cr,u1];Xn[87]=[cr,l1];Xn[119]=[cr,l1];function Ej(e,t,n){const i=this;let s,l;return a;function a(p){return!ud(p)||!d1.call(i,i.previous)||xh(i.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(p))}function c(p){return ud(p)?(e.consume(p),c):p===64?(e.consume(p),f):n(p)}function f(p){return p===46?e.check(bj,m,h)(p):p===45||p===95||zt(p)?(l=!0,e.consume(p),f):m(p)}function h(p){return e.consume(p),s=!0,f}function m(p){return l&&s&&Ht(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function Pj(e,t,n){const i=this;return s;function s(a){return a!==87&&a!==119||!c1.call(i,i.previous)||xh(i.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Sj,e.attempt(o1,e.attempt(s1,l),n),n)(a))}function l(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Tj(e,t,n){const i=this;let s="",l=!1;return a;function a(p){return(p===72||p===104)&&f1.call(i,i.previous)&&!xh(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(p),e.consume(p),c):n(p)}function c(p){if(Ht(p)&&s.length<5)return s+=String.fromCodePoint(p),e.consume(p),c;if(p===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(p),f}return n(p)}function f(p){return p===47?(e.consume(p),l?h:(l=!0,f)):n(p)}function h(p){return p===null||Nl(p)||et(p)||pi(p)||Wl(p)?n(p):e.attempt(o1,e.attempt(s1,m),n)(p)}function m(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function Rj(e,t,n){let i=0;return s;function s(a){return(a===87||a===119)&&i<3?(i++,e.consume(a),s):a===46&&i===3?(e.consume(a),l):n(a)}function l(a){return a===null?n(a):t(a)}}function Mj(e,t,n){let i,s,l;return a;function a(h){return h===46||h===95?e.check(a1,f,c)(h):h===null||et(h)||pi(h)||h!==45&&Wl(h)?f(h):(l=!0,e.consume(h),a)}function c(h){return h===95?i=!0:(s=i,i=void 0),e.consume(h),a}function f(h){return s||i||!l?n(h):t(h)}}function Aj(e,t){let n=0,i=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&i<n?l(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(a1,t,l)(a):a===null||et(a)||pi(a)?t(a):(e.consume(a),s)}function l(a){return a===41&&i++,e.consume(a),s}}function Nj(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),l):c===93?(e.consume(c),s):c===60||c===null||et(c)||pi(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||et(c)||pi(c)?t(c):i(c)}function l(c){return Ht(c)?a(c):n(c)}function a(c){return c===59?(e.consume(c),i):Ht(c)?(e.consume(c),a):n(c)}}function Ij(e,t,n){return i;function i(l){return e.consume(l),s}function s(l){return zt(l)?n(l):t(l)}}function c1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||et(e)}function f1(e){return!Ht(e)}function d1(e){return!(e===47||ud(e))}function ud(e){return e===43||e===45||e===46||e===95||zt(e)}function xh(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const jj={tokenize:Bj,partial:!0};function Dj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Fj,continuation:{tokenize:zj},exit:Vj}},text:{91:{name:"gfmFootnoteCall",tokenize:Oj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_j,resolveTo:Lj}}}}function _j(e,t,n){const i=this;let s=i.events.length;const l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a;for(;s--;){const f=i.events[s][1];if(f.type==="labelImage"){a=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!a||!a._balanced)return n(f);const h=_n(i.sliceSerialize({start:a.end,end:i.now()}));return h.codePointAt(0)!==94||!l.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function Lj(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function Oj(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l=0,a;return c;function c(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),f}function f(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(l>999||p===93&&!a||p===null||p===91||et(p))return n(p);if(p===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(_n(i.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return et(p)||(a=!0),l++,e.consume(p),p===92?m:h}function m(p){return p===91||p===92||p===93?(e.consume(p),l++,h):h(p)}}function Fj(e,t,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l,a=0,c;return f;function f(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(S)}function m(S){if(a>999||S===93&&!c||S===null||S===91||et(S))return n(S);if(S===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return l=_n(i.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return et(S)||(c=!0),a++,e.consume(S),S===92?p:m}function p(S){return S===91||S===92||S===93?(e.consume(S),a++,m):m(S)}function y(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(l)||s.push(l),Ue(e,w,"gfmFootnoteDefinitionWhitespace")):n(S)}function w(S){return t(S)}}function zj(e,t,n){return e.check(Ms,t,e.attempt(jj,t,n))}function Vj(e){e.exit("gfmFootnoteDefinition")}function Bj(e,t,n){const i=this;return Ue(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const a=i.events[i.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(l):n(l)}}function $j(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(a,c){let f=-1;for(;++f<a.length;)if(a[f][0]==="enter"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._close){let h=f;for(;h--;)if(a[h][0]==="exit"&&a[h][1].type==="strikethroughSequenceTemporary"&&a[h][1]._open&&a[f][1].end.offset-a[f][1].start.offset===a[h][1].end.offset-a[h][1].start.offset){a[f][1].type="strikethroughSequence",a[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},a[h][1].start),end:Object.assign({},a[f][1].end)},p={type:"strikethroughText",start:Object.assign({},a[h][1].end),end:Object.assign({},a[f][1].start)},y=[["enter",m,c],["enter",a[h][1],c],["exit",a[h][1],c],["enter",p,c]],w=c.parser.constructs.insideSpan.null;w&&dn(y,y.length,0,ql(w,a.slice(h+1,f),c)),dn(y,y.length,0,[["exit",p,c],["enter",a[f][1],c],["exit",a[f][1],c],["exit",m,c]]),dn(a,h-1,f-h+3,y),f=h+y.length-2;break}}for(f=-1;++f<a.length;)a[f][1].type==="strikethroughSequenceTemporary"&&(a[f][1].type="data");return a}function l(a,c,f){const h=this.previous,m=this.events;let p=0;return y;function y(S){return h===126&&m[m.length-1][1].type!=="characterEscape"?f(S):(a.enter("strikethroughSequenceTemporary"),w(S))}function w(S){const C=to(h);if(S===126)return p>1?f(S):(a.consume(S),p++,w);if(p<2&&!n)return f(S);const E=a.exit("strikethroughSequenceTemporary"),P=to(S);return E._open=!P||P===2&&!!C,E._close=!C||C===2&&!!P,c(S)}}}class Uj{constructor(){this.map=[]}add(t,n,i){Wj(this,t,n,i)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let s=i.pop();for(;s;){for(const l of s)t.push(l);s=i.pop()}this.map.length=0}}function Wj(e,t,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...i);return}s+=1}e.map.push([t,n,i])}}function Hj(e,t){let n=!1;const i=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=i.length-1;i[l]=i[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function Kj(){return{flow:{null:{name:"table",tokenize:qj,resolveAll:Xj}}}}function qj(e,t,n){const i=this;let s=0,l=0,a;return c;function c(N){let X=i.events.length-1;for(;X>-1;){const Z=i.events[X][1].type;if(Z==="lineEnding"||Z==="linePrefix")X--;else break}const B=X>-1?i.events[X][1].type:null,fe=B==="tableHead"||B==="tableRow"?j:f;return fe===j&&i.parser.lazy[i.now().line]?n(N):fe(N)}function f(N){return e.enter("tableHead"),e.enter("tableRow"),h(N)}function h(N){return N===124||(a=!0,l+=1),m(N)}function m(N){return N===null?n(N):je(N)?l>1?(l=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),w):n(N):ze(N)?Ue(e,m,"whitespace")(N):(l+=1,a&&(a=!1,s+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),a=!0,m):(e.enter("data"),p(N)))}function p(N){return N===null||N===124||et(N)?(e.exit("data"),m(N)):(e.consume(N),N===92?y:p)}function y(N){return N===92||N===124?(e.consume(N),p):p(N)}function w(N){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(N):(e.enter("tableDelimiterRow"),a=!1,ze(N)?Ue(e,S,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):S(N))}function S(N){return N===45||N===58?E(N):N===124?(a=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),C):U(N)}function C(N){return ze(N)?Ue(e,E,"whitespace")(N):E(N)}function E(N){return N===58?(l+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),P):N===45?(l+=1,P(N)):N===null||je(N)?D(N):U(N)}function P(N){return N===45?(e.enter("tableDelimiterFiller"),M(N)):U(N)}function M(N){return N===45?(e.consume(N),M):N===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(N))}function T(N){return ze(N)?Ue(e,D,"whitespace")(N):D(N)}function D(N){return N===124?S(N):N===null||je(N)?!a||s!==l?U(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):U(N)}function U(N){return n(N)}function j(N){return e.enter("tableRow"),Y(N)}function Y(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),Y):N===null||je(N)?(e.exit("tableRow"),t(N)):ze(N)?Ue(e,Y,"whitespace")(N):(e.enter("data"),W(N))}function W(N){return N===null||N===124||et(N)?(e.exit("data"),Y(N)):(e.consume(N),N===92?L:W)}function L(N){return N===92||N===124?(e.consume(N),W):W(N)}}function Xj(e,t){let n=-1,i=!0,s=0,l=[0,0,0,0],a=[0,0,0,0],c=!1,f=0,h,m,p;const y=new Uj;for(;++n<e.length;){const w=e[n],S=w[1];w[0]==="enter"?S.type==="tableHead"?(c=!1,f!==0&&(Nv(y,t,f,h,m),m=void 0,f=0),h={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(n,0,[["enter",h,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(i=!0,p=void 0,l=[0,0,0,0],a=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(n,0,[["enter",m,t]])),s=S.type==="tableDelimiterRow"?2:m?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(i=!1,a[2]===0&&(l[1]!==0&&(a[0]=a[1],p=Xa(y,t,l,s,void 0,p),l=[0,0,0,0]),a[2]=n)):S.type==="tableCellDivider"&&(i?i=!1:(l[1]!==0&&(a[0]=a[1],p=Xa(y,t,l,s,void 0,p)),l=a,a=[l[1],n,0,0])):S.type==="tableHead"?(c=!0,f=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(f=n,l[1]!==0?(a[0]=a[1],p=Xa(y,t,l,s,n,p)):a[1]!==0&&(p=Xa(y,t,a,s,n,p)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(a[3]=n)}for(f!==0&&Nv(y,t,f,h,m),y.consume(t.events),n=-1;++n<t.events.length;){const w=t.events[n];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=Hj(t.events,n))}return e}function Xa(e,t,n,i,s,l){const a=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(l.end=Object.assign({},Ki(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const f=Ki(t.events,n[1]);if(l={type:a,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const h=Ki(t.events,n[2]),m=Ki(t.events,n[3]),p={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",p,t]]),i!==2){const y=t.events[n[2]],w=t.events[n[3]];if(y[1].end=Object.assign({},w[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,C=n[3]-n[2]-1;e.add(S,C,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return s!==void 0&&(l.end=Object.assign({},Ki(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function Nv(e,t,n,i,s){const l=[],a=Ki(t.events,n);s&&(s.end=Object.assign({},a),l.push(["exit",s,t])),i.end=Object.assign({},a),l.push(["exit",i,t]),e.add(n+1,0,l)}function Ki(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const Yj={name:"tasklistCheck",tokenize:Qj};function Gj(){return{text:{91:Yj}}}function Qj(e,t,n){const i=this;return s;function s(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),l)}function l(f){return et(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),a):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),a):n(f)}function a(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return je(f)?t(f):ze(f)?e.check({tokenize:Zj},t,n)(f):n(f)}}function Zj(e,t,n){return Ue(e,i,"whitespace");function i(s){return s===null?n(s):t(s)}}function h1(e){return K0([Cj(),Dj(),$j(e),Kj(),Gj()])}function p1(e){return typeof e=="string"&&/\.md$/i.test(e.trim())}function Jj(e,t){const n=String(e??"").trim().split(/\r?\n/).map(s=>`> ${s}`).join(`
|
|
261
|
+
`),i=String(t??"").trim();return n&&i?`${n}
|
|
262
|
+
|
|
263
|
+
${i}`:n||i}function eD(e){const t=String(e??""),n=t.lastIndexOf(".");return`${n>0?t.slice(0,n):t}_review.md`}function tD(e,t,n){const i=String(e??""),s=String(t??""),l=Math.max(0,Number(n)||0);if(!s)return 0;let a=0,c=0;for(;c<=i.length;){const f=i.indexOf(s,c);if(f<0||f>=l)return a;a+=1,c=f+Math.max(s.length,1)}return a}function nD(e){return(String(e??"").match(/https?:\/\/[^\s<>()\[\]{}"']+/gi)??[]).map(n=>n.replace(/[.,!?;:]+$/,""))}function cd(e){return e?.kind!=="file"?null:String(e.mime??"").toLowerCase().startsWith("image/")?"photo":"file"}function rD(e){const t=i=>{const s=Date.parse(String(i??""));return Number.isFinite(s)?s:0},n=new Map;for(const i of e??[]){const s=String(i?.message?.filename||"file"),l=n.get(s)??[];l.push(i),n.set(s,l)}return[...n.entries()].map(([i,s])=>({filename:i,versions:s.sort((l,a)=>t(a.message?.date)-t(l.message?.date))})).sort((i,s)=>t(s.versions[0]?.message?.date)-t(i.versions[0]?.message?.date))}const iD=new Set(["delete","emphasis","inlineCode","link","linkReference","strong"]);function oD(e){const t=r1(e,{extensions:[h1()],mdastExtensions:[H0()]}),n=[],i=[],s=[],l=(c,f)=>{const h=String(c??""),m=f.position?.start?.offset,p=f.position?.end?.offset;if(!h||!Number.isInteger(m)||!Number.isInteger(p))return;const y=e.slice(m,p),w=y.indexOf(h);if(w>=0){for(let C=0;C<h.length;C+=1)n.push(h[C]),i.push(m+w+C+1);return}let S=0;for(const C of h){const E=y.indexOf(C,S),P=E>=0?E:Math.min(S,Math.max(y.length-1,0));n.push(C),i.push(m+P+1),S=P+1}},a=c=>{const f=n.length;if(c.type==="text"||c.type==="inlineCode"||c.type==="code")l(c.value,c);else for(const p of c.children??[])a(p);const h=n.length,m=c.position?.end?.offset;h>f&&iD.has(c.type)&&Number.isInteger(m)&&s.push({visibleEnd:h,rawEnd:m})};return a(t),{text:n.join(""),rawEnds:i,trailingRanges:s}}function sD(e,t,n){let i=-1,s=0;for(let l=0;l<=n;l+=1){if(i=e.indexOf(t,s),i<0)return-1;s=i+Math.max(t.length,1)}return i}function aD(e,t){const n=String(e??""),i=oD(n),s=new Map,l=[];for(const[f,h]of(t??[]).entries()){const m=String(h?.selection??"").trim(),p=String(h?.comment??"").trim().replace(/\s+/g," ").replace(/\]\]/g,"] ]");if(!p)continue;const y=`[[REVIEW COMMENT ${f+1}: ${p}]]`,w=Number.isInteger(h?.occurrence)&&h.occurrence>=0?h.occurrence:0,S=m?sD(i.text,m,w):-1,C=S+m.length;let E=S>=0?i.rawEnds[C-1]:void 0;if(!Number.isInteger(E)){l.push(`[[REVIEW COMMENT ${f+1} — ANCHOR NOT FOUND: ${p}]]`);continue}for(const M of i.trailingRanges)M.visibleEnd===C&&(E=Math.max(E,M.rawEnd));const P=s.get(E)??[];P.push(y),s.set(E,P)}let a=n;const c=[...s.keys()].sort((f,h)=>h-f);for(const f of c)a=`${a.slice(0,f)} ${s.get(f).join(" ")}${a.slice(f)}`;return l.length>0&&(a=`${a.trimEnd()}
|
|
264
|
+
|
|
265
|
+
${l.join(`
|
|
266
|
+
`)}
|
|
267
|
+
`),a}const lD="",uD="application/octet-stream",cD=/\.([A-Za-z0-9]{1,12})$/;function m1(e){return String(e??"").split(";")[0].trim().toLowerCase()}function g1(e){const t=cD.exec(String(e??"").trim());return t?t[1].toLowerCase():""}function fD(e){const t=g1(e);return t==="html"||t==="htm"}function As(e,t){return fD(e)?!0:g1(e)?!1:m1(t)==="text/html"}function wh(e,t){const n=m1(e);return n==="text/html"||As(t,e)?uD:n}const fd=48e3,dD=Object.freeze([{rec:"audio/webm;codecs=opus",base:"audio/webm",ext:"webm"},{rec:"audio/ogg;codecs=opus",base:"audio/ogg",ext:"ogg"},{rec:"audio/webm",base:"audio/webm",ext:"webm"},{rec:"audio/mp4",base:"audio/mp4",ext:"m4a"}]),y1="x-ours-duration",hD=4e3;function pD(e){return!Number.isFinite(e)||e<=0?null:String(Math.round(e*100)/100)}function mD(e,t){const n=t===null?null:pD(t);return n===null?e:`${e};${y1}=${n}`}function gD(e){if(!e)return null;const t=new RegExp(`${y1}\\s*=\\s*([0-9]*\\.?[0-9]+)`,"i").exec(e);if(!t)return null;const n=Number(t[1]);return Number.isFinite(n)&&n>0?n:null}function yD(e,t=hD){return typeof Audio!="function"||typeof URL?.createObjectURL!="function"?Promise.resolve(null):new Promise(n=>{const i=URL.createObjectURL(e),s=new Audio;let l=!1;const a=f=>{l||(l=!0,clearTimeout(c),s.removeAttribute("src"),s.load(),URL.revokeObjectURL(i),n(Number.isFinite(f)&&(f??0)>0?f:null))},c=setTimeout(()=>a(null),t);s.addEventListener("loadedmetadata",()=>{Number.isFinite(s.duration)&&s.duration>0?a(s.duration):s.currentTime=Number.MAX_SAFE_INTEGER},{once:!0}),s.addEventListener("durationchange",()=>{Number.isFinite(s.duration)&&s.duration>0&&a(s.duration)}),s.addEventListener("error",()=>a(null),{once:!0}),s.preload="metadata",s.src=i})}const v1=40,vD=44,x1=.14,xD=.5,wD=e=>e<0?0:e>1?1:e;function w1(e,{floor:t=x1,gamma:n=xD}={}){const i=Math.pow(wD(Number.isFinite(e)?e:0),n);return t+(1-t)*i}function kD(e,t=v1){const n=Math.max(1,Math.floor(t)),i=new Array(n).fill(0);if(!e||e.length===0)return i;const s=e.length/n;for(let l=0;l<n;l++){const a=Math.floor(l*s),c=Math.min(e.length,Math.max(a+1,Math.floor((l+1)*s)));let f=0;for(let h=a;h<c;h++)f+=e[h]*e[h];i[l]=Math.sqrt(f/(c-a))}return i}function SD(e,t={}){const{silenceFloor:n=1e-4}=t,i=e.reduce((s,l)=>l>s?l:s,0);return i>n?e.map(s=>w1(s/i,t)):e.map(()=>x1)}function bD({decay:e=.995,minReference:t=.02}={}){let n=t;return{push(i){const s=Number.isFinite(i)&&i>0?i:0;return n=Math.max(t,n*e,s),w1(s/n)},get reference(){return n}}}function k1(e){return wh(e.mime,e.filename)}function kh(e){const[t,n]=k.useState({url:null,size:0,loaded:!1});return k.useEffect(()=>{let i=null,s=!1;n({url:null,size:0,loaded:!1});const l=e.available?_2(e.id):null;return l?(n({url:l,size:e.size,loaded:!0}),()=>{}):(Ul(e.id).then(a=>{if(s)return;if(!a){n({url:null,size:0,loaded:!0});return}const c=URL.createObjectURL(new Blob([a],{type:k1(e)}));i=c,n({url:c,size:a.byteLength,loaded:!0})}),()=>{s=!0,i&&URL.revokeObjectURL(i)})},[e.id,e.available]),t}function Sh({label:e}){return v.jsxs("div",{className:"file-offdevice",children:[v.jsx("div",{className:"file-offdevice-ic",children:v.jsx(Ce,{name:"inbox",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e,children:e}),v.jsx("div",{className:"filecard-sub",children:"Available on your original device"})]})]})}function CD(e){const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Iv({rec:e}){if(!e.transcription)return null;const t=e.transcription.text?.trim();return v.jsx("div",{className:"voice-transcript",children:t||`Transcription ${e.transcription.status??"unavailable"}${e.transcription.error_category?` · ${e.transcription.error_category}`:""}`})}function ED({rec:e,receipt:t,receiptless:n,onPreview:i,onFetch:s}){const l=e.dir==="out",a=`bubble file-bubble${l?" me":""}`,c=eo(e.mime,e.filename)?"Voice message":"File",f=v.jsxs("div",{className:"bubble-at",children:[CD(e.date),l&&v.jsx(E0,{receipt:t,content:c,receiptless:n})]});return e.mime.startsWith("image/")?v.jsx(PD,{rec:e,cls:a,footer:f,onFetch:s}):eo(e.mime,e.filename)?v.jsx(TD,{rec:e,cls:a,footer:f,onFetch:s}):v.jsx(RD,{rec:e,cls:a,footer:f,onPreview:i,onFetch:s})}function bh({rec:e,onFetch:t}){const[n,i]=k.useState(!1),[s,l]=k.useState(!1);return v.jsxs("div",{className:"file-offdevice",children:[v.jsx("div",{className:"file-offdevice-ic",children:v.jsx(Ce,{name:"inbox",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e.filename,children:eo(e.mime,e.filename)?"Voice message":e.filename}),v.jsx("div",{className:"filecard-sub",children:s?"Could not fetch media":"Available after explicit fetch"})]}),v.jsx("button",{className:"btn sm",disabled:n,onClick:()=>{i(!0),l(!1),(t?.(e.id)??F2(e.id)).catch(()=>l(!0)).finally(()=>i(!1))},children:n?"Fetching…":"Fetch"})]})}function PD({rec:e,cls:t,footer:n,onFetch:i}){const{url:s,loaded:l}=kh(e);return l&&!s?v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(bh,{rec:e,onFetch:i}):v.jsx(Sh,{label:e.filename&&e.filename!=="file"?e.filename:"Photo"}),n]}):v.jsxs("div",{className:t+" image-bubble",children:[s?v.jsx("a",{href:s,target:"_blank",rel:"noreferrer",title:e.filename,children:v.jsx("img",{src:s,alt:e.filename})}):v.jsx("div",{className:"file-loading",children:"loading…"}),n]})}function TD({rec:e,cls:t,footer:n,onFetch:i}){const{url:s,loaded:l}=kh(e),a=k.useRef(null),c=k.useRef(null),[f,h]=k.useState(!1),[m,p]=k.useState(0),[y,w]=k.useState(()=>gD(e.mime)),[S,C]=k.useState(!1),[E,P]=k.useState(null);if(k.useEffect(()=>{if(!s)return;let W=!1;const L=typeof window>"u"?void 0:window.AudioContext||window.webkitAudioContext;if(!L)return;const N=new L,X=()=>{try{N.close()?.catch?.(()=>{})}catch{}};return(async()=>{try{const B=await fetch(s).then(Z=>Z.arrayBuffer()),fe=await N.decodeAudioData(B);if(W)return;P(SD(kD(fe.getChannelData(0),v1)))}catch{}finally{X()}})(),()=>{W=!0,X()}},[s]),l&&!s)return v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(bh,{rec:e,onFetch:i}):v.jsx(Sh,{label:"Voice message"}),n,v.jsx(Iv,{rec:e})]});const M=()=>{const W=a.current;W&&(f?W.pause():W.play())},T=W=>{const L=c.current;if(!L)return 0;const N=L.getBoundingClientRect();return Math.max(0,Math.min(1,(W-N.left)/N.width))},D=W=>{const L=a.current;p(W),L&&y&&isFinite(y)&&(L.currentTime=W*y)},U=W=>{s&&(W.currentTarget.setPointerCapture?.(W.pointerId),C(!0),D(T(W.clientX)))},j=W=>{S&&D(T(W.clientX))},Y=W=>{S&&(W.currentTarget.releasePointerCapture?.(W.pointerId),C(!1))};return v.jsxs("div",{className:t+" voice-bubble",children:[v.jsx("button",{className:"voice-play",onClick:M,disabled:!s,title:f?"Pause":"Play",children:v.jsx(Ce,{name:f?"pause":"play",size:14})}),v.jsxs("div",{className:"voice-track"+(s?" seekable":"")+(S?" scrubbing":"")+(E?" has-wave":""),ref:c,onPointerDown:U,onPointerMove:j,onPointerUp:Y,onPointerCancel:Y,role:s?"slider":void 0,"aria-label":s?"Seek":void 0,"aria-valuenow":Math.round(m*100),children:[E?v.jsx("div",{className:"voice-wave","aria-hidden":!0,children:E.map((W,L)=>v.jsx("span",{className:"voice-wave-bar"+(L/E.length<m?" played":""),style:{height:`${Math.round(W*100)}%`}},L))}):v.jsx("div",{className:"voice-track-fill",style:{width:`${m*100}%`}}),s&&v.jsx("span",{className:"voice-track-knob",style:{left:`${m*100}%`}})]}),v.jsx("span",{className:"voice-dur mono",children:y!==null?`${Math.floor(y/60)}:${String(Math.floor(y%60)).padStart(2,"0")}`:"·:··"}),s&&v.jsx("audio",{ref:a,src:s,onPlay:()=>h(!0),onPause:()=>h(!1),onEnded:()=>{h(!1),p(0)},onTimeUpdate:W=>{const L=W.currentTarget;!S&&L.duration>0&&isFinite(L.duration)&&p(L.currentTime/L.duration)},onLoadedMetadata:W=>{const L=W.currentTarget.duration;isFinite(L)&&L>0&&w(L)}}),n,v.jsx(Iv,{rec:e})]})}function RD({rec:e,cls:t,footer:n,onPreview:i,onFetch:s}){const{url:l,size:a,loaded:c}=kh(e);return c&&!l?v.jsxs("div",{className:t+" filecard-bubble file-offdevice-bubble",children:[e.available===!1?v.jsx(bh,{rec:e,onFetch:s}):v.jsx(Sh,{label:e.filename}),n]}):v.jsxs("div",{className:t+" filecard-bubble",children:[v.jsxs("div",{className:"filecard",children:[v.jsx("div",{className:"filecard-ic",children:v.jsx(Ce,{name:"copy",size:18})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:e.filename,children:e.filename}),v.jsx("div",{className:"filecard-sub",children:a?Fr(a):e.size?Fr(e.size):""})]}),p1(e.filename)&&l&&i&&v.jsx("button",{className:"icon-btn",onClick:()=>i(e),title:"Preview markdown",children:v.jsx(Ce,{name:"monitor",size:16})}),As(e.filename,e.mime)&&l&&i&&v.jsx("button",{className:"icon-btn",onClick:()=>i(e),title:"Preview HTML",children:v.jsx(Ce,{name:"monitor",size:16})}),v.jsx("a",{className:"icon-btn"+(l?"":" disabled"),href:l??void 0,download:e.filename,title:"Download",children:v.jsx(Ce,{name:"download",size:16})})]}),n]})}function S1(e){const{att:t}=e,[n,i]=k.useState(null);return k.useEffect(()=>{const s=k1({mime:t.mime,filename:t.filename}),l=URL.createObjectURL(new Blob([t.bytes],{type:s}));return i(l),()=>URL.revokeObjectURL(l)},[t]),v.jsxs("div",{className:"attach-preview",children:[t.mime.startsWith("image/")&&n?v.jsx("img",{className:"attach-thumb",src:n,alt:t.filename}):t.voice&&n?v.jsx("audio",{className:"attach-audio",src:n,controls:!0}):v.jsx("div",{className:"filecard-ic",children:v.jsx(Ce,{name:"copy",size:16})}),v.jsxs("div",{className:"filecard-meta",children:[v.jsx("div",{className:"filecard-name",title:t.filename,children:t.voice?"Voice message":t.filename}),v.jsxs("div",{className:"filecard-sub",children:[Fr(t.bytes.length),t.originalSize&&t.originalSize>t.bytes.length?` · optimized from ${Fr(t.originalSize)}`:""]})]}),v.jsx("button",{className:"btn primary sm",disabled:e.sending,onClick:e.onSend,children:e.sending?"Sending…":"Send"}),v.jsx("button",{className:"icon-btn",title:"Discard",disabled:e.sending,onClick:e.onDiscard,children:v.jsx(Ce,{name:"close"})})]})}const MD={channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0},AD=e=>`${Math.floor(e/60)}:${String(Math.floor(e%60)).padStart(2,"0")}`,jv=84,Dv=120,ND=550,ID=Math.floor(ts/(fd/8)),jD=Math.min(300,ID),DD=vD;function b1(e){const[t,n]=k.useState("idle"),[i,s]=k.useState(0),[l,a]=k.useState([]),[c,f]=k.useState(0),[h,m]=k.useState(0),p=k.useRef("idle"),y=k.useRef(null),w=k.useRef(null),S=k.useRef([]),C=k.useRef("webm"),E=k.useRef("audio/webm"),P=k.useRef(!1),M=k.useRef({x:0,y:0}),T=k.useRef(0),D=k.useRef(!1),U=k.useRef(null),j=k.useRef(null),Y=k.useRef(null),W=k.useRef(e.onReady),L=k.useRef(e.onError),N=k.useRef(e.onActiveChange);W.current=e.onReady,L.current=e.onError,N.current=e.onActiveChange;const X=ee=>{p.current=ee,n(ee),N.current?.(ee==="recording"||ee==="locked"||ee==="arming")},B=()=>{j.current!=null&&cancelAnimationFrame(j.current),j.current=null,Y.current&&clearInterval(Y.current),Y.current=null,U.current?.close().catch(()=>{}),U.current=null,w.current?.getTracks().forEach(ee=>ee.stop()),w.current=null},fe=()=>{window.removeEventListener("pointermove",Pe),window.removeEventListener("pointerup",Q),window.removeEventListener("pointercancel",Q)},Z=ee=>{P.current=ee;const ye=y.current;ye&&ye.state!=="inactive"?ye.stop():te(),fe()},te=()=>{B(),X("idle"),s(0),a([]),f(0),m(0)},ge=()=>{p.current==="recording"&&(fe(),m(0),X("locked"))};function Pe(ee){if(p.current!=="recording")return;const ye=M.current.y-ee.clientY,ve=M.current.x-ee.clientX,pe=Math.max(0,Math.min(1,ye/jv)),Me=Math.max(0,Math.min(1,ve/Dv));f(pe),m(Me),ye>=jv?ge():ve>=Dv&&Z(!0)}function Q(){if(p.current==="arming"){D.current=!0,fe();return}if(p.current!=="recording")return;const ee=Date.now()-T.current<ND;Z(ee)}const de=ee=>{e.disabled||p.current!=="idle"||(ee.preventDefault(),M.current={x:ee.clientX,y:ee.clientY},D.current=!1,P.current=!1,S.current=[],f(0),m(0),X("arming"),window.addEventListener("pointermove",Pe),window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",Q),R())};async function R(){let ee;try{ee=await navigator.mediaDevices.getUserMedia({audio:MD})}catch{L.current("Microphone unavailable — check the browser permission."),fe(),X("idle");return}if(D.current||p.current==="idle"){ee.getTracks().forEach(pe=>pe.stop()),X("idle");return}w.current=ee;const ye=dD.find(pe=>typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported(pe.rec));C.current=ye?.ext??"webm",E.current=ye?.base??"audio/webm";const ve=ye?new MediaRecorder(ee,{mimeType:ye.rec,audioBitsPerSecond:fd}):new MediaRecorder(ee,{audioBitsPerSecond:fd});y.current=ve,ve.ondataavailable=pe=>{pe.data.size>0&&S.current.push(pe.data)},ve.onstop=()=>{if(P.current){te();return}const Me=new Blob(S.current,{type:E.current});Promise.all([Me.arrayBuffer(),yD(Me)]).then(([me,Oe])=>{if(te(),me.byteLength===0)return;const qe=new Date().toISOString().replace(/[-:]/g,"").replace(/\..+/,"").replace("T","-");W.current({filename:`${b0}${qe}.${C.current}`,mime:mD(L2(E.current),Oe),bytes:new Uint8Array(me),voice:!0})})},ve.start(),T.current=Date.now(),X("recording"),s(0),Y.current=setInterval(()=>{s(pe=>{const Me=pe+1;return Me>=jD&&Z(!1),Me})},1e3),O(ee)}function O(ee){try{const ye=window.AudioContext||window.webkitAudioContext,ve=new ye;U.current=ve;const pe=ve.createMediaStreamSource(ee),Me=ve.createAnalyser();Me.fftSize=256,pe.connect(Me);const me=new Uint8Array(Me.fftSize),Oe=bD();let qe=0;const ut=mt=>{if(j.current=requestAnimationFrame(ut),mt-qe<80)return;qe=mt,Me.getByteTimeDomainData(me);let Ve=0;for(let it=0;it<me.length;it++){const Bt=(me[it]-128)/128;Ve+=Bt*Bt}const bt=Math.sqrt(Ve/me.length),Rt=Oe.push(bt);a(it=>{const Bt=it.length>=DD?it.slice(1):it.slice();return Bt.push(Rt),Bt})};j.current=requestAnimationFrame(ut)}catch{}}k.useEffect(()=>()=>{P.current=!0,y.current?.stop(),fe(),B()},[]);const G=t==="recording"||t==="locked"||t==="arming",A=v.jsx("div",{className:"vr-wave","aria-hidden":!0,children:l.map((ee,ye)=>v.jsx("span",{className:"vr-bar",style:{height:`${Math.round(ee*100)}%`}},ye))});return v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"icon-btn composer-tool vr-mic",title:"Hold to record a voice message",disabled:e.disabled,onPointerDown:de,onContextMenu:ee=>ee.preventDefault(),children:v.jsx(Ce,{name:"mic",size:18})}),G&&v.jsxs("div",{className:"voice-rec-overlay","data-mode":t,children:[t==="recording"&&v.jsxs("div",{className:"vr-lock",style:{"--p":c},"aria-hidden":!0,children:[v.jsx(Ce,{name:"lock",size:13}),v.jsx(Ce,{name:"chevronDown",size:12})]}),v.jsx("span",{className:"voice-rec-dot"}),v.jsx("span",{className:"vr-time mono",children:AD(i)}),t==="locked"?v.jsxs(v.Fragment,{children:[A,v.jsx("button",{className:"icon-btn vr-trash",title:"Cancel",onClick:()=>Z(!0),children:v.jsx(Ce,{name:"trash",size:16})}),v.jsxs("button",{className:"btn primary sm vr-stop",onClick:()=>Z(!1),children:[v.jsx(Ce,{name:"check",size:13}),"Stop"]})]}):v.jsxs("div",{className:"vr-slide",style:{opacity:1-h},children:[A,v.jsx("span",{className:"vr-hint",children:"‹ slide to cancel · slide up to lock"})]})]})]})}const _D="modulepreload",LD=function(e){return"/"+e},_v={},Ch=function(t,n,i){let s=Promise.resolve();if(n&&n.length>0){let a=function(h){return Promise.all(h.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=c?.nonce||c?.getAttribute("nonce");s=a(n.map(h=>{if(h=LD(h),h in _v)return;_v[h]=!0;const m=h.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":_D,m||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),m)return new Promise((w,S)=>{y.addEventListener("load",w),y.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return s.then(a=>{for(const c of a||[])c.status==="rejected"&&l(c.reason);return t().catch(l)})};var OD=Object.defineProperty,ao=(e,t)=>OD(e,"name",{value:t,configurable:!0}),C1=!!(typeof window<"u"&&window.document&&window.document.createElement);function _r(e,t,{checkForDefaultPrevented:n=!0}={}){return ao(function(s){if(e?.(s),n===!1||!s||!s.defaultPrevented)return t?.(s)},"handleEvent")}ao(_r,"composeEventHandlers");function FD(e){if(!C1)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}ao(FD,"getOwnerWindow");function dd(e){if(!C1)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}ao(dd,"getOwnerDocument");function E1(e,t=!1){const{activeElement:n}=dd(e);if(!n?.nodeName)return null;if(P1(n)&&n.contentDocument)return E1(n.contentDocument.body,t);if(t){const i=n.getAttribute("aria-activedescendant");if(i){const s=dd(n).getElementById(i);if(s)return s}}return n}ao(E1,"getActiveElement");function P1(e){return e.tagName==="IFRAME"}ao(P1,"isFrame");var zD=Object.defineProperty,Eh=(e,t)=>zD(e,"name",{value:t,configurable:!0});function hd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}Eh(hd,"setRef");function T1(...e){return t=>{let n=!1;const i=e.map(s=>{const l=hd(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<i.length;s++){const l=i[s];typeof l=="function"?l():hd(e[s],null)}}}}Eh(T1,"composeRefs");function lo(...e){return k.useCallback(T1(...e),e)}Eh(lo,"useComposedRefs");var VD=Object.defineProperty,kn=(e,t)=>VD(e,"name",{value:t,configurable:!0});function BD(e,t){const n=k.createContext(t);n.displayName=e+"Context";const i=kn(l=>{const{children:a,...c}=l,f=k.useMemo(()=>c,Object.values(c));return v.jsx(n.Provider,{value:f,children:a})},"Provider");i.displayName=e+"Provider";function s(l,a={}){const{optional:c=!1}=a,f=k.useContext(n);if(f)return f;if(t!==void 0)return t;if(!c)throw new Error(`\`${l}\` must be used within \`${e}\``)}return kn(s,"useContext"),[i,s]}kn(BD,"createContext");function R1(e,t=[]){let n=[];function i(l,a){const c=k.createContext(a);c.displayName=l+"Context";const f=n.length;n=[...n,a];const h=kn(p=>{const{scope:y,children:w,...S}=p,C=y?.[e]?.[f]||c,E=k.useMemo(()=>S,Object.values(S));return v.jsx(C.Provider,{value:E,children:w})},"Provider");h.displayName=l+"Provider";function m(p,y,w={}){const{optional:S=!1}=w,C=y?.[e]?.[f]||c,E=k.useContext(C);if(E)return E;if(a!==void 0)return a;if(!S)throw new Error(`\`${p}\` must be used within \`${l}\``)}return kn(m,"useContext"),[h,m]}kn(i,"createContext");const s=kn(()=>{const l=n.map(a=>k.createContext(a));return kn(function(c){const f=c?.[e]||l;return k.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])},"useScope")},"createScope");return s.scopeName=e,[i,M1(s,...t)]}kn(R1,"createContextScope");function M1(...e){const t=e[0];if(e.length===1)return t;const n=kn(()=>{const i=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return kn(function(l){const a=i.reduce((c,{useScope:f,scopeName:h})=>{const p=f(l)[`__scope${h}`];return{...c,...p}},{});return k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}kn(M1,"composeContextScopes");var zr=globalThis?.document?k.useLayoutEffect:()=>{},$D=Object.defineProperty,UD=(e,t)=>$D(e,"name",{value:t,configurable:!0}),WD=bs[" useId ".trim().toString()]||(()=>{}),HD=0;function pl(e){const[t,n]=k.useState(WD());return zr(()=>{e||n(i=>i??String(HD++))},[e]),e||(t?`radix-${t}`:"")}UD(pl,"useId");var KD=Object.defineProperty,qD=(e,t)=>KD(e,"name",{value:t,configurable:!0}),Lv=bs[" useEffectEvent ".trim().toString()],Ov=bs[" useInsertionEffect ".trim().toString()];function A1(e){if(typeof Lv=="function")return Lv(e);const t=k.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof Ov=="function"?Ov(()=>{t.current=e}):zr(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}qD(A1,"useEffectEvent");var XD=Object.defineProperty,Ns=(e,t)=>XD(e,"name",{value:t,configurable:!0}),YD=bs[" useInsertionEffect ".trim().toString()]||zr;function N1({prop:e,defaultProp:t,onChange:n=Ns(()=>{},"onChange"),caller:i}){const[s,l,a]=I1({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:s,h=k.useCallback(m=>{if(c){const p=j1(m)?m(e):m;p!==e&&a.current?.(p)}else l(m)},[c,e,l,a]);return[f,h]}Ns(N1,"useControllableState");function I1({defaultProp:e,onChange:t}){const[n,i]=k.useState(e),s=k.useRef(n),l=k.useRef(t);return YD(()=>{l.current=t},[t]),k.useEffect(()=>{s.current!==n&&(l.current?.(n),s.current=n)},[n,s]),[n,i,l]}Ns(I1,"useUncontrolledState");function j1(e){return typeof e=="function"}Ns(j1,"isFunction");var Fv=Symbol("RADIX:SYNC_STATE");function GD(e,t,n,i){const{prop:s,defaultProp:l,onChange:a,caller:c}=t,f=s!==void 0,h=A1(a),m=[{...n,state:l}];i&&m.push(i);const[p,y]=k.useReducer((E,P)=>{if(P.type===Fv)return{...E,state:P.state};const M=e(E,P);return f&&!Object.is(M.state,E.state)&&h(M.state),M},...m),w=p.state,S=k.useRef(w);k.useEffect(()=>{S.current!==w&&(S.current=w,f||h(w))},[w,S,f]);const C=k.useMemo(()=>s!==void 0?{...p,state:s}:p,[p,s]);return k.useEffect(()=>{f&&!Object.is(s,p.state)&&y({type:Fv,state:s})},[s,p.state,f]),[C,y]}Ns(GD,"useControllableStateReducer");var D1=Ax(),QD=Object.defineProperty,Ln=(e,t)=>QD(e,"name",{value:t,configurable:!0});function Ph(e){const t=k.forwardRef((n,i)=>{let{children:s,...l}=n,a=null,c=!1;const f=[];pd(s)&&typeof Ya=="function"&&(s=Ya(s._payload)),k.Children.forEach(s,y=>{if(F1(y)){c=!0;const w=y;let S="child"in w.props?w.props.child:w.props.children;pd(S)&&typeof Ya=="function"&&(S=Ya(S._payload)),a=JD(w,S),f.push(a?.props?.children)}else f.push(y)}),a?a=k.cloneElement(a,void 0,f):!c&&k.Children.count(s)===1&&k.isValidElement(s)&&(a=s);const h=a?O1(a):void 0,m=lo(i,h);if(!a){if(s||s===0)throw new Error(c?n_(e):t_(e));return s}const p=L1(l,a.props??{});return a.type!==k.Fragment&&(p.ref=i?m:h),k.cloneElement(a,p)});return t.displayName=`${e}.Slot`,t}Ln(Ph,"createSlot");var _1=Symbol.for("radix.slottable");function ZD(e){const t=Ln(n=>"child"in n?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=_1,t}Ln(ZD,"createSlottable");var JD=Ln((e,t)=>{if("child"in e.props){const n=e.props.child;return k.isValidElement(n)?k.cloneElement(n,void 0,e.props.children(n.props.children)):null}return k.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function L1(e,t){const n={...t};for(const i in t){const s=e[i],l=t[i];/^on[A-Z]/.test(i)?s&&l?n[i]=(...c)=>{const f=l(...c);return s(...c),f}:s&&(n[i]=s):i==="style"?n[i]={...s,...l}:i==="className"&&(n[i]=[s,l].filter(Boolean).join(" "))}return{...e,...n}}Ln(L1,"mergeProps");function O1(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)}Ln(O1,"getElementRef");function F1(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_1}Ln(F1,"isSlottable");var e_=Symbol.for("react.lazy");function pd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===e_&&"_payload"in e&&z1(e._payload)}Ln(pd,"isLazyComponent");function z1(e){return typeof e=="object"&&e!==null&&"then"in e}Ln(z1,"isPromiseLike");var t_=Ln(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),n_=Ln(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Ya=bs[" use ".trim().toString()],r_=Object.defineProperty,i_=(e,t)=>r_(e,"name",{value:t,configurable:!0}),o_=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mi=o_.reduce((e,t)=>{const n=Ph(`Primitive.${t}`),i=k.forwardRef((s,l)=>{const{asChild:a,...c}=s,f=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(f,{...c,ref:l})});return i.displayName=`Primitive.${t}`,{...e,[t]:i}},{});function V1(e,t){e&&D1.flushSync(()=>e.dispatchEvent(t))}i_(V1,"dispatchDiscreteCustomEvent");var s_=Object.defineProperty,a_=(e,t)=>s_(e,"name",{value:t,configurable:!0});function no(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>t.current?.(...n),[])}a_(no,"useCallbackRef");var l_=Object.defineProperty,Tt=(e,t)=>l_(e,"name",{value:t,configurable:!0}),md="dismissableLayer.update",u_="dismissableLayer.pointerDownOutside",c_="dismissableLayer.focusOutside",zv,B1=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),f_=k.forwardRef(Tt(function(t,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:l,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:f,onDismiss:h,...m}=t,p=k.useContext(B1),[y,w]=k.useState(null),S=y?.ownerDocument??globalThis?.document,[,C]=k.useState({}),E=lo(n,w),P=Array.from(p.layers),[M]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),T=M?P.indexOf(M):-1,D=y?P.indexOf(y):-1,U=p.layersWithOutsidePointerEventsDisabled.size>0,j=D>=T,Y=k.useRef(!1),W=U1(B=>{a?.(B),f?.(B),B.defaultPrevented||h?.()},{ownerDocument:S,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:Y,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:k.useCallback(B=>{if(!(B instanceof Node))return!1;const fe=[...p.branches].some(Z=>Z.contains(B));return j&&!fe},[p.branches,j])}),L=W1(B=>{if(s&&Y.current)return;const fe=B.target;[...p.branches].some(te=>te.contains(fe))||(c?.(B),f?.(B),B.defaultPrevented||h?.())},S),N=y?D===P.length-1:!1,X=no(B=>{B.key==="Escape"&&(l?.(B),!B.defaultPrevented&&h&&(B.preventDefault(),h()))});return k.useEffect(()=>{if(N)return S.addEventListener("keydown",X,{capture:!0}),()=>S.removeEventListener("keydown",X,{capture:!0})},[S,N,X]),k.useEffect(()=>{if(y)return i&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(zv=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),gd(),()=>{i&&(p.layersWithOutsidePointerEventsDisabled.delete(y),p.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=zv))}},[y,S,i,p]),k.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),gd())},[y,p]),k.useEffect(()=>{const B=Tt(()=>C({}),"handleUpdate");return document.addEventListener(md,B),()=>document.removeEventListener(md,B)},[]),v.jsx(mi.div,{...m,ref:E,style:{pointerEvents:U?j?"auto":"none":void 0,...t.style},onFocusCapture:_r(t.onFocusCapture,L.onFocusCapture),onBlurCapture:_r(t.onBlurCapture,L.onBlurCapture),onPointerDownCapture:_r(t.onPointerDownCapture,W.onPointerDownCapture)})},"DismissableLayer"));function $1(){const e=k.useContext(B1),[t,n]=k.useState(null);return k.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Tt($1,"useDismissableLayerSurface");var d_=Tt(()=>!0,"IS_TRUE");function U1(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:s,dismissableSurfaces:l,shouldHandlePointerDownOutside:a=d_}=t,c=no(e),f=k.useRef(!1),h=k.useRef(!1),m=k.useRef(new Map),p=k.useRef(()=>{});return k.useEffect(()=>{function y(){h.current=!1,s.current=!1,m.current.clear()}Tt(y,"resetOutsideInteraction");function w(){return Array.from(m.current.values()).some(Boolean)}Tt(w,"isOutsideInteractionIntercepted");function S(T){if(!h.current)return;const D=T.target;D instanceof Node&&[...l].some(j=>j.contains(D))||m.current.set(T.type,!0),T.type==="click"&&window.setTimeout(()=>{h.current&&p.current()},0)}Tt(S,"handleInteractionCapture");function C(T){h.current&&m.current.set(T.type,!1)}Tt(C,"handleInteractionBubble");const E=Tt(T=>{if(T.target&&!f.current){let D=function(){n.removeEventListener("click",p.current);const j=w();y(),j||Th(u_,c,U,{discrete:!0})};if(Tt(D,"handleAndDispatchPointerDownOutsideEvent"),!a(T.target)){n.removeEventListener("click",p.current),y(),f.current=!1;return}const U={originalEvent:T};h.current=!0,s.current=i&&T.button===0,m.current.clear(),!i||T.button!==0?D():(n.removeEventListener("click",p.current),p.current=D,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),y();f.current=!1},"handlePointerDown"),P=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const T of P)n.addEventListener(T,S,!0),n.addEventListener(T,C);const M=window.setTimeout(()=>{n.addEventListener("pointerdown",E)},0);return()=>{window.clearTimeout(M),n.removeEventListener("pointerdown",E),n.removeEventListener("click",p.current);for(const T of P)n.removeEventListener(T,S,!0),n.removeEventListener(T,C)}},[n,c,i,s,l,a]),{onPointerDownCapture:Tt(()=>f.current=!0,"onPointerDownCapture")}}Tt(U1,"usePointerDownOutside");function W1(e,t=globalThis?.document){const n=no(e),i=k.useRef(!1);return k.useEffect(()=>{const s=Tt(l=>{l.target&&!i.current&&Th(c_,n,{originalEvent:l},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:Tt(()=>i.current=!0,"onFocusCapture"),onBlurCapture:Tt(()=>i.current=!1,"onBlurCapture")}}Tt(W1,"useFocusOutside");function gd(){const e=new CustomEvent(md);document.dispatchEvent(e)}Tt(gd,"dispatchUpdate");function Th(e,t,n,{discrete:i}){const s=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),i?V1(s,l):s.dispatchEvent(l)}Tt(Th,"handleAndDispatchCustomEvent");var h_=Object.defineProperty,Xt=(e,t)=>h_(e,"name",{value:t,configurable:!0}),lf="focusScope.autoFocusOnMount",uf="focusScope.autoFocusOnUnmount",Vv={bubbles:!1,cancelable:!0},p_=k.forwardRef(Xt(function(t,n){const{loop:i=!1,trapped:s=!1,onMountAutoFocus:l,onUnmountAutoFocus:a,...c}=t,[f,h]=k.useState(null),m=no(l),p=no(a),y=k.useRef(null),w=lo(n,h),S=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(s){let E=function(D){if(S.paused||!f)return;const U=D.target;f.contains(U)?y.current=U:lr(y.current,{select:!0})},P=function(D){if(S.paused||!f)return;const U=D.relatedTarget;U!==null&&(f.contains(U)||lr(y.current,{select:!0}))},M=function(D){if(document.activeElement===document.body)for(const j of D)j.removedNodes.length>0&&lr(f)};Xt(E,"handleFocusIn"),Xt(P,"handleFocusOut"),Xt(M,"handleMutations"),document.addEventListener("focusin",E),document.addEventListener("focusout",P);const T=new MutationObserver(M);return f&&T.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",E),document.removeEventListener("focusout",P),T.disconnect()}}},[s,f,S.paused]),k.useEffect(()=>{if(f){Bv.add(S);const E=document.activeElement;if(!f.contains(E)){const M=new CustomEvent(lf,Vv);f.addEventListener(lf,m),f.dispatchEvent(M),M.defaultPrevented||(H1(G1(Rh(f)),{select:!0}),document.activeElement===E&&lr(f))}return()=>{f.removeEventListener(lf,m),setTimeout(()=>{const M=new CustomEvent(uf,Vv);f.addEventListener(uf,p),f.dispatchEvent(M),M.defaultPrevented||lr(E??document.body,{select:!0}),f.removeEventListener(uf,p),Bv.remove(S)},0)}}},[f,m,p,S]);const C=k.useCallback(E=>{if(!i&&!s||S.paused)return;const P=E.key==="Tab"&&!E.altKey&&!E.ctrlKey&&!E.metaKey,M=document.activeElement;if(P&&M){const T=E.currentTarget,[D,U]=K1(T);D&&U?!E.shiftKey&&M===U?(E.preventDefault(),i&&lr(D,{select:!0})):E.shiftKey&&M===D&&(E.preventDefault(),i&&lr(U,{select:!0})):M===T&&E.preventDefault()}},[i,s,S.paused]);return v.jsx(mi.div,{tabIndex:-1,...c,ref:w,onKeyDown:C})},"FocusScope"));function H1(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(lr(i,{select:t}),document.activeElement!==n)return}Xt(H1,"focusFirst");function K1(e){const t=Rh(e),n=yd(t,e),i=yd(t.reverse(),e);return[n,i]}Xt(K1,"getTabbableEdges");function Rh(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Xt(i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}Xt(Rh,"getTabbableCandidates");function yd(e,t){const n=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const i of e)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):q1(i,{upTo:t})))return i}Xt(yd,"findVisible");function q1(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}Xt(q1,"isHidden");function X1(e){return e instanceof HTMLInputElement&&"select"in e}Xt(X1,"isSelectableInput");function lr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&X1(e)&&t&&e.select()}}Xt(lr,"focus");var Bv=Y1();function Y1(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=vd(e,t),e.unshift(t)},remove(t){e=vd(e,t),e[0]?.resume()}}}Xt(Y1,"createFocusScopesStack");function vd(e,t){const n=[...e],i=n.indexOf(t);return i!==-1&&n.splice(i,1),n}Xt(vd,"arrayRemove");function G1(e){return e.filter(t=>t.tagName!=="A")}Xt(G1,"removeLinks");var m_=Object.defineProperty,g_=(e,t)=>m_(e,"name",{value:t,configurable:!0}),y_=k.forwardRef(g_(function(t,n){const{container:i,...s}=t,[l,a]=k.useState(!1);zr(()=>a(!0),[]);const c=i||l&&globalThis?.document?.body;return c?D1.createPortal(v.jsx(mi.div,{...s,ref:n}),c):null},"Portal")),v_=Object.defineProperty,ur=(e,t)=>v_(e,"name",{value:t,configurable:!0});function Q1(e,t){return k.useReducer((n,i)=>t[n][i]??n,e)}ur(Q1,"useStateMachine");var Mh=ur(e=>{const{present:t,children:n}=e,i=Z1(t),s=typeof n=="function"?n({present:i.isPresent}):k.Children.only(n),l=J1(i.ref,ek(s));return typeof n=="function"||i.isPresent?k.cloneElement(s,{ref:l}):null},"Presence");function Z1(e){const[t,n]=k.useState(),i=k.useRef(null),s=k.useRef(e),l=k.useRef("none"),a=k.useRef(void 0),c=e?"mounted":"unmounted",[f,h]=Q1(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{f==="mounted"?(l.current=a.current??qi(i.current),a.current=void 0):l.current="none"},[f]),zr(()=>{const m=i.current,p=s.current;if(p!==e){const w=l.current,S=qi(m);e?(a.current=S,h("MOUNT")):S==="none"||m?.display==="none"?h("UNMOUNT"):h(p&&w!==S?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,h]),zr(()=>{if(t){let m;const p=t.ownerDocument.defaultView??window,y=ur(S=>{const E=qi(i.current).includes(CSS.escape(S.animationName));if(S.target===t&&E&&(h("ANIMATION_END"),!s.current)){const P=t.style.animationFillMode;t.style.animationFillMode="forwards",m=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=P)})}},"handleAnimationEnd"),w=ur(S=>{S.target===t&&(l.current=qi(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",w),t.addEventListener("animationcancel",y),t.addEventListener("animationend",y),()=>{p.clearTimeout(m),t.removeEventListener("animationstart",w),t.removeEventListener("animationcancel",y),t.removeEventListener("animationend",y)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:k.useCallback(m=>{if(m){const p=getComputedStyle(m);i.current=p,a.current=qi(p)}else i.current=null;n(m)},[])}}ur(Z1,"usePresence");function xd(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}ur(xd,"setRef");function J1(...e){const t=k.useRef(e);return t.current=e,k.useCallback(n=>{const i=t.current;let s=!1;const l=i.map(a=>{const c=xd(a,n);return!s&&typeof c=="function"&&(s=!0),c});if(s)return()=>{for(let a=0;a<l.length;a++){const c=l[a];typeof c=="function"?c():xd(i[a],null)}}},[])}ur(J1,"useStableComposedRefs");function qi(e){return e?.animationName||"none"}ur(qi,"getAnimationName");function ek(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)}ur(ek,"getElementRef");var x_=Object.defineProperty,Ah=(e,t)=>x_(e,"name",{value:t,configurable:!0}),Ga=0,Vi=null;function w_(e){return Nh(),e.children}Ah(w_,"FocusGuards");function Nh(){k.useEffect(()=>{Vi||(Vi={start:wd(),end:wd()});const{start:e,end:t}=Vi;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Ga++,()=>{Ga===1&&(Vi?.start.remove(),Vi?.end.remove(),Vi=null),Ga=Math.max(0,Ga-1)}},[])}Ah(Nh,"useFocusGuards");function wd(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}Ah(wd,"createFocusGuard");var Hn=function(){return Hn=Object.assign||function(t){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Hn.apply(this,arguments)};function tk(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,i=Object.getOwnPropertySymbols(e);s<i.length;s++)t.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(e,i[s])&&(n[i[s]]=e[i[s]]);return n}function k_(e,t,n){if(n||arguments.length===2)for(var i=0,s=t.length,l;i<s;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return e.concat(l||Array.prototype.slice.call(t))}var ml="right-scroll-bar-position",gl="width-before-scroll-bar",S_="with-scroll-bars-hidden",b_="--removed-body-scroll-bar-size";function cf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function C_(e,t){var n=k.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(i){var s=n.value;s!==i&&(n.value=i,n.callback(i,s))}}}})[0];return n.callback=t,n.facade}var E_=typeof window<"u"?k.useLayoutEffect:k.useEffect,$v=new WeakMap;function P_(e,t){var n=C_(null,function(i){return e.forEach(function(s){return cf(s,i)})});return E_(function(){var i=$v.get(n);if(i){var s=new Set(i),l=new Set(e),a=n.current;s.forEach(function(c){l.has(c)||cf(c,null)}),l.forEach(function(c){s.has(c)||cf(c,a)})}$v.set(n,e)},[e]),n}function T_(e){return e}function R_(e,t){t===void 0&&(t=T_);var n=[],i=!1,s={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var a=t(l,i);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(l){for(i=!0;n.length;){var a=n;n=[],a.forEach(l)}n={push:function(c){return l(c)},filter:function(){return n}}},assignMedium:function(l){i=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(l),a=n}var f=function(){var m=a;a=[],m.forEach(l)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(m){a.push(m),h()},filter:function(m){return a=a.filter(m),n}}}};return s}function M_(e){e===void 0&&(e={});var t=R_(null);return t.options=Hn({async:!0,ssr:!1},e),t}var nk=function(e){var t=e.sideCar,n=tk(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return k.createElement(i,Hn({},n))};nk.isSideCarExport=!0;function A_(e,t){return e.useMedium(t),nk}var rk=M_(),ff=function(){},Xl=k.forwardRef(function(e,t){var n=k.useRef(null),i=k.useState({onScrollCapture:ff,onWheelCapture:ff,onTouchMoveCapture:ff}),s=i[0],l=i[1],a=e.forwardProps,c=e.children,f=e.className,h=e.removeScrollBar,m=e.enabled,p=e.shards,y=e.sideCar,w=e.noRelative,S=e.noIsolation,C=e.inert,E=e.allowPinchZoom,P=e.as,M=P===void 0?"div":P,T=e.gapMode,D=tk(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),U=y,j=P_([n,t]),Y=Hn(Hn({},D),s);return k.createElement(k.Fragment,null,m&&k.createElement(U,{sideCar:rk,removeScrollBar:h,shards:p,noRelative:w,noIsolation:S,inert:C,setCallbacks:l,allowPinchZoom:!!E,lockRef:n,gapMode:T}),a?k.cloneElement(k.Children.only(c),Hn(Hn({},Y),{ref:j})):k.createElement(M,Hn({},Y,{className:f,ref:j}),c))});Xl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xl.classNames={fullWidth:gl,zeroRight:ml};var N_=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function I_(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=N_();return t&&e.setAttribute("nonce",t),e}function j_(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function D_(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var __=function(){var e=0,t=null;return{add:function(n){e==0&&(t=I_())&&(j_(t,n),D_(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},L_=function(){var e=__();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ik=function(){var e=L_(),t=function(n){var i=n.styles,s=n.dynamic;return e(i,s),null};return t},O_={left:0,top:0,right:0,gap:0},df=function(e){return parseInt(e||"",10)||0},F_=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],i=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[df(n),df(i),df(s)]},z_=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return O_;var t=F_(e),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-n+t[2]-t[0])}},V_=ik(),Qi="data-scroll-locked",B_=function(e,t,n,i){var s=e.left,l=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
268
|
+
.`.concat(S_,` {
|
|
269
|
+
overflow: hidden `).concat(i,`;
|
|
270
|
+
padding-right: `).concat(c,"px ").concat(i,`;
|
|
271
|
+
}
|
|
272
|
+
body[`).concat(Qi,`] {
|
|
273
|
+
overflow: hidden `).concat(i,`;
|
|
274
|
+
overscroll-behavior: contain;
|
|
275
|
+
`).concat([t&&"position: relative ".concat(i,";"),n==="margin"&&`
|
|
276
|
+
padding-left: `.concat(s,`px;
|
|
277
|
+
padding-top: `).concat(l,`px;
|
|
278
|
+
padding-right: `).concat(a,`px;
|
|
279
|
+
margin-left:0;
|
|
280
|
+
margin-top:0;
|
|
281
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
282
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.`).concat(ml,` {
|
|
286
|
+
right: `).concat(c,"px ").concat(i,`;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.`).concat(gl,` {
|
|
290
|
+
margin-right: `).concat(c,"px ").concat(i,`;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.`).concat(ml," .").concat(ml,` {
|
|
294
|
+
right: 0 `).concat(i,`;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.`).concat(gl," .").concat(gl,` {
|
|
298
|
+
margin-right: 0 `).concat(i,`;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
body[`).concat(Qi,`] {
|
|
302
|
+
`).concat(b_,": ").concat(c,`px;
|
|
303
|
+
}
|
|
304
|
+
`)},Uv=function(){var e=parseInt(document.body.getAttribute(Qi)||"0",10);return isFinite(e)?e:0},$_=function(){k.useEffect(function(){return document.body.setAttribute(Qi,(Uv()+1).toString()),function(){var e=Uv()-1;e<=0?document.body.removeAttribute(Qi):document.body.setAttribute(Qi,e.toString())}},[])},U_=function(e){var t=e.noRelative,n=e.noImportant,i=e.gapMode,s=i===void 0?"margin":i;$_();var l=k.useMemo(function(){return z_(s)},[s]);return k.createElement(V_,{styles:B_(l,!t,s,n?"":"!important")})},kd=!1;if(typeof window<"u")try{var Qa=Object.defineProperty({},"passive",{get:function(){return kd=!0,!0}});window.addEventListener("test",Qa,Qa),window.removeEventListener("test",Qa,Qa)}catch{kd=!1}var Bi=kd?{passive:!1}:!1,W_=function(e){return e.tagName==="TEXTAREA"},ok=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!W_(e)&&n[t]==="visible")},H_=function(e){return ok(e,"overflowY")},K_=function(e){return ok(e,"overflowX")},Wv=function(e,t){var n=t.ownerDocument,i=t;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var s=sk(e,i);if(s){var l=ak(e,i),a=l[1],c=l[2];if(a>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},q_=function(e){var t=e.scrollTop,n=e.scrollHeight,i=e.clientHeight;return[t,n,i]},X_=function(e){var t=e.scrollLeft,n=e.scrollWidth,i=e.clientWidth;return[t,n,i]},sk=function(e,t){return e==="v"?H_(t):K_(t)},ak=function(e,t){return e==="v"?q_(t):X_(t)},Y_=function(e,t){return e==="h"&&t==="rtl"?-1:1},G_=function(e,t,n,i,s){var l=Y_(e,window.getComputedStyle(t).direction),a=l*i,c=n.target,f=t.contains(c),h=!1,m=a>0,p=0,y=0;do{if(!c)break;var w=ak(e,c),S=w[0],C=w[1],E=w[2],P=C-E-l*S;(S||P)&&sk(e,c)&&(p+=P,y+=S);var M=c.parentNode;c=M&&M.nodeType===Node.DOCUMENT_FRAGMENT_NODE?M.host:M}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(m&&Math.abs(p)<1||!m&&Math.abs(y)<1)&&(h=!0),h},Za=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hv=function(e){return[e.deltaX,e.deltaY]},Kv=function(e){return e&&"current"in e?e.current:e},Q_=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Z_=function(e){return`
|
|
305
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
306
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
307
|
+
`)},J_=0,$i=[];function eL(e){var t=k.useRef([]),n=k.useRef([0,0]),i=k.useRef(),s=k.useState(J_++)[0],l=k.useState(ik)[0],a=k.useRef(e);k.useEffect(function(){a.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var C=k_([e.lockRef.current],(e.shards||[]).map(Kv),!0).filter(Boolean);return C.forEach(function(E){return E.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),C.forEach(function(E){return E.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var c=k.useCallback(function(C,E){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!a.current.allowPinchZoom;var P=Za(C),M=n.current,T="deltaX"in C?C.deltaX:M[0]-P[0],D="deltaY"in C?C.deltaY:M[1]-P[1],U,j=C.target,Y=Math.abs(T)>Math.abs(D)?"h":"v";if("touches"in C&&Y==="h"&&j.type==="range")return!1;var W=window.getSelection(),L=W&&W.anchorNode,N=L?L===j||L.contains(j):!1;if(N)return!1;var X=Wv(Y,j);if(!X)return!0;if(X?U=Y:(U=Y==="v"?"h":"v",X=Wv(Y,j)),!X)return!1;if(!i.current&&"changedTouches"in C&&(T||D)&&(i.current=U),!U)return!0;var B=i.current||U;return G_(B,E,C,B==="h"?T:D)},[]),f=k.useCallback(function(C){var E=C;if(!(!$i.length||$i[$i.length-1]!==l)){var P="deltaY"in E?Hv(E):Za(E),M=t.current.filter(function(U){return U.name===E.type&&(U.target===E.target||E.target===U.shadowParent)&&Q_(U.delta,P)})[0];if(M&&M.should){E.cancelable&&E.preventDefault();return}if(!M){var T=(a.current.shards||[]).map(Kv).filter(Boolean).filter(function(U){return U.contains(E.target)}),D=T.length>0?c(E,T[0]):!a.current.noIsolation;D&&E.cancelable&&E.preventDefault()}}},[]),h=k.useCallback(function(C,E,P,M){var T={name:C,delta:E,target:P,should:M,shadowParent:tL(P)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(D){return D!==T})},1)},[]),m=k.useCallback(function(C){n.current=Za(C),i.current=void 0},[]),p=k.useCallback(function(C){h(C.type,Hv(C),C.target,c(C,e.lockRef.current))},[]),y=k.useCallback(function(C){h(C.type,Za(C),C.target,c(C,e.lockRef.current))},[]);k.useEffect(function(){return $i.push(l),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:y}),document.addEventListener("wheel",f,Bi),document.addEventListener("touchmove",f,Bi),document.addEventListener("touchstart",m,Bi),function(){$i=$i.filter(function(C){return C!==l}),document.removeEventListener("wheel",f,Bi),document.removeEventListener("touchmove",f,Bi),document.removeEventListener("touchstart",m,Bi)}},[]);var w=e.removeScrollBar,S=e.inert;return k.createElement(k.Fragment,null,S?k.createElement(l,{styles:Z_(s)}):null,w?k.createElement(U_,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function tL(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nL=A_(rk,eL);var lk=k.forwardRef(function(e,t){return k.createElement(Xl,Hn({},e,{ref:t,sideCar:nL}))});lk.classNames=Xl.classNames;var rL=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ui=new WeakMap,Ja=new WeakMap,el={},hf=0,uk=function(e){return e&&(e.host||uk(e.parentNode))},iL=function(e,t){return t.map(function(n){if(e.contains(n))return n;var i=uk(n);return i&&e.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},oL=function(e,t,n,i){var s=iL(t,Array.isArray(e)?e:[e]);el[n]||(el[n]=new WeakMap);var l=el[n],a=[],c=new Set,f=new Set(s),h=function(p){!p||c.has(p)||(c.add(p),h(p.parentNode))};s.forEach(h);var m=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(y){if(c.has(y))m(y);else try{var w=y.getAttribute(i),S=w!==null&&w!=="false",C=(Ui.get(y)||0)+1,E=(l.get(y)||0)+1;Ui.set(y,C),l.set(y,E),a.push(y),C===1&&S&&Ja.set(y,!0),E===1&&y.setAttribute(n,"true"),S||y.setAttribute(i,"true")}catch(P){console.error("aria-hidden: cannot operate on ",y,P)}})};return m(t),c.clear(),hf++,function(){a.forEach(function(p){var y=Ui.get(p)-1,w=l.get(p)-1;Ui.set(p,y),l.set(p,w),y||(Ja.has(p)||p.removeAttribute(i),Ja.delete(p)),w||p.removeAttribute(n)}),hf--,hf||(Ui=new WeakMap,Ui=new WeakMap,Ja=new WeakMap,el={})}},sL=function(e,t,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),s=rL(e);return s?(i.push.apply(i,Array.from(s.querySelectorAll("[aria-live], script"))),oL(i,s,n,"aria-hidden")):function(){return null}},aL=Object.defineProperty,Cn=(e,t)=>aL(e,"name",{value:t,configurable:!0}),Ih="Dialog",[ck,Vz]=R1(Ih),[lL,Yn]=ck(Ih),fk=Cn(e=>{const{__scopeDialog:t,children:n,open:i,defaultOpen:s,onOpenChange:l,modal:a=!0}=e,c=k.useRef(null),f=k.useRef(null),[h,m]=N1({prop:i,defaultProp:s??!1,onChange:l,caller:Ih}),[p,y]=k.useState(0),[w,S]=k.useState(0);return v.jsx(lL,{scope:t,triggerRef:c,contentRef:f,contentId:pl(),titleId:pl(),descriptionId:pl(),titlePresent:p>0,descriptionPresent:w>0,setTitleCount:y,setDescriptionCount:S,open:h,onOpenChange:m,onOpenToggle:k.useCallback(()=>m(C=>!C),[m]),modal:a,children:n})},"Dialog"),dk="DialogPortal",[uL,hk]=ck(dk,{forceMount:void 0}),pk=Cn(e=>{const{__scopeDialog:t,forceMount:n,children:i,container:s}=e,l=Yn(dk,t);return v.jsx(uL,{scope:t,forceMount:n,children:k.Children.map(i,a=>v.jsx(Mh,{present:n||l.open,children:v.jsx(y_,{asChild:!0,container:s,children:a})}))})},"DialogPortal"),Sd="DialogOverlay",mk=k.forwardRef(Cn(function(t,n){const i=hk(Sd,t.__scopeDialog),{forceMount:s=i.forceMount,...l}=t,a=Yn(Sd,t.__scopeDialog);return a.modal?v.jsx(Mh,{present:s||a.open,children:v.jsx(fL,{...l,ref:n})}):null},"DialogOverlay")),cL=Ph("DialogOverlay.RemoveScroll"),fL=k.forwardRef(Cn(function(t,n){const{__scopeDialog:i,...s}=t,l=Yn(Sd,i),a=$1(),c=lo(n,a);return v.jsx(lk,{as:cL,allowPinchZoom:!0,shards:[l.contentRef],children:v.jsx(mi.div,{"data-state":jh(l.open),...s,ref:c,style:{pointerEvents:"auto",...s.style}})})},"DialogOverlayImpl")),ws="DialogContent",gk=k.forwardRef(Cn(function(t,n){const i=hk(ws,t.__scopeDialog),{forceMount:s=i.forceMount,...l}=t,a=Yn(ws,t.__scopeDialog);return v.jsx(Mh,{present:s||a.open,children:a.modal?v.jsx(dL,{...l,ref:n}):v.jsx(hL,{...l,ref:n})})},"DialogContent")),dL=k.forwardRef(Cn(function(t,n){const i=Yn(ws,t.__scopeDialog),s=k.useRef(null),l=lo(n,i.contentRef,s);return k.useEffect(()=>{const a=s.current;if(a)return sL(a)},[]),v.jsx(yk,{...t,ref:l,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:_r(t.onCloseAutoFocus,a=>{a.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:_r(t.onPointerDownOutside,a=>{const c=a.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&a.preventDefault()}),onFocusOutside:_r(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),hL=k.forwardRef(Cn(function(t,n){const i=Yn(ws,t.__scopeDialog),s=k.useRef(!1),l=k.useRef(!1);return v.jsx(yk,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(s.current||i.triggerRef.current?.focus(),a.preventDefault()),s.current=!1,l.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(s.current=!0,a.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const c=a.target;i.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&l.current&&a.preventDefault()}})},"DialogContentNonModal")),yk=k.forwardRef(Cn(function(t,n){const{__scopeDialog:i,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:a,...c}=t,f=Yn(ws,i);return Nh(),v.jsx(v.Fragment,{children:v.jsx(p_,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:l,onUnmountAutoFocus:a,children:v.jsx(f_,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionPresent?f.descriptionId:void 0,"aria-labelledby":f.titlePresent?f.titleId:void 0,"data-state":jh(f.open),...c,ref:n,deferPointerDownOutside:!0,onDismiss:()=>f.onOpenChange(!1)})})})},"DialogContentImpl")),pL="DialogTitle",vk=k.forwardRef(Cn(function(t,n){const{__scopeDialog:i,...s}=t,l=Yn(pL,i),{setTitleCount:a}=l;return zr(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),v.jsx(mi.h2,{id:l.titleId,...s,ref:n})},"DialogTitle")),mL="DialogDescription",xk=k.forwardRef(Cn(function(t,n){const{__scopeDialog:i,...s}=t,l=Yn(mL,i),{setDescriptionCount:a}=l;return zr(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),v.jsx(mi.p,{id:l.descriptionId,...s,ref:n})},"DialogDescription")),gL="DialogClose",wk=k.forwardRef(Cn(function(t,n){const{__scopeDialog:i,...s}=t,l=Yn(gL,i);return v.jsx(mi.button,{type:"button",...s,ref:n,onClick:_r(t.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function jh(e){return e?"open":"closed"}Cn(jh,"getState");function yL(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const vL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,xL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wL={};function qv(e,t){return(wL.jsx?xL:vL).test(e)}const kL=/[ \t\n\f\r]/g;function SL(e){return typeof e=="object"?e.type==="text"?Xv(e.value):!1:Xv(e)}function Xv(e){return e.replace(kL,"")===""}class Is{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Is.prototype.normal={};Is.prototype.property={};Is.prototype.space=void 0;function kk(e,t){const n={},i={};for(const s of e)Object.assign(n,s.property),Object.assign(i,s.normal);return new Is(n,i,t)}function bd(e){return e.toLowerCase()}class nn{constructor(t,n){this.attribute=n,this.property=t}}nn.prototype.attribute="";nn.prototype.booleanish=!1;nn.prototype.boolean=!1;nn.prototype.commaOrSpaceSeparated=!1;nn.prototype.commaSeparated=!1;nn.prototype.defined=!1;nn.prototype.mustUseProperty=!1;nn.prototype.number=!1;nn.prototype.overloadedBoolean=!1;nn.prototype.property="";nn.prototype.spaceSeparated=!1;nn.prototype.space=void 0;let bL=0;const Le=gi(),vt=gi(),Cd=gi(),le=gi(),Qe=gi(),hi=gi(),cn=gi();function gi(){return 2**++bL}const Ed=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:vt,commaOrSpaceSeparated:cn,commaSeparated:hi,number:le,overloadedBoolean:Cd,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),pf=Object.keys(Ed);class Dh extends nn{constructor(t,n,i,s){let l=-1;if(super(t,n),Yv(this,"space",s),typeof i=="number")for(;++l<pf.length;){const a=pf[l];Yv(this,pf[l],(i&Ed[a])===Ed[a])}}}Dh.prototype.defined=!0;function Yv(e,t,n){n&&(e[t]=n)}function uo(e){const t={},n={};for(const[i,s]of Object.entries(e.properties)){const l=new Dh(i,e.transform(e.attributes||{},i),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(l.mustUseProperty=!0),t[i]=l,n[bd(i)]=i,n[bd(l.attribute)]=i}return new Is(t,n,e.space)}const Sk=uo({properties:{ariaActiveDescendant:null,ariaAtomic:vt,ariaAutoComplete:null,ariaBusy:vt,ariaChecked:vt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:vt,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:vt,ariaFlowTo:Qe,ariaGrabbed:vt,ariaHasPopup:null,ariaHidden:vt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:le,ariaLive:null,ariaModal:vt,ariaMultiLine:vt,ariaMultiSelectable:vt,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:vt,ariaReadOnly:vt,ariaRelevant:null,ariaRequired:vt,ariaRoleDescription:Qe,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:vt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function bk(e,t){return t in e?e[t]:t}function Ck(e,t){return bk(e,t.toLowerCase())}const CL=uo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:hi,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alpha:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:Qe,autoFocus:Le,autoPlay:Le,blocking:Qe,capture:null,charSet:null,checked:Le,cite:null,className:Qe,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:vt,controls:Le,controlsList:Qe,coords:le|hi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:Cd,draggable:vt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:Qe,height:le,hidden:Cd,high:le,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Le,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:le,pattern:null,ping:Qe,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:Qe,required:Le,reversed:Le,rows:le,rowSpan:le,sandbox:Qe,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootCustomElementRegistry:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shadowRootSerializable:Le,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:vt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:vt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:vt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Le,disablePictureInPicture:Le,disableRemotePlayback:Le,exportParts:hi,part:Qe,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Ck}),EL=uo({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",maskType:"mask-type",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:cn,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Qe,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:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,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:hi,g2:hi,glyphName:hi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,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:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cn,rev:cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cn,requiredFeatures:cn,requiredFonts:cn,requiredFormats:cn,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:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cn,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:bk}),Ek=uo({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()}}),Pk=uo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ck}),Tk=uo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),PL={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"},TL=/[A-Z]/g,Gv=/-[a-z]/g,RL=/^data[-\w.:]+$/i;function ML(e,t){const n=bd(t);let i=t,s=nn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&RL.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Gv,NL);i="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Gv.test(l)){let a=l.replace(TL,AL);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}s=Dh}return new s(i,t)}function AL(e){return"-"+e.toLowerCase()}function NL(e){return e.charAt(1).toUpperCase()}const IL=kk([Sk,CL,Ek,Pk,Tk],"html"),_h=kk([Sk,EL,Ek,Pk,Tk],"svg");function jL(e){return e.join(" ").trim()}var Wi={},mf,Qv;function DL(){if(Qv)return mf;Qv=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
308
|
+
`,h="/",m="*",p="",y="comment",w="declaration";function S(E,P){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];P=P||{};var M=1,T=1;function D(Z){var te=Z.match(t);te&&(M+=te.length);var ge=Z.lastIndexOf(f);T=~ge?Z.length-ge:T+Z.length}function U(){var Z={line:M,column:T};return function(te){return te.position=new j(Z),L(),te}}function j(Z){this.start=Z,this.end={line:M,column:T},this.source=P.source}j.prototype.content=E;function Y(Z){var te=new Error(P.source+":"+M+":"+T+": "+Z);if(te.reason=Z,te.filename=P.source,te.line=M,te.column=T,te.source=E,!P.silent)throw te}function W(Z){var te=Z.exec(E);if(te){var ge=te[0];return D(ge),E=E.slice(ge.length),te}}function L(){W(n)}function N(Z){var te;for(Z=Z||[];te=X();)te!==!1&&Z.push(te);return Z}function X(){var Z=U();if(!(h!=E.charAt(0)||m!=E.charAt(1))){for(var te=2;p!=E.charAt(te)&&(m!=E.charAt(te)||h!=E.charAt(te+1));)++te;if(te+=2,p===E.charAt(te-1))return Y("End of comment missing");var ge=E.slice(2,te-2);return T+=2,D(ge),E=E.slice(te),T+=2,Z({type:y,comment:ge})}}function B(){var Z=U(),te=W(i);if(te){if(X(),!W(s))return Y("property missing ':'");var ge=W(l),Pe=Z({type:w,property:C(te[0].replace(e,p)),value:ge?C(ge[0].replace(e,p)):p});return W(a),Pe}}function fe(){var Z=[];N(Z);for(var te;te=B();)te!==!1&&(Z.push(te),N(Z));return Z}return L(),fe()}function C(E){return E?E.replace(c,p):p}return mf=S,mf}var Zv;function _L(){if(Zv)return Wi;Zv=1;var e=Wi&&Wi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.default=n;const t=e(DL());function n(i,s){let l=null;if(!i||typeof i!="string")return l;const a=(0,t.default)(i),c=typeof s=="function";return a.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:m}=f;c?s(h,m,f):m&&(l=l||{},l[h]=m)}),l}return Wi}var Qo={},Jv;function LL(){if(Jv)return Qo;Jv=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(h){return!h||n.test(h)||e.test(h)},a=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),l(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(s,c):h=h.replace(i,c),h.replace(t,a))};return Qo.camelCase=f,Qo}var Zo,ex;function OL(){if(ex)return Zo;ex=1;var e=Zo&&Zo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(_L()),n=LL();function i(s,l){var a={};return!s||typeof s!="string"||(0,t.default)(s,function(c,f){c&&f&&(a[(0,n.camelCase)(c,l)]=f)}),a}return i.default=i,Zo=i,Zo}var FL=OL();const zL=Id(FL),Rk=Mk("end"),Lh=Mk("start");function Mk(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function VL(e){const t=Lh(e),n=Rk(e);if(t&&n)return{start:t,end:n}}class Vt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(a=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?l.ruleId=i:(l.source=i.slice(0,f),l.ruleId=i.slice(f+1))}if(!l.place&&l.ancestors&&l.ancestors){const f=l.ancestors[l.ancestors.length-1];f&&(l.place=f.position)}const c=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=c?c.line:void 0,this.name=ls(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Vt.prototype.file="";Vt.prototype.name="";Vt.prototype.reason="";Vt.prototype.message="";Vt.prototype.stack="";Vt.prototype.column=void 0;Vt.prototype.line=void 0;Vt.prototype.ancestors=void 0;Vt.prototype.cause=void 0;Vt.prototype.fatal=void 0;Vt.prototype.place=void 0;Vt.prototype.ruleId=void 0;Vt.prototype.source=void 0;const Oh={}.hasOwnProperty,BL=new Map,$L=/[A-Z]/g,UL=new Set(["table","tbody","thead","tfoot","tr"]),WL=new Set(["td","th"]),Ak="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function HL(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=JL(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=ZL(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?_h:IL,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=Nk(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function Nk(e,t,n){if(t.type==="element")return KL(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return qL(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return YL(e,t,n);if(t.type==="mdxjsEsm")return XL(e,t);if(t.type==="root")return GL(e,t,n);if(t.type==="text")return QL(e,t)}function KL(e,t,n){const i=e.schema;let s=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(s=_h,e.schema=s),e.ancestors.push(t);const l=jk(e,t.tagName,!1),a=eO(e,t);let c=zh(e,t);return UL.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!SL(f):!0})),Ik(e,a,l,t),Fh(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function qL(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}ks(e,t.position)}function XL(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ks(e,t.position)}function YL(e,t,n){const i=e.schema;let s=i;t.name==="svg"&&i.space==="html"&&(s=_h,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:jk(e,t.name,!0),a=tO(e,t),c=zh(e,t);return Ik(e,a,l,t),Fh(a,c),e.ancestors.pop(),e.schema=i,e.create(t,l,a,n)}function GL(e,t,n){const i={};return Fh(i,zh(e,t)),e.create(t,e.Fragment,i,n)}function QL(e,t){return t.value}function Ik(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Fh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ZL(e,t,n){return i;function i(s,l,a,c){const h=Array.isArray(a.children)?n:t;return c?h(l,a,c):h(l,a)}}function JL(e,t){return n;function n(i,s,l,a){const c=Array.isArray(l.children),f=Lh(i);return t(s,l,a,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function eO(e,t){const n={};let i,s;for(s in t.properties)if(s!=="children"&&Oh.call(t.properties,s)){const l=nO(e,s,t.properties[s]);if(l){const[a,c]=l;e.tableCellAlignToStyle&&a==="align"&&typeof c=="string"&&WL.has(t.tagName)?i=c:n[a]=c}}if(i){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function tO(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const l=i.data.estree.body[0];l.type;const a=l.expression;a.type;const c=a.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ks(e,t.position);else{const s=i.name;let l;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,l=e.evaluater.evaluateExpression(c.expression)}else ks(e,t.position);else l=i.value===null?!0:i.value;n[s]=l}return n}function zh(e,t){const n=[];let i=-1;const s=e.passKeys?new Map:BL;for(;++i<t.children.length;){const l=t.children[i];let a;if(e.passKeys){const f=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(f){const h=s.get(f)||0;a=f+"-"+h,s.set(f,h+1)}}const c=Nk(e,l,a);c!==void 0&&n.push(c)}return n}function nO(e,t,n){const i=ML(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?yL(n):jL(n)),i.property==="style"){let s=typeof n=="object"?n:rO(e,String(n));return e.stylePropertyNameCase==="css"&&(s=iO(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&i.space?PL[i.property]||i.property:i.attribute,n]}}function rO(e,t){try{return zL(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,s=new Vt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Ak+"#cannot-parse-style-attribute",s}}function jk(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,a;for(;++l<s.length;){const c=qv(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};a=a?{type:"MemberExpression",object:a,property:c,computed:!!(l&&c.type==="Literal"),optional:!1}:c}i=a}else i=qv(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const s=i.value;return Oh.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(i);ks(e)}function ks(e,t){const n=new Vt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ak+"#cannot-handle-mdx-estrees-without-createevaluater",n}function iO(e){const t={};let n;for(n in e)Oh.call(e,n)&&(t[oO(n)]=e[n]);return t}function oO(e){let t=e.replace($L,sO);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function sO(e){return"-"+e.toLowerCase()}const gf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]};function aO(e){const t=this;t.parser=n;function n(i){return r1(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function lO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function uO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
309
|
+
`}]}function cO(e,t){const n=t.value?t.value+`
|
|
310
|
+
`:"",i={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(i.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function fO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),s=so(i.toLowerCase()),l=e.footnoteOrder.indexOf(i);let a,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),a=e.footnoteOrder.length):a=l+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function pO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Dk(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=i:s.push({type:"text",value:i}),s}function gO(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Dk(e,t);const s={src:so(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function yO(e,t){const n={src:so(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function vO(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function xO(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Dk(e,t);const s={href:so(i.url||"")};i.title!==null&&i.title!==void 0&&(s.title=i.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function wO(e,t){const n={href:so(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function kO(e,t,n){const i=e.all(t),s=n?SO(n):_k(t),l={},a=[];if(typeof t.checked=="boolean"){const m=i[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},i.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const m=i[c];(s||c!==0||m.type!=="element"||m.tagName!=="p")&&a.push({type:"text",value:`
|
|
311
|
+
`}),m.type==="element"&&m.tagName==="p"&&!s?a.push(...m.children):a.push(m)}const f=i[i.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
312
|
+
`});const h={type:"element",tagName:"li",properties:l,children:a};return e.patch(t,h),e.applyData(t,h)}function SO(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=_k(n[i])}return t}function _k(e){const t=e.spread;return t??e.children.length>1}function bO(e,t){const n={},i=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<i.length;){const a=i[s];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,l),e.applyData(t,l)}function CO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function EO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function PO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TO(e,t){const n=e.all(t),i=n.shift(),s=[];if(i){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],a),s.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Lh(t.children[1]),f=Rk(t.children[t.children.length-1]);c&&f&&(a.position={start:c,end:f}),s.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function RO(e,t,n){const i=n?n.children:void 0,l=(i?i.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,c=a?a.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const p=t.children[f],y={},w=a?a[f]:void 0;w&&(y.align=w);let S={type:"element",tagName:l,properties:y,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),h.push(S)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function MO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const tx=9,nx=32;function AO(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),s=0;const l=[];for(;i;)l.push(rx(t.slice(s,i.index),s>0,!0),i[0]),s=i.index+i[0].length,i=n.exec(t);return l.push(rx(t.slice(s),s>0,!1)),l.join("")}function rx(e,t,n){let i=0,s=e.length;if(t){let l=e.codePointAt(i);for(;l===tx||l===nx;)i++,l=e.codePointAt(i)}if(n){let l=e.codePointAt(s-1);for(;l===tx||l===nx;)s--,l=e.codePointAt(s-1)}return s>i?e.slice(i,s):""}function NO(e,t){const n={type:"text",value:AO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const jO={blockquote:lO,break:uO,code:cO,delete:fO,emphasis:dO,footnoteReference:hO,heading:pO,html:mO,imageReference:gO,image:yO,inlineCode:vO,linkReference:xO,link:wO,listItem:kO,list:bO,paragraph:CO,root:EO,strong:PO,table:TO,tableCell:MO,tableRow:RO,text:NO,thematicBreak:IO,toml:tl,yaml:tl,definition:tl,footnoteDefinition:tl};function tl(){}const Lk=-1,Yl=0,us=1,jl=2,Vh=3,Bh=4,$h=5,Uh=6,Ok=7,Fk=8,zk=typeof self=="object"?self:globalThis,ix=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new zk[e](t)},DO=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),i=s=>{if(e.has(s))return e.get(s);const[l,a]=t[s];switch(l){case Yl:case Lk:return n(a,s);case us:{const c=n([],s);for(const f of a)c.push(i(f));return c}case jl:{const c=n({},s);for(const[f,h]of a)c[i(f)]=i(h);return c}case Vh:return n(new Date(a),s);case Bh:{const{source:c,flags:f}=a;return n(new RegExp(c,f),s)}case $h:{const c=n(new Map,s);for(const[f,h]of a)c.set(i(f),i(h));return c}case Uh:{const c=n(new Set,s);for(const f of a)c.add(i(f));return c}case Ok:{const{name:c,message:f}=a;return n(typeof zk[c]=="function"?ix(c,f):new Error(f),s)}case Fk:return n(BigInt(a),s);case"BigInt":return n(Object(BigInt(a)),s);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:c}=new Uint8Array(a);return n(new DataView(c),a)}}return n(ix(l,a),s)};return i},ox=e=>DO(new Map,e)(0),ai="",{toString:_O}={},{keys:LO}=Object,Jo=e=>{const t=typeof e;if(t!=="object"||!e)return[Yl,t];const n=_O.call(e).slice(8,-1);switch(n){case"Array":return[us,ai];case"Object":return[jl,ai];case"Date":return[Vh,ai];case"RegExp":return[Bh,ai];case"Map":return[$h,ai];case"Set":return[Uh,ai];case"DataView":return[us,n]}return n.includes("Array")?[us,n]:e instanceof Error?[Ok,e.name||"Error"]:[jl,n]},nl=([e,t])=>e===Yl&&(t==="function"||t==="symbol"),OO=(e,t,n,i)=>{const s=(a,c)=>{const f=i.push(a)-1;return n.set(c,f),f},l=a=>{if(n.has(a))return n.get(a);let[c,f]=Jo(a);switch(c){case Yl:{let m=a;switch(f){case"bigint":c=Fk,m=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return s([Lk],a)}return s([c,m],a)}case us:{if(f){let y=a;return f==="DataView"?y=new Uint8Array(a.buffer):f==="ArrayBuffer"&&(y=new Uint8Array(a)),s([f,[...y]],a)}const m=[],p=s([c,m],a);for(const y of a)m.push(l(y));return p}case jl:{if(f)switch(f){case"BigInt":return s([f,a.toString()],a);case"Boolean":case"Number":case"String":return s([f,a.valueOf()],a)}if(t&&"toJSON"in a)return l(a.toJSON());const m=[],p=s([c,m],a);for(const y of LO(a))(e||!nl(Jo(a[y])))&&m.push([l(y),l(a[y])]);return p}case Vh:return s([c,isNaN(a.getTime())?ai:a.toISOString()],a);case Bh:{const{source:m,flags:p}=a;return s([c,{source:m,flags:p}],a)}case $h:{const m=[],p=s([c,m],a);for(const[y,w]of a)(e||!(nl(Jo(y))||nl(Jo(w))))&&m.push([l(y),l(w)]);return p}case Uh:{const m=[],p=s([c,m],a);for(const y of a)(e||!nl(Jo(y)))&&m.push(l(y));return p}}const{message:h}=a;return s([c,{name:f,message:h}],a)};return l},sx=(e,{json:t,lossy:n}={})=>{const i=[];return OO(!(t||n),!!t,new Map,i)(e),i},Dl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ox(sx(e,t)):structuredClone(e):(e,t)=>ox(sx(e,t));function FO(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function zO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function VO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||FO,i=e.options.footnoteBackLabel||zO,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const m=e.all(h),p=String(h.identifier).toUpperCase(),y=so(p.toLowerCase());let w=0;const S=[],C=e.footnoteCounts.get(p);for(;C!==void 0&&++w<=C;){S.length>0&&S.push({type:"text",value:" "});let M=typeof n=="string"?n:n(f,w);typeof M=="string"&&(M={type:"text",value:M}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,w),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const E=m[m.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const M=E.children[E.children.length-1];M&&M.type==="text"?M.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...S)}else m.push(...S);const P={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(m,!0)};e.patch(h,P),c.push(P)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...Dl(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
313
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
314
|
+
`}]}}const Pd={}.hasOwnProperty,BO={};function $O(e,t){const n=t||BO,i=new Map,s=new Map,l=new Map,a={...jO,...n.handlers},c={all:h,applyData:WO,definitionById:i,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:a,one:f,options:n,patch:UO,wrap:KO};return ph(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?i:s,y=String(m.identifier).toUpperCase();p.has(y)||p.set(y,m)}}),c;function f(m,p){const y=m.type,w=c.handlers[y];if(Pd.call(c.handlers,y)&&w)return w(c,m,p);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in m){const{children:C,...E}=m,P=Dl(E);return P.children=c.all(m),P}return Dl(m)}return(c.options.unknownHandler||HO)(c,m,p)}function h(m){const p=[];if("children"in m){const y=m.children;let w=-1;for(;++w<y.length;){const S=c.one(y[w],m);if(S){if(w&&y[w-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=ax(S.value)),!Array.isArray(S)&&S.type==="element")){const C=S.children[0];C&&C.type==="text"&&(C.value=ax(C.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function UO(e,t){e.position&&(t.position=VL(e))}function WO(e,t){let n=t;if(e&&e.data){const i=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const a="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:a}}n.type==="element"&&l&&Object.assign(n.properties,Dl(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function HO(e,t){const n=t.data||{},i="value"in t&&!(Pd.call(n,"hProperties")||Pd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function KO(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
315
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
316
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
317
|
+
`}),n}function ax(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function lx(e,t){const n=$O(e,t),i=n.one(e,void 0),s=VO(n),l=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
|
|
318
|
+
`},s),l}function qO(e,t){return e&&"run"in e?async function(n,i){const s=lx(n,{file:i,...t});await e.run(s,i)}:function(n,i){return lx(n,{file:i,...e||t})}}function ux(e){if(e)throw e}var yf,cx;function XO(){if(cx)return yf;cx=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},l=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!p)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},a=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(i)return i(h,m).value}else return;return h[m]};return yf=function f(){var h,m,p,y,w,S,C=arguments[0],E=1,P=arguments.length,M=!1;for(typeof C=="boolean"&&(M=C,C=arguments[1]||{},E=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});E<P;++E)if(h=arguments[E],h!=null)for(m in h)p=c(C,m),y=c(h,m),C!==y&&(M&&y&&(l(y)||(w=s(y)))?(w?(w=!1,S=p&&s(p)?p:[]):S=p&&l(p)?p:{},a(C,{name:m,newValue:f(M,S,y)})):typeof y<"u"&&a(C,{name:m,newValue:y}));return C},yf}var YO=XO();const vf=Id(YO);function Td(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function GO(){const e=[],t={run:n,use:i};return t;function n(...s){let l=-1;const a=s.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);c(null,...s);function c(f,...h){const m=e[++l];let p=-1;if(f){a(f);return}for(;++p<s.length;)(h[p]===null||h[p]===void 0)&&(h[p]=s[p]);s=h,m?QO(m,c)(...h):a(null,...h)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function QO(e,t){let n;return i;function i(...a){const c=e.length>a.length;let f;c&&a.push(s);try{f=e.apply(this,a)}catch(h){const m=h;if(c&&n)throw m;return s(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(l,s):f instanceof Error?s(f):l(f))}function s(a,...c){n||(n=!0,t(a,...c))}function l(a){s(null,a)}}const Un={basename:ZO,dirname:JO,extname:eF,join:tF,sep:"/"};function ZO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');js(e);let n=0,i=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else i<0&&(l=!0,i=s+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let a=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else a<0&&(l=!0,a=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(i=s):(c=-1,i=a));return n===i?i=a:i<0&&(i=e.length),e.slice(n,i)}function JO(e){if(js(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function eF(e){js(e);let t=e.length,n=-1,i=0,s=-1,l=0,a;for(;t--;){const c=e.codePointAt(t);if(c===47){if(a){i=t+1;break}continue}n<0&&(a=!0,n=t+1),c===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===i+1?"":e.slice(s,n)}function tF(...e){let t=-1,n;for(;++t<e.length;)js(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":nF(n)}function nF(e){js(e);const t=e.codePointAt(0)===47;let n=rF(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function rF(e,t){let n="",i=0,s=-1,l=0,a=-1,c,f;for(;++a<=e.length;){if(a<e.length)c=e.codePointAt(a);else{if(c===47)break;c=47}if(c===47){if(!(s===a-1||l===1))if(s!==a-1&&l===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),s=a,l=0;continue}}else if(n.length>0){n="",i=0,s=a,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),i=a-s-1;s=a,l=0}else c===46&&l>-1?l++:l=-1}return n}function js(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const iF={cwd:oF};function oF(){return"/"}function Rd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sF(e){if(typeof e=="string")e=new URL(e);else if(!Rd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return aF(e)}function aF(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const xf=["history","path","basename","stem","extname","dirname"];class Vk{constructor(t){let n;t?Rd(t)?n={path:t}:typeof t=="string"||lF(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":iF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<xf.length;){const l=xf[i];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)xf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Un.basename(this.path):void 0}set basename(t){kf(t,"basename"),wf(t,"basename"),this.path=Un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Un.dirname(this.path):void 0}set dirname(t){fx(this.basename,"dirname"),this.path=Un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Un.extname(this.path):void 0}set extname(t){if(wf(t,"extname"),fx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Rd(t)&&(t=sF(t)),kf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Un.basename(this.path,this.extname):void 0}set stem(t){kf(t,"stem"),wf(t,"stem"),this.path=Un.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const s=this.message(t,n,i);throw s.fatal=!0,s}info(t,n,i){const s=this.message(t,n,i);return s.fatal=void 0,s}message(t,n,i){const s=new Vt(t,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function wf(e,t){if(e&&e.includes(Un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Un.sep+"`")}function kf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function fx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function lF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uF=function(e){const i=this.constructor.prototype,s=i[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,i),l},cF={}.hasOwnProperty;class Wh extends uF{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=GO()}copy(){const t=new Wh;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(vf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Cf("data",this.frozen),this.namespace[t]=n,this):cF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Cf("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(t,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=rl(t),i=this.parser||this.Parser;return Sf("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Sf("process",this.parser||this.Parser),bf("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,a){const c=rl(t),f=i.parse(c);i.run(f,c,function(m,p,y){if(m||!p||!y)return h(m);const w=p,S=i.stringify(w,y);hF(S)?y.value=S:y.result=S,h(m,y)});function h(m,p){m||!p?a(m):l?l(p):n(void 0,p)}}}processSync(t){let n=!1,i;return this.freeze(),Sf("processSync",this.parser||this.Parser),bf("processSync",this.compiler||this.Compiler),this.process(t,s),hx("processSync","process",n),i;function s(l,a){n=!0,ux(l),i=a}}run(t,n,i){dx(t),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?l(void 0,i):new Promise(l);function l(a,c){const f=rl(n);s.run(t,f,h);function h(m,p,y){const w=p||t;m?c(m):a?a(w):i(void 0,w,y)}}}runSync(t,n){let i=!1,s;return this.run(t,n,l),hx("runSync","run",i),s;function l(a,c){ux(a),s=c,i=!0}}stringify(t,n){this.freeze();const i=rl(n),s=this.compiler||this.Compiler;return bf("stringify",s),dx(t),s(t,i)}use(t,...n){const i=this.attachers,s=this.namespace;if(Cf("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...p]=h;f(m,p)}else a(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function a(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(s.settings=vf(!0,s.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const p=h[m];l(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,m){let p=-1,y=-1;for(;++p<i.length;)if(i[p][0]===h){y=p;break}if(y===-1)i.push([h,...m]);else if(m.length>0){let[w,...S]=m;const C=i[y][1];Td(C)&&Td(w)&&(w=vf(!0,C,w)),i[y]=[h,w,...S]}}}}const fF=new Wh().freeze();function Sf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function bf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Cf(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function dx(e){if(!Td(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hx(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rl(e){return dF(e)?e:new Vk(e)}function dF(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function hF(e){return typeof e=="string"||pF(e)}function pF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const mF="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",px=[],mx={allowDangerousHtml:!0},gF=/^(https?|ircs?|mailto|xmpp)$/i,yF=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Bk(e){const t=vF(e),n=xF(e);return wF(t.runSync(t.parse(n),n),e)}function vF(e){const t=e.rehypePlugins||px,n=e.remarkPlugins||px,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mx}:mx;return fF().use(aO).use(n).use(qO,i).use(t)}function xF(e){const t=e.children||"",n=new Vk;return typeof t=="string"&&(n.value=t),n}function wF(e,t){const n=t.allowedElements,i=t.allowElement,s=t.components,l=t.disallowedElements,a=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||kF;for(const m of yF)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+mF+m.id,void 0);return ph(e,h),HL(e,{Fragment:v.Fragment,components:s,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(m,p,y){if(m.type==="raw"&&y&&typeof p=="number")return a?y.children.splice(p,1):y.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let w;for(w in gf)if(Object.hasOwn(gf,w)&&Object.hasOwn(m.properties,w)){const S=m.properties[w],C=gf[w];(C===null||C.includes(m.tagName))&&(m.properties[w]=f(String(S||""),w,m))}}if(m.type==="element"){let w=n?!n.includes(m.tagName):l?l.includes(m.tagName):!1;if(!w&&i&&typeof p=="number"&&(w=!i(m,p,y)),w&&y&&typeof p=="number")return c&&m.children?y.children.splice(p,1,...m.children):y.children.splice(p,1),p}}}function kF(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||i!==-1&&t>i||gF.test(e.slice(0,t))?e:""}const SF={};function $k(e){const t=this,n=e||SF,i=t.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),l=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),a=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(h1(n)),l.push(H0()),a.push(MN(n))}function Ds(e){const t=k.useRef(null);return k.useEffect(()=>(t.current=document.activeElement instanceof HTMLElement?document.activeElement:null,()=>{const n=t.current;n?.isConnected&&requestAnimationFrame(()=>n.focus())}),[]),v.jsx(fk,{open:!0,onOpenChange:n=>{n||e.onClose()},children:v.jsxs(pk,{children:[v.jsx(mk,{className:"modal-backdrop"}),v.jsxs(gk,{id:e.contentId,className:"modal"+(e.wide?" modal-wide":"")+(e.className?` ${e.className}`:""),children:[v.jsxs("div",{className:"modal-head",children:[v.jsxs("div",{children:[v.jsx(vk,{asChild:!0,children:v.jsx("h3",{children:e.title})}),e.description&&v.jsx(xk,{className:"modal-description",children:e.description})]}),v.jsx(wk,{asChild:!0,children:v.jsx("button",{className:"icon-btn","aria-label":`Close ${e.title}`,children:v.jsx(Ce,{name:"close"})})})]}),e.tabs,v.jsx("div",{className:"modal-body",children:e.children})]})]})})}const bF=.25,CF=8;let gx=Promise.resolve();function yx(){return document.documentElement.classList.contains("theme-dark")?"dark":"default"}function EF(){const[e,t]=k.useState(yx);return k.useEffect(()=>{const n=document.documentElement,i=()=>t(yx()),s=new MutationObserver(i);return s.observe(n,{attributes:!0,attributeFilter:["class"]}),i(),()=>s.disconnect()},[]),e}function PF(e,t,n){const i=gx.then(async()=>{const{default:s}=await Ch(async()=>{const{default:l}=await import("./mermaid.core-qQfZwK3y.js").then(a=>a.bp);return{default:l}},[]);return s.initialize({startOnLoad:!1,securityLevel:"strict",theme:n,fontFamily:"var(--sans)"}),s.render(e,t)});return gx=i.then(()=>{},()=>{}),i}function TF(e){return Math.min(CF,Math.max(bF,e))}function RF(e){const t=k.useRef(null),n=k.useRef(null),[i,s]=k.useState(1),[l,a]=k.useState({x:0,y:0}),[c,f]=k.useState(!1),h=()=>{s(1),a({x:0,y:0})},m=(p,y,w)=>{const S=TF(p);if(S===i)return;const C=t.current?.getBoundingClientRect();if(C){const E=(y??C.left+C.width/2)-C.left-C.width/2,P=(w??C.top+C.height/2)-C.top-C.height/2,M=S/i;a(T=>({x:E-M*(E-T.x),y:P-M*(P-T.y)}))}s(S)};return k.useEffect(()=>{const p=y=>{y.key==="+"||y.key==="="?(y.preventDefault(),m(i*1.25)):y.key==="-"?(y.preventDefault(),m(i/1.25)):y.key==="0"&&(y.preventDefault(),h())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)}),v.jsx(fk,{open:!0,onOpenChange:p=>{p||e.onClose()},children:v.jsxs(pk,{children:[v.jsx(mk,{className:"mermaid-fullscreen-backdrop"}),v.jsxs(gk,{className:"mermaid-fullscreen","data-mermaid-theme":e.theme,"aria-describedby":"mermaid-fullscreen-help",children:[v.jsx(vk,{className:"mermaid-fullscreen-title",children:"Diagram viewer"}),v.jsxs("div",{className:"mermaid-fullscreen-tools",children:[v.jsx("button",{className:"icon-btn","aria-label":"Zoom out",title:"Zoom out (−)",onClick:()=>m(i/1.25),children:v.jsx(Ce,{name:"minus"})}),v.jsxs("button",{className:"mermaid-zoom-value",onClick:h,title:"Reset zoom and position",children:[Math.round(i*100),"%"]}),v.jsx("button",{className:"icon-btn","aria-label":"Zoom in",title:"Zoom in (+)",onClick:()=>m(i*1.25),children:v.jsx(Ce,{name:"plus"})}),v.jsx(wk,{asChild:!0,children:v.jsx("button",{className:"icon-btn","aria-label":"Close diagram viewer",title:"Close (Esc)",children:v.jsx(Ce,{name:"close"})})})]}),v.jsx("div",{ref:t,className:"mermaid-fullscreen-viewport"+(c?" dragging":""),onWheel:p=>{p.preventDefault(),m(i*Math.exp(-p.deltaY*.0015),p.clientX,p.clientY)},onDoubleClick:p=>m(i*1.5,p.clientX,p.clientY),onPointerDown:p=>{p.button===0&&(n.current={pointerId:p.pointerId,startX:p.clientX,startY:p.clientY,panX:l.x,panY:l.y},p.currentTarget.setPointerCapture(p.pointerId),f(!0))},onPointerMove:p=>{const y=n.current;!y||y.pointerId!==p.pointerId||a({x:y.panX+p.clientX-y.startX,y:y.panY+p.clientY-y.startY})},onPointerUp:p=>{n.current?.pointerId===p.pointerId&&(n.current=null,f(!1),p.currentTarget.releasePointerCapture(p.pointerId))},onPointerCancel:()=>{n.current=null,f(!1)},children:v.jsx("div",{className:"mermaid-fullscreen-canvas",style:{transform:`translate(${l.x}px, ${l.y}px) scale(${i})`},dangerouslySetInnerHTML:{__html:e.svg}})}),v.jsx(xk,{id:"mermaid-fullscreen-help",className:"mermaid-fullscreen-help",children:"Scroll to zoom · drag to move · double-click to zoom in"})]})]})})}function MF({source:e}){const t=k.useId(),[n,i]=k.useState(""),[s,l]=k.useState(""),[a,c]=k.useState("default"),[f,h]=k.useState(!1),m=EF();return k.useEffect(()=>{let p=!0;const y=`mermaid-${t.replace(/[^a-zA-Z0-9_-]/g,"")}`;return i(""),l(""),PF(y,e,m).then(w=>{p&&(c(m),i(w.svg))}).catch(w=>{p&&l(w instanceof Error?w.message:String(w))}),()=>{p=!1,document.getElementById(`d${y}`)?.remove()}},[t,e,m]),s?v.jsxs("pre",{className:"markdown-mermaid-error",children:["Mermaid error: ",s]}):n?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"markdown-mermaid","data-mermaid-theme":a,children:[v.jsx("button",{className:"icon-btn markdown-mermaid-expand","aria-label":"View diagram fullscreen",title:"View diagram fullscreen",onClick:()=>h(!0),children:v.jsx(Ce,{name:"maximize"})}),v.jsx("div",{className:"markdown-mermaid-diagram",dangerouslySetInnerHTML:{__html:n}})]}),f&&v.jsx(RF,{svg:n,theme:a,onClose:()=>h(!1)})]}):v.jsx("div",{className:"markdown-mermaid-loading",children:"Rendering diagram…"})}const AF=k.memo(function(t){return v.jsx("article",{className:"markdown-body",ref:t.contentRef,children:v.jsx(Bk,{remarkPlugins:[$k],components:{a:({children:n,...i})=>v.jsx("a",{...i,target:"_blank",rel:"noreferrer",children:n}),code:({className:n,children:i,...s})=>{const l=/language-([\w-]+)/.exec(n??"")?.[1],a=String(i).replace(/\n$/,"");return l==="mermaid"?v.jsx(MF,{source:a}):v.jsx("code",{className:n,...s,children:i})}},children:t.markdown})})});function Uk(e){const{rec:t}=e,n=k.useRef(null),[i,s]=k.useState(""),[l,a]=k.useState(null),[c,f]=k.useState("loading"),[h,m]=k.useState(""),[p,y]=k.useState(0),[w,S]=k.useState(""),[C,E]=k.useState(0),[P,M]=k.useState(!1),[T,D]=k.useState(""),[U,j]=k.useState(!1),[Y,W]=k.useState(!1),[L,N]=k.useState([]),[X,B]=k.useState(!1),[fe,Z]=k.useState(null),[te,ge]=k.useState(!1),[Pe,Q]=k.useState("");k.useEffect(()=>{let A=!0,ee=null;return f("loading"),Ul(t.id).then(ye=>{if(A){if(!ye){f("missing");return}s(new TextDecoder("utf-8").decode(ye)),ee=URL.createObjectURL(new Blob([ye],{type:"text/markdown;charset=utf-8"})),a(ee),f("ready")}}).catch(()=>{A&&f("error")}),()=>{A=!1,ee&&URL.revokeObjectURL(ee)}},[t.id]),k.useEffect(()=>{const A=()=>{const ee=window.getSelection(),ye=n.current;if(!ee||ee.isCollapsed||!ye){m(""),y(0);return}if(!ye.contains(ee.anchorNode)||!ye.contains(ee.focusNode)){m(""),y(0);return}const ve=ee.getRangeAt(0),pe=ee.toString(),Me=pe.length-pe.trimStart().length,me=pe.trim().slice(0,4e3),Oe=document.createRange();Oe.selectNodeContents(ye),Oe.setEnd(ve.startContainer,ve.startOffset);const qe=Oe.toString().length+Me;m(me),y(tD(ye.textContent,me,qe))};return document.addEventListener("selectionchange",A),()=>document.removeEventListener("selectionchange",A)},[]);const de=()=>{h&&(S(h),E(p),M(!0),Q(""))},R=async()=>{if(Y){if(!w||!T.trim())return;N(ee=>[...ee,{selection:w,comment:T.trim(),occurrence:C}]),D(""),M(!1),Q("Comment added to review");return}const A=Jj(w,T);if(!(!A||!T.trim()||U)){j(!0),Q("");try{await e.onSendText(A,t.id||void 0),D(""),M(!1),Q("Feedback sent")}catch(ee){Q(`Send failed: ${String(ee)}`)}finally{j(!1)}}},O=async()=>{if(L.length===0||X)return;const A=aD(i,L);B(!0),Q("");try{e.onSendFile?await e.onSendFile({filename:eD(t.filename),mime:"text/markdown",bytes:new TextEncoder().encode(A)},t.id||void 0):await e.onSendText(A,t.id||void 0),N([]),W(!1),Q("Review submitted")}catch(ee){Q(`Review send failed: ${String(ee)}`)}finally{B(!1)}},G=async()=>{if(!(!fe||!e.onSendFile||te)){ge(!0),Q("");try{await e.onSendFile(fe,t.id||void 0),Z(null),Q("Voice feedback sent")}catch(A){Q(`Voice send failed: ${String(A)}`)}finally{ge(!1)}}};return v.jsx(Ds,{title:t.filename,description:"Markdown preview · select text to send precise feedback",onClose:e.onClose,wide:!0,className:"markdown-modal",children:v.jsxs("div",{className:"markdown-preview",children:[v.jsxs("div",{className:"markdown-review-toolbar",children:[v.jsxs("button",{className:"btn sm",disabled:!h,onMouseDown:A=>A.preventDefault(),onClick:de,children:[v.jsx(Ce,{name:"reply",size:14}),Y?"Add review comment":"Quick message",h?` (${h.length})`:""]}),Y?v.jsx("button",{className:"btn sm",onClick:()=>{W(!1),N([]),M(!1),Q("Review discarded")},children:"Cancel review"}):v.jsxs("button",{className:"btn sm",onClick:()=>{W(!0),N([]),Q("Review started — select passages to add comments")},children:[v.jsx(Ce,{name:"edit",size:14}),"Start review"]}),l&&v.jsxs("a",{className:"btn sm",href:l,download:t.filename,children:[v.jsx(Ce,{name:"download",size:14}),"Download"]}),e.onSendFile&&v.jsx(b1,{disabled:!!fe||te,onReady:Z,onError:Q}),v.jsx("span",{className:"markdown-review-hint",children:h?"Selection ready for feedback":"Highlight any passage to comment on it"})]}),P&&v.jsxs("div",{className:"markdown-feedback",children:[v.jsx("blockquote",{children:w}),v.jsx("textarea",{className:"field",rows:3,autoFocus:!0,placeholder:"What should change?",value:T,onChange:A=>D(A.target.value)}),v.jsxs("div",{className:"markdown-feedback-actions",children:[v.jsx("button",{className:"btn sm",onClick:()=>M(!1),children:"Cancel"}),v.jsxs("button",{className:"btn sm primary",disabled:!T.trim()||U,onClick:()=>void R(),children:[v.jsx(Ce,{name:"send",size:14}),Y?"Add to review":U?"Sending…":"Send feedback"]})]})]}),Y&&v.jsxs("div",{className:"markdown-review-draft",children:[v.jsxs("div",{className:"markdown-review-draft-head",children:[v.jsxs("strong",{children:["Review · ",L.length," comment",L.length===1?"":"s"]}),v.jsxs("button",{className:"btn sm primary",disabled:L.length===0||X,onClick:()=>void O(),children:[v.jsx(Ce,{name:"send",size:14}),X?"Submitting…":"Submit review"]})]}),L.map((A,ee)=>v.jsxs("div",{className:"markdown-review-comment",children:[v.jsx("span",{children:ee+1}),v.jsxs("div",{children:[v.jsx("blockquote",{children:A.selection}),v.jsx("p",{children:A.comment})]}),v.jsx("button",{className:"icon-btn",title:"Remove comment",onClick:()=>N(ye=>ye.filter((ve,pe)=>pe!==ee)),children:v.jsx(Ce,{name:"close",size:14})})]},`${ee}-${A.selection.slice(0,24)}`))]}),fe&&v.jsx(S1,{att:fe,sending:te,onSend:()=>void G(),onDiscard:()=>Z(null)}),Pe&&v.jsx("div",{className:"markdown-review-status",role:"status",children:Pe}),v.jsxs("div",{className:"markdown-preview-scroll",children:[c==="loading"&&v.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),c==="missing"&&v.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),c==="error"&&v.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),c==="ready"&&v.jsx(AF,{markdown:i,contentRef:n})]})]})})}function Wk(e){const{rec:t}=e,[n,i]=k.useState(null),[s,l]=k.useState(0),[a,c]=k.useState("loading");return k.useEffect(()=>{let f=!0,h=null;return c("loading"),Ul(t.id).then(m=>{if(f){if(!m){c("missing");return}l(m.byteLength),h=URL.createObjectURL(new Blob([m],{type:wh(t.mime,t.filename)})),i(h),c("ready")}}).catch(()=>{f&&c("error")}),()=>{f=!1,h&&URL.revokeObjectURL(h)}},[t.id,t.mime,t.filename]),v.jsx(Ds,{title:t.filename,description:"Transformed safe preview · external navigation disabled",onClose:e.onClose,wide:!0,className:"markdown-modal html-modal",children:v.jsxs("div",{className:"html-preview",children:[v.jsxs("div",{className:"html-preview-toolbar",children:[v.jsxs("span",{className:"html-preview-shield",children:[v.jsx(Ce,{name:"shield",size:14}),"Scripts, forms and network requests are blocked"]}),n&&v.jsxs("a",{className:"btn sm",href:n,download:t.filename,children:[v.jsx(Ce,{name:"download",size:14}),"Download original",s?` · ${Fr(s)}`:""]})]}),v.jsxs("div",{className:"html-preview-frame",children:[a==="loading"&&v.jsx("div",{className:"markdown-empty",children:"Loading preview…"}),a==="missing"&&v.jsx("div",{className:"markdown-empty",children:"This file is available on the original device only."}),a==="error"&&v.jsx("div",{className:"markdown-empty",children:"The file could not be opened."}),a==="ready"&&v.jsx("iframe",{className:"html-preview-iframe",title:`Sandboxed preview of ${t.filename}`,sandbox:lD,referrerPolicy:"no-referrer",src:`/api/html-preview/${encodeURIComponent(t.id)}`},t.id)]})]})})}function Hk(e){const t=(n,i)=>{const{key:s}=n;if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(s))return;n.preventDefault();const l=e.options.length-1,a=s==="Home"?0:s==="End"?l:s==="ArrowLeft"||s==="ArrowUp"?(i-1+e.options.length)%e.options.length:(i+1)%e.options.length,c=e.options[a];c&&(e.onChange(c.id),document.getElementById(`${e.idPrefix}-${c.id}`)?.focus())};return v.jsx("div",{className:e.className,role:"tablist","aria-label":e.label,children:e.options.map((n,i)=>v.jsxs("button",{id:`${e.idPrefix}-${n.id}`,type:"button",role:"tab","aria-selected":e.value===n.id,"aria-controls":e.panelId,tabIndex:e.value===n.id?0:-1,className:"tab"+(e.value===n.id?" active":""),onClick:()=>e.onChange(n.id),onKeyDown:s=>t(s,i),children:[n.label,n.count===void 0?null:v.jsxs(v.Fragment,{children:[" ",v.jsx("span",{children:n.count})]})]},n.id))})}function Md(e){const{message:t}=e,[n,i]=k.useState(null),[s,l]=k.useState(0),a=C0(t.wireId)??{id:t.wireId,dir:t.dir,filename:t.filename??"file",mime:t.mime??"application/octet-stream",size:s,date:t.date};k.useEffect(()=>{let h=!0,m=null;if(t.wireId)return Ul(t.wireId).then(p=>{!h||!p||(l(p.byteLength),m=URL.createObjectURL(new Blob([p],{type:wh(a.mime,a.filename)})),i(m))}).catch(()=>{}),()=>{h=!1,m&&URL.revokeObjectURL(m)}},[t.wireId,a.mime,a.filename]);const c=cd(t)==="photo",f=eo(a.mime,a.filename);return v.jsxs("div",{className:"shared-media-item"+(c?" shared-photo-item":""),children:[v.jsxs("button",{className:"shared-media-jump",onClick:()=>e.onJump(e.messageKey),children:[c&&n?v.jsx("img",{src:n,alt:a.filename}):v.jsx("span",{className:"shared-media-icon",children:v.jsx(Ce,{name:f?"mic":"copy",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:c?a.filename||"Photo":f?"Voice message":a.filename}),v.jsxs("span",{children:[e.versionLabel?`${e.versionLabel} · `:"",ys(a.date),s?` · ${Fr(s)}`:""]})]})]}),v.jsxs("span",{className:"shared-media-actions",children:[p1(a.filename)&&n&&v.jsx("button",{className:"icon-btn",title:"Preview markdown",onClick:()=>e.onPreview(a),children:v.jsx(Ce,{name:"monitor",size:16})}),As(a.filename,a.mime)&&n&&v.jsx("button",{className:"icon-btn",title:"Preview HTML",onClick:()=>e.onPreview(a),children:v.jsx(Ce,{name:"monitor",size:16})}),v.jsx("a",{className:"icon-btn"+(n?"":" disabled"),href:n??void 0,download:a.filename,title:"Download",children:v.jsx(Ce,{name:"download",size:16})})]})]})}function NF(e){const[t,n]=k.useState(!1);if(e.versions.length===1){const i=e.versions[0];return v.jsx(Md,{message:i.message,messageKey:i.key,onJump:e.onJump,onPreview:e.onPreview})}return v.jsxs("div",{className:"file-version-stack"+(t?" expanded":""),children:[v.jsxs("button",{className:"file-version-stack-head",onClick:()=>n(i=>!i),children:[v.jsx("span",{className:"shared-media-icon",children:v.jsx(Ce,{name:"copy",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:e.filename}),v.jsxs("span",{children:[e.versions.length," versions · newest ",ys(e.versions[0].message.date)]})]}),v.jsx(Ce,{name:t?"chevronDown":"chevron",size:16})]}),t&&v.jsx("div",{className:"file-version-stack-list",children:e.versions.map((i,s)=>v.jsx(Md,{message:i.message,messageKey:i.key,versionLabel:`Version ${e.versions.length-s}`,onJump:e.onJump,onPreview:e.onPreview},i.key))})]})}function IF(e){const[t,n]=k.useState("photo"),i=e.messages.map((h,m)=>({message:h,key:h.wireId||`${h.date}-${(e.indexOffset??0)+m}`})),s=i.filter(({message:h})=>cd(h)==="photo"),l=i.filter(({message:h})=>cd(h)==="file"),a=rD(l),c=i.flatMap(({message:h,key:m})=>h.kind==="file"?[]:nD(h.text).map(p=>({url:p,message:h,key:m}))),f=[{id:"photo",label:"Photos",count:s.length},{id:"file",label:"Files",count:l.length},{id:"link",label:"Links",count:c.length}];return v.jsx(Ds,{title:"Shared media",description:"Photos, files, and links from this conversation",onClose:e.onClose,wide:!0,className:"shared-media-modal",tabs:v.jsx(Hk,{className:"shared-media-tabs",label:"Shared media type",options:f,value:t,onChange:n,idPrefix:"shared-media-tab",panelId:"shared-media-panel"}),children:v.jsxs("div",{id:"shared-media-panel",role:"tabpanel","aria-labelledby":`shared-media-tab-${t}`,className:"shared-media-list"+(t==="photo"?" photos":""),children:[t==="photo"&&s.map(h=>v.jsx(Md,{message:h.message,messageKey:h.key,onJump:e.onJump,onPreview:e.onPreview},h.key)),t==="file"&&a.map(h=>v.jsx(NF,{filename:h.filename,versions:h.versions,onJump:e.onJump,onPreview:e.onPreview},h.filename)),t==="link"&&c.map((h,m)=>v.jsxs("div",{className:"shared-media-item",children:[v.jsxs("a",{className:"shared-media-jump",href:h.url,target:"_blank",rel:"noreferrer",children:[v.jsx("span",{className:"shared-media-icon",children:v.jsx(Ce,{name:"link",size:18})}),v.jsxs("span",{className:"shared-media-copy",children:[v.jsx("strong",{children:h.url}),v.jsx("span",{children:ys(h.message.date)})]})]}),v.jsx("button",{className:"icon-btn",title:"Jump to message",onClick:()=>e.onJump(h.key),children:v.jsx(Ce,{name:"reply",size:16})})]},`${h.key}-${h.url}-${m}`)),(t==="photo"&&s.length===0||t==="file"&&l.length===0||t==="link"&&c.length===0)&&v.jsxs("div",{className:"markdown-empty",children:["No ",t==="photo"?"photos":`${t}s`," in this chat yet."]})]})})}const jF=Object.freeze(["image/avif","image/bmp","image/heic","image/heif","image/jpeg","image/jpg","image/png","image/webp"]),DF=/\.(avif|bmp|heic|heif|jpe?g|png|webp)$/i;function Kk(e,t=""){return jF.includes(String(e??"").toLowerCase())||DF.test(String(t??""))}function _F(e){return`${(String(e||"photo").trim()||"photo").replace(/\.[^./\\]+$/,"")||"photo"}.jpg`}function LF(e,t,n){const i=Math.max(1,Number(e)||1),s=Math.max(1,Number(t)||1),l=Math.max(1,Number(n)||1),a=Math.min(1,l/Math.max(i,s));return{width:Math.max(1,Math.round(i*a)),height:Math.max(1,Math.round(s*a))}}const OF=2048,FF=640,zF=.82,VF=[.84,.7,.56,.44],BF=.94;function $F(e){return new Promise((t,n)=>{const i=URL.createObjectURL(e),s=new Image,l=()=>URL.revokeObjectURL(i);s.onload=()=>t({image:s,release:l}),s.onerror=()=>{l(),n(new Error("This browser could not decode the selected image."))},s.src=i})}function UF(e,t){return new Promise((n,i)=>{e.toBlob(s=>s?n(s):i(new Error("This browser could not encode the optimized photo.")),"image/jpeg",t)})}async function WF(e,t){if(!Kk(e.type,e.name))throw new Error("This image format cannot be optimized safely in this browser.");const n=Math.max(1,Math.floor(t*BF)),{image:i,release:s}=await $F(e),l=document.createElement("canvas"),a=l.getContext("2d",{alpha:!1});if(!a)throw s(),new Error("Photo optimization is unavailable in this browser.");try{let c=Math.min(OF,Math.max(i.naturalWidth,i.naturalHeight));for(;c>=FF;){const f=LF(i.naturalWidth,i.naturalHeight,c);l.width=f.width,l.height=f.height,a.fillStyle="#fff",a.fillRect(0,0,l.width,l.height),a.drawImage(i,0,0,l.width,l.height);for(const h of VF){const m=await UF(l,h);if(m.size<=n)return{filename:_F(e.name),mime:"image/jpeg",bytes:new Uint8Array(await m.arrayBuffer()),width:l.width,height:l.height,originalSize:e.size}}c=Math.floor(c*zF)}}finally{s(),l.width=1,l.height=1}throw new Error("The photo is still too large after optimization.")}const HF=5e4,KF=new Set(["http:","https:","mailto:"]);function qk(e){if(!(!e||e!==e.trim()||/[\u0000-\u001f\u007f]/u.test(e)))try{const t=new URL(e);return KF.has(t.protocol.toLowerCase())?e:void 0}catch{return}}function Xk(e){const t="language-";return e?.startsWith(t)&&e.slice(t.length)||void 0}function qF(e){return e.split(/(\n[ \t]*\n)/).map(t=>{if(/^\n[ \t]*\n$/.test(t))return t;const n=t.split(`
|
|
319
|
+
`),i=n.filter(a=>a.trim().length>0);if(i.length===0)return t;const s=i.map(a=>a.match(/^[ \t]+/)?.[0]??"");if(s.some(a=>a.length===0))return t;const l=Math.min(...s.map(a=>a.length));return n.map(a=>a.trim().length>0?a.slice(l):a).join(`
|
|
320
|
+
`)}).join("")}function XF({children:e}){const t=k.isValidElement(e)?e:null,n=Xk(t?.props.className);return v.jsxs("div",{className:"message-code-block","data-language":n||void 0,children:[n&&v.jsx("div",{className:"message-code-language",children:n}),v.jsx("pre",{children:e})]})}const YF=[$k],GF={a:({node:e,children:t,href:n,...i})=>{const s=qk(n);return s?v.jsx("a",{...i,href:s,target:"_blank",rel:"noopener noreferrer",children:t}):v.jsx("span",{className:"message-link-blocked",children:t})},img:({alt:e})=>v.jsxs("span",{className:"message-image-placeholder",children:["[image: ",e||"remote image blocked","]"]}),pre:XF,code:({node:e,className:t,children:n,...i})=>v.jsx("code",{className:t,"data-language":Xk(t),...i,children:n})},vx=k.memo(function({text:t,className:n="bubble-text message-markdown"}){return t.length>HF?v.jsx("div",{className:`${n} message-markdown-plaintext`,"data-render-mode":"plaintext",children:t}):v.jsx("div",{className:n,"data-render-mode":"markdown",children:v.jsx(Bk,{remarkPlugins:YF,components:GF,urlTransform:i=>qk(i)??"",children:qF(t)})})});function QF(){return typeof navigator>"u"?!1:/iPhone|iPad|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}function xx(e,t){const n=window.getSelection();if(!n?.rangeCount||!e.contains(n.anchorNode)){e.append(document.createTextNode(t));return}const i=n.getRangeAt(0);i.deleteContents();const s=document.createTextNode(t);i.insertNode(s),i.setStartAfter(s),i.collapse(!0),n.removeAllRanges(),n.addRange(i)}const ZF=k.forwardRef(function({value:t,placeholder:n,busy:i,onChange:s,onSend:l},a){const c=k.useRef(null),f=k.useRef(!1);k.useImperativeHandle(a,()=>c.current,[]),k.useLayoutEffect(()=>{const y=c.current;y&&!f.current&&y.textContent!==t&&(y.textContent=t)},[t]);const h=()=>s(c.current?.textContent??""),m=y=>{y.preventDefault(),xx(y.currentTarget,y.clipboardData.getData("text/plain")),h()},p=y=>{y.key!=="Enter"||y.nativeEvent.isComposing||(y.preventDefault(),y.shiftKey?(xx(y.currentTarget,`
|
|
321
|
+
`),h()):l())};return v.jsx("div",{ref:c,className:"field composer-editor",contentEditable:"plaintext-only",suppressContentEditableWarning:!0,role:"textbox","aria-label":n,"aria-multiline":"true","aria-busy":i,"data-placeholder":n,inputMode:"text",enterKeyHint:"send",onInput:h,onPaste:m,onKeyDown:p,onCompositionStart:()=>{f.current=!0},onCompositionEnd:()=>{f.current=!1,h()}})}),yl={type:"spring",stiffness:430,damping:38,mass:.72},wx=10,Yk=56,JF=18,ez=650;function tz(e,t){return Math.abs(e)<wx&&Math.abs(t)<wx?"pending":Math.abs(e)>Math.abs(t)&&e>0?"drag":"reject"}function nz(e){const t=e.at(-1),n=t?e.slice(0,-1).reverse().find(i=>i.x!==t.x&&t.time-i.time<=100):void 0;return n&&t&&t.time>n.time?(t.x-n.x)/(t.time-n.time)*1e3:0}function rz(e,t){const n=nz(t);return n>=0&&(e>=Yk||e>=JF&&n>=ez)}const Ad="ours.chats.listMode",cs="recent";function Gk(){try{return globalThis.localStorage}catch{return}}function iz(e=Gk()){try{return e?.getItem(Ad)==="identity"?"identity":cs}catch{return cs}}function oz(e,t=Gk()){const n=e==="identity"?"identity":cs;try{return t?.setItem(Ad,n),t?.getItem(Ad)===n?n:cs}catch{return cs}}function Ss(e){return typeof e=="string"?e:""}function _l(e,t){const n=Ss(e),i=Ss(t),s=n.normalize().toLowerCase(),l=i.normalize().toLowerCase();return s<l?-1:s>l?1:n<i?-1:n>i?1:0}function sz(e,t){const n=Rl(Ss(t.activityAt))-Rl(Ss(e.activityAt));if(n!==0)return n;const i=_l(e.name,t.name);return i!==0?i:_l(e.id,t.id)}function Nd(e){return[...e].sort(sz)}function kx(e){return e.contacts.length>0?Rl(Ss(e.contacts[0].activityAt)):0}function az(e,t){const n=new Map,i=[];for(const l of e){const a=l.root||(t?.[l.id]?l.id:null);if(!a){i.push(l);continue}const c=t?.[a]||{label:a,note:""};let f=n.get(a);f||(f={id:`root:${a}`,rootId:a,label:c.label,note:c.note,contacts:[]},n.set(a,f)),f.contacts.push(l)}const s=[...n.values()].map(l=>({...l,contacts:Nd(l.contacts)}));return i.length>0&&s.push({id:"rootless",rootId:null,label:"Independent identities",note:"People, agents and apps without a verified Human/root group",contacts:Nd(i)}),s.sort((l,a)=>{const c=kx(a)-kx(l);if(c!==0)return c;const f=_l(l.label,a.label);return f!==0?f:_l(l.id,a.id)})}const lz=15e3;function Ef(e){const{c:t,active:n,grouped:i}=e,[s,l]=k.useState(!1),a=async(h,m)=>{if(!(!h||s)){l(!0);try{const p=await h();requestAnimationFrame(()=>{p?document.getElementById("chat-list-title")?.focus():m.focus()})}finally{l(!1)}}},c=v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"contact-avatar","aria-hidden":!0,children:t.initials}),v.jsxs("span",{className:"contact-copy",children:[v.jsxs("span",{className:"contact-row-topline",children:[v.jsx("span",{className:"contact-name",children:t.name}),t.when&&v.jsx("span",{className:"contact-time",children:t.when})]}),v.jsxs("span",{className:"contact-row-bottomline",children:[v.jsx("span",{className:"contact-last",children:t.last}),t.status==="pending"&&v.jsx("span",{className:"chip",children:"pending approval"}),!!t.unread&&v.jsx("span",{className:"contact-unread",children:t.unread})]})]}),t.status==="pending"&&v.jsxs("span",{className:"pending-actions",role:"group","aria-label":`Decide whether to accept ${t.name}`,children:[v.jsx("button",{type:"button",className:"linkbtn",disabled:s,onClick:h=>void a(e.onApprove,h.currentTarget),children:"Approve"}),v.jsx("button",{type:"button",className:"linkbtn quiet",disabled:s,onClick:h=>void a(e.onReject,h.currentTarget),children:"Reject"})]}),n&&v.jsx(ss.span,{className:"contact-active-glow",layoutId:"active-contact",transition:yl})]}),f="contact-row"+(n?" active":"")+(i?" grouped":"")+(t.status==="pending"?" pending":"");return t.status==="pending"?v.jsx("div",{className:f,children:c}):v.jsx(ss.button,{type:"button",className:f,onClick:e.onClick,children:c})}function uz(e){const{contacts:t,roots:n,selected:i}=e,[s,l]=k.useState(""),a=k.useRef(null),c=k.useRef(null),[f,h]=k.useState(()=>iz()),m=L=>L.name.toLowerCase().includes(s.toLowerCase()),p=t.filter(L=>L.status!=="pending"&&m(L)),y=t.filter(L=>L.status==="pending"&&m(L)),w=Nd(p),S=az(p,n),C=p.length===0&&y.length===0,E=L=>{h(oz(L))},P=[{id:"recent",label:"Recent"},{id:"identity",label:"By identity"}],M=k.useRef(null),T=k.useRef({id:-1,x0:0,y0:0,mode:"idle"}),D=k.useRef(!1),U=(L,N)=>{const X=T.current;if(X.id!==L)return;const B=M.current;if(N&&X.mode==="drag"&&B){const fe=parseFloat(B.style.getPropertyValue("--mode-drag-x"))||0,Z=Math.max(0,(B.clientWidth-8)/2);E(fe>=Z/2?"identity":"recent"),D.current=!0,window.setTimeout(()=>{D.current=!1},0)}T.current={id:-1,x0:0,y0:0,mode:"idle"},B?.hasPointerCapture?.(L)&&B.releasePointerCapture(L),B?.classList.remove("dragging"),B?.style.removeProperty("--mode-drag-x")},j=L=>{!L.isPrimary||T.current.id!==-1||(T.current={id:L.pointerId,x0:L.clientX,y0:L.clientY,mode:"pending"})},Y=L=>{const N=T.current;if(N.id!==L.pointerId||N.mode==="idle")return;const X=L.clientX-N.x0,B=L.clientY-N.y0;if(N.mode==="pending"){if(Math.abs(X)<10&&Math.abs(B)<10)return;if(Math.abs(B)>Math.abs(X)){U(L.pointerId,!1);return}N.mode="drag",L.currentTarget.setPointerCapture?.(L.pointerId),L.currentTarget.classList.add("dragging")}L.preventDefault();const fe=Math.max(0,(L.currentTarget.clientWidth-8)/2),Z=f==="identity"?fe:0;L.currentTarget.style.setProperty("--mode-drag-x",`${Math.min(fe,Math.max(0,Z+X))}px`)},W=(L,N)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(L.key))return;L.preventDefault();const B=L.key==="Home"?"recent":L.key==="End"||N==="recent"?"identity":"recent";E(B),document.getElementById(`conversation-list-${B}`)?.focus()};return k.useLayoutEffect(()=>{const L=a.current,N=c.current;if(!L||!N)return;const X=()=>L.style.setProperty("--list-bottom-chrome-height",`${N.getBoundingClientRect().height}px`);X();const B=new ResizeObserver(X);return B.observe(N),()=>{B.disconnect(),L.style.removeProperty("--list-bottom-chrome-height")}},[]),v.jsxs("div",{className:"listcol",ref:a,children:[v.jsxs("div",{className:"listcol-head",children:[v.jsxs("div",{className:"listcol-titlebar",children:[v.jsxs("h2",{id:"chat-list-title",className:"listcol-title messenger-lockup",tabIndex:-1,children:[v.jsx("span",{className:"messenger-brand-ours",children:"Ours"}),v.jsx("span",{className:"messenger-brand-product",children:"messenger"})]}),v.jsxs("div",{className:"listcol-actions",children:[v.jsx("button",{className:"btn icon-btn desktop-invite","aria-label":"Invite",title:"Invite",onClick:e.onInvite,children:v.jsx(Ce,{name:"invite",size:18})}),v.jsx("button",{className:"icon-btn","aria-label":"Settings",title:"Settings",onClick:e.onSettings,children:v.jsx(Ce,{name:"settings",size:18})})]})]}),v.jsx("div",{ref:M,className:"conversation-list-modes",role:"tablist","aria-label":"Conversation list layout","data-mode":f,onPointerDown:j,onPointerMove:Y,onPointerUp:L=>U(L.pointerId,!0),onPointerCancel:L=>U(L.pointerId,!1),onLostPointerCapture:L=>U(L.pointerId,!1),children:P.map(L=>v.jsx("button",{id:`conversation-list-${L.id}`,type:"button",role:"tab","aria-selected":f===L.id,"aria-controls":"conversation-list-panel",tabIndex:f===L.id?0:-1,className:f===L.id?"active":"",onClick:N=>{if(D.current){N.preventDefault();return}E(L.id)},onKeyDown:N=>W(N,L.id),children:L.label},L.id))})]}),v.jsxs("div",{id:"conversation-list-panel",className:"listcol-scroll",role:"tabpanel","aria-labelledby":`conversation-list-${f}`,children:[f==="recent"&&w.length>0&&v.jsx("div",{className:"conversation-group",children:w.map(L=>v.jsx(Ef,{c:L,active:i===L.id,onClick:()=>e.onSelect(L.id)},L.id))}),f==="identity"&&S.map(L=>v.jsxs("div",{children:[v.jsxs("div",{className:"group-label",title:L.note,children:[L.rootId&&v.jsx(Ce,{name:"clusters"}),v.jsx("span",{children:L.label}),L.note&&v.jsxs("span",{className:"gl-note",children:["· ",L.note]})]}),v.jsx("div",{className:"conversation-group",children:L.contacts.map(N=>v.jsx(Ef,{c:N,grouped:L.rootId!==null,active:i===N.id,onClick:()=>e.onSelect(N.id)},N.id))})]},L.id)),y.length>0&&v.jsxs("div",{children:[v.jsx("div",{className:"group-label",children:v.jsx("span",{children:"Pending"})}),v.jsx("div",{className:"conversation-group",children:y.map(L=>v.jsx(Ef,{c:L,active:!1,onClick:()=>{},onApprove:()=>e.onApprovePending(L.id.slice(8)),onReject:()=>e.onRejectPending(L.id.slice(8))},L.id))})]}),C&&v.jsx("p",{className:"muted",style:{padding:"14px 10px",fontSize:"0.85rem"},children:"No contacts yet — share an invite to start."})]}),v.jsxs("div",{className:"list-bottom-chrome",ref:c,children:[v.jsxs("div",{className:"search adaptive-search",role:"search",children:[v.jsx("span",{className:"adaptive-search-icon","aria-hidden":!0,children:v.jsx(Ce,{name:"search"})}),v.jsx("input",{className:"field",placeholder:"Search people, agents, apps…",value:s,onChange:L=>l(L.target.value),onKeyDown:L=>{L.key==="Escape"&&(L.preventDefault(),l(""))}})]}),v.jsx("button",{type:"button",className:"icon-btn list-bottom-invite","aria-label":"Invite",title:"Invite",onClick:e.onInvite,children:v.jsx(Ce,{name:"invite",size:20})})]})]})}function cz(e){const[t,n]=k.useState(!1),[i,s]=k.useState(e.contact.name),[l,a]=k.useState(!1),[c,f]=k.useState(null),h=k.useRef(!1);k.useEffect(()=>{const p=y=>{y.key!=="Escape"||l||c||t||(y.preventDefault(),e.onBack())};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[t,c,e.onBack,l]);const m=()=>{if(h.current)return;h.current=!0;const p=i.trim();p&&p!==e.contact.name?e.onRename(p):s(e.contact.name),n(!1)};return v.jsxs("div",{className:"detail contact-screen",children:[v.jsxs("div",{className:"detail-head contact-screen-head",children:[v.jsx("button",{type:"button",className:"icon-btn detail-back contact-back","aria-label":"Back to conversation",onClick:e.onBack,children:v.jsx(Ce,{name:"back"})}),v.jsx("strong",{children:"Contact"})]}),v.jsxs("div",{className:"contact-screen-scroll",children:[v.jsxs("section",{className:"contact-hero","aria-labelledby":"contact-screen-name",children:[v.jsx("div",{className:"avatar accent contact-avatar-large","aria-hidden":!0,children:e.contact.initials}),t?v.jsx("input",{id:"contact-screen-name",className:"field contact-name-input",value:i,autoFocus:!0,onChange:p=>s(p.target.value),onBlur:m,onKeyDown:p=>{p.key==="Enter"&&m(),p.key==="Escape"&&(h.current=!0,s(e.contact.name),n(!1))}}):v.jsx("h2",{id:"contact-screen-name",children:e.contact.name}),v.jsxs("p",{children:[v.jsx(Ce,{name:"lock",size:13})," End-to-end encrypted connection"]})]}),v.jsxs("section",{className:"contact-action-group","aria-label":"Contact actions",children:[v.jsxs("button",{type:"button",onClick:()=>a(!0),children:[v.jsxs("span",{children:[v.jsx(Ce,{name:"paperclip"}),"Shared photos, files, and links"]}),v.jsx(Ce,{name:"chevron"})]}),v.jsxs("button",{type:"button",onClick:()=>{h.current=!1,s(e.contact.name),n(!0)},children:[v.jsxs("span",{children:[v.jsx(Ce,{name:"edit"}),"Rename contact"]}),v.jsx(Ce,{name:"chevron"})]})]}),v.jsxs("section",{className:"contact-identity","aria-labelledby":"contact-identity-title",children:[v.jsx("h3",{id:"contact-identity-title",children:"Verified identity"}),e.contact.roleId&&v.jsxs("p",{children:["Role ",v.jsx("strong",{children:e.contact.roleId})," of ",v.jsx("strong",{children:e.contact.rootName})]}),v.jsx("code",{children:e.contact.id}),v.jsxs("button",{type:"button",className:"btn sm",onClick:()=>void navigator.clipboard.writeText(e.contact.id),children:[v.jsx(Ce,{name:"copy",size:14}),"Copy identity"]})]}),v.jsxs("button",{type:"button",className:"contact-remove",onClick:e.onRemove,children:[v.jsx(Ce,{name:"trash"}),"Remove contact"]})]}),l&&v.jsx(IF,{messages:e.messages,indexOffset:e.indexOffset,onClose:()=>a(!1),onJump:e.onOpenMessage,onPreview:p=>{a(!1),f(p)}}),c&&(As(c.filename,c.mime)?v.jsx(Wk,{rec:c,onClose:()=>f(null)}):v.jsx(Uk,{rec:c,onClose:()=>f(null),onSendText:e.onSendText,onSendFile:e.onSendFile}))]})}const Sx=e=>`chat-message-${encodeURIComponent(e)}`,Qk=()=>typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;function bx(e){const{dir:t,canReply:n,onReply:i}=e,s=k.useRef(null),l=k.useRef(null),a=k.useRef(null),c=k.useRef(i);c.current=i;const f=t==="in"?1:-1,h=Yk,m=84,p=()=>({id:-1,x0:0,y0:0,mode:"idle",armed:!1,distance:0,samples:[]}),y=k.useRef(p()),w=M=>{const T=l.current,D=a.current,U=Qk();if(T&&(T.style.transform=M&&!U?`translateX(${M}px)`:""),D){const j=Math.min(1,Math.abs(M)/h);D.style.opacity=String(j),D.style.transform=U?"scale(1)":`scale(${.5+.5*j})`}},S=(M,T)=>{const D=y.current;if(D.id!==M)return;const U=T&&D.mode==="drag"&&rz(D.distance,D.samples);y.current=p(),l.current?.classList.remove("swiping"),a.current?.classList.remove("armed"),w(0);const j=s.current;j?.hasPointerCapture?.(M)&&j.releasePointerCapture(M),U&&c.current()};k.useEffect(()=>{const M=s.current;if(!M)return;const T=D=>S(D.pointerId,!1);return M.addEventListener("lostpointercapture",T),()=>{M.removeEventListener("lostpointercapture",T);const D=y.current.id;D!==-1&&S(D,!1)}},[]);const C=M=>{const T=M.target,D=window.getSelection?.();!n||!M.isPrimary||M.pointerType==="mouse"||M.pointerType==="pen"&&M.button!==0||y.current.id!==-1||D&&!D.isCollapsed||T.closest('a, button, input, textarea, select, [role="button"], audio, video, img, [draggable="true"], .filecard, .filecard-bubble, .image-bubble, .voice-bubble, .ours-message-file, .attachment')||(y.current={id:M.pointerId,x0:M.clientX,y0:M.clientY,mode:"maybe",armed:!1,distance:0,samples:[{x:M.clientX*f,time:M.timeStamp}]},w(0))},E=M=>{const T=y.current;if(T.id!==M.pointerId||T.mode==="idle")return;const D=M.clientX-T.x0,U=M.clientY-T.y0,j=window.getSelection?.();if(j&&!j.isCollapsed){S(M.pointerId,!1);return}if(T.mode==="maybe"){const X=tz(D*f,U);if(X==="pending")return;if(X==="drag")T.mode="drag",M.currentTarget.setPointerCapture?.(M.pointerId),l.current?.classList.add("swiping");else{T.mode="idle";return}}M.preventDefault();const Y=M.timeStamp;T.samples.push({x:M.clientX*f,time:Y}),T.samples=T.samples.filter(X=>Y-X.time<=120);let W=D*f;W<0&&(W=0),W>h&&(W=h+(W-h)*.35),W=Math.min(W,m),T.distance=W;const L=W*f,N=Math.abs(L)>=h;N!==T.armed&&(T.armed=N,a.current?.classList.toggle("armed",N),N&&navigator.vibrate?.(10)),w(L)},P=M=>{const T=y.current;T.id===M.pointerId&&T.mode==="drag"&&(T.samples.push({x:M.clientX*f,time:M.timeStamp}),T.distance=Math.max(0,(M.clientX-T.x0)*f),T.armed=T.distance>=h),S(M.pointerId,!0)};return v.jsxs("div",{ref:s,className:"msg-row "+(e.rowClass??t),style:n?{touchAction:"pan-y"}:void 0,onPointerDown:C,onPointerMove:E,onPointerUp:P,onPointerCancel:M=>S(M.pointerId,!1),onLostPointerCapture:M=>S(M.pointerId,!1),children:[n&&v.jsx("span",{className:"swipe-cue",ref:a,"aria-hidden":!0,children:v.jsx(Ce,{name:"reply",size:16})}),v.jsx("div",{className:"bubble-wrap",ref:l,children:e.children}),e.after]})}function fz(e){const{contact:t,messages:n}=e,[i,s]=k.useState(""),[l,a]=k.useState(!1),[c,f]=k.useState(null),[h,m]=k.useState(null),[p,y]=k.useState(null),[w,S]=k.useState(null),[C,E]=k.useState(null),[P,M]=k.useState(!1),[T,D]=k.useState(!1),[U,j]=k.useState(!1),[Y,W]=k.useState(null),L=k.useRef(null),N=k.useRef(null),X=QF(),B=k.useRef(null),fe=k.useRef(null),Z=k.useRef(null),te=k.useRef(!1),ge=k.useRef(null),Pe=k.useRef(!1),[Q,de]=k.useState(!1),[R,O]=k.useState(0),G=k.useRef(null),A=k.useRef(!0),ee=k.useRef(null),ye=k.useRef(0),ve=k.useRef(null),pe=k.useRef(new Map),Me=k.useRef(0),me=k.useRef(null),Oe=k.useRef(null),qe=k.useRef(0),ut=k.useRef(null);k.useLayoutEffect(()=>{const F=B.current,J=fe.current,we=Z.current;if(!F||!J||!we)return;let V=-1,ue=-1,ae=null;const he=()=>{const se=Math.round(J.getBoundingClientRect().height),De=Math.round(we.getBoundingClientRect().height);if(se!==V&&(V=se,F.style.setProperty("--conversation-head-height",`${se}px`)),De!==ue){const We=A.current;ue=De,F.style.setProperty("--conversation-compose-height",`${De}px`),We&&(ae!==null&&cancelAnimationFrame(ae),ae=requestAnimationFrame(()=>{ae=null;const gt=ge.current;gt&&A.current&&(gt.scrollTop=Math.max(0,gt.scrollHeight-gt.clientHeight))}))}};he();const Te=new ResizeObserver(he);return Te.observe(J),Te.observe(we),()=>{Te.disconnect(),ae!==null&&cancelAnimationFrame(ae),F.style.removeProperty("--conversation-head-height"),F.style.removeProperty("--conversation-compose-height")}},[t?.id]),k.useEffect(()=>{s(""),m(null),y(null),f(null),S(null),E(null),M(!1),D(!1),j(!1),ye.current+=1,W(null),pe.current.clear(),me.current=null,Oe.current=null},[t?.id]),k.useEffect(()=>{if(!p)return;const F=p.reply?.wireId;n.some(we=>we.kind!=="file"&&we.dir==="out"&&!!we.wireId&&!p.wireIds.has(we.wireId)&&we.text===p.text&&(we.replyTo?.wireId??void 0)===F)&&(y(null),m(null),s(we=>we===p.draft?"":we),S(we=>we===p.reply?null:we))},[n,p]);const mt=!!c?.wireId&&n.some(F=>F.wireId===c.wireId),Ve=k.useMemo(()=>c&&!mt?[...n,c.message]:n,[n,c,mt]);k.useEffect(()=>{mt&&f(null)},[mt]),k.useLayoutEffect(()=>{const F=N.current;if(!F)return;F.style.height="0px";const J=Math.max(44,Math.min(F.scrollHeight,132));F.style.height=`${J}px`,F.style.overflowY=F.scrollHeight>132?"auto":"hidden"},[i,t?.id]);const bt=F=>{const J=ge.current;if(!J)return;const we=Math.max(0,J.scrollHeight-J.clientHeight);if(Math.abs(J.scrollTop-we)<1){me.current=null,Oe.current=null;return}const V=F&&!Qk();me.current=V?we:null,Oe.current=V?J.scrollTop:null,V?J.scrollTo({top:we,behavior:"smooth"}):J.scrollTop=we},Rt=()=>{G.current===null&&(G.current=requestAnimationFrame(()=>{G.current=null;const F=ge.current;if(!F)return;const J=F.scrollHeight-F.clientHeight-F.scrollTop>48;de(J),J||O(0)}))};k.useLayoutEffect(()=>{if(!t){ee.current=null,A.current=!0,qe.current=0;return}const F=ge.current;if(!F)return;const J=ee.current!==t.id,we=qe.current,V=Ve.length!==we,ue=Ve.at(-1),ae=ue?ue.wireId||`${ue.date}:${ue.text}`:null,he=ut.current;if(qe.current=Ve.length,ut.current=ae,!J&&!V&&me.current===null&&(A.current=F.scrollHeight-F.clientHeight-F.scrollTop<=48),J||A.current)bt(V&&!J&&ee.current!==null),A.current=!0;else if(V&&Ve.length>we&&ae!==he){const Te=he===null?-1:Ve.findIndex(se=>(se.wireId||`${se.date}:${se.text}`)===he);O(se=>se+Math.max(1,Ve.length-Math.max(0,Te+1)))}ee.current=t.id,Rt()},[t,Ve.length]),k.useLayoutEffect(()=>{if(Pe.current||!e.unreadOpen||window.location.hash.startsWith("#chat-message-"))return;const F=ge.current,J=document.getElementById(`unread-${Sx(e.unreadOpen.wireId)}`);!F||!J||(F.scrollTop=Math.max(0,J.offsetTop-16),A.current=!1,Pe.current=!0,Rt())},[e.unreadOpen,Ve.length]),k.useLayoutEffect(()=>{const F=window.location.hash;if(!F.startsWith("#chat-message-"))return;const J=document.getElementById(F.slice(1));J&&(J.scrollIntoView({block:"center"}),A.current=!1)},[t?.id,Ve.length]),k.useLayoutEffect(()=>{const F=ve.current,J=ge.current;if(F===null||!J)return;const we=requestAnimationFrame(()=>{ve.current===F&&(J.scrollTop=F.top+J.scrollHeight-F.height,ve.current=null)});return()=>cancelAnimationFrame(we)},[Ve.length]),k.useEffect(()=>{const F=ge.current;if(!F||typeof ResizeObserver>"u")return;const J=F.firstElementChild;if(!J)return;const we=new ResizeObserver(()=>{A.current&&bt(me.current!==null),Rt()});return we.observe(J),we.observe(F),()=>{we.disconnect(),G.current!==null&&cancelAnimationFrame(G.current)}},[t?.id]);const it=async F=>{const J=++ye.current;m(null),j(!0);try{if(F.size>ts&&Kk(F.type,F.name)){const V=await WF(F,ts);if(J!==ye.current)return;E({filename:V.filename,mime:V.mime,bytes:V.bytes,originalSize:V.originalSize});return}if(F.size>ts){m(`"${F.name}" is ${Fr(F.size)} — files up to ${Fr(ts)} can be sent.`);return}const we=await F.arrayBuffer();if(J!==ye.current)return;E({filename:F.name||"file",mime:F.type||"application/octet-stream",bytes:new Uint8Array(we)})}catch(we){J===ye.current&&m(`Photo optimization failed: ${we instanceof Error?we.message:String(we)}`)}finally{J===ye.current&&j(!1)}},Bt=()=>{!C||!e.onSendFile||T||(D(!0),e.onSendFile(C,w?.wireId).then(()=>{E(null),S(null)}).catch(F=>m(`File send failed: ${String(F)} — it was not delivered.`)).finally(()=>D(!1)))},rn=e.onDraftChange;k.useEffect(()=>(rn?.(i.trim().length>0||l),()=>rn?.(!1)),[i,l,rn]);const Mt=new Map;for(const F of Ve)F.wireId&&Mt.set(F.wireId,F);const on=k.useMemo(()=>{const F=new Map;for(const J of Ve)F.set(J,J.kind==="file"?null:J.dir==="in"?v2(t?.announcedName??"",J.text):null);return F},[Ve,t?.announcedName]),hn=F=>on.get(F)??null,Be=F=>{if(F.dir==="out")return"You";const J=hn(F);return J&&J.variant==="chat"?J.author:t?.name??"Them"},Gn=F=>{if(F.kind==="file")return F.mime?.startsWith("image/")?"Photo":eo(F.mime??"",F.filename??"")?"Voice message":F.filename||"File";const J=hn(F);return J?J.text||E2(J):F.text},Qn=F=>{if(!F.replyTo)return null;const J=Mt.get(F.replyTo.wireId);return J?{author:Be(J),text:Gn(J)}:{author:"",text:"Original message"}};if(!t)return e.emptyOverride?v.jsx(v.Fragment,{children:e.emptyOverride}):v.jsx("div",{className:"detail",children:v.jsxs("div",{className:"detail-empty",children:[v.jsx(Ce,{name:"chat"}),v.jsxs("div",{children:[v.jsx("div",{style:{fontWeight:650,color:"var(--text-2)"},children:"Select a conversation"}),v.jsx("div",{style:{fontSize:"0.85rem"},children:"Chat with people, agents and apps across ours."})]})]})});const q=async()=>{const F=i,J=F.trim(),we=!!p&&F===p.draft&&(w?.wireId??void 0)===p.reply?.wireId;if(!J||te.current||we)return;p&&y(null),te.current=!0,a(!0),m(null);const V=w,ue=V?.wireId,ae=new AbortController;let he=!1,Te=0;s(""),S(null);const se=`optimistic-${++Me.current}`;f({key:se,wireId:null,message:{dir:"out",text:J,date:new Date().toISOString(),read:!0,wireId:"",replyTo:ue?{wireId:ue}:null}});try{const De=await Promise.race([e.onSend(J,ue,ae.signal),new Promise((We,gt)=>{Te=window.setTimeout(()=>{he=!0,ae.abort(),gt(new Error("send timeout"))},lz)})]);De?(pe.current.set(De,se),f(We=>We?.key===se?{...We,wireId:De}:We)):f(We=>We?.key===se?null:We),y(null)}catch(De){f(null),s(We=>We===""?F:We),S(We=>We===null?V:We),he||!(De instanceof Qf)?(y({draft:F,text:J,reply:V,wireIds:new Set(n.flatMap(We=>We.wireId?[We.wireId]:[]))}),m(`${he?"Send timed out":"Send connection was interrupted"} — delivery status is unknown. Check the conversation; edit the draft before sending again.`)):m(`Send failed: ${String(De)} — the message was not delivered.`)}finally{window.clearTimeout(Te),te.current=!1,a(!1)}},oe=!!p&&i===p.draft&&(w?.wireId??void 0)===p.reply?.wireId,Ae=F=>{F.wireId&&S({wireId:F.wireId,author:Be(F),text:Gn(F)})};return v.jsxs("div",{className:"detail detail-chat",ref:B,children:[v.jsx("div",{className:"detail-head",ref:fe,children:v.jsxs("div",{className:"conv-peer",children:[v.jsx("button",{className:"icon-btn detail-back","aria-label":"Back to conversations",onClick:e.onBack,children:v.jsx(Ce,{name:"back"})}),v.jsxs("div",{className:"conv-peer-status",children:[v.jsx("span",{className:"conv-peer-name",children:t.name}),e.syncing&&v.jsxs("div",{className:"conv-sync",role:"status","aria-live":"polite",children:[v.jsx("span",{className:"conv-sync-dot","aria-hidden":!0}),e.syncing==="connecting"?"Connecting…":"Updating…"]}),!e.syncing&&v.jsxs("span",{className:"conv-contact-status",children:[v.jsx(Ce,{name:"lock",size:11}),"Encrypted connection"]})]}),v.jsx("button",{type:"button",className:"conv-contact-trigger conv-contact-avatar","data-contact-trigger":!0,onClick:e.onOpenContact,disabled:!e.onOpenContact,"aria-label":`Open contact details for ${t.name}`,children:v.jsx("span",{className:"conv-contact-initials","aria-hidden":!0,children:t.initials})})]})}),v.jsx("div",{className:"messages",ref:ge,tabIndex:-1,"aria-label":"Conversation timeline",onScroll:F=>{const J=F.currentTarget,we=J.scrollHeight-J.clientHeight-J.scrollTop;if(me.current!==null){const V=Oe.current;if(V===null||J.scrollTop>=V-1){Oe.current=J.scrollTop,we<=4&&(me.current=null,Oe.current=null);return}me.current=null,Oe.current=null}A.current=we<=48,Rt()},onPointerDown:()=>{me.current=null,Oe.current=null},onTouchStart:()=>{me.current=null,Oe.current=null},onWheel:()=>{me.current=null,Oe.current=null},onDragOver:F=>{e.onSendFile&&F.preventDefault()},onDrop:F=>{if(!e.onSendFile)return;F.preventDefault();const J=F.dataTransfer.files?.[0];J&&it(J)},children:v.jsxs("div",{className:"messages-inner",children:[v.jsxs("div",{className:"e2e-note",children:[v.jsx(Ce,{name:"lock"}),"End-to-end encrypted · the broker only sees ciphertext"]}),(e.hiddenEarlier??0)>0&&e.onLoadEarlier&&v.jsxs("button",{className:"btn sm chat-load-earlier",onClick:()=>{A.current=!1;const F=ge.current;ve.current=F?{height:F.scrollHeight,top:F.scrollTop}:null,e.onLoadEarlier?.()},children:["Load earlier messages (",e.hiddenEarlier," remaining)"]}),v.jsx(XT,{initial:!1,children:Ve.map((F,J)=>{const we=F===c?.message?c.key:F.wireId&&pe.current.get(F.wireId)||F.wireId||`${F.date}-${(e.hiddenEarlier??0)+J}`,V=Sx(F.wireId||we),ue=Ve[J-1],ae=Ve[J+1],he=hn(F),Te=Ge=>{if(!Ge)return null;const Dt=hn(Ge);return Dt?Dt.variant==="system"?"room:system":`room:chat:${Dt.author}${Dt.role}`:Ge.dir},se=Te(F),De=!!ue&&Te(ue)===se&&se!=="room:system",We=!!ae&&Te(ae)===se&&se!=="room:system",gt=(F.dir==="out"?"out":"in")+(De?" cont-top":"")+(We?" cont-bot":""),ct=F.wireId?v.jsx("button",{className:"msg-reply",title:"Reply",onClick:()=>Ae(F),children:v.jsx(Ce,{name:"reply",size:15})}):null;if(he&&he.variant==="system"){const Ge=he.presentation??"system";return v.jsxs(ss.div,{className:"message-motion",id:V,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:yl,children:[F.wireId===e.unreadOpen?.wireId&&v.jsx("div",{id:`unread-${V}`,className:"unread-divider",role:"separator",children:v.jsx("span",{children:"Unread messages"})}),v.jsxs("div",{className:`room-system room-${Ge}-card`,role:"note",children:[he.label&&v.jsx("span",{className:"room-system-label",children:he.label}),he.roomName&&v.jsx("strong",{className:"room-card-name",children:he.roomName}),v.jsx(vx,{text:he.text,className:"room-system-text message-markdown"}),!!he.details?.length&&v.jsx("ul",{className:"room-card-details","aria-label":"Room event details",children:he.details.map(Dt=>v.jsx("li",{children:Dt},Dt))}),v.jsxs("span",{className:"room-card-provenance",children:[he.authoredBy&&v.jsx("span",{className:"room-card-author",children:he.authoredBy}),v.jsx("span",{className:"room-system-at",children:ys(he.authoredAt||F.date)})]})]})]},we)}if(F.kind==="file"){const Ge=C0(F.wireId)??{id:F.wireId,dir:F.dir,filename:F.filename??"file",mime:F.mime??"application/octet-stream",size:0,date:F.date};return v.jsxs(ss.div,{className:"message-motion",id:V,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:yl,children:[F.wireId===e.unreadOpen?.wireId&&v.jsx("div",{id:`unread-${V}`,className:"unread-divider",role:"separator",children:v.jsx("span",{children:"Unread messages"})}),v.jsx(bx,{dir:F.dir==="out"?"out":"in",rowClass:gt,canReply:!!F.wireId,onReply:()=>Ae(F),after:ct,children:v.jsx("div",{className:`ours-message ours-message-file ours-message--${F.dir}`,children:v.jsx(ED,{rec:Ge,receipt:F.receipt,receiptless:F.receiptless,onPreview:W,onFetch:e.onFetchFile})})})]},we)}const ot=Qn(F);return v.jsxs(ss.div,{className:"message-motion",id:V,initial:{opacity:0,y:12,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.98},transition:yl,children:[F.wireId===e.unreadOpen?.wireId&&v.jsx("div",{id:`unread-${V}`,className:"unread-divider",role:"separator",children:v.jsx("span",{children:"Unread messages"})}),v.jsx(bx,{dir:F.dir==="out"?"out":"in",rowClass:gt,canReply:!!F.wireId,onReply:()=>Ae(F),after:ct,children:v.jsxs("div",{className:`ours-message ours-message--${F.dir}`,children:[ot&&v.jsxs("div",{className:"quote",children:[ot.author&&v.jsx("span",{className:"quote-author",children:ot.author}),v.jsx("span",{className:"quote-text",children:ot.text})]}),he&&!De&&v.jsxs(v.Fragment,{children:[he.roomName&&v.jsx("div",{className:"room-message-room",children:he.roomName}),v.jsxs("div",{className:"room-author",children:[v.jsx("span",{className:"room-author-name",children:he.author}),he.role&&v.jsx("span",{className:"room-author-role",children:he.role})]})]}),v.jsx(vx,{text:he?he.text:F.text}),v.jsxs("div",{className:"bubble-at",children:[ys(he?.authoredAt||F.date),F.dir==="out"&&v.jsx(E0,{receipt:F.receipt,receiptless:F.receiptless})]})]})})]},we)})}),v.jsx("div",{className:"thread-end","aria-hidden":!0})]})},t.id),Q&&v.jsxs("button",{type:"button",className:"jump-latest btn sm","aria-label":R?`Jump to latest, ${R} new messages`:"Jump to latest",onClick:F=>{const J=F.currentTarget===document.activeElement;O(0),bt(!0),J&&requestAnimationFrame(()=>ge.current?.focus({preventScroll:!0}))},children:[v.jsx("span",{children:"Jump to latest"}),!!R&&v.jsx("span",{className:"jump-latest-count","aria-live":"polite",children:R})]}),h&&v.jsxs("div",{className:"banner error",role:"alert",children:[h,h.startsWith("Send failed:")&&v.jsx("span",{className:"banner-actions",children:v.jsx("button",{className:"linkbtn",onClick:()=>void q(),children:"retry"})})]}),v.jsxs("div",{className:"composer-wrap",ref:Z,children:[w&&v.jsxs("div",{className:"reply-bar",children:[v.jsx("div",{className:"reply-bar-line"}),v.jsxs("div",{className:"reply-bar-body",children:[v.jsxs("div",{className:"reply-bar-author",children:["Replying to ",w.author]}),v.jsx("div",{className:"reply-bar-text",children:w.text})]}),v.jsx("button",{className:"icon-btn",title:"Cancel reply",onClick:()=>S(null),children:v.jsx(Ce,{name:"close",size:16})})]}),C&&v.jsx(S1,{att:C,sending:T,onSend:Bt,onDiscard:()=>E(null)}),U&&v.jsx("div",{className:"attachment-processing",role:"status",children:"Optimizing photo for secure delivery…"}),v.jsxs("div",{className:"composer"+(P?" recording":""),children:[e.onSendFile&&v.jsxs(v.Fragment,{children:[v.jsx("input",{ref:L,type:"file",style:{display:"none"},onChange:F=>{const J=F.target.files?.[0];J&&it(J),F.target.value=""}}),v.jsx("button",{className:"icon-btn composer-tool",title:"Attach a file or photo",disabled:T||U||P,onClick:()=>L.current?.click(),children:v.jsx(Ce,{name:"paperclip",size:18})})]}),X?v.jsx(ZF,{ref:N,value:i,placeholder:(w?"Reply to "+w.author:"Message "+t.name)+"…",busy:l,onChange:s,onSend:()=>void q()}):v.jsx("textarea",{ref:N,className:"field",rows:1,placeholder:(w?"Reply to "+w.author:"Message "+t.name)+"…",value:i,"aria-busy":l,onChange:F=>s(F.target.value),onKeyDown:F=>{F.key==="Enter"?!(window.matchMedia("(pointer: coarse)").matches||window.innerWidth<=860)&&!F.shiftKey&&(F.preventDefault(),q()):F.key==="Escape"&&S(null)}}),e.onSendFile&&!i.trim()&&!C&&!U&&!T?v.jsx(b1,{disabled:T||U||!!C,onReady:F=>{M(!1),E(F)},onError:F=>{M(!1),m(F)},onActiveChange:M},t.id):v.jsxs("button",{className:"btn primary","aria-label":"Send",onPointerDown:F=>{F.button===0&&document.activeElement===N.current&&F.preventDefault()},onClick:()=>void q(),disabled:l||oe||!i.trim(),title:oe?"Delivery status unknown — edit before sending again":void 0,children:[v.jsx(Ce,{name:"send",size:16}),v.jsx("span",{className:"btn-label",children:"Send"})]})]})]}),Y&&(As(Y.filename,Y.mime)?v.jsx(Wk,{rec:Y,onClose:()=>W(null)}):v.jsx(Uk,{rec:Y,onClose:()=>W(null),onSendText:e.onSend,onSendFile:e.onSendFile}))]})}const Zk=3;function dz(e,t,n=Zk){return[t,...e.filter(i=>i.cid!==t.cid)].slice(0,n)}function hz(e,t){return e.filter(n=>n.id!==t)}const pz=6e3,mz=dz,gz=hz;function yz(){const[e,t]=k.useState([]),n=k.useRef(0),i=k.useCallback((a,c,f)=>{const h=Date.now(),m={id:`${a}:${h}:${n.current++}`,cid:a,name:c,preview:"",at:h};t(p=>mz(p,m,Zk))},[]),s=k.useCallback(a=>t(c=>gz(c,a)),[]),l=k.useCallback(a=>t(c=>c.filter(f=>f.cid!==a)),[]);return{toasts:e,push:i,dismiss:s,clear:l}}function vz(e){const{item:t,onOpen:n,onDismiss:i}=e,[s,l]=k.useState(!1),[a,c]=k.useState(!1),f=s||a;return k.useEffect(()=>{if(f)return;const h=setTimeout(()=>i(t.id),pz);return()=>clearTimeout(h)},[t.id,f,i]),v.jsxs("div",{className:"banner msg",role:"status",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onFocus:()=>c(!0),onBlur:h=>{h.currentTarget.contains(h.relatedTarget)||c(!1)},children:[v.jsxs("button",{className:"msg-open",title:`Open the conversation with ${t.name}`,onClick:()=>n(t.cid),children:[v.jsx("span",{className:"avatar sm accent","aria-hidden":"true",children:rd(t.name)}),v.jsxs("span",{className:"msg-text",children:[v.jsx("strong",{className:"msg-name",children:t.name}),v.jsx("span",{className:"msg-preview",children:t.preview||"New message"})]})]}),v.jsx("button",{className:"icon-btn msg-close",title:"Dismiss","aria-label":`Dismiss the notification from ${t.name}`,onClick:()=>i(t.id),children:v.jsx(Ce,{name:"close",size:15})})]})}function xz(e){return v.jsx(v.Fragment,{children:e.items.map(t=>v.jsx(vz,{item:t,onOpen:e.onOpen,onDismiss:e.onDismiss},t.id))})}function wz(e){const t=k.useRef(null),{text:n,size:i=240}=e;return k.useEffect(()=>{if(!t.current||!n)return;const s=t.current;Ch(()=>import("./browser-ZTwkz1ke.js").then(l=>l.b),[]).then(l=>{l.toCanvas(s,n,{width:i,margin:2,errorCorrectionLevel:"M",color:{dark:"#000000",light:"#ffffff"}})})},[n,i]),v.jsx("div",{style:{display:"flex",justifyContent:"center",margin:"8px 0"},children:v.jsx("canvas",{ref:t,"data-testid":"qr-canvas","data-invite":n,width:i,height:i,style:{borderRadius:8,border:"1px solid var(--line)",imageRendering:"pixelated"}})})}function kz(e){const t=k.useRef(null),n=k.useRef(null),i=k.useRef(null),s=k.useRef(0),l=k.useRef(!0),[a,c]=k.useState("requesting"),[f,h]=k.useState(""),m=k.useCallback(()=>{s.current&&cancelAnimationFrame(s.current),i.current&&(i.current.getTracks().forEach(w=>w.stop()),i.current=null),t.current&&(t.current.srcObject=null)},[]),p=k.useCallback(w=>{i.current=w;const S=t.current;S.srcObject=w,S.setAttribute("playsinline","true"),S.play();const C=n.current,E=C.getContext("2d"),P=()=>{if(l.current)if(S.readyState>=S.HAVE_ENOUGH_DATA){const M=S.videoWidth||320,T=S.videoHeight||240;C.width=M,C.height=T,E.drawImage(S,0,0,M,T);const D=E.getImageData(0,0,M,T);Ch(()=>import("./jsQR-C3ibzKCu.js").then(U=>U.j),[]).then(U=>{const j=U.default,Y=j(D.data,D.width,D.height,{inversionAttempts:"dontInvert"});if(Y&&Y.data&&l.current){m(),e.onDecode(Y.data);return}l.current&&(s.current=requestAnimationFrame(P))})}else s.current=requestAnimationFrame(P)};s.current=requestAnimationFrame(P)},[m,e]);k.useEffect(()=>{if(l.current=!0,!navigator.mediaDevices?.getUserMedia){c("nocamera");return}return navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}}).then(w=>{if(!l.current){w.getTracks().forEach(S=>S.stop());return}c("scanning"),p(w)}).catch(w=>{if(!l.current)return;const S=w.name??"";S==="NotAllowedError"||S==="PermissionDeniedError"?c("denied"):S==="NotFoundError"||S==="DevicesNotFoundError"?c("nocamera"):(c("error"),h(w.message??String(w)))}),()=>{l.current=!1,m()}},[]);const y=()=>{m(),e.onClose()};return v.jsxs("div",{"data-testid":"qr-scanner",style:{display:"flex",flexDirection:"column",gap:12,padding:"12px 0"},children:[(a==="requesting"||a==="scanning")&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:a==="requesting"?"Requesting camera…":"Point your camera at the QR code."}),v.jsxs("div",{style:{position:"relative",borderRadius:8,overflow:"hidden",background:"#000",minHeight:200},children:[v.jsx("canvas",{ref:n,"data-testid":"scanner-canvas",style:{display:"none"}}),v.jsx("video",{ref:t,"data-testid":"scanner-video",muted:!0,playsInline:!0,style:{width:"100%",display:"block",borderRadius:8}}),a==="scanning"&&v.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx("div",{style:{width:160,height:160,borderRadius:12,border:"2px solid var(--accent)",boxShadow:"0 0 0 9999px rgba(0,0,0,0.4)"}})})]})]}),a==="denied"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[v.jsx(Ce,{name:"shield",size:16}),v.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"Camera access denied"})]}),v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"Camera permission was denied. To scan QR codes, allow camera access in your browser settings, then try again. Or paste the invite text below instead."})]}),a==="nocamera"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,color:"var(--text-2)"},children:[v.jsx(Ce,{name:"close",size:16}),v.jsx("span",{style:{fontWeight:600,fontSize:"0.9rem"},children:"No camera available"})]}),v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.88rem"},children:"No camera was found on this device. Paste the invite text below instead."})]}),a==="error"&&v.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:v.jsxs("p",{style:{margin:0,fontSize:"0.85rem",color:"var(--danger, #e53)"},children:["Camera error: ",f||"unknown error",". Paste the invite text below instead."]})}),v.jsx("button",{className:"btn",style:{justifyContent:"center"},onClick:y,children:a==="scanning"?v.jsxs(v.Fragment,{children:[v.jsx(Ce,{name:"close",size:14}),"Cancel scan"]}):v.jsxs(v.Fragment,{children:[v.jsx(Ce,{name:"close",size:14}),"Close scanner"]})})]})}function Sz(e){const[t,n]=k.useState("generate"),[i,s]=k.useState("one_time"),[l,a]=k.useState(""),[c,f]=k.useState(null),[h,m]=k.useState("one_time"),[p,y]=k.useState(""),[w,S]=k.useState(""),[C,E]=k.useState(!1),[P,M]=k.useState(null),[T,D]=k.useState(null),[U,j]=k.useState(!1),[Y,W]=k.useState(null),L=k.useRef(!1),N=async()=>{if(!L.current){L.current=!0,E(!0),D(null),M(null);try{m(i),f(await e.onCreate(i,i==="one_time"&&l.trim()||void 0))}catch(B){D(B instanceof Error?B.message:String(B))}finally{L.current=!1,E(!1)}}},X=v.jsx(Hk,{className:"modal-tabs",label:"Invite mode",options:[{id:"generate",label:"Generate invite"},{id:"accept",label:"Accept invite"}],value:t,onChange:n,idPrefix:"invite-tab",panelId:"invite-panel"});return v.jsx(Ds,{title:t==="generate"?"Invite a contact":"Accept an invite",onClose:()=>{L.current||e.onClose()},tabs:X,children:v.jsxs("div",{id:"invite-panel",role:"tabpanel","aria-labelledby":`invite-tab-${t}`,children:[t==="generate"&&!c&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:13},children:[v.jsxs("p",{className:"muted","data-testid":"invite-identity",style:{margin:0,fontSize:"0.85rem"},children:["Creating as ",v.jsx("strong",{children:e.identity.name})," · ",v.jsxs("span",{className:"mono",children:["@",S0(e.identity.cid)]})]}),v.jsxs("div",{role:"radiogroup","aria-label":"Invite kind",style:{display:"flex",flexDirection:"column",gap:7},children:[v.jsxs("label",{children:[v.jsx("input",{type:"radio",name:"invite-kind",checked:i==="one_time",onChange:()=>s("one_time")})," One person (one time)"]}),v.jsxs("label",{children:[v.jsx("input",{type:"radio",name:"invite-kind",checked:i==="public",onChange:()=>s("public")})," Reusable public invite"]})]}),i==="one_time"?v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted",style:{margin:0,fontSize:"0.9rem"},children:"Optionally name the person or agent this invite is for."}),v.jsx("input",{className:"field",value:l,onChange:B=>a(B.target.value),placeholder:"Their name (optional), e.g. Bob",maxLength:64})]}):v.jsx("p",{className:"onb-warning","data-testid":"public-invite-warning",style:{margin:0,fontSize:"0.9rem"},children:"Anyone with this invite can connect until you revoke it. It has no expiry and stays valid across server restarts."}),v.jsx("button",{className:"btn primary",style:{justifyContent:"center"},disabled:C,onClick:()=>void N(),children:C?"Generating…":i==="public"?"Create public invite":"Generate invite"}),i==="public"&&v.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[v.jsx("h4",{style:{margin:0,fontSize:"0.9rem"},children:"Active reusable invites"}),e.invites.filter(B=>B.mode==="public").length===0&&v.jsx("p",{className:"muted",style:{margin:0},children:"None right now."}),e.invites.filter(B=>B.mode==="public").map(B=>v.jsxs("div",{"data-testid":"public-invite-row",style:{padding:"8px 10px",background:"var(--inset)",borderRadius:7},children:[v.jsx("span",{className:"mono",children:B.invite_id}),v.jsxs("p",{className:"muted",children:["Created ",B.created?M2(B.created):"unknown"," · Active until revoked · No expiry"]}),Y===B.invite_id?v.jsxs("span",{children:[v.jsx("button",{className:"btn sm danger",onClick:()=>void e.onRevoke(B.invite_id).then(()=>(W(null),e.onRefresh())).catch(fe=>D(String(fe))),children:"Confirm revoke"})," ",v.jsx("button",{className:"btn sm",onClick:()=>W(null),children:"Keep it"})]}):v.jsx("button",{className:"btn sm",onClick:()=>W(B.invite_id),children:"Revoke"})]},B.invite_id))]}),P&&v.jsx("p",{className:"muted",children:P}),T&&v.jsx("p",{className:"onb-error",children:T})]}),t==="generate"&&c&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"muted","data-testid":h==="public"?"public-result-note":void 0,children:h==="public"?"Shown only on this screen. Copy it now; the text cannot be recovered later. The invite stays active until revoked.":`Send this invite to ${l.trim()||"your contact"}. It can be redeemed once.`}),v.jsx("textarea",{className:"field mono","data-testid":"invite-result-text",readOnly:!0,rows:5,value:c,onFocus:B=>B.currentTarget.select()}),h==="one_time"&&v.jsx(wz,{text:c}),v.jsxs("button",{className:"btn primary",onClick:()=>void navigator.clipboard.writeText(c).then(()=>M("Copied to clipboard.")),children:[v.jsx(Ce,{name:"copy",size:15}),"Copy invite"]}),h==="public"&&v.jsx("button",{className:"btn","data-testid":"done-hide-invite",onClick:()=>{f(null),a(""),e.onRefresh()},children:"Done — hide invite"}),P&&v.jsx("p",{className:"muted",children:P})]}),t==="accept"&&v.jsxs("form",{style:{display:"flex",flexDirection:"column",gap:13},onSubmit:B=>{B.preventDefault(),!(!p.trim()||C)&&(E(!0),D(null),e.onAccept(p.trim(),w.trim()||void 0).then(()=>{M("Invite accepted — the contact will appear once the sender verifies your identity."),y(""),S("")}).catch(fe=>D(String(fe))).finally(()=>E(!1)))},children:[v.jsx("p",{className:"muted",children:"Paste the invite you received, or scan a QR code."}),U?v.jsx(kz,{onDecode:B=>{y(B),j(!1)},onClose:()=>j(!1)}):v.jsxs("button",{type:"button",className:"btn",onClick:()=>j(!0),children:[v.jsx(Ce,{name:"monitor",size:15}),"Scan QR code"]}),v.jsx("textarea",{className:"field mono","aria-label":"Invite",rows:5,value:p,onChange:B=>y(B.target.value),placeholder:"Paste invite text…"}),v.jsx("input",{className:"field",value:w,onChange:B=>S(B.target.value),placeholder:"Rename them (optional)",maxLength:64}),v.jsx("button",{className:"btn primary",type:"submit",disabled:C||!p.trim(),children:C?"Connecting…":"Add contact"}),P&&v.jsx("p",{className:"muted",children:P}),T&&v.jsx("p",{className:"onb-error",children:T})]})]})})}function bz(e){const[t,n]=k.useState(e.identity.bio??""),[i,s]=k.useState(!1),[l,a]=k.useState(null),[c,f]=k.useState(e.push.preview),h=wM(),m=!e.workerSupported||e.push.status==="unsupported"?h??"Unavailable — requires a secure browser with service-worker support.":e.push.status==="needs-permission"?h??"Needs permission — allow notifications, then choose Enable or Repair.":e.push.status==="on"?"On — this browser and the server agree on the current Web Push configuration.":e.push.status==="repairing"?"Repairing — checking the browser subscription and server acknowledgement…":e.push.status==="error"?"Repair needed — the browser and server could not confirm the same subscription.":"Off — enable notifications for this browser.";return v.jsxs(Ds,{title:"Settings",onClose:e.onClose,wide:!0,children:[v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Display name"}),v.jsx("input",{className:"field",readOnly:!0,value:e.identity.name})]}),v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Your address"}),v.jsx("input",{className:"field mono",readOnly:!0,value:e.identity.cid,onFocus:p=>p.currentTarget.select()}),v.jsx("p",{className:"muted",children:"Your public address on ours. Share an invite to connect more easily."})]}),v.jsxs("div",{children:[v.jsx("span",{className:"lbl",children:"Public bio"}),v.jsx("textarea",{className:"field",rows:3,value:t,onChange:p=>{n(p.target.value),s(!1),a(null)}}),v.jsx("button",{className:"btn sm",onClick:()=>{a(null),e.onSaveBio(t).then(()=>s(!0)).catch(p=>a(String(p)))},children:i?"Saved":"Save bio"}),l&&v.jsx("p",{className:"onb-error",children:l})]}),v.jsxs("label",{style:{display:"flex",gap:9},children:[v.jsx("input",{type:"checkbox",checked:e.dark,onChange:e.onToggleDark})," Dark mode"]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"Notifications"}),v.jsx("p",{className:e.push.status==="needs-permission"||e.push.status==="error"?"onb-error":"muted",children:m}),h&&h!==m&&v.jsx("p",{className:"muted","data-testid":"push-platform-guidance",children:h}),v.jsxs("fieldset",{style:{border:0,padding:0,margin:"12px 0"},children:[v.jsx("legend",{className:"lbl",children:"Lock-screen preview"}),v.jsxs("label",{style:{display:"block",marginTop:7},children:[v.jsx("input",{type:"radio",name:"push-preview",checked:c==="full",onChange:()=>f("full")})," Full — sender and message text or filename"]}),v.jsxs("label",{style:{display:"block",marginTop:7},children:[v.jsx("input",{type:"radio",name:"push-preview",checked:c==="private",onChange:()=>f("private")})," Private — generic content only"]})]}),v.jsx("p",{className:"muted",children:"Full previews can expose sender names, message text, and filenames on the lock screen. The push provider still sees delivery endpoint, timing, and payload size metadata in either mode."}),v.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:e.push.status==="on"?v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("disable",c),children:"Disable notifications"}),v.jsx("button",{className:"btn",disabled:e.busy,onClick:()=>void e.onPushAction("repair",c),children:"Repair"}),c!==e.push.preview&&v.jsx("button",{className:"btn primary",disabled:e.busy,onClick:()=>void e.onPushAction("enable",c),children:"Save preview"})]}):v.jsx("button",{className:"btn primary",disabled:e.busy||!e.workerSupported||e.push.status==="unsupported",onClick:()=>void e.onPushAction(e.push.status==="error"||e.push.blocked?"repair":"enable",c),children:e.busy?"Repairing…":e.push.status==="error"||e.push.blocked?"Repair":"Enable notifications"})})]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"App status"}),v.jsx("p",{className:"muted",children:e.offline?"Offline — reconnecting. Message and identity data are never cached.":"Online."}),e.onInstall&&v.jsx("button",{className:"btn",onClick:e.onInstall,children:"Install app"}),e.updateAvailable&&v.jsx("button",{className:"btn primary",onClick:e.onReloadUpdate,children:"Reload to update"})]}),v.jsxs("div",{style:{borderTop:"1px solid var(--line)",paddingTop:16},children:[v.jsx("h4",{children:"Build"}),v.jsx("input",{className:"field mono",readOnly:!0,value:e.build?`${e.build.version} · ${e.build.sha}`:"Loading…"})]})]})}function Cz(e,t,n,i,s=6e4){return!t||!t.sha?"current":t.sha===e?(n.remoteSha=null,n.firstMismatchAt=null,"current"):(n.remoteSha=t.sha,(n.firstMismatchAt===null||n.firstMismatchAt===void 0)&&(n.firstMismatchAt=i),n.controllerChanged?"newer-available":i-n.firstMismatchAt>=s?"stuck":"newer-available")}const Ez="70c833a0c5219f7b32407c46aa56efdc76e78ed3",Pz=15*6e4,Tz=6e4,Rz=Cz;async function Mz(){try{const e=await fetch("/version.json",{cache:"no-store"});return e.ok?await e.json():null}catch{return null}}function Az(e){const t={remoteSha:null,firstMismatchAt:null,controllerChanged:!1},n=()=>{t.controllerChanged=!0};navigator.serviceWorker?.addEventListener("controllerchange",n);let i=!1;const s=async()=>{const f=await Mz(),h=Rz(Ez,f,t,Date.now(),Tz);h==="newer-available"?(e.onUpdateAvailable(),navigator.serviceWorker?.getRegistration().then(m=>m?.update())):h==="stuck"&&!i&&(i=!0,e.onStuck(f.sha))},l=setTimeout(()=>void s(),5e3),a=setInterval(()=>void s(),Pz),c=()=>{document.visibilityState==="visible"&&s()};return document.addEventListener("visibilitychange",c),()=>{clearTimeout(l),clearInterval(a),document.removeEventListener("visibilitychange",c),navigator.serviceWorker?.removeEventListener("controllerchange",n)}}async function Nz(e){try{const t=await navigator.serviceWorker.getRegistrations();await Promise.all(t.map(i=>i.unregister()));const n=await caches.keys();await Promise.all(n.map(i=>caches.delete(i)))}catch{}return location.replace(location.pathname+"?v="+encodeURIComponent(e)),new Promise(()=>{})}function Iz(){const e=new URL(location.href);e.searchParams.has("v")&&(e.searchParams.delete("v"),history.replaceState(null,"",e.pathname+e.search+e.hash))}const Cx=[0,100,400,1e3,3e3,6e3],Ex=e=>new Promise(t=>setTimeout(t,e)),Px={delivered:1,read:2},Tx="ours-dark-v3",Rx="#chat-message-",Mx=Rl,jz=e=>e instanceof Error&&e.message?e.message:"The request could not be completed.";function Jk(e,t){const n=new Map,i=[];for(const s of e?.messages??[]){const l={dir:s.dir,text:s.text,date:s.date,read:s.read,wireId:s.wire_id,replyTo:s.reply_to?{wireId:s.reply_to.wire_id}:null,receipt:s.receipt??void 0,receiptless:s.dir==="out"&&!s.wire_id};s.wire_id?n.set(s.wire_id,l):i.push(l)}for(const s of t){const l=n.get(s.wire_id);n.set(s.wire_id,{dir:s.dir,text:"",date:s.date,read:l?.read??s.dir==="out",wireId:s.wire_id,replyTo:s.reply_to?{wireId:s.reply_to.wire_id}:l?.replyTo??null,kind:"file",filename:s.filename,mime:s.mime,receipt:l?.receipt})}return[...i,...n.values()].sort((s,l)=>{const a=Mx(s.date)-Mx(l.date);return a===0?s.wireId.localeCompare(l.wireId):a})}function Dz(e){const t={};for(const n of Object.values(e.roots??{}))t[n.root_cid]={label:n.root_name,note:"Verified identity"};return t}function _z(e,t){return[...e.contacts.contacts.map(i=>{const s=e.contacts.roots?.[i.container_id],l=ar(e,i.container_id),c=Jk(l,t[i.container_id]??[]).at(-1),f=Al(i);return{id:i.container_id,name:f,announcedName:i.name,initials:rd(f),when:c?R2(c.date):"",activityAt:c?.date??"",last:c?.kind==="file"?O2(c.filename,c.mime):l?.preview??c?.text??"",unread:l?.unread??0,status:"active",root:s?.root_cid??null,sub:s?`role “${s.role_id}” of ${s.root_name}`:"",roleId:s?.role_id??null,rootName:s?.root_name??null,mine:!1,kind:s?"agent":"person"}}),...e.contacts.pending.map(i=>{const s=Al(i);return{id:`pending:${i.container_id}`,name:s,announcedName:i.name,initials:rd(s),when:"",activityAt:"",last:`${i.queued} queued · approval required`,unread:0,status:"pending",root:null,sub:"",roleId:null,rootName:null,mine:!1,kind:"person"}})]}function Lz(){return v.jsx(Oz,{})}function Oz(){const e=k.useRef(pM(Qy(window.location.pathname))).current,[t,n]=k.useReducer(ev,e),[i,s]=k.useState(null),l=k.useRef(0),a=k.useRef(null),c=k.useRef(t),f=k.useRef(new cM),h=k.useRef(null),m=k.useRef(new Map),p=k.useRef(new Map),[y,w]=k.useState({}),S=k.useRef(y),[C,E]=k.useState(null),P=k.useRef(new Set),[M,T]=k.useState(null),D=k.useRef(M),U=k.useRef(!1),[j,Y]=k.useState([]),[W,L]=k.useState(null),[N,X]=k.useState(()=>localStorage.getItem(Tx)!=="0"),[B,fe]=k.useState(null),[Z,te]=k.useState({supported:!1,offline:!navigator.onLine,updateAvailable:!1,registration:null}),[ge,Pe]=k.useState({status:"unsupported",preview:"full"}),[Q,de]=k.useState(!1),R=k.useRef(!1),[O,G]=k.useState(()=>window.location.hash.startsWith(Rx)),{toasts:A,push:ee,dismiss:ye,clear:ve}=yz(),pe=k.useCallback(V=>{c.current=ev(c.current,V),n(V)},[]),Me=k.useCallback(V=>{U.current=V},[]);k.useEffect(()=>{c.current=t},[t]),D.current=M,S.current=y,k.useMemo(()=>(fv(Object.values(y).flat()),null),[y]),k.useEffect(()=>(document.documentElement.classList.toggle("theme-dark",N),()=>document.documentElement.classList.remove("theme-dark")),[N]);const me=k.useCallback(V=>pe({type:"error",message:jz(V)}),[pe]),Oe=k.useCallback(()=>{const V=c.current;return{visibility:document.visibilityState,appRoute:V.route.name==="chats"?"chats":"other",selectedContactCid:ri(V),desktopLayout:h.current?.matches??window.innerWidth>=861,mobileDetailOpen:V.mobileDetailOpen,conversationCoveringDialogOpen:D.current!==null}},[]),qe=k.useCallback(async(V,ue=!0)=>{try{const ae=await Xe.conversation(V);return pe({type:"page",contactCid:V,page:ae}),ae}catch(ae){return ue&&me(ae),null}},[pe,me]),ut=k.useCallback(async(V,ue=!0)=>{try{const ae=await Xe.files(V);return fv(ae.files),w(he=>({...he,[V]:ae.files})),ae.files}catch(ae){return ue&&me(ae),null}},[me]);k.useEffect(()=>Az({onUpdateAvailable:()=>te(V=>({...V,updateAvailable:!0})),onStuck:V=>{Nz(V)}}),[]);const mt=k.useCallback(async()=>{const V=await Xe.contacts();return pe({type:"contacts",contacts:{...V,pending:V.pending??[]}}),V},[pe]),Ve=k.useCallback(async()=>{try{const[V,ue,ae]=await Promise.all([Xe.identity(),Xe.contacts(),Xe.buildInfo()]),he={...ue,pending:ue.pending??[]};return c.current.identity&&c.current.identity.cid!==V.cid&&(D2(),S.current={},w({})),pe({type:"snapshot",identity:V,contacts:he}),L(ae),await Promise.all(he.contacts.flatMap(Te=>[qe(Te.container_id,!1),ut(Te.container_id,!1)])),ri(c.current)}catch(V){return me(V),null}},[pe,ut,qe,me]),bt=k.useCallback(async V=>{await f.current.request(V,async()=>{uM(V,Oe())&&(await Xe.markRead(V),await Promise.all([qe(V),mt()]))}).catch(me)},[Oe,mt,qe,me]),Rt=k.useCallback(async V=>{const ue=++l.current;a.current?.abort();const ae=new AbortController;a.current=ae,s(null),ve(V),ut(V,!1);let he;try{he=await Xe.conversation(V,void 0,ae.signal)}catch(Ge){ae.signal.aborted||me(Ge);return}if(ae.signal.aborted||ue!==l.current)return;pe({type:"page",contactCid:V,page:he});const Te=he.unread;let se=[...he.messages],De=he.nextBefore;const We=new Set,gt=new Set(se.map(Ge=>Ge.wire_id).filter(Boolean)),ct=()=>se.filter(Ge=>Ge.dir==="in"&&!Ge.read);for(;ct().length<Te&&De&&!We.has(De);){We.add(De);let Ge;try{Ge=await Xe.conversation(V,De,ae.signal)}catch{break}if(ae.signal.aborted||ue!==l.current)return;const Dt=Ge.messages.filter(fr=>!fr.wire_id||!gt.has(fr.wire_id));if(!Dt.length&&Ge.nextBefore===De)break;for(const fr of Dt)fr.wire_id&>.add(fr.wire_id);se=[...Dt,...se],pe({type:"older_page",contactCid:V,page:Ge,newer:he.messages}),De=Ge.nextBefore}const ot=ct()[0];ot?.wire_id&&ue===l.current&&!ae.signal.aborted&&s({contactCid:V,wireId:ot.wire_id,count:Te}),await bt(V)},[ve,pe,bt,ut,me]),it=k.useCallback(async(V,ue,ae="page")=>{const he=`page:${V}:${ae}`,Te=(m.current.get(he)??0)+1;m.current.set(he,Te);for(const se of Cx){if(se&&await Ex(se),m.current.get(he)!==Te)return;const De=await qe(V,!1);if(De&&ue(De))return}},[qe]),Bt=k.useCallback(async(V,ue)=>{const ae=`file:${V}`,he=(m.current.get(ae)??0)+1;m.current.set(ae,he);for(const Te of Cx)if(Te&&await Ex(Te),m.current.get(ae)!==he||(await ut(V,!1))?.some(De=>De.wire_id===ue))return},[ut]),rn=k.useRef(!1);k.useEffect(()=>{if(!O||!t.loaded)return;const V=decodeURIComponent(window.location.hash.slice(Rx.length)),ue=ri(c.current);if(!V||!ue){G(!1);return}if(ar(c.current,ue)?.messages.some(ae=>ae.wire_id===V)){G(!1);return}rn.current||(rn.current=!0,it(ue,ae=>ae.messages.some(he=>he.wire_id===V),`anchor:${V}`).catch(()=>{}).finally(()=>G(!1)))},[O,it,t.loaded,t.pages]),k.useMemo(()=>(j2({url:V=>Object.values(S.current).flat().find(ae=>ae.wire_id===V)?.available?Xe.mediaUrl(V):null,bytes:async V=>{if(!Object.values(S.current).flat().find(he=>he.wire_id===V)?.available)return null;const ae=await fetch(Xe.mediaUrl(V),{cache:"no-store",credentials:"same-origin"});if(!ae.ok)throw new Error(`Media request failed (HTTP ${ae.status})`);return new Uint8Array(await ae.arrayBuffer())},fetch:async V=>{const ue=Object.values(S.current).flat().find(ae=>ae.wire_id===V);if(!ue)throw new Error("Media record is unavailable");await Xe.fetchFiles([V]),await ut(ue.contact_id)}}),null),[ut]),k.useEffect(()=>{let V;yM(ae=>{te(ae),rv(ae.registration).then(Pe).catch(()=>Pe(he=>({...he,status:"error"})))},{shouldDeferReload:()=>U.current||D.current!==null}).then(ae=>{V=ae}).catch(me);const ue=ae=>{ae.preventDefault(),fe(ae)};return window.addEventListener("beforeinstallprompt",ue),()=>{V?.(),window.removeEventListener("beforeinstallprompt",ue)}},[me]),k.useEffect(()=>EM(),[]),k.useEffect(()=>{if(!(!Z.registration||ge.status!=="on"))return lM({registration:Z.registration,identity:Xe.identity,onEvent:p0})},[ge.status,ge.bindingId,Z.registration]),k.useEffect(()=>{const V=()=>Pe(ue=>({...ue,status:"error"}));return window.addEventListener("ours-push-repair-required",V),()=>window.removeEventListener("ours-push-repair-required",V)},[]),k.useEffect(()=>{window.location.pathname==="/"&&window.history.replaceState(null,"",ni()),h.current=window.matchMedia("(min-width: 861px)");const V=()=>{const se=Qy(window.location.pathname);a.current?.abort(),l.current+=1,s(null),pe({type:"route",route:se}),R.current&&se.name==="chats"&&se.contactCid&&(R.current=!1,requestAnimationFrame(()=>document.querySelector("[data-contact-trigger]")?.focus({preventScroll:!0}))),se.name==="chats"&&se.contactCid&&Rt(se.contactCid)},ue=()=>{if(document.visibilityState!=="visible")return;const se=ri(c.current);se&&bt(se),v0(),Z.registration&&rv(Z.registration).then(Pe).catch(()=>Pe(De=>({...De,status:"error"})))};window.addEventListener("popstate",V),document.addEventListener("visibilitychange",ue);const ae=se=>{const De=se.type==="sync_required"?`${se.type}:${se.reason}`:se.type==="receipt_received"?`${se.type}:${se.contact_id}:${se.kind}:${se.wire_ids.join(",")}`:`${se.type}:${se.contact_id}:${se.wire_id}`,We=Date.now(),gt=p.current.get(De)??0;p.current.set(De,We);for(const[ct,ot]of p.current)We-ot>6e4&&p.current.delete(ct);We-gt<6e4||(async()=>{if(se.type==="sync_required"){await Ve();return}if(mt().catch(me),se.type==="file_received"){await Bt(se.contact_id,se.wire_id);const ct=c.current.contacts.contacts.find(ot=>ot.container_id===se.contact_id);ri(c.current)!==se.contact_id&&ct&&ee(se.contact_id,Al(ct),"New file");return}if(se.type==="message_received"){const ct=c.current.contacts.contacts.find(ot=>ot.container_id===se.contact_id);await it(se.contact_id,ot=>ot.messages.some(Ge=>Ge.wire_id===se.wire_id),`message:${se.wire_id}`),ri(c.current)===se.contact_id?await bt(se.contact_id):ct&&ee(se.contact_id,Al(ct),"New message");return}pe({type:"receipt",contactCid:se.contact_id,kind:se.kind,wireIds:se.wire_ids}),await it(se.contact_id,ct=>se.wire_ids.every(ot=>{const Ge=ct.messages.find(Dt=>Dt.wire_id===ot);return!!Ge?.receipt&&Px[Ge.receipt]>=Px[se.kind]}),`receipt:${se.wire_ids.join(",")}`)})().catch(me)},he=iM(ae),Te=oM(ae,se=>pe({type:"connection",connection:se}));return Ve().then(se=>{se&&Rt(se)}),()=>{Te(),he(),window.removeEventListener("popstate",V),document.removeEventListener("visibilitychange",ue)}},[it,Bt,pe,bt,Rt,ee,mt,Ve,me,Z.registration]);const Mt=(V,ue,ae)=>{window.history.pushState({oursMessenger:!0},"",ue),pe({type:"route",route:V,mobileDetailOpen:ae})},on=async V=>{Mt({name:"chats",contactCid:V},ni(V),!0),await Rt(V)},hn=async V=>{const ue=ar(c.current,V);if(!(!ue?.nextBefore||P.current.has(V))){P.current.add(V),E(V);try{const ae=await Xe.conversation(V,ue.nextBefore);pe({type:"older_page",contactCid:V,page:ae,newer:ue.messages})}catch(ae){me(ae)}finally{P.current.delete(V),E(null)}}},Be=ri(t),Gn=t.contacts.contacts.find(V=>V.container_id===Be),Qn=k.useMemo(()=>_z(t,y),[t,y]),q=Qn.find(V=>V.id===Be)??null,oe=Be?Jk(ar(t,Be),y[Be]??[]):[],Ae=t.identity,F=t.loaded?Be&&!ar(t,Be)||O?"updating":t.connection!=="live"?"connecting":null:"connecting",J=async(V,ue=ge.preview)=>{if(Z.registration){de(!0),Pe(ae=>({...ae,status:"repairing",preview:ue}));try{Pe(await(V==="enable"?y0(Z.registration,{preview:ue}):V==="repair"?bM(Z.registration,ue):CM(Z.registration,ge)))}catch(ae){Pe(he=>({...he,status:"error"})),me(ae)}finally{de(!1)}}},we=()=>{Y([]),T("invite"),Xe.invites().then(Y).catch(me)};return t.route.name==="not_found"?v.jsxs("div",{className:"centered-screen",children:[v.jsx("h1",{children:"Page not found"}),v.jsx("button",{className:"btn primary",onClick:()=>Mt({name:"chats",contactCid:null},ni()),children:"Open chats"})]}):Ae?v.jsx("div",{className:N?"theme-dark":"",style:{height:"100%"},children:v.jsxs("div",{className:"app signal-app",children:[v.jsxs("main",{className:"section signal-stage"+(t.mobileDetailOpen?" show-detail":""),children:[v.jsx(uz,{contacts:Qn,roots:Dz(t.contacts),selected:Be,onSelect:V=>{V.startsWith("pending:")||on(V)},onInvite:we,onSettings:()=>T("settings"),onApprovePending:async V=>{try{return await Xe.respondToIntroduction(V,"approve"),await Ve(),!0}catch(ue){return me(ue),!1}},onRejectPending:async V=>{try{return await Xe.respondToIntroduction(V,"reject"),await Ve(),!0}catch(ue){return me(ue),!1}}}),t.route.name==="contact"&&q?v.jsx(cz,{contact:q,messages:oe,onBack:()=>{R.current=!0,dM(window.history.state)==="back"?window.history.back():(window.history.replaceState({oursMessenger:!0},"",ni(q.id)),pe({type:"route",route:{name:"chats",contactCid:q.id},mobileDetailOpen:!0}),requestAnimationFrame(()=>document.querySelector("[data-contact-trigger]")?.focus({preventScroll:!0})),R.current=!1)},onRename:V=>void Xe.renameContact(q.id,V).then(Ve).catch(me),onRemove:()=>{confirm(`Remove “${Gn?.name??"contact"}”?`)&&Xe.removeContact(q.id).then(()=>(window.history.replaceState({oursMessenger:!0},"",ni()),pe({type:"route",route:{name:"chats",contactCid:null},mobileDetailOpen:!1}),Ve())).catch(me)},onOpenMessage:V=>{Mt({name:"chats",contactCid:q.id},ni(q.id),!0);let ue=12;const ae=()=>{const he=document.getElementById(`chat-message-${encodeURIComponent(V)}`),Te=he?.closest(".messages");if((!he||!Te||Te.clientHeight<=0)&&ue-- >0){requestAnimationFrame(ae);return}if(!he||!Te)return;const se=he.getBoundingClientRect(),De=Te.getBoundingClientRect(),We=Te.scrollTop+se.top-De.top-Math.max(0,(Te.clientHeight-se.height)/2),gt=Math.max(0,Math.min(We,Te.scrollHeight-Te.clientHeight));Te.scrollTo({top:gt,behavior:window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"})};requestAnimationFrame(ae)},indexOffset:ar(t,q.id)?.hasMore?Math.max(1,(ar(t,q.id)?.total??oe.length)-oe.length):0,onSendText:async(V,ue)=>{const ae=await Xe.send(q.id,V,ue);return await qe(q.id,!1),ae.wire_id??void 0},onSendFile:async(V,ue)=>{await Xe.sendFile(q.id,new Blob([V.bytes],{type:V.mime}),V.filename,V.mime,ue),await Promise.all([ut(q.id),qe(q.id,!1)])}}):v.jsx(fz,{contact:q,messages:oe,syncing:F,unreadOpen:i?.contactCid===Be?i:null,hiddenEarlier:ar(t,Be??"")?.hasMore?Math.max(1,(ar(t,Be??"")?.total??oe.length)-oe.length):0,onLoadEarlier:Be&&C!==Be?()=>void hn(Be):void 0,onBack:()=>{a.current?.abort(),l.current+=1,s(null),Mt({name:"chats",contactCid:null},ni(),!1)},onOpenContact:()=>{Be&&Mt({name:"contact",contactCid:Be},fM(Be),!0)},onDraftChange:Me,onSend:async(V,ue,ae)=>{if(!Be)return;const he=Be,Te=await Xe.send(he,V,ue,ae);return pe({type:"sent_message",contactCid:he,message:{dir:"out",text:V,date:new Date().toISOString(),read:!0,wire_id:Te.wire_id??"",receipt:null,reply_to:ue?{wire_id:ue}:null}}),Te.wire_id?it(he,se=>se.messages.some(De=>De.wire_id===Te.wire_id),`send:${Te.wire_id}`):mt().catch(me),Te.wire_id??void 0},onSendFile:async(V,ue)=>{Be&&(await Xe.sendFile(Be,new Blob([V.bytes],{type:V.mime}),V.filename,V.mime,ue),await Promise.all([ut(Be),qe(Be,!1)]))},onFetchFile:async V=>{await Xe.fetchFiles([V]),Be&&await ut(Be)}},Be??"no-conversation")]}),v.jsxs("div",{className:"app-banners",children:[Z.offline&&v.jsx("div",{className:"banner warn",role:"status","aria-live":"polite",children:"Offline — reconnecting to the network…"}),t.connection!=="live"&&v.jsx("div",{className:"banner warn",role:"status","aria-live":"polite",children:t.connection==="retrying"?"Live updates interrupted — reconnecting…":"Connecting to live updates…"}),Z.updateAvailable&&v.jsxs("div",{className:"banner info",children:[v.jsx("span",{role:"status","aria-live":"polite",children:"A new version is available."}),v.jsx("span",{className:"banner-actions",children:v.jsx("button",{className:"linkbtn",onClick:()=>{Z.registration&&tv(Z.registration)},children:"Restart now"})})]}),v.jsx(xz,{items:A,onDismiss:ye,onOpen:V=>void on(V)})]}),M==="invite"&&v.jsx(Sz,{identity:Ae,invites:j,onRefresh:async()=>Y(await Xe.invites()),onCreate:async(V,ue)=>(await Xe.createInvite(V,ue)).blob,onAccept:async(V,ue)=>{await Xe.addContact(V,ue),await Ve()},onRevoke:async V=>{await Xe.revokeInvite(V)},onClose:()=>{T(null),Ve()}}),M==="settings"&&v.jsx(bz,{identity:Ae,push:ge,workerSupported:Z.supported,busy:Q,offline:Z.offline,updateAvailable:Z.updateAvailable,build:W,dark:N,onToggleDark:()=>X(V=>(localStorage.setItem(Tx,V?"0":"1"),!V)),onSaveBio:async V=>{await Xe.setBio(V),await Ve()},onPushAction:J,onInstall:B?()=>void B.prompt().then(()=>fe(null)):void 0,onReloadUpdate:()=>{Z.registration&&tv(Z.registration)},onClose:()=>{D.current=null,T(null),Be&&bt(Be)}}),t.error&&v.jsxs("div",{className:"banner error",role:"alert","aria-live":"assertive",children:[t.error,v.jsx("button",{className:"linkbtn",onClick:()=>pe({type:"error",message:null}),children:"dismiss"})]})]})}):v.jsx("div",{className:N?"theme-dark":"",style:{height:"100%"},children:v.jsx("div",{className:"centered-screen",children:v.jsx("p",{className:"muted",children:"Loading…"})})})}function Fz(e,t=window){const n=t.visualViewport,i=()=>{const s=n?.height??t.innerHeight,l=n?.offsetTop??0;e.style.setProperty("--app-viewport-height",`${s}px`),e.style.setProperty("--app-viewport-top",`${l}px`)};return i(),n?.addEventListener("resize",i),n?.addEventListener("scroll",i),t.addEventListener("resize",i),()=>{n?.removeEventListener("resize",i),n?.removeEventListener("scroll",i),t.removeEventListener("resize",i),e.style.removeProperty("--app-viewport-height"),e.style.removeProperty("--app-viewport-top")}}Iz();const Hh=document.getElementById("root");if(!Hh)throw new Error("missing #root");Fz(Hh);nC.createRoot(Hh).render(v.jsx(JT,{reducedMotion:"user",children:v.jsx(Lz,{})}));export{Ch as _,Id as g};
|
|
322
|
+
//# sourceMappingURL=index-8AhXQ9Q4.js.map
|