mulmoclaude 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/bin/mulmoclaude.js +1 -1
  2. package/client/assets/PluginScopedRoot-YjvQq0Nn.js +3 -0
  3. package/client/assets/{html2canvas-CDGcmOD3-BbPeutDg.js → html2canvas-CDGcmOD3-Bkf2uOth.js} +1 -1
  4. package/client/assets/{index-BZdOOa5E.js → index-BwrlMMHr.js} +66 -65
  5. package/client/assets/index-CvvNuegU.css +2 -0
  6. package/client/assets/{index.es-DqtpmBm8-DJdTPdnc.js → index.es-DqtpmBm8-D9mAh_KQ.js} +1 -1
  7. package/client/assets/material-symbols-outlined-BOZVWuR3.woff2 +0 -0
  8. package/client/assets/runtime-protocol-vue-C1To4M3t.js +1 -0
  9. package/client/index.html +7 -6
  10. package/package.json +7 -7
  11. package/server/accounting/eventPublisher.ts +2 -1
  12. package/server/accounting/snapshotCache.ts +2 -1
  13. package/server/agent/backend/claude-code.ts +1 -0
  14. package/server/agent/backend/types.ts +3 -0
  15. package/server/agent/config.ts +25 -2
  16. package/server/agent/index.ts +6 -0
  17. package/server/agent/prompt.ts +37 -24
  18. package/server/api/routes/accounting.ts +31 -24
  19. package/server/api/routes/agent.ts +2 -2
  20. package/server/api/routes/config-refresh.ts +49 -0
  21. package/server/api/routes/config.ts +77 -67
  22. package/server/api/routes/files.ts +41 -17
  23. package/server/api/routes/hookLog.ts +95 -0
  24. package/server/api/routes/news.ts +39 -52
  25. package/server/api/routes/notifier.ts +14 -19
  26. package/server/api/routes/pdf.ts +2 -2
  27. package/server/api/routes/presentSvg.ts +107 -0
  28. package/server/api/routes/scheduler.ts +100 -98
  29. package/server/api/routes/schedulerTasks.ts +98 -95
  30. package/server/api/routes/sessions.ts +22 -27
  31. package/server/api/routes/sources.ts +45 -43
  32. package/server/api/routes/wiki/history.ts +6 -15
  33. package/server/api/routes/wiki.ts +73 -276
  34. package/server/events/file-change.ts +3 -2
  35. package/server/events/session-store/index.ts +2 -1
  36. package/server/index.ts +117 -8
  37. package/server/notifier/store.ts +3 -3
  38. package/server/plugins/preset-list.ts +16 -5
  39. package/server/plugins/runtime.ts +2 -2
  40. package/server/system/config.ts +44 -2
  41. package/server/utils/asyncHandler.ts +75 -0
  42. package/server/utils/files/accounting-io.ts +19 -20
  43. package/server/utils/files/journal-io.ts +2 -1
  44. package/server/utils/files/json.ts +8 -1
  45. package/server/utils/files/reference-dirs-io.ts +2 -3
  46. package/server/utils/files/scheduler-overrides-io.ts +2 -3
  47. package/server/utils/files/svg-store.ts +27 -0
  48. package/server/utils/files/user-tasks-io.ts +2 -3
  49. package/server/utils/regex.ts +3 -12
  50. package/server/utils/text.ts +29 -0
  51. package/server/workspace/chat-index/summarizer.ts +5 -3
  52. package/server/workspace/cooking-recipes/migrate.ts +125 -0
  53. package/server/workspace/custom-dirs.ts +2 -2
  54. package/server/workspace/hooks/dispatcher.mjs +300 -0
  55. package/server/workspace/hooks/dispatcher.ts +55 -0
  56. package/server/workspace/hooks/handlers/configRefresh.ts +38 -0
  57. package/server/workspace/hooks/handlers/skillBridge.ts +223 -0
  58. package/server/workspace/hooks/handlers/wikiSnapshot.ts +43 -0
  59. package/server/workspace/hooks/provision.ts +222 -0
  60. package/server/workspace/hooks/shared/sidecar.ts +124 -0
  61. package/server/workspace/hooks/shared/stdin.ts +60 -0
  62. package/server/workspace/hooks/shared/workspace.ts +13 -0
  63. package/server/workspace/journal/dailyPass.ts +1 -6
  64. package/server/workspace/memory/io.ts +1 -34
  65. package/server/workspace/memory/migrate.ts +2 -1
  66. package/server/workspace/memory/snapshot.ts +26 -0
  67. package/server/workspace/memory/topic-io.ts +1 -18
  68. package/server/workspace/paths.ts +10 -0
  69. package/server/workspace/skills-preset/mc-cooking-coach/SKILL.md +217 -0
  70. package/server/workspace/skills-preset/mc-manage-automations/SKILL.md +119 -0
  71. package/server/workspace/skills-preset/mc-manage-skills/SKILL.md +128 -0
  72. package/server/workspace/skills-preset/mc-manage-sources/SKILL.md +106 -0
  73. package/server/workspace/skills-preset.ts +2 -1
  74. package/server/workspace/wiki-pages/io.ts +2 -1
  75. package/src/App.vue +51 -3
  76. package/src/components/ChatInput.vue +7 -8
  77. package/src/components/FileContentHeader.vue +1 -6
  78. package/src/components/FileDropOverlay.vue +18 -0
  79. package/src/components/RolesView.vue +14 -5
  80. package/src/components/SettingsMcpTab.vue +15 -10
  81. package/src/components/SettingsModal.vue +116 -130
  82. package/src/components/SettingsModelTab.vue +121 -0
  83. package/src/composables/useContentDisplay.ts +16 -0
  84. package/src/composables/useFileDropZone.ts +148 -0
  85. package/src/composables/useSkillsList.ts +2 -1
  86. package/src/config/apiRoutes.ts +22 -0
  87. package/src/config/roles.ts +78 -48
  88. package/src/config/toolNames.ts +4 -1
  89. package/src/lang/de.ts +36 -1
  90. package/src/lang/en.ts +36 -1
  91. package/src/lang/es.ts +36 -1
  92. package/src/lang/fr.ts +36 -1
  93. package/src/lang/ja.ts +36 -1
  94. package/src/lang/ko.ts +36 -1
  95. package/src/lang/pt-BR.ts +36 -1
  96. package/src/lang/zh.ts +36 -1
  97. package/src/lib/wiki-page/index-parse.ts +221 -0
  98. package/src/lib/wiki-page/link.ts +62 -0
  99. package/src/lib/wiki-page/lint.ts +105 -0
  100. package/src/lib/wiki-page/paths.ts +35 -0
  101. package/src/lib/wiki-page/slug.ts +28 -40
  102. package/src/main.ts +1 -0
  103. package/src/plugins/_generated/metas.ts +2 -0
  104. package/src/plugins/_generated/registrations.ts +2 -0
  105. package/src/plugins/_generated/server-bindings.ts +3 -0
  106. package/src/plugins/accounting/Preview.vue +3 -6
  107. package/src/plugins/accounting/View.vue +2 -1
  108. package/src/plugins/accounting/components/AccountsModal.vue +3 -2
  109. package/src/plugins/accounting/components/JournalEntryForm.vue +2 -1
  110. package/src/plugins/accounting/components/JournalList.vue +2 -1
  111. package/src/plugins/accounting/components/OpeningBalancesForm.vue +2 -1
  112. package/src/plugins/accounting/currencies.ts +13 -0
  113. package/src/plugins/manageRoles/View.vue +16 -5
  114. package/src/plugins/photoLocations/View.vue +4 -2
  115. package/src/plugins/presentSVG/Preview.vue +56 -0
  116. package/src/plugins/presentSVG/View.vue +465 -0
  117. package/src/plugins/presentSVG/definition.ts +29 -0
  118. package/src/plugins/presentSVG/index.ts +49 -0
  119. package/src/plugins/presentSVG/meta.ts +14 -0
  120. package/src/plugins/scheduler/View.vue +3 -7
  121. package/src/plugins/skill/View.vue +11 -13
  122. package/src/plugins/wiki/View.vue +1 -1
  123. package/src/plugins/wiki/helpers.ts +23 -5
  124. package/src/plugins/wiki/route.ts +12 -11
  125. package/src/tools/runtimeLoader.ts +75 -9
  126. package/src/utils/format/bytes.ts +41 -0
  127. package/src/utils/format/date.ts +14 -2
  128. package/src/utils/markdown/setup.ts +5 -0
  129. package/src/utils/markdown/workspaceLinkify.ts +73 -0
  130. package/client/assets/index-Bl3vqgA6.css +0 -2
  131. package/client/assets/material-symbols-outlined-BLDfUw-_.woff2 +0 -0
  132. package/client/assets/runtime-protocol-vue-6WYa8hAs.js +0 -1
  133. package/server/workspace/wiki-history/hook/snapshot.mjs +0 -98
  134. package/server/workspace/wiki-history/hook/snapshot.ts +0 -135
  135. package/server/workspace/wiki-history/provision.ts +0 -181
  136. /package/client/assets/{chunk-D8eiyYIV-C1eAZMzz.js → chunk-D8eiyYIV-CAXpUwLd.js} +0 -0
  137. /package/client/assets/{purify.es-Fx1Nqyry-BSVNht6S.js → purify.es-Fx1Nqyry-Dwtk-9WZ.js} +0 -0
  138. /package/client/assets/{typeof-DBp4T-Ny-C2xoZtcz.js → typeof-DBp4T-Ny-CSr8wx1e.js} +0 -0
  139. /package/client/assets/{vue-1e_vz2LW.js → vue-C8UuIO9J.js} +0 -0
@@ -113,7 +113,7 @@ Options:
113
113
  }
114
114
 
115
115
  if (args.includes("--version")) {
116
- console.log("mulmoclaude 0.6.1");
116
+ console.log("mulmoclaude 0.6.2");
117
117
  process.exit(0);
118
118
  }
119
119
 
@@ -0,0 +1,3 @@
1
+ import{r as e}from"./chunk-CernVdwh.js";import{B as t,F as n,Fn as r,Ht as i,In as a,K as o,Kt as s,Lt as c,Qn as l,Rt as u,Vn as d,Wn as f,Wt as p,X as m,Y as h,Yn as g,Zt as _,ar as v,at as y,gt as b,jr as x,n as S,pt as ee,q as C,rt as w,wt as T,yn as te}from"./vue.runtime.esm-bundler-DQ8Kjjui.js";import{t as E}from"./vue-C8UuIO9J.js";function ne(e,t){typeof console<`u`&&(console.warn(`[intlify] `+e),t&&console.warn(t.stack))}var re=typeof window<`u`,D=(e,t=!1)=>t?Symbol.for(e):Symbol(e),ie=(e,t,n)=>ae({l:e,k:t,s:n}),ae=e=>JSON.stringify(e).replace(/\u2028/g,`\\u2028`).replace(/\u2029/g,`\\u2029`).replace(/\u0027/g,`\\u0027`),O=e=>typeof e==`number`&&isFinite(e),oe=e=>_e(e)===`[object Date]`,se=e=>_e(e)===`[object RegExp]`,ce=e=>R(e)&&Object.keys(e).length===0,k=Object.assign,le=Object.create,A=(e=null)=>le(e),ue,j=()=>ue||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:A();function de(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/\//g,`&#x2F;`).replace(/=/g,`&#x3D;`)}function fe(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,`&amp;`).replace(/"/g,`&quot;`).replace(/'/g,`&apos;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}function pe(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(e,t,n)=>`${t}="${fe(n)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(e,t,n)=>`${t}='${fe(n)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,`$1&#111;n$3`)),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,`$1javascript&#58;`)}),e}var me=Object.prototype.hasOwnProperty;function M(e,t){return me.call(e,t)}var N=Array.isArray,P=e=>typeof e==`function`,F=e=>typeof e==`string`,I=e=>typeof e==`boolean`,L=e=>typeof e==`object`&&!!e,he=e=>L(e)&&P(e.then)&&P(e.catch),ge=Object.prototype.toString,_e=e=>ge.call(e),R=e=>_e(e)===`[object Object]`,ve=e=>e==null?``:N(e)||R(e)&&e.toString===ge?JSON.stringify(e,null,2):String(e);function ye(e,t=``){return e.reduce((e,n,r)=>r===0?e+n:e+t+n,``)}var be=e=>!L(e)||N(e);function xe(e,t){if(be(e)||be(t))throw Error(`Invalid value`);let n=[{src:e,des:t}];for(;n.length;){let{src:e,des:t}=n.pop();Object.keys(e).forEach(r=>{r!==`__proto__`&&(L(e[r])&&!L(t[r])&&(t[r]=Array.isArray(e[r])?[]:A()),be(t[r])||be(e[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]}))})}}function Se(e,t,n){return{line:e,column:t,offset:n}}function Ce(e,t,n){let r={start:e,end:t};return n!=null&&(r.source=n),r}var z={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16};z.EXPECTED_TOKEN,z.INVALID_TOKEN_IN_PLACEHOLDER,z.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,z.UNKNOWN_ESCAPE_SEQUENCE,z.INVALID_UNICODE_ESCAPE_SEQUENCE,z.UNBALANCED_CLOSING_BRACE,z.UNTERMINATED_CLOSING_BRACE,z.EMPTY_PLACEHOLDER,z.NOT_ALLOW_NEST_PLACEHOLDER,z.INVALID_LINKED_FORMAT,z.MUST_HAVE_MESSAGES_IN_PLURAL,z.UNEXPECTED_EMPTY_LINKED_MODIFIER,z.UNEXPECTED_EMPTY_LINKED_KEY,z.UNEXPECTED_LEXICAL_ANALYSIS,z.UNHANDLED_CODEGEN_NODE_TYPE,z.UNHANDLED_MINIFIER_NODE_TYPE;function we(e,t,n={}){let{domain:r,messages:i,args:a}=n,o=SyntaxError(String(e));return o.code=e,t&&(o.location=t),o.domain=r,o}function Te(e){throw e}var B=` `,Ee=`\r`,V=`
2
+ `,De=`\u2028`,Oe=`\u2029`;function ke(e){let t=e,n=0,r=1,i=1,a=0,o=e=>t[e]===Ee&&t[e+1]===V,s=e=>t[e]===V,c=e=>t[e]===Oe,l=e=>t[e]===De,u=e=>o(e)||s(e)||c(e)||l(e),d=()=>n,f=()=>r,p=()=>i,m=()=>a,h=e=>o(e)||c(e)||l(e)?V:t[e],g=()=>h(n),_=()=>h(n+a);function v(){return a=0,u(n)&&(r++,i=0),o(n)&&n++,n++,i++,t[n]}function y(){return o(n+a)&&a++,a++,t[n+a]}function b(){n=0,r=1,i=1,a=0}function x(e=0){a=e}function S(){let e=n+a;for(;e!==n;)v();a=0}return{index:d,line:f,column:p,peekOffset:m,charAt:h,currentChar:g,currentPeek:_,next:v,peek:y,reset:b,resetPeek:x,skipToPeek:S}}var Ae=void 0,H=`'`,je=`tokenizer`;function Me(e,t={}){let n=t.location!==!1,r=ke(e),i=()=>r.index(),a=()=>Se(r.line(),r.column(),r.index()),o=a(),s=i(),c={currentType:13,offset:s,startLoc:o,endLoc:o,lastType:13,lastOffset:s,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:``},l=()=>c,{onError:u}=t;function d(e,t,r,...i){let a=l();t.column+=r,t.offset+=r,u&&u(we(e,n?Ce(a.startLoc,t):null,{domain:je,args:i}))}function f(e,t,r){e.endLoc=a(),e.currentType=t;let i={type:t};return n&&(i.loc=Ce(e.startLoc,e.endLoc)),r!=null&&(i.value=r),i}let p=e=>f(e,13);function m(e,t){return e.currentChar()===t?(e.next(),t):(d(z.EXPECTED_TOKEN,a(),0,t),``)}function h(e){let t=``;for(;e.currentPeek()===B||e.currentPeek()===V;)t+=e.currentPeek(),e.peek();return t}function g(e){let t=h(e);return e.skipToPeek(),t}function _(e){if(e===Ae)return!1;let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t===95}function v(e){if(e===Ae)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57}function y(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function b(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=v(e.currentPeek()===`-`?e.peek():e.currentPeek());return e.resetPeek(),r}function x(e,t){let{currentType:n}=t;if(n!==2)return!1;h(e);let r=e.currentPeek()===H;return e.resetPeek(),r}function S(e,t){let{currentType:n}=t;if(n!==7)return!1;h(e);let r=e.currentPeek()===`.`;return e.resetPeek(),r}function ee(e,t){let{currentType:n}=t;if(n!==8)return!1;h(e);let r=_(e.currentPeek());return e.resetPeek(),r}function C(e,t){let{currentType:n}=t;if(!(n===7||n===11))return!1;h(e);let r=e.currentPeek()===`:`;return e.resetPeek(),r}function w(e,t){let{currentType:n}=t;if(n!==9)return!1;let r=()=>{let t=e.currentPeek();return t===`{`?_(e.peek()):t===`@`||t===`|`||t===`:`||t===`.`||t===B||!t?!1:t===V?(e.peek(),r()):te(e,!1)},i=r();return e.resetPeek(),i}function T(e){h(e);let t=e.currentPeek()===`|`;return e.resetPeek(),t}function te(e,t=!0){let n=(t=!1,r=``)=>{let i=e.currentPeek();return i===`{`||i===`@`||!i?t:i===`|`?!(r===B||r===V):i===B?(e.peek(),n(!0,B)):i===V?(e.peek(),n(!0,V)):!0},r=n();return t&&e.resetPeek(),r}function E(e,t){let n=e.currentChar();return n===Ae?Ae:t(n)?(e.next(),n):null}function ne(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36}function re(e){return E(e,ne)}function D(e){let t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||t===95||t===36||t===45}function ie(e){return E(e,D)}function ae(e){let t=e.charCodeAt(0);return t>=48&&t<=57}function O(e){return E(e,ae)}function oe(e){let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function se(e){return E(e,oe)}function ce(e){let t=``,n=``;for(;t=O(e);)n+=t;return n}function k(e){let t=``;for(;;){let n=e.currentChar();if(n===`\\`){let r=e.peek();r===`{`||r===`}`||r===`@`||r===`|`||r===`\\`?(t+=n+r,e.next(),e.next()):(e.resetPeek(),t+=n,e.next())}else if(n===`{`||n===`}`||n===`@`||n===`|`||!n)break;else if(n===B||n===V)if(te(e))t+=n,e.next();else if(T(e))break;else t+=n,e.next();else t+=n,e.next()}return t}function le(e){g(e);let t=``,n=``;for(;t=ie(e);)n+=t;let r=e.currentChar();if(r&&r!==`}`&&r!==Ae&&r!==B&&r!==V&&r!==` `){let t=me(e);return d(z.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n+t),n+t}return e.currentChar()===Ae&&d(z.UNTERMINATED_CLOSING_BRACE,a(),0),n}function A(e){g(e);let t=``;return e.currentChar()===`-`?(e.next(),t+=`-${ce(e)}`):t+=ce(e),e.currentChar()===Ae&&d(z.UNTERMINATED_CLOSING_BRACE,a(),0),t}function ue(e){return e!==H&&e!==V}function j(e){g(e),m(e,`'`);let t=``,n=``;for(;t=E(e,ue);)t===`\\`?n+=de(e):n+=t;let r=e.currentChar();return r===V||r===Ae?(d(z.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===V&&(e.next(),m(e,`'`)),n):(m(e,`'`),n)}function de(e){let t=e.currentChar();switch(t){case`\\`:case`'`:return e.next(),`\\${t}`;case`u`:return fe(e,t,4);case`U`:return fe(e,t,6);default:return d(z.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),``}}function fe(e,t,n){m(e,t);let r=``;for(let i=0;i<n;i++){let n=se(e);if(!n){d(z.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function pe(e){return e!==`{`&&e!==`}`&&e!==B&&e!==V}function me(e){g(e);let t=``,n=``;for(;t=E(e,pe);)n+=t;return n}function M(e){let t=``,n=``;for(;t=re(e);)n+=t;return n}function N(e){let t=n=>{let r=e.currentChar();return r===`{`||r===`@`||r===`|`||r===`(`||r===`)`||!r||r===B?n:(n+=r,e.next(),t(n))};return t(``)}function P(e){g(e);let t=m(e,`|`);return g(e),t}function F(e,t){let n=null;switch(e.currentChar()){case`{`:return t.braceNest>=1&&d(z.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=f(t,2,`{`),g(e),t.braceNest++,n;case`}`:return t.braceNest>0&&t.currentType===2&&d(z.EMPTY_PLACEHOLDER,a(),0),e.next(),n=f(t,3,`}`),t.braceNest--,t.braceNest>0&&g(e),t.inLinked&&t.braceNest===0&&(t.inLinked=!1),n;case`@`:return t.braceNest>0&&d(z.UNTERMINATED_CLOSING_BRACE,a(),0),n=I(e,t)||p(t),t.braceNest=0,n;default:{let r=!0,i=!0,o=!0;if(T(e))return t.braceNest>0&&d(z.UNTERMINATED_CLOSING_BRACE,a(),0),n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(t.currentType===4||t.currentType===5||t.currentType===6))return d(z.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,L(e,t);if(r=y(e,t))return n=f(t,4,le(e)),g(e),n;if(i=b(e,t))return n=f(t,5,A(e)),g(e),n;if(o=x(e,t))return n=f(t,6,j(e)),g(e),n;if(!r&&!i&&!o)return n=f(t,12,me(e)),d(z.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),g(e),n;break}}return n}function I(e,t){let{currentType:n}=t,r=null,i=e.currentChar();switch((n===7||n===8||n===11||n===9)&&(i===V||i===B)&&d(z.INVALID_LINKED_FORMAT,a(),0),i){case`@`:return e.next(),r=f(t,7,`@`),t.inLinked=!0,r;case`.`:return g(e),e.next(),f(t,8,`.`);case`:`:return g(e),e.next(),f(t,9,`:`);default:return T(e)?(r=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,r):S(e,t)||C(e,t)?(g(e),I(e,t)):ee(e,t)?(g(e),f(t,11,M(e))):w(e,t)?(g(e),i===`{`?F(e,t)||r:f(t,10,N(e))):(n===7&&d(z.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,L(e,t))}}function L(e,t){let n={type:13};if(t.braceNest>0)return F(e,t)||p(t);if(t.inLinked)return I(e,t)||p(t);switch(e.currentChar()){case`{`:return F(e,t)||p(t);case`}`:return d(z.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),f(t,3,`}`);case`@`:return I(e,t)||p(t);default:if(T(e))return n=f(t,1,P(e)),t.braceNest=0,t.inLinked=!1,n;if(te(e))return f(t,0,k(e));break}return n}function he(){let{currentType:e,offset:t,startLoc:n,endLoc:o}=c;return c.lastType=e,c.lastOffset=t,c.lastStartLoc=n,c.lastEndLoc=o,c.offset=i(),c.startLoc=a(),r.currentChar()===Ae?f(c,13):L(r,c)}return{nextToken:he,currentOffset:i,currentPosition:a,context:l}}var Ne=`parser`,Pe=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Fe=/\\([\\@{}|])/g;function Ie(e,t){return t}function Le(e,t,n){switch(e){case`\\\\`:return`\\`;case`\\'`:return`'`;default:{let e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):`�`}}}function Re(e={}){let t=e.location!==!1,{onError:n}=e;function r(e,r,i,a,...o){let s=e.currentPosition();s.offset+=a,s.column+=a,n&&n(we(r,t?Ce(i,s):null,{domain:Ne,args:o}))}function i(e,n,r){let i={type:e};return t&&(i.start=n,i.end=n,i.loc={start:r,end:r}),i}function a(e,n,r,i){t&&(e.end=n,e.loc&&(e.loc.end=r))}function o(e,t){let n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t.replace(Fe,Ie),a(r,e.currentOffset(),e.currentPosition()),r}function s(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(5,n,r);return o.index=parseInt(t,10),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function c(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(4,n,r);return o.key=t,e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function l(e,t){let{lastOffset:n,lastStartLoc:r}=e.context(),o=i(9,n,r);return o.value=t.replace(Pe,Le),e.nextToken(),a(o,e.currentOffset(),e.currentPosition()),o}function u(e){let t=e.nextToken(),n=e.context(),{lastOffset:o,lastStartLoc:s}=n,c=i(8,o,s);return t.type===11?(t.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,U(t)),c.value=t.value||``,a(c,e.currentOffset(),e.currentPosition()),{node:c}):(r(e,z.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),c.value=``,a(c,o,s),{nextConsumeToken:t,node:c})}function d(e,t){let n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,a(r,e.currentOffset(),e.currentPosition()),r}function f(e){let t=e.context(),n=i(6,t.offset,t.startLoc),o=e.nextToken();if(o.type===8){let t=u(e);n.modifier=t.node,o=t.nextConsumeToken||e.nextToken()}switch(o.type!==9&&r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(o)),o=e.nextToken(),o.type===2&&(o=e.nextToken()),o.type){case 10:o.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(o)),n.key=d(e,o.value||``);break;case 4:o.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(o)),n.key=c(e,o.value||``);break;case 5:o.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(o)),n.key=s(e,o.value||``);break;case 6:o.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(o)),n.key=l(e,o.value||``);break;default:{r(e,z.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);let s=e.context(),c=i(7,s.offset,s.startLoc);return c.value=``,a(c,s.offset,s.startLoc),n.key=c,a(n,s.offset,s.startLoc),{nextConsumeToken:o,node:n}}}return a(n,e.currentOffset(),e.currentPosition()),{node:n}}function p(e){let t=e.context(),n=i(2,t.currentType===1?e.currentOffset():t.offset,t.currentType===1?t.endLoc:t.startLoc);n.items=[];let u=null;do{let i=u||e.nextToken();switch(u=null,i.type){case 0:i.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(i)),n.items.push(o(e,i.value||``));break;case 5:i.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(i)),n.items.push(s(e,i.value||``));break;case 4:i.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(i)),n.items.push(c(e,i.value||``));break;case 6:i.value??r(e,z.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,U(i)),n.items.push(l(e,i.value||``));break;case 7:{let t=f(e);n.items.push(t.node),u=t.nextConsumeToken||null;break}}}while(t.currentType!==13&&t.currentType!==1);return a(n,t.currentType===1?t.lastOffset:e.currentOffset(),t.currentType===1?t.lastEndLoc:e.currentPosition()),n}function m(e,t,n,o){let s=e.context(),c=o.items.length===0,l=i(1,t,n);l.cases=[],l.cases.push(o);do{let t=p(e);c||=t.items.length===0,l.cases.push(t)}while(s.currentType!==13);return c&&r(e,z.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),a(l,e.currentOffset(),e.currentPosition()),l}function h(e){let t=e.context(),{offset:n,startLoc:r}=t,i=p(e);return t.currentType===13?i:m(e,n,r,i)}function g(n){let o=Me(n,k({},e)),s=o.context(),c=i(0,s.offset,s.startLoc);return t&&c.loc&&(c.loc.source=n),c.body=h(o),e.onCacheKey&&(c.cacheKey=e.onCacheKey(n)),s.currentType!==13&&r(o,z.UNEXPECTED_LEXICAL_ANALYSIS,s.lastStartLoc,0,n[s.offset]||``),a(c,o.currentOffset(),o.currentPosition()),c}return{parse:g}}function U(e){if(e.type===13)return`EOF`;let t=(e.value||``).replace(/\r?\n/gu,`\\n`);return t.length>10?t.slice(0,9)+`…`:t}function ze(e,t={}){let n={ast:e,helpers:new Set};return{context:()=>n,helper:e=>(n.helpers.add(e),e)}}function Be(e,t){for(let n=0;n<e.length;n++)Ve(e[n],t)}function Ve(e,t){switch(e.type){case 1:Be(e.cases,t),t.helper(`plural`);break;case 2:Be(e.items,t);break;case 6:Ve(e.key,t),t.helper(`linked`),t.helper(`type`);break;case 5:t.helper(`interpolate`),t.helper(`list`);break;case 4:t.helper(`interpolate`),t.helper(`named`);break}}function He(e,t={}){let n=ze(e);n.helper(`normalize`),e.body&&Ve(e.body,n);let r=n.context();e.helpers=Array.from(r.helpers)}function Ue(e){let t=e.body;return t.type===2?We(t):t.cases.forEach(e=>We(e)),e}function We(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let n=0;n<e.items.length;n++){let r=e.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=ye(t);for(let t=0;t<e.items.length;t++){let n=e.items[t];(n.type===3||n.type===9)&&delete n.value}}}}function Ge(e){switch(e.t=e.type,e.type){case 0:{let t=e;Ge(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,n=t.cases;for(let e=0;e<n.length;e++)Ge(n[e]);t.c=n,delete t.cases;break}case 2:{let t=e,n=t.items;for(let e=0;e<n.length;e++)Ge(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;Ge(t.key),t.k=t.key,delete t.key,t.modifier&&(Ge(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}default:}delete e.type}function Ke(e,t){let{sourceMap:n,filename:r,breakLineCode:i,needIndent:a}=t,o=t.location!==!1,s={filename:r,code:``,column:1,line:1,offset:0,map:void 0,breakLineCode:i,needIndent:a,indentLevel:0};o&&e.loc&&(s.source=e.loc.source);let c=()=>s;function l(e,t){s.code+=e}function u(e,t=!0){let n=t?i:``;l(a?n+` `.repeat(e):n)}function d(e=!0){let t=++s.indentLevel;e&&u(t)}function f(e=!0){let t=--s.indentLevel;e&&u(t)}function p(){u(s.indentLevel)}return{context:c,push:l,indent:d,deindent:f,newline:p,helper:e=>`_${e}`,needIndent:()=>s.needIndent}}function qe(e,t){let{helper:n}=e;e.push(`${n(`linked`)}(`),Ze(e,t.key),t.modifier?(e.push(`, `),Ze(e,t.modifier),e.push(`, _type`)):e.push(`, undefined, _type`),e.push(`)`)}function Je(e,t){let{helper:n,needIndent:r}=e;e.push(`${n(`normalize`)}([`),e.indent(r());let i=t.items.length;for(let n=0;n<i&&(Ze(e,t.items[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}function Ye(e,t){let{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n(`plural`)}([`),e.indent(r());let i=t.cases.length;for(let n=0;n<i&&(Ze(e,t.cases[n]),n!==i-1);n++)e.push(`, `);e.deindent(r()),e.push(`])`)}}function Xe(e,t){t.body?Ze(e,t.body):e.push(`null`)}function Ze(e,t){let{helper:n}=e;switch(t.type){case 0:Xe(e,t);break;case 1:Ye(e,t);break;case 2:Je(e,t);break;case 6:qe(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n(`interpolate`)}(${n(`list`)}(${t.index}))`,t);break;case 4:e.push(`${n(`interpolate`)}(${n(`named`)}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break;default:}}var Qe=(e,t={})=>{let n=F(t.mode)?t.mode:`normal`,r=F(t.filename)?t.filename:`message.intl`,i=!!t.sourceMap,a=t.breakLineCode==null?n===`arrow`?`;`:`
3
+ `:t.breakLineCode,o=t.needIndent?t.needIndent:n!==`arrow`,s=e.helpers||[],c=Ke(e,{mode:n,filename:r,sourceMap:i,breakLineCode:a,needIndent:o});c.push(n===`normal`?`function __msg__ (ctx) {`:`(ctx) => {`),c.indent(o),s.length>0&&(c.push(`const { ${ye(s.map(e=>`${e}: _${e}`),`, `)} } = ctx`),c.newline()),c.push(`return `),Ze(c,e),c.deindent(o),c.push(`}`),delete e.helpers;let{code:l,map:u}=c.context();return{ast:e,code:l,map:u?u.toJSON():void 0}};function $e(e,t={}){let n=k({},t),r=!!n.jit,i=!!n.minify,a=n.optimize==null?!0:n.optimize,o=Re(n).parse(e);return r?(a&&Ue(o),i&&Ge(o),{ast:o,code:``}):(He(o,n),Qe(o,n))}function et(){typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(j().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(j().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function W(e){return L(e)&&ut(e)===0&&(M(e,`b`)||M(e,`body`))}var tt=[`b`,`body`];function nt(e){return _t(e,tt)}var rt=[`c`,`cases`];function it(e){return _t(e,rt,[])}var at=[`s`,`static`];function ot(e){return _t(e,at)}var st=[`i`,`items`];function ct(e){return _t(e,st,[])}var lt=[`t`,`type`];function ut(e){return _t(e,lt)}var dt=[`v`,`value`];function ft(e,t){let n=_t(e,dt);if(n!=null)return n;throw yt(t)}var pt=[`m`,`modifier`];function mt(e){return _t(e,pt)}var ht=[`k`,`key`];function gt(e){let t=_t(e,ht);if(t)return t;throw yt(6)}function _t(e,t,n){for(let n=0;n<t.length;n++){let r=t[n];if(M(e,r)&&e[r]!=null)return e[r]}return n}var vt=[...tt,...rt,...at,...st,...ht,...pt,...dt,...lt];function yt(e){return Error(`unhandled node type: ${e}`)}function bt(e){return t=>xt(t,e)}function xt(e,t){let n=nt(t);if(n==null)throw yt(0);if(ut(n)===1){let t=it(n);return e.plural(t.reduce((t,n)=>[...t,St(e,n)],[]))}else return St(e,n)}function St(e,t){let n=ot(t);if(n!=null)return e.type===`text`?n:e.normalize([n]);{let n=ct(t).reduce((t,n)=>[...t,Ct(e,n)],[]);return e.normalize(n)}}function Ct(e,t){let n=ut(t);switch(n){case 3:return ft(t,n);case 9:return ft(t,n);case 4:{let r=t;if(M(r,`k`)&&r.k)return e.interpolate(e.named(r.k));if(M(r,`key`)&&r.key)return e.interpolate(e.named(r.key));throw yt(n)}case 5:{let r=t;if(M(r,`i`)&&O(r.i))return e.interpolate(e.list(r.i));if(M(r,`index`)&&O(r.index))return e.interpolate(e.list(r.index));throw yt(n)}case 6:{let n=t,r=mt(n),i=gt(n);return e.linked(Ct(e,i),r?Ct(e,r):void 0,e.type)}case 7:return ft(t,n);case 8:return ft(t,n);default:throw Error(`unhandled node on format message part: ${n}`)}}var wt=e=>e,Tt=A();function Et(e,t={}){let n=!1,r=t.onError||Te;return t.onError=e=>{n=!0,r(e)},{...$e(e,t),detectError:n}}function Dt(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&F(e)){I(t.warnHtmlMessage)&&t.warnHtmlMessage;let n=(t.onCacheKey||wt)(e),r=Tt[n];if(r)return r;let{ast:i,detectError:a}=Et(e,{...t,location:!1,jit:!0}),o=bt(i);return a?o:Tt[n]=o}else{let t=e.cacheKey;return t?Tt[t]||(Tt[t]=bt(e)):bt(e)}}var Ot=null;function kt(e){Ot=e}function At(e,t,n){Ot&&Ot.emit(`i18n:init`,{timestamp:Date.now(),i18n:e,version:t,meta:n})}var jt=Mt(`function:translate`);function Mt(e){return t=>Ot&&Ot.emit(e,t)}var G={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function Nt(e){return we(e,null,void 0)}G.INVALID_ARGUMENT,G.INVALID_DATE_ARGUMENT,G.INVALID_ISO_DATE_ARGUMENT,G.NOT_SUPPORT_NON_STRING_MESSAGE,G.NOT_SUPPORT_LOCALE_PROMISE_VALUE,G.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION,G.NOT_SUPPORT_LOCALE_TYPE;function Pt(e,t){return t.locale==null?It(e.locale):It(t.locale)}var Ft;function It(e){if(F(e))return e;if(P(e)){if(e.resolvedOnce&&Ft!=null)return Ft;if(e.constructor.name===`Function`){let t=e();if(he(t))throw Nt(G.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Ft=t}else throw Nt(G.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Nt(G.NOT_SUPPORT_LOCALE_TYPE)}function Lt(e,t,n){return[...new Set([n,...N(t)?t:L(t)?Object.keys(t):F(t)?[t]:[n]])]}function Rt(e,t,n){let r=F(n)?n:en,i=e;i.__localeChainCache||=new Map;let a=i.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;N(e);)e=zt(a,e,t);let o=N(t)||!R(t)?t:t.default?t.default:null;e=F(o)?[o]:o,N(e)&&zt(a,e,!1),i.__localeChainCache.set(r,a)}return a}function zt(e,t,n){let r=!0;for(let i=0;i<t.length&&I(r);i++){let a=t[i];F(a)&&(r=Bt(e,t[i],n))}return r}function Bt(e,t,n){let r,i=t.split(`-`);do r=Vt(e,i.join(`-`),n),i.splice(-1,1);while(i.length&&r===!0);return r}function Vt(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!==`!`;let i=t.replace(/!/g,``);e.push(i),(N(n)||R(n))&&n[i]&&(r=n[i])}return r}var Ht=[];Ht[0]={w:[0],i:[3,0],"[":[4],o:[7]},Ht[1]={w:[1],".":[2],"[":[4],o:[7]},Ht[2]={w:[2],i:[3,0],0:[3,0]},Ht[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},Ht[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},Ht[5]={"'":[4,0],o:8,l:[5,0]},Ht[6]={'"':[4,0],o:8,l:[6,0]};var Ut=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Wt(e){return Ut.test(e)}function Gt(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function Kt(e){if(e==null)return`o`;switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return`i`;case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return`w`}return`i`}function qt(e){let t=e.trim();return e.charAt(0)===`0`&&isNaN(parseInt(e))?!1:Wt(t)?Gt(t):`*`+t}function Jt(e){let t=[],n=-1,r=0,i=0,a,o,s,c,l,u,d,f=[];f[0]=()=>{o===void 0?o=s:o+=s},f[1]=()=>{o!==void 0&&(t.push(o),o=void 0)},f[2]=()=>{f[0](),i++},f[3]=()=>{if(i>0)i--,r=4,f[0]();else{if(i=0,o===void 0||(o=qt(o),o===!1))return!1;f[1]()}};function p(){let t=e[n+1];if(r===5&&t===`'`||r===6&&t===`"`)return n++,s=`\\`+t,f[0](),!0}for(;r!==null;)if(n++,a=e[n],!(a===`\\`&&p())){if(c=Kt(a),d=Ht[r],l=d[c]||d.l||8,l===8||(r=l[0],l[1]!==void 0&&(u=f[l[1]],u&&(s=a,u()===!1))))return;if(r===7)return t}}var Yt=new Map;function Xt(e,t){return L(e)?e[t]:null}function Zt(e,t){if(!L(e))return null;let n=Yt.get(t);if(n||(n=Jt(t),n&&Yt.set(t,n)),!n)return null;let r=n.length,i=e,a=0;for(;a<r;){let e=n[a];if(vt.includes(e)&&W(i)||!L(i)||!M(i,e))return null;let t=i[e];if(t===void 0||P(i))return null;i=t,a++}return i}var Qt={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7,INVALID_NUMBER_ARGUMENT:8,INVALID_DATE_ARGUMENT:9};Qt.NOT_FOUND_KEY,Qt.FALLBACK_TO_TRANSLATE,Qt.CANNOT_FORMAT_NUMBER,Qt.FALLBACK_TO_NUMBER_FORMAT,Qt.CANNOT_FORMAT_DATE,Qt.FALLBACK_TO_DATE_FORMAT,Qt.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER,Qt.INVALID_NUMBER_ARGUMENT,Qt.INVALID_DATE_ARGUMENT;var $t=`11.4.2`,en=`en-US`,tn=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function nn(){return{upper:(e,t)=>t===`text`&&F(e)?e.toUpperCase():t===`vnode`&&L(e)&&`__v_isVNode`in e?e.children.toUpperCase():e,lower:(e,t)=>t===`text`&&F(e)?e.toLowerCase():t===`vnode`&&L(e)&&`__v_isVNode`in e?e.children.toLowerCase():e,capitalize:(e,t)=>t===`text`&&F(e)?tn(e):t===`vnode`&&L(e)&&`__v_isVNode`in e?tn(e.children):e}}var rn;function an(e){rn=e}var on;function sn(e){on=e}var cn;function ln(e){cn=e}var un=null,dn=()=>un,fn=null,pn=e=>{fn=e},mn=()=>fn,hn=0;function gn(e={}){let t=P(e.onWarn)?e.onWarn:ne,n=F(e.version)?e.version:$t,r=F(e.locale)||P(e.locale)?e.locale:en,i=P(r)?en:r,a=N(e.fallbackLocale)||R(e.fallbackLocale)||F(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,o=R(e.messages)?e.messages:_n(i),s=R(e.datetimeFormats)?e.datetimeFormats:_n(i),c=R(e.numberFormats)?e.numberFormats:_n(i),l=k(A(),e.modifiers,nn()),u=e.pluralRules||A(),d=P(e.missing)?e.missing:null,f=I(e.missingWarn)||se(e.missingWarn)?e.missingWarn:!0,p=I(e.fallbackWarn)||se(e.fallbackWarn)?e.fallbackWarn:!0,m=!!e.fallbackFormat,h=!!e.unresolving,g=P(e.postTranslation)?e.postTranslation:null,_=R(e.processor)?e.processor:null,v=I(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter,b=P(e.messageCompiler)?e.messageCompiler:rn,x=P(e.messageResolver)?e.messageResolver:on||Xt,S=P(e.localeFallbacker)?e.localeFallbacker:cn||Lt,ee=L(e.fallbackContext)?e.fallbackContext:void 0,C=e,w=L(C.__datetimeFormatters)?C.__datetimeFormatters:new Map,T=L(C.__numberFormatters)?C.__numberFormatters:new Map,te=L(C.__meta)?C.__meta:{};hn++;let E={version:n,cid:hn,locale:r,fallbackLocale:a,messages:o,modifiers:l,pluralRules:u,missing:d,missingWarn:f,fallbackWarn:p,fallbackFormat:m,unresolving:h,postTranslation:g,processor:_,warnHtmlMessage:v,escapeParameter:y,messageCompiler:b,messageResolver:x,localeFallbacker:S,fallbackContext:ee,onWarn:t,__meta:te};return E.datetimeFormats=s,E.numberFormats=c,E.__datetimeFormatters=w,E.__numberFormatters=T,__INTLIFY_PROD_DEVTOOLS__&&At(E,n,te),E}var _n=e=>({[e]:A()});function vn(e,t,n,r,i){let{missing:a,onWarn:o}=e;if(a!==null){let r=a(e,n,t,i);return F(r)?r:t}else return t}function yn(e,t,n){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function bn(e,t){return e===t?!1:e.split(`-`)[0]===t.split(`-`)[0]}function xn(e,t){let n=t.indexOf(e);if(n===-1)return!1;for(let r=n+1;r<t.length;r++)if(bn(e,t[r]))return!0;return!1}var Sn=typeof Intl<`u`;Sn&&Intl.DateTimeFormat,Sn&&Intl.NumberFormat;function Cn(e,...t){let{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__datetimeFormatters:s}=e;if(!F(t[0])&&!oe(t[0])&&!O(t[0]))return``;let[c,l,u,d]=Tn(...t),f=I(u.missingWarn)?u.missingWarn:e.missingWarn;I(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=Pt(e,u),h=o(e,i,m);if(!F(c)||c===``)return new Intl.DateTimeFormat(m.replace(/!/g,``),d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!R(v));t++)vn(e,c,_,f,`datetime format`);if(!R(v)||!F(_))return r?-1:c;let y=`${_}__${c}`;ce(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.DateTimeFormat(_,k({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var wn=[`localeMatcher`,`weekday`,`era`,`year`,`month`,`day`,`hour`,`minute`,`second`,`timeZoneName`,`formatMatcher`,`hour12`,`timeZone`,`dateStyle`,`timeStyle`,`calendar`,`dayPeriod`,`numberingSystem`,`hourCycle`,`fractionalSecondDigits`];function Tn(...e){let[t,n,r,i]=e,a=A(),o=A(),s;if(F(t)){let e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw Nt(G.INVALID_ISO_DATE_ARGUMENT);let n=e[3]?e[3].trim().startsWith(`T`)?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();s=new Date(n);try{s.toISOString()}catch{throw Nt(G.INVALID_ISO_DATE_ARGUMENT)}}else if(oe(t)){if(isNaN(t.getTime()))throw Nt(G.INVALID_DATE_ARGUMENT);s=t}else if(O(t))s=t;else throw Nt(G.INVALID_ARGUMENT);return F(n)?a.key=n:R(n)&&Object.keys(n).forEach(e=>{wn.includes(e)?o[e]=n[e]:a[e]=n[e]}),F(r)?a.locale=r:R(r)&&(o=r),R(i)&&(o=i),[a.key||``,s,a,o]}function En(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__datetimeFormatters.has(n)&&r.__datetimeFormatters.delete(n)}}function Dn(e,...t){let{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:a,localeFallbacker:o}=e,{__numberFormatters:s}=e;if(!O(t[0]))return``;let[c,l,u,d]=kn(...t),f=I(u.missingWarn)?u.missingWarn:e.missingWarn;I(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let p=!!u.part,m=Pt(e,u),h=o(e,i,m);if(!F(c)||c===``)return new Intl.NumberFormat(m.replace(/!/g,``),d).format(l);let g={},_,v=null;for(let t=0;t<h.length&&(_=h[t],g=n[_]||{},v=g[c],!R(v));t++)vn(e,c,_,f,`number format`);if(!R(v)||!F(_))return r?-1:c;let y=`${_}__${c}`;ce(d)||(y=`${y}__${JSON.stringify(d)}`);let b=s.get(y);return b||(b=new Intl.NumberFormat(_,k({},v,d)),s.set(y,b)),p?b.formatToParts(l):b.format(l)}var On=[`localeMatcher`,`style`,`currency`,`currencyDisplay`,`currencySign`,`useGrouping`,`minimumIntegerDigits`,`minimumFractionDigits`,`maximumFractionDigits`,`minimumSignificantDigits`,`maximumSignificantDigits`,`compactDisplay`,`notation`,`signDisplay`,`unit`,`unitDisplay`,`roundingMode`,`roundingPriority`,`roundingIncrement`,`trailingZeroDisplay`];function kn(...e){let[t,n,r,i]=e,a=A(),o=A();if(!O(t))throw Nt(G.INVALID_ARGUMENT);let s=t;return F(n)?a.key=n:R(n)&&Object.keys(n).forEach(e=>{On.includes(e)?o[e]=n[e]:a[e]=n[e]}),F(r)?a.locale=r:R(r)&&(o=r),R(i)&&(o=i),[a.key||``,s,a,o]}function An(e,t,n){let r=e;for(let e in n){let n=`${t}__${e}`;r.__numberFormatters.has(n)&&r.__numberFormatters.delete(n)}}var jn=e=>e,Mn=e=>``,Nn=`text`,Pn=e=>e.length===0?``:ye(e),Fn=ve;function In(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function Ln(e){let t=O(e.pluralIndex)?e.pluralIndex:-1;return O(e.named?.count)?e.named.count:O(e.named?.n)?e.named.n:t}function Rn(e={}){let t=e.locale,n=Ln(e),r=F(t)&&P(e.pluralRules?.[t])?e.pluralRules[t]:In,i=r===In?void 0:In,a=e=>e[r(n,e.length,i)],o=e.list||[],s=e=>o[e],c=e.named||A();O(e.pluralIndex)&&(c.count||=e.pluralIndex,c.n||=e.pluralIndex);let l=e=>c[e];function u(t,n){return(P(e.messages)?e.messages(t,!!n):L(e.messages)?e.messages[t]:!1)||(e.parent?e.parent.message(t):Mn)}let d=t=>e.modifiers?e.modifiers[t]:jn,f=P(e.processor?.normalize)?e.processor.normalize:Pn,p=P(e.processor?.interpolate)?e.processor.interpolate:Fn,m={list:s,named:l,plural:a,linked:(e,...t)=>{let[n,r]=t,i=`text`,a=``;t.length===1?L(n)?(a=n.modifier||a,i=n.type||i):F(n)&&(a=n||a):t.length===2&&(F(n)&&(a=n||a),F(r)&&(i=r||i));let o=u(e,!0)(m),s=o===``||o===void 0?e:o,c=i===`vnode`&&N(s)&&a?s[0]:s;return a?d(a)(c,i):c},message:u,type:F(e.processor?.type)?e.processor.type:Nn,interpolate:p,normalize:f,values:k(A(),o,c)};return m}var zn=()=>``,K=e=>P(e);function Bn(e,...t){let{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:a,fallbackLocale:o,messages:s}=e,[c,l]=Gn(...t),u=I(l.missingWarn)?l.missingWarn:e.missingWarn,d=I(l.fallbackWarn)?l.fallbackWarn:e.fallbackWarn,f=I(l.escapeParameter)?l.escapeParameter:e.escapeParameter,p=!!l.resolvedMessage,m=F(l.default)||I(l.default)?I(l.default)?a?c:()=>c:l.default:n?a?c:()=>c:null,h=n||m!=null&&(F(m)||P(m)),g=Pt(e,l);f&&Vn(l);let[_,v,y]=p?[c,g,s[g]||A()]:Hn(e,c,g,o,d,u),b=_,x=c;if(!p&&!(F(b)||W(b)||K(b))&&h&&(b=m,x=b),!p&&(!(F(b)||W(b)||K(b))||!F(v)))return i?-1:c;let S=!1,ee=K(b)?b:Un(e,c,v,b,x,()=>{S=!0});if(S)return b;let C=Wn(e,ee,Rn(qn(e,v,y,l))),w=r?r(C,c):C;if(f&&F(w)&&(w=pe(w)),__INTLIFY_PROD_DEVTOOLS__){let t={timestamp:Date.now(),key:F(c)?c:K(b)?b.key:``,locale:v||(K(b)?b.locale:``),format:F(b)?b:K(b)?b.source:``,message:w};t.meta=k({},e.__meta,dn()||{}),jt(t)}return w}function Vn(e){N(e.list)?e.list=e.list.map(e=>F(e)?de(e):e):L(e.named)&&Object.keys(e.named).forEach(t=>{F(e.named[t])&&(e.named[t]=de(e.named[t]))})}function Hn(e,t,n,r,i,a){let{messages:o,onWarn:s,messageResolver:c,localeFallbacker:l}=e,u=l(e,r,n),d=A(),f,p=null;for(let n=0;n<u.length&&(f=u[n],d=o[f]||A(),(p=c(d,t))===null&&(p=d[t]),!(F(p)||W(p)||K(p)));n++)if(!xn(f,u)){let n=vn(e,t,f,a,`translate`);n!==t&&(p=n)}return[p,f,d]}function Un(e,t,n,r,i,a){let{messageCompiler:o,warnHtmlMessage:s}=e;if(K(r)){let e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(o==null){let e=(()=>r);return e.locale=n,e.key=t,e}let c=o(r,Kn(e,n,i,r,s,a));return c.locale=n,c.key=t,c.source=r,c}function Wn(e,t,n){return t(n)}function Gn(...e){let[t,n,r]=e,i=A();if(!F(t)&&!O(t)&&!K(t)&&!W(t))throw Nt(G.INVALID_ARGUMENT);let a=O(t)?String(t):(K(t),t);return O(n)?i.plural=n:F(n)?i.default=n:R(n)&&!ce(n)?i.named=n:N(n)&&(i.list=n),O(r)?i.plural=r:F(r)?i.default=r:R(r)&&k(i,r),[a,i]}function Kn(e,t,n,r,i,a){return{locale:t,key:n,warnHtmlMessage:i,onError:e=>{throw a&&a(e),e},onCacheKey:e=>ie(t,n,e)}}function qn(e,t,n,r){let{modifiers:i,pluralRules:a,messageResolver:o,fallbackLocale:s,fallbackWarn:c,missingWarn:l,fallbackContext:u}=e,d={locale:t,modifiers:i,pluralRules:a,messages:(r,i)=>{let a=o(n,r);if(a==null&&(u||i)){let[n,,i]=Hn(u||e,r,t,s,c,l);a=n??o(i,r)}if(F(a)||W(a)){let n=!1,i=Un(e,r,t,a,r,()=>{n=!0});return n?zn:i}else if(K(a))return a;else return zn}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),O(r.plural)&&(d.pluralIndex=r.plural),d}et();var Jn=`11.4.2`;function Yn(){typeof __VUE_I18N_FULL_INSTALL__!=`boolean`&&(j().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!=`boolean`&&(j().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!=`boolean`&&(j().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!=`boolean`&&(j().__INTLIFY_PROD_DEVTOOLS__=!1)}var q={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function J(e,...t){return we(e,null,void 0)}q.UNEXPECTED_RETURN_TYPE,q.INVALID_ARGUMENT,q.MUST_BE_CALL_SETUP_TOP,q.NOT_INSTALLED,q.UNEXPECTED_ERROR,q.REQUIRED_VALUE,q.INVALID_VALUE,q.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN,q.NOT_INSTALLED_WITH_PROVIDE,q.NOT_COMPATIBLE_LEGACY_VUE_I18N,q.NOT_AVAILABLE_COMPOSITION_IN_LEGACY;var Xn=D(`__translateVNode`),Zn=D(`__datetimeParts`),Qn=D(`__numberParts`),$n=D(`__setPluralRules`);D(`__intlifyMeta`);var er=D(`__injectWithOption`),tr=D(`__dispose`),nr={FALLBACK_TO_ROOT:10,NOT_FOUND_PARENT_SCOPE:11,IGNORE_OBJ_FLATTEN:12,DEPRECATE_LEGACY_MODE:13,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:14,DUPLICATE_USE_I18N_CALLING:15};nr.FALLBACK_TO_ROOT,nr.NOT_FOUND_PARENT_SCOPE,nr.IGNORE_OBJ_FLATTEN,nr.DEPRECATE_LEGACY_MODE,nr.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE,nr.DUPLICATE_USE_I18N_CALLING;function rr(e){if(!L(e)||W(e))return e;for(let t in e)if(M(e,t))if(!t.includes(`.`))L(e[t])&&rr(e[t]);else{let n=t.split(`.`),r=n.length-1,i=e,a=!1;for(let e=0;e<r;e++){if(n[e]===`__proto__`)throw Error(`unsafe key: ${n[e]}`);if(n[e]in i||(i[n[e]]=A()),!L(i[n[e]])){a=!0;break}i=i[n[e]]}if(a||(W(i)?vt.includes(n[r])||delete e[t]:(i[n[r]]=e[t],delete e[t])),!W(i)){let e=i[n[r]];L(e)&&rr(e)}}return e}function ir(e,t){let{messages:n,__i18n:r,messageResolver:i,flatJson:a}=t,o=R(n)?n:N(r)?A():{[e]:A()};if(N(r)&&r.forEach(e=>{if(`locale`in e&&`resource`in e){let{locale:t,resource:n}=e;t?(o[t]=o[t]||A(),xe(n,o[t])):xe(n,o)}else F(e)&&xe(JSON.parse(e),o)}),i==null&&a)for(let e in o)M(o,e)&&rr(o[e]);return o}function ar(e){return e.type}function or(e,t,n){let r=L(t.messages)?t.messages:A();`__i18nGlobal`in n&&(r=ir(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));let i=Object.keys(r);if(i.length&&i.forEach(t=>{e.mergeLocaleMessage(t,r[t])}),L(t.datetimeFormats)){let n=Object.keys(t.datetimeFormats);n.length&&n.forEach(n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])})}if(L(t.numberFormats)){let n=Object.keys(t.numberFormats);n.length&&n.forEach(n=>{e.mergeNumberFormat(n,t.numberFormats[n])})}}function sr(e){return w(t,null,e,0)}function cr(){let e=`currentInstance`;return e in S?S[e]:ee()}var lr=()=>[],ur=()=>!1,dr=0;function fr(e){return((t,n,r,i)=>e(n,r,cr()||void 0,i))}function pr(e={}){let{__root:t,__injectWithOption:n}=e,r=t===void 0,i=e.flatJson,a=re?g:l,s=I(e.inheritLocale)?e.inheritLocale:!0,c=a(t&&s?t.locale.value:F(e.locale)?e.locale:en),u=a(t&&s?t.fallbackLocale.value:F(e.fallbackLocale)||N(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:c.value),d=a(ir(c.value,e)),f=a(R(e.datetimeFormats)?e.datetimeFormats:{[c.value]:{}}),p=a(R(e.numberFormats)?e.numberFormats:{[c.value]:{}}),m=t?t.missingWarn:I(e.missingWarn)||se(e.missingWarn)?e.missingWarn:!0,h=t?t.fallbackWarn:I(e.fallbackWarn)||se(e.fallbackWarn)?e.fallbackWarn:!0,_=t?t.fallbackRoot:I(e.fallbackRoot)?e.fallbackRoot:!0,v=!!e.fallbackFormat,y=P(e.missing)?e.missing:null,b=P(e.missing)?fr(e.missing):null,x=P(e.postTranslation)?e.postTranslation:null,S=t?t.warnHtmlMessage:I(e.warnHtmlMessage)?e.warnHtmlMessage:!0,ee=!!e.escapeParameter,C=t?t.modifiers:R(e.modifiers)?e.modifiers:{},w=e.pluralRules||t&&t.pluralRules,T;T=(()=>{r&&pn(null);let t={version:Jn,locale:c.value,fallbackLocale:u.value,messages:d.value,modifiers:C,pluralRules:w,missing:b===null?void 0:b,missingWarn:m,fallbackWarn:h,fallbackFormat:v,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:S,escapeParameter:ee,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:`vue`}};t.datetimeFormats=f.value,t.numberFormats=p.value,t.__datetimeFormatters=R(T)?T.__datetimeFormatters:void 0,t.__numberFormatters=R(T)?T.__numberFormatters:void 0;let n=gn(t);return r&&pn(n),n})(),yn(T,c.value,u.value);function E(){return[c.value,u.value,d.value,f.value,p.value]}let ne=o({get:()=>c.value,set:e=>{T.locale=e,c.value=e}}),D=o({get:()=>u.value,set:e=>{T.fallbackLocale=e,u.value=e,yn(T,c.value,e)}}),ie=o(()=>d.value),ae=o(()=>f.value),oe=o(()=>p.value);function ce(){return P(x)?x:null}function le(e){x=e,T.postTranslation=e}function A(){return y}function ue(e){e!==null&&(b=fr(e)),y=e,T.missing=b}let j=(e,n,i,a,o,s)=>{E();let c;try{__INTLIFY_PROD_DEVTOOLS__,r||(T.fallbackContext=t?mn():void 0),c=e(T)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(T.fallbackContext=void 0)}if(i!==`translate exists`&&O(c)&&c===-1||i===`translate exists`&&!c){let[e,r]=n();return t&&_?a(t):o(e)}else if(s(c))return c;else throw J(q.UNEXPECTED_RETURN_TYPE)};function de(...e){return j(t=>Reflect.apply(Bn,null,[t,...e]),()=>Gn(...e),`translate`,t=>Reflect.apply(t.t,t,[...e]),e=>e,e=>F(e))}function fe(...e){let[t,n,r]=e;if(r&&!L(r))throw J(q.INVALID_ARGUMENT);return de(t,n,k({resolvedMessage:!0},r||{}))}function pe(...e){return j(t=>Reflect.apply(Cn,null,[t,...e]),()=>Tn(...e),`datetime format`,t=>Reflect.apply(t.d,t,[...e]),()=>``,e=>F(e)||N(e))}function me(...e){return j(t=>Reflect.apply(Dn,null,[t,...e]),()=>kn(...e),`number format`,t=>Reflect.apply(t.n,t,[...e]),()=>``,e=>F(e)||N(e))}function he(e){return e.map(e=>F(e)||O(e)||I(e)?sr(String(e)):e)}let ge={normalize:he,interpolate:e=>e,type:`vnode`};function _e(...e){return j(t=>{let n,r=t;try{r.processor=ge,n=Reflect.apply(Bn,null,[r,...e])}finally{r.processor=null}return n},()=>Gn(...e),`translate`,t=>t[Xn](...e),e=>[sr(e)],e=>N(e))}function ve(...e){return j(t=>Reflect.apply(Dn,null,[t,...e]),()=>kn(...e),`number format`,t=>t[Qn](...e),lr,e=>F(e)||N(e))}function ye(...e){return j(t=>Reflect.apply(Cn,null,[t,...e]),()=>Tn(...e),`datetime format`,t=>t[Zn](...e),lr,e=>F(e)||N(e))}function be(e){w=e,T.pluralRules=w}function Se(e,t){return j(()=>{if(!e)return!1;let n=F(t)?t:c.value,r=F(t)?[n]:Rt(T,u.value,n);for(let t=0;t<r.length;t++){let n=we(r[t]),i=T.messageResolver(n,e);if(i===null&&(i=n[e]),W(i)||K(i)||F(i))return!0}return!1},()=>[e],`translate exists`,n=>Reflect.apply(n.te,n,[e,t]),ur,e=>I(e))}function Ce(e){let t=null,n=Rt(T,u.value,c.value);for(let r=0;r<n.length;r++){let i=d.value[n[r]]||{},a=T.messageResolver(i,e);if(a!=null){t=a;break}}return t}function z(e){return Ce(e)??(t&&t.tm(e)||{})}function we(e){return d.value[e]||{}}function Te(e,t){if(i){let n={[e]:t};for(let e in n)M(n,e)&&rr(n[e]);t=n[e]}d.value[e]=t,T.messages=d.value}function B(e,t){d.value[e]=d.value[e]||{};let n={[e]:t};if(i)for(let e in n)M(n,e)&&rr(n[e]);t=n[e],xe(t,d.value[e]),T.messages=d.value}function Ee(e){return f.value[e]||{}}function V(e,t){f.value[e]=t,T.datetimeFormats=f.value,En(T,e,t)}function De(e,t){f.value[e]=k(f.value[e]||{},t),T.datetimeFormats=f.value,En(T,e,t)}function Oe(e){return p.value[e]||{}}function ke(e,t){p.value[e]=t,T.numberFormats=p.value,An(T,e,t)}function Ae(e,t){p.value[e]=k(p.value[e]||{},t),T.numberFormats=p.value,An(T,e,t)}dr++,t&&re&&(te(t.locale,e=>{s&&(c.value=e,T.locale=e,yn(T,c.value,u.value))}),te(t.fallbackLocale,e=>{s&&(u.value=e,T.fallbackLocale=e,yn(T,c.value,u.value))}));let H={id:dr,locale:ne,fallbackLocale:D,get inheritLocale(){return s},set inheritLocale(e){s=e,e&&t&&(c.value=t.locale.value,u.value=t.fallbackLocale.value,yn(T,c.value,u.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:ie,get modifiers(){return C},get pluralRules(){return w||{}},get isGlobal(){return r},get missingWarn(){return m},set missingWarn(e){m=e,T.missingWarn=m},get fallbackWarn(){return h},set fallbackWarn(e){h=e,T.fallbackWarn=h},get fallbackRoot(){return _},set fallbackRoot(e){_=e},get fallbackFormat(){return v},set fallbackFormat(e){v=e,T.fallbackFormat=v},get warnHtmlMessage(){return S},set warnHtmlMessage(e){S=e,T.warnHtmlMessage=e},get escapeParameter(){return ee},set escapeParameter(e){ee=e,T.escapeParameter=e},t:de,getLocaleMessage:we,setLocaleMessage:Te,mergeLocaleMessage:B,getPostTranslationHandler:ce,setPostTranslationHandler:le,getMissingHandler:A,setMissingHandler:ue,[$n]:be};return H.datetimeFormats=ae,H.numberFormats=oe,H.rt=fe,H.te=Se,H.tm=z,H.d=pe,H.n=me,H.getDateTimeFormat=Ee,H.setDateTimeFormat=V,H.mergeDateTimeFormat=De,H.getNumberFormat=Oe,H.setNumberFormat=ke,H.mergeNumberFormat=Ae,H[er]=n,H[Xn]=_e,H[Zn]=ye,H[Qn]=ve,H}function mr(e){let t=F(e.locale)?e.locale:en,n=F(e.fallbackLocale)||N(e.fallbackLocale)||R(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=P(e.missing)?e.missing:void 0,i=I(e.silentTranslationWarn)||se(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,a=I(e.silentFallbackWarn)||se(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=I(e.fallbackRoot)?e.fallbackRoot:!0,s=!!e.formatFallbackMessages,c=R(e.modifiers)?e.modifiers:{},l=e.pluralizationRules,u=P(e.postTranslation)?e.postTranslation:void 0,d=F(e.warnHtmlInMessage)?e.warnHtmlInMessage!==`off`:!0,f=!!e.escapeParameterHtml,p=I(e.sync)?e.sync:!0,m=e.messages;if(R(e.sharedMessages)){let t=e.sharedMessages;m=Object.keys(t).reduce((e,n)=>(k(e[n]||(e[n]={}),t[n]),e),m||{})}let{__i18n:h,__root:g,__injectWithOption:_}=e,v=e.datetimeFormats,y=e.numberFormats,b=e.flatJson;return{locale:t,fallbackLocale:n,messages:m,flatJson:b,datetimeFormats:v,numberFormats:y,missing:r,missingWarn:i,fallbackWarn:a,fallbackRoot:o,fallbackFormat:s,modifiers:c,pluralRules:l,postTranslation:u,warnHtmlMessage:d,escapeParameter:f,messageResolver:e.messageResolver,inheritLocale:p,__i18n:h,__root:g,__injectWithOption:_}}function hr(e={}){let t=pr(mr(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return I(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=I(e)?!e:e},get silentFallbackWarn(){return I(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=I(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?`warn`:`off`},set warnHtmlInMessage(e){t.warnHtmlMessage=e!==`off`},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){return Reflect.apply(t.t,t,[...e])},rt(...e){return Reflect.apply(t.rt,t,[...e])},te(e,n){return t.te(e,n)},tm(e){return t.tm(e)},getLocaleMessage(e){return t.getLocaleMessage(e)},setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d(...e){return Reflect.apply(t.d,t,[...e])},getDateTimeFormat(e){return t.getDateTimeFormat(e)},setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n(...e){return Reflect.apply(t.n,t,[...e])},getNumberFormat(e){return t.getNumberFormat(e)},setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)}};return r.__extender=n,r}function gr(e,t,n){return{beforeCreate(){let r=cr();if(!r)throw J(q.UNEXPECTED_ERROR);let i=this.$options;if(i.i18n){let r=i.i18n;if(i.__i18n&&(r.__i18n=i.__i18n),r.__root=t,this===this.$root)this.$i18n=_r(e,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=hr(r);let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=_r(e,i);else{this.$i18n=hr({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});let e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;i.__i18nGlobal&&or(t,i,i),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){let e=cr();if(!e)throw J(q.UNEXPECTED_ERROR);let t=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,t.__disposer&&(t.__disposer(),delete t.__disposer,delete t.__extender),n.__deleteInstance(e),delete this.$i18n}}}function _r(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[$n](t.pluralizationRules||e.pluralizationRules);let n=ir(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(t=>e.mergeLocaleMessage(t,n[t])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n])),t.numberFormats&&Object.keys(t.numberFormats).forEach(n=>e.mergeNumberFormat(n,t.numberFormats[n])),e}var vr={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e===`parent`||e===`global`,default:`parent`},i18n:{type:Object}};function yr({slots:e},t){return t.length===1&&t[0]===`default`?(e.default?e.default():[]).reduce((e,t)=>[...e,...t.type===n?t.children:[t]],[]):t.reduce((t,n)=>{let r=e[n];return r&&(t[n]=r()),t},A())}function br(){return n}var xr=y({name:`i18n-t`,props:k({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>O(e)||!isNaN(e)}},vr),setup(e,t){let{slots:n,attrs:r}=t,i=e.i18n||Mr({useScope:e.scope,__useComponent:!0});return()=>{let a=()=>{let r=Object.keys(n).filter(e=>e[0]!==`_`),a=A();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=F(e.plural)?+e.plural:e.plural);let o=yr(t,r);return i[Xn](e.keypath,o,a)},o=k(A(),r),s=F(e.tag)||L(e.tag)?e.tag:br();return L(s)?b(s,o,{default:a}):b(s,o,a())}}});function Sr(e){return N(e)&&!F(e[0])}function Cr(e,t,n,r){let{slots:i,attrs:a}=t;return()=>{let t=()=>{let t={part:!0},a=A();e.locale&&(t.locale=e.locale),F(e.format)?t.key=e.format:L(e.format)&&(F(e.format.key)&&(t.key=e.format.key),a=Object.keys(e.format).reduce((t,r)=>n.includes(r)?k(A(),t,{[r]:e.format[r]}):t,A()));let o=r(e.value,t,a),s=[t.key];return N(o)?s=o.map((e,t)=>{let n=i[e.type],r=n?n({[e.type]:e.value,index:t,parts:o}):[e.value];return Sr(r)&&(r[0].key=`${e.type}-${t}`),r}):F(o)&&(s=[o]),s},o=k(A(),a),s=F(e.tag)||L(e.tag)?e.tag:br();return L(s)?b(s,o,{default:t}):b(s,o,t())}}var wr=y({name:`i18n-n`,props:k({value:{type:Number,required:!0},format:{type:[String,Object]}},vr),setup(e,t){let n=e.i18n||Mr({useScope:e.scope,__useComponent:!0});return Cr(e,t,On,(...e)=>n[Qn](...e))}});function Tr(e,t){let n=e;if(e.mode===`composition`)return n.__getInstance(t)||e.global;{let r=n.__getInstance(t);return r==null?e.global.__composer:r.__composer}}function Er(e){let t=t=>{let{instance:n,value:r}=t;if(!n||!n.$)throw J(q.UNEXPECTED_ERROR);let i=Tr(e,n.$),a=Dr(r);return[Reflect.apply(i.t,i,[...Or(a)]),i]};return{created:(e,n)=>{let[r,i]=t(n);re&&(e.__i18nWatcher=te(i.locale,()=>{n.instance&&n.instance.$forceUpdate()})),e.__composer=i,e.textContent=r},unmounted:e=>{re&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){let n=e.__composer,r=Dr(t);e.textContent=Reflect.apply(n.t,n,[...Or(r)])}},getSSRProps:e=>{let[n]=t(e);return{textContent:n}}}}function Dr(e){if(F(e))return{path:e};if(R(e)){if(!(`path`in e))throw J(q.REQUIRED_VALUE,`path`);return e}else throw J(q.INVALID_VALUE)}function Or(e){let{path:t,locale:n,args:r,choice:i,plural:a}=e,o={},s=r||{};return F(n)&&(o.locale=n),O(i)&&(o.plural=i),O(a)&&(o.plural=a),[t,s,o]}function kr(e,t,...n){let r=R(n[0])?n[0]:{};(!I(r.globalInstall)||r.globalInstall)&&([xr.name,`I18nT`].forEach(t=>e.component(t,xr)),[wr.name,`I18nN`].forEach(t=>e.component(t,wr)),[Ur.name,`I18nD`].forEach(t=>e.component(t,Ur))),e.directive(`t`,Er(t))}var Ar=D(`global-vue-i18n`);function jr(e={}){let t=__VUE_I18N_LEGACY_API__&&I(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,n=I(e.globalInjection)?e.globalInjection:!0,r=new Map,[i,a]=Nr(e,t),o=D(``);function s(e){return r.get(e)||null}function c(e,t){r.set(e,t)}function l(e){r.delete(e)}let u={get mode(){return __VUE_I18N_LEGACY_API__&&t?`legacy`:`composition`},async install(e,...r){if(e.__VUE_I18N_SYMBOL__=o,e.provide(e.__VUE_I18N_SYMBOL__,u),R(r[0])){let e=r[0];u.__composerExtend=e.__composerExtend,u.__vueI18nExtend=e.__vueI18nExtend}let i=null;!t&&n&&(i=Hr(e,u.global)),__VUE_I18N_FULL_INSTALL__&&kr(e,u,...r),__VUE_I18N_LEGACY_API__&&t&&e.mixin(gr(a,a.__composer,u));let s=e.unmount;e.unmount=()=>{i&&i(),u.dispose(),s()}},get global(){return a},dispose(){i.stop()},__instances:r,__getInstance:s,__setInstance:c,__deleteInstance:l};return u}function Mr(e={}){let t=cr();if(t==null)throw J(q.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw J(q.NOT_INSTALLED);let n=Pr(t),r=Ir(n),i=ar(t),o=Fr(e,i);if(o===`global`)return or(r,e,i),r;if(o===`parent`){let i=Lr(n,t,e.__useComponent);return i??=r,i}if(o===`isolated`){if(n.mode!==`composition`)throw J(q.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);let i=n,o=k({},e);o.__root=Lr(n,t)||r;let s=pr(o);return i.__composerExtend&&(s[tr]=i.__composerExtend(s)),a()&&f(()=>{let e=s[tr];e&&(e(),delete s[tr])}),s}let s=n,c=s.__getInstance(t);if(c==null){let n=k({},e);`__i18n`in i&&(n.__i18n=i.__i18n),r&&(n.__root=r),c=pr(n),s.__composerExtend&&(c[tr]=s.__composerExtend(c)),zr(s,t,c),s.__setInstance(t,c)}return c}function Nr(e,t){let n=r(),i=__VUE_I18N_LEGACY_API__&&t?n.run(()=>hr(e)):n.run(()=>pr(e));if(i==null)throw J(q.UNEXPECTED_ERROR);return[n,i]}function Pr(e){let t=T(e.isCE?Ar:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw J(e.isCE?q.NOT_INSTALLED_WITH_PROVIDE:q.UNEXPECTED_ERROR);return t}function Fr(e,t){return ce(e)?`__i18n`in t?`local`:`global`:e.useScope?e.useScope:`local`}function Ir(e){return e.mode===`composition`?e.global:e.global.__composer}function Lr(e,t,n=!1){let r=null,i=t.root,a=Rr(t,n);for(;a!=null;){let t=e;if(e.mode===`composition`)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){let e=t.__getInstance(a);e!=null&&(r=e.__composer,n&&r&&!r[er]&&(r=null))}if(r!=null||i===a)break;a=a.parent}return r}function Rr(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function zr(e,t,n){u(()=>{},t),i(()=>{let r=n;e.__deleteInstance(t);let i=r[tr];i&&(i(),delete r[tr])},t)}var Br=[`locale`,`fallbackLocale`,`availableLocales`],Vr=[`t`,`rt`,`d`,`n`,`tm`,`te`];function Hr(e,t){let n=Object.create(null);return Br.forEach(e=>{let r=Object.getOwnPropertyDescriptor(t,e);if(!r)throw J(q.UNEXPECTED_ERROR);let i=d(r.value)?{get(){return r.value.value},set(e){r.value.value=e}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,e,i)}),e.config.globalProperties.$i18n=n,Vr.forEach(n=>{let r=Object.getOwnPropertyDescriptor(t,n);if(!r||!r.value)throw J(q.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,r)}),()=>{delete e.config.globalProperties.$i18n,Vr.forEach(t=>{delete e.config.globalProperties[`$${t}`]})}}var Ur=y({name:`i18n-d`,props:k({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},vr),setup(e,t){let n=e.i18n||Mr({useScope:e.scope,__useComponent:!0});return Cr(e,t,wn,(...e)=>n[Zn](...e))}});if(Yn(),an(Dt),sn(Zt),ln(Rt),__INTLIFY_PROD_DEVTOOLS__){let e=j();e.__INTLIFY__=!0,kt(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}function Wr(e,t){if(e instanceof Error)return e.message;if(typeof e==`object`&&e){let t=e;if(typeof t.details==`string`&&t.details)return t.details;if(typeof t.message==`string`&&t.message)return t.message}return t===void 0?String(e):t}function Gr(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Kr(e){return typeof e==`object`&&!!e}function qr(e){return typeof e==`string`&&e.trim().length>0}function Jr(e,t){return Gr(e)&&typeof e[t]==`string`}var Yr=null;function Xr(e){Yr=e}function Zr(e){if(!e)return``;let t=[];for(let[n,r]of Object.entries(e))r!==void 0&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(r))}`);return t.length===0?``:`?${t.join(`&`)}`}function Qr(e,t){let n={...e.headers??{}};return t&&n[`Content-Type`]===void 0&&(n[`Content-Type`]=`application/json`),Yr&&n.Authorization===void 0&&(n.Authorization=`Bearer ${Yr}`),n}async function $r(e){let{status:t}=e;try{let n=await e.clone().json();if(Jr(n,`error`))return{error:n.error,status:t}}catch{}return{error:e.statusText||`Request failed (${t})`,status:t}}async function ei(e,t={}){let n=t.method??`GET`,r=t.body!==void 0,i=`${e}${Zr(t.query)}`,a={method:n,headers:Qr(t,r),signal:t.signal};r&&(a.body=JSON.stringify(t.body));let o;try{o=await fetch(i,a)}catch(e){return{ok:!1,error:Wr(e),status:0}}if(!o.ok){let{error:e,status:t}=await $r(o);return{ok:!1,error:e,status:t}}try{return{ok:!0,data:await o.json()}}catch(e){return{ok:!1,error:`Invalid JSON response: ${Wr(e)}`,status:o.status}}}function ti(e,t,n={}){return ei(e,{...n,method:`GET`,query:t})}function ni(e,t,n={}){return ei(e,{...n,method:`POST`,body:t})}function ri(e,t,n={}){return ei(e,{...n,method:`PUT`,body:t})}function ii(e,t,n={}){return ei(e,{...n,method:`DELETE`,body:t})}async function ai(e,t={}){let n=`${e}${Zr(t.query)}`,r={method:t.method??`GET`,headers:Qr(t,!1),body:t.body,signal:t.signal};return fetch(n,r)}var oi={message:`/api/transports/:transportId/chats/:externalChatId`,connect:`/api/transports/:transportId/chats/:externalChatId/connect`};function Y(e){return e}function si(e,t){if(!t)return e.url;let{url:n}=e;for(let[e,r]of Object.entries(t)){let t=`:${e}`;n.includes(t)&&(n=n.split(t).join(encodeURIComponent(String(r))))}return n}var ci=Y({toolName:`manageAccounting`,apiNamespace:`accounting`,apiRoutes:{dispatch:{method:`POST`,path:``}},mcpDispatch:`dispatch`,workspaceDirs:{accounting:`data/accounting`,accountingBooks:`data/accounting/books`},staticChannels:{accountingBooks:`accounting:books`}});function li(e){return`accounting:${e}`}var ui=Y({toolName:`openCanvas`,apiNamespace:`canvas`,apiRoutes:{dispatch:{method:`POST`,path:``}},mcpDispatch:`dispatch`}),di=Y({toolName:`presentChart`,apiNamespace:`chart`,apiRoutes:{create:{method:`POST`,path:``}},mcpDispatch:`create`}),fi=Y({toolName:`editImages`}),pi=Y({toolName:`generateImage`}),mi=Y({toolName:`manageSkills`,apiNamespace:`skills`,apiRoutes:{list:{method:`GET`,path:``},detail:{method:`GET`,path:`/:name`},create:{method:`POST`,path:``},update:{method:`PUT`,path:`/:name`},remove:{method:`DELETE`,path:`/:name`}},mcpDispatch:`create`}),hi=Y({toolName:`manageSource`,apiNamespace:`sources`,apiRoutes:{list:{method:`GET`,path:``},create:{method:`POST`,path:``},remove:{method:`DELETE`,path:`/:slug`},rebuild:{method:`POST`,path:`/rebuild`},manage:{method:`POST`,path:`/manage`}},mcpDispatch:`manage`}),gi=Y({toolName:`presentDocument`,apiNamespace:`markdown`,apiRoutes:{create:{method:`POST`,path:``},update:{method:`PUT`,path:`/update`}},mcpDispatch:`create`}),_i=Y({toolName:`managePhotoLocations`,apiNamespace:`photoLocations`,apiRoutes:{dispatch:{method:`POST`,path:``}},mcpDispatch:`dispatch`,staticChannels:{locationsChanged:`photoLocations:locations-changed`}}),vi=Y({toolName:`presentForm`,apiNamespace:`form`,apiRoutes:{dispatch:{method:`POST`,path:``}},mcpDispatch:`dispatch`}),yi=Y({toolName:`presentHtml`,apiNamespace:`html`,apiRoutes:{create:{method:`POST`,path:``},update:{method:`PUT`,path:`/update`}},mcpDispatch:`create`}),bi=Y({toolName:`presentMulmoScript`,apiNamespace:`mulmoScript`,apiRoutes:{save:{method:`POST`,path:`/save`},updateBeat:{method:`POST`,path:`/update-beat`},updateScript:{method:`POST`,path:`/update-script`},beatImage:{method:`GET`,path:`/beat-image`},beatAudio:{method:`GET`,path:`/beat-audio`},generateBeatAudio:{method:`POST`,path:`/generate-beat-audio`},renderBeat:{method:`POST`,path:`/render-beat`},uploadBeatImage:{method:`POST`,path:`/upload-beat-image`},characterImage:{method:`GET`,path:`/character-image`},renderCharacter:{method:`POST`,path:`/render-character`},uploadCharacterImage:{method:`POST`,path:`/upload-character-image`},movieStatus:{method:`GET`,path:`/movie-status`},generateMovie:{method:`POST`,path:`/generate-movie`},downloadMovie:{method:`GET`,path:`/download-movie`}},mcpDispatch:`save`}),xi=Y({toolName:`presentSVG`,apiNamespace:`svg`,apiRoutes:{create:{method:`POST`,path:``},update:{method:`PUT`,path:`/update`}},mcpDispatch:`create`}),Si=Y({toolName:`manageAutomations`}),Ci=Y({toolName:`manageCalendar`,apiNamespace:`scheduler`,apiRoutes:{list:{method:`GET`,path:``},dispatch:{method:`POST`,path:``},tasksList:{method:`GET`,path:`/tasks`},tasksCreate:{method:`POST`,path:`/tasks`},taskUpdate:{method:`PUT`,path:`/tasks/:id`},taskDelete:{method:`DELETE`,path:`/tasks/:id`},taskRun:{method:`POST`,path:`/tasks/:id/run`},logs:{method:`GET`,path:`/logs`}},mcpDispatch:`dispatch`}),wi=Y({toolName:`presentSpreadsheet`,apiNamespace:`spreadsheet`,apiRoutes:{create:{method:`POST`,path:``},update:{method:`PUT`,path:`/update`}},mcpDispatch:`create`}),Ti=[ci,ui,di,fi,pi,mi,hi,gi,_i,vi,yi,bi,xi,Si,Ci,wi,Y({toolName:`manageWiki`})];function Ei(e,t,n){let r={},i={},a=[];for(let o of e){let e=t(o);if(e)for(let[t,s]of Object.entries(e)){let e=i[t];if(e!==void 0){a.push({dimension:n,key:t,plugins:[e,o.toolName]});continue}r[t]=s,i[t]=o.toolName}}return{aggregate:r,owner:i,collisions:a}}function Di(e,t,n,r){let i={},a=[];for(let[o,s]of Object.entries(n)){if(t.has(o)){a.push({label:e,key:o,plugin:r[o]??``});continue}i[o]=s}return{cleaned:i,dropped:a}}function Oi(e,t){let{aggregate:n,owner:r,collisions:i}=Ei(e,t.extract,t.dimension),a=new Set(Object.keys(t.hostRecord));if(t.additionalReservedKeys)for(let e of t.additionalReservedKeys)a.add(e);let{cleaned:o,dropped:s}=Di(t.label,a,n,r);return{merged:{...t.hostRecord,...o},hostCollisions:s,intraCollisions:i}}function ki(e,t){let n={};for(let[r,i]of Object.entries(t))n[r]={method:i.method,url:`/api/${e}${i.path}`};return n}var Ai=Oi(Ti,{label:`API_ROUTES`,hostRecord:{health:`/api/health`,sandbox:`/api/sandbox`,agent:{run:`/api/agent`,cancel:`/api/agent/cancel`,internal:{toolResult:`/api/internal/tool-result`}},chatIndex:{rebuild:`/api/chat-index/rebuild`},chatService:oi,config:{base:`/api/config`,settings:`/api/config/settings`,mcp:`/api/config/mcp`,workspaceDirs:`/api/config/workspace-dirs`,referenceDirs:`/api/config/reference-dirs`,schedulerOverrides:`/api/config/scheduler-overrides`,refresh:`/api/config/refresh`},files:{tree:`/api/files/tree`,dir:`/api/files/dir`,content:`/api/files/content`,raw:`/api/files/raw`,refRoots:`/api/files/ref-roots`},image:{generate:`/api/generate-image`,edit:`/api/edit-image`,upload:`/api/images`,update:`/api/images/update`},attachments:{upload:`/api/attachments`},mcpTools:{list:`/api/mcp-tools`,invoke:`/api/mcp-tools/:tool`},notifications:{test:`/api/notifications/test`},notifier:{dispatch:`/api/notifier`},journal:{latestDaily:`/api/journal/latest-daily`},pdf:{markdown:`/api/pdf/markdown`},translation:{translate:`/api/translation`},plugins:{mindmap:`/api/mindmap`,quiz:`/api/quiz`,present3d:`/api/present3d`,googleMap:`/api/google-map`,runtimeList:`/api/plugins/runtime/list`,runtimeDispatch:`/api/plugins/runtime/:pkg/dispatch`,runtimeOauthCallback:`/api/plugins/runtime/oauth-callback/:alias`,diagnostics:`/api/plugins/diagnostics`,runtimeAsset:`/api/plugins/runtime/:pkg/:version/{*splat}`},roles:{list:`/api/roles`,manage:`/api/roles/manage`},sessions:{list:`/api/sessions`,detail:`/api/sessions/:id`,markRead:`/api/sessions/:id/mark-read`,bookmark:`/api/sessions/:id/bookmark`},news:{items:`/api/news/items`,itemBody:`/api/news/items/:id/body`,readState:`/api/news/read-state`},hooks:{log:`/api/hooks/log`},wiki:{base:`/api/wiki`,pageHistory:`/api/wiki/pages/:slug/history`,pageHistorySnapshot:`/api/wiki/pages/:slug/history/:stamp`,pageHistoryRestore:`/api/wiki/pages/:slug/history/:stamp/restore`,internalSnapshot:`/api/wiki/internal/snapshot`}},extract:e=>{if(e.apiRoutes===void 0)return;let t=e.apiNamespace??e.toolName;return{[t]:ki(t,e.apiRoutes)}},dimension:`apiNamespace`});Ai.hostCollisions,Ai.intraCollisions;var ji=Ai.merged,Mi=Object.create(null);Mi.open=`0`,Mi.close=`1`,Mi.ping=`2`,Mi.pong=`3`,Mi.message=`4`,Mi.upgrade=`5`,Mi.noop=`6`;var Ni=Object.create(null);Object.keys(Mi).forEach(e=>{Ni[Mi[e]]=e});var Pi={type:`error`,data:`parser error`},Fi=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,Ii=typeof ArrayBuffer==`function`,Li=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ri=({type:e,data:t},n,r)=>Fi&&t instanceof Blob?n?r(t):zi(t,r):Ii&&(t instanceof ArrayBuffer||Li(t))?n?r(t):zi(new Blob([t]),r):r(Mi[e]+(t||``)),zi=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function Bi(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var Vi;function Hi(e,t){if(Fi&&e.data instanceof Blob)return e.data.arrayBuffer().then(Bi).then(t);if(Ii&&(e.data instanceof ArrayBuffer||Li(e.data)))return t(Bi(e.data));Ri(e,!1,e=>{Vi||=new TextEncoder,t(Vi.encode(e))})}var Ui=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Wi=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)Wi[Ui.charCodeAt(e)]=e;var Gi=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=Wi[e.charCodeAt(r)],o=Wi[e.charCodeAt(r+1)],s=Wi[e.charCodeAt(r+2)],c=Wi[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Ki=typeof ArrayBuffer==`function`,qi=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:Yi(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:Ji(e.substring(1),t)}:Ni[n]?e.length>1?{type:Ni[n],data:e.substring(1)}:{type:Ni[n]}:Pi},Ji=(e,t)=>Ki?Yi(Gi(e),t):{base64:!0,data:e},Yi=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},Xi=``,Zi=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{Ri(e,!1,e=>{r[a]=e,++i===n&&t(r.join(Xi))})})},Qi=(e,t)=>{let n=e.split(Xi),r=[];for(let e=0;e<n.length;e++){let i=qi(n[e],t);if(r.push(i),i.type===`error`)break}return r};function $i(){return new TransformStream({transform(e,t){Hi(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var ea;function ta(e){return e.reduce((e,t)=>e+t.length,0)}function na(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function ra(e,t){ea||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(ta(n)<1)break;let e=na(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(ta(n)<2)break;let e=na(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(ta(n)<8)break;let e=na(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(Pi);break}i=a*2**32+t.getUint32(4),r=3}else{if(ta(n)<i)break;let e=na(n,i);s.enqueue(qi(a?e:ea.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(Pi);break}}}})}function X(e){if(e)return ia(e)}function ia(e){for(var t in X.prototype)e[t]=X.prototype[t];return e}X.prototype.on=X.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},X.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},X.prototype.off=X.prototype.removeListener=X.prototype.removeAllListeners=X.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},X.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},X.prototype.emitReserved=X.prototype.emit,X.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},X.prototype.hasListeners=function(e){return!!this.listeners(e).length};var aa=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Z=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),oa=`arraybuffer`;function sa(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var ca=Z.setTimeout,la=Z.clearTimeout;function ua(e,t){t.useNativeTimers?(e.setTimeoutFn=ca.bind(Z),e.clearTimeoutFn=la.bind(Z)):(e.setTimeoutFn=Z.setTimeout.bind(Z),e.clearTimeoutFn=Z.clearTimeout.bind(Z))}var da=1.33;function fa(e){return typeof e==`string`?pa(e):Math.ceil((e.byteLength||e.size)*da)}function pa(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function ma(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function ha(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function ga(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var _a=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},va=class extends X{constructor(e){super(),this.writable=!1,ua(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new _a(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=qi(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=ha(e);return t.length?`?`+t:``}},ya=class extends va{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}onData(e){Qi(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,Zi(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=ma()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},ba=!1;try{ba=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var xa=ba;function Sa(){}var Ca=class extends ya{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},wa=class e extends X{constructor(e,t,n){super(),this.createRequest=e,ua(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=sa(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(this._xhr===void 0||this._xhr===null)){if(this._xhr.onreadystatechange=Sa,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(wa.requestsCount=0,wa.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,Ta);else if(typeof addEventListener==`function`){let e=`onpagehide`in Z?`pagehide`:`unload`;addEventListener(e,Ta,!1)}}function Ta(){for(let e in wa.requests)wa.requests.hasOwnProperty(e)&&wa.requests[e].abort()}var Ea=(function(){let e=Oa({xdomain:!1});return e&&e.responseType!==null})(),Da=class extends Ca{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ea&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new wa(Oa,this.uri(),e)}};function Oa(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||xa))return new XMLHttpRequest}catch{}if(!t)try{return new Z[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var ka=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,Aa=class extends va{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=ka?{}:sa(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;Ri(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&aa(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=ma()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},ja=Z.WebSocket||Z.MozWebSocket,Ma={websocket:class extends Aa{createSocket(e,t,n){return ka?new ja(e,t,n):t?new ja(e,t):new ja(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends va{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=ra(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=$i();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&aa(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:Da},Na=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Pa=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function Fa(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=Na.exec(e||``),a={},o=14;for(;o--;)a[Pa[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=Ia(a,a.path),a.queryKey=La(a,a.query),a}function Ia(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function La(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var Ra=typeof addEventListener==`function`&&typeof removeEventListener==`function`,za=[];Ra&&addEventListener(`offline`,()=>{za.forEach(e=>e())},!1);var Ba=class e extends X{constructor(e,t){if(super(),this.binaryType=oa,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=Fa(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=Fa(t.host).host);ua(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=ga(this.opts.query)),Ra&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},za.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data);break}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=fa(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,aa(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={},n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),Ra&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=za.indexOf(this._offlineEventListener);e!==-1&&za.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};Ba.protocol=4;var Va=class extends Ba{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;Ba.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;Ba.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},Ha=class extends Va{constructor(e,t={}){let n=typeof e==`object`?e:t;(!n.transports||n.transports&&typeof n.transports[0]==`string`)&&(n.transports=(n.transports||[`polling`,`websocket`,`webtransport`]).map(e=>Ma[e]).filter(e=>!!e)),super(e,n)}};Ha.protocol;function Ua(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=Fa(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var Wa=typeof ArrayBuffer==`function`,Ga=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Ka=Object.prototype.toString,qa=typeof Blob==`function`||typeof Blob<`u`&&Ka.call(Blob)===`[object BlobConstructor]`,Ja=typeof File==`function`||typeof File<`u`&&Ka.call(File)===`[object FileConstructor]`;function Ya(e){return Wa&&(e instanceof ArrayBuffer||Ga(e))||qa&&e instanceof Blob||Ja&&e instanceof File}function Xa(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(Xa(e[t]))return!0;return!1}if(Ya(e))return!0;if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return Xa(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Xa(e[t]))return!0;return!1}function Za(e){let t=[],n=e.data,r=e;return r.data=Qa(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Qa(e,t){if(!e)return e;if(Ya(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=Qa(e[r],t);return n}else if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Qa(e[r],t));return n}return e}function $a(e,t){return e.data=eo(e.data,t),delete e.attachments,e}function eo(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=eo(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=eo(e[n],t));return e}var to=e({Decoder:()=>io,Encoder:()=>ro,PacketType:()=>Q,isPacketValid:()=>fo,protocol:()=>5}),no=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],Q;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(Q||={});var ro=class{constructor(e){this.replacer=e}encode(e){return(e.type===Q.EVENT||e.type===Q.ACK)&&Xa(e)?this.encodeAsBinary({type:e.type===Q.EVENT?Q.BINARY_EVENT:Q.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===Q.BINARY_EVENT||e.type===Q.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Za(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},io=class e extends X{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===Q.BINARY_EVENT;n||t.type===Q.BINARY_ACK?(t.type=n?Q.EVENT:Q.ACK,this.reconstructor=new ao(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(Ya(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(Q[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===Q.BINARY_EVENT||r.type===Q.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!so(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&!(t.charAt(n)===`,`||n===t.length););r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case Q.CONNECT:return lo(t);case Q.DISCONNECT:return t===void 0;case Q.CONNECT_ERROR:return typeof t==`string`||lo(t);case Q.EVENT:case Q.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&no.indexOf(t[0])===-1);case Q.ACK:case Q.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},ao=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=$a(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function oo(e){return typeof e==`string`}var so=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function co(e){return e===void 0||so(e)}function lo(e){return Object.prototype.toString.call(e)===`[object Object]`}function uo(e,t){switch(e){case Q.CONNECT:return t===void 0||lo(t);case Q.DISCONNECT:return t===void 0;case Q.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&no.indexOf(t[0])===-1);case Q.ACK:return Array.isArray(t);case Q.CONNECT_ERROR:return typeof t==`string`||lo(t);default:return!1}}function fo(e){return oo(e.nsp)&&co(e.id)&&uo(e.type,e.data)}function $(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var po=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),mo=class extends X{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[$(e,`open`,this.onopen.bind(this)),$(e,`packet`,this.onpacket.bind(this)),$(e,`error`,this.onerror.bind(this)),$(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(po.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:Q.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Q.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Q.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case Q.EVENT:case Q.BINARY_EVENT:this.onevent(e);break;case Q.ACK:case Q.BINARY_ACK:this.onack(e);break;case Q.DISCONNECT:this.ondisconnect();break;case Q.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:Q.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Q.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function ho(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ho.prototype.duration=function(){var e=this.ms*this.factor**+ this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},ho.prototype.reset=function(){this.attempts=0},ho.prototype.setMin=function(e){this.ms=e},ho.prototype.setMax=function(e){this.max=e},ho.prototype.setJitter=function(e){this.jitter=e};var go=class extends X{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,ua(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new ho({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||to;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new Ha(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=$(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=$(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push($(e,`ping`,this.onping.bind(this)),$(e,`data`,this.ondata.bind(this)),$(e,`error`,this.onerror.bind(this)),$(e,`close`,this.onclose.bind(this)),$(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){aa(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new mo(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},_o={};function vo(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=Ua(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=_o[i]&&a in _o[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new go(r,t):(_o[i]||(_o[i]=new go(r,t)),c=_o[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(vo,{Manager:go,Socket:mo,io:vo,connect:vo});var yo=null,bo=new Map;function xo(e){for(let t of bo.keys())e.emit(`subscribe`,t)}function So(){if(yo)return yo;let e=vo({path:`/ws/pubsub`,transports:[`websocket`]});return e.on(`connect`,()=>xo(e)),e.on(`data`,e=>{let t=bo.get(e.channel);if(t)for(let n of t)n(e.data)}),yo=e,e}function Co(){bo.size>0||(yo&&=(yo.disconnect(),null))}function wo(){function e(e,t){let n=bo.get(e);n||(n=new Set,bo.set(e,n)),n.add(t);let r=So();return r.connected&&r.emit(`subscribe`,e),()=>{let n=bo.get(e);n&&(n.delete(t),n.size===0&&(bo.delete(e),yo?.connected&&yo.emit(`unsubscribe`,e)),Co())}}return{subscribe:e}}function To(e,t){return`plugin:${e}:${t}`}function Eo(e){let{subscribe:t}=wo();return{subscribe(n,r){return t(To(e,n),r)}}}function Do(e){let t=`[plugin/${e}]`;return{debug:(e,n)=>console.debug(t,e,n),info:(e,n)=>console.info(t,e,n),warn:(e,n)=>console.warn(t,e,n),error:(e,n)=>console.error(t,e,n)}}var Oo=new Set([`http:`,`https:`]);function ko(e){return t=>{let n;try{n=new URL(t)}catch{console.warn(`[plugin/${e}] openUrl rejected unparseable URL`,{url:t});return}if(!Oo.has(n.protocol)){console.warn(`[plugin/${e}] openUrl rejected non-http(s) scheme`,{scheme:n.protocol});return}window.open(t,`_blank`,`noopener,noreferrer`)||console.warn(`[plugin/${e}] window.open returned null`,{url:t})}}function Ao(e){let t=ji.plugins.runtimeDispatch.replace(`:pkg`,encodeURIComponent(e));return async n=>{let r=await ni(t,n);if(!r.ok)throw Error(`plugin/${e} dispatch failed (${r.status}): ${r.error}`);return r.data}}function jo(e){let{pkgName:t,endpoints:n}=e,{locale:r}=Mr(),i=o(()=>String(r.value));return{pubsub:Eo(t),locale:i,log:Do(t),openUrl:ko(t),dispatch:Ao(t),endpoints:n}}function Mo(e){let t=g(null),n=g(!1),r=g(0),i=o(()=>{if(!t.value)return``;let e=t.value.message||String(t.value),n=t.value.stack??``;return n?`${e}\n\n${n}`:e});function a(n){let r=n instanceof Error?n:Error(String(n));console.error(`[plugin/${e}] uncaught error`,r),t.value=r}function s(){t.value=null,n.value=!1,r.value+=1}return{error:t,showDetails:n,mountKey:r,errorDetails:i,captureError:a,retry:s}}var No={key:0,class:`rounded border border-red-200 bg-red-50 p-3 text-sm`,"data-testid":`plugin-error-boundary`,role:`alert`},Po={class:`flex items-center gap-2 mb-1`},Fo={class:`font-medium text-red-800`},Io={class:`text-red-700 mb-2`},Lo={class:`flex items-center gap-3`},Ro={key:0,class:`mt-2 text-xs text-red-900 bg-red-100 p-2 rounded overflow-auto max-h-40 whitespace-pre-wrap break-words`},zo=y({__name:`PluginScopedRoot`,props:{pkgName:{},endpoints:{}},setup(e){let t=e,{t:n}=Mr();s(E,jo({pkgName:t.pkgName,endpoints:t.endpoints}));let{error:r,showDetails:i,mountKey:a,errorDetails:o,captureError:l,retry:u}=Mo(t.pkgName);return c(e=>(l(e),!1)),(t,s)=>v(r)?(p(),m(`div`,No,[C(`div`,Po,[s[2]||=C(`span`,{class:`material-icons text-red-500`,"aria-hidden":`true`},`error_outline`,-1),C(`span`,Fo,x(v(n)(`pluginErrorBoundary.title`,{pkg:e.pkgName})),1)]),C(`p`,Io,x(v(n)(`pluginErrorBoundary.subtitle`)),1),C(`div`,Lo,[C(`button`,{type:`button`,class:`text-xs text-red-600 hover:underline`,"data-testid":`plugin-error-toggle-details`,onClick:s[0]||=e=>i.value=!v(i)},x(v(i)?v(n)(`pluginErrorBoundary.hideDetails`):v(n)(`pluginErrorBoundary.showDetails`)),1),C(`button`,{type:`button`,class:`text-xs text-red-600 hover:underline`,"data-testid":`plugin-error-retry`,onClick:s[1]||=(...e)=>v(u)&&v(u)(...e)},x(v(n)(`pluginErrorBoundary.retry`)),1)]),v(i)?(p(),m(`pre`,Ro,x(v(o)),1)):h(``,!0)])):_(t.$slots,`default`,{key:v(a)})}}),Bo=e({default:()=>Vo}),Vo=zo;export{Gr as A,ai as C,Xr as D,ri as E,jr as M,Mr as N,qr as O,ii as S,ni as T,ui as _,Ti as a,si as b,xi as c,vi as d,_i as f,di as g,mi as h,ji as i,Wr as j,Kr as k,bi as l,hi as m,Bo as n,Oi as o,gi as p,wo as r,wi as s,Vo as t,yi as u,ci as v,ti as w,ei as x,li as y};