@runeya/runeya 2.0.152 → 2.0.154

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 (108) hide show
  1. package/{chat-Z7SFBEXS.js → chat-COP27XB3.js} +3 -3
  2. package/{chunk-EUTW2S4P.js → chunk-OLHL5NFP.js} +7 -4
  3. package/chunk-OLHL5NFP.js.map +1 -0
  4. package/{chunk-QJSIN26R.js → chunk-VKYSHTYT.js} +443 -78
  5. package/chunk-VKYSHTYT.js.map +1 -0
  6. package/{companion-ZDEGNZ2G.js → companion-3MW23ONE.js} +2 -2
  7. package/index.js +7 -7
  8. package/{install-gate-TSCXUCYE.js → install-gate-3UVXPA57.js} +2 -2
  9. package/package.json +1 -1
  10. package/{src-NWPED6TK.js → src-K4E6GUCZ.js} +37 -25
  11. package/src-K4E6GUCZ.js.map +1 -0
  12. package/web/assets/{AgentScalarChatInterface.vue-0pB6D9jL.js → AgentScalarChatInterface.vue-BtA-f77q.js} +3 -3
  13. package/web/assets/{AgentTerminalPage-D1c5A1Ol.js → AgentTerminalPage-2Ky-vEkw.js} +1 -1
  14. package/web/assets/AiChatModals-BV3vIIqN.js +4 -0
  15. package/web/assets/AiChatModals-DS5R3Oz1.css +1 -0
  16. package/web/assets/AppLayout-BgPr-urw.css +1 -0
  17. package/web/assets/AppLayout-DsczwAFI.js +1 -0
  18. package/web/assets/{AuditPage-B_Ee8f0S.js → AuditPage-DoKHFRJ7.js} +1 -1
  19. package/web/assets/{CloudAccountPage-D1L8Z_V3.js → CloudAccountPage-CDQNalgx.js} +1 -1
  20. package/web/assets/{CloudMessagingPage-CyZF0sdY.js → CloudMessagingPage-DduCz3KB.js} +1 -1
  21. package/web/assets/{DashboardPage-BeWd0GWF.js → DashboardPage-ClJR5DiP.js} +1 -1
  22. package/web/assets/{DirectoryPickerDialog-BGhbB66i.js → DirectoryPickerDialog-CVVg3SzI.js} +1 -1
  23. package/web/assets/{EditorIcon-CcU8Z46_.js → EditorIcon-DksI79ZN.js} +1 -1
  24. package/web/assets/{EnvironmentForm-B0FYydAK.js → EnvironmentForm-eMpLFv_-.js} +1 -1
  25. package/web/assets/{EnvironmentFormPage-BdTdOUBD.js → EnvironmentFormPage-DXH2lgk_.js} +1 -1
  26. package/web/assets/{EnvironmentListPage-Cy9Kg5pY.js → EnvironmentListPage-D-g_8lQw.js} +1 -1
  27. package/web/assets/{FlagChip-maG1f7pl.js → FlagChip-DjC14z4J.js} +1 -1
  28. package/web/assets/KanbanBoardPage-BeSkCN6I.js +4 -0
  29. package/web/assets/KanbanBoardPage-BrFqn87r.css +1 -0
  30. package/web/assets/{KanbanListPage-BigioApQ.css → KanbanListPage-DCK-N3nw.css} +1 -1
  31. package/web/assets/{KanbanListPage-BOxLKDpW.js → KanbanListPage-DnhCC5ET.js} +1 -1
  32. package/web/assets/{LaunchProjectPage-zlY3PK3t.js → LaunchProjectPage-DyNqhic1.js} +1 -1
  33. package/web/assets/{LaunchServicesPage-BsM0bP8N.js → LaunchServicesPage-bI7pVeU7.js} +1 -1
  34. package/web/assets/{LaunchShell-BznQ7GLD.js → LaunchShell-CokT4E5l.js} +1 -1
  35. package/web/assets/{LogViewer-9e3e9X-R.js → LogViewer-Cs3Y8vaZ.js} +1 -1
  36. package/web/assets/{OrgKeyPrompt-Ckq1sJ8-.js → OrgKeyPrompt-DtgelhnI.js} +1 -1
  37. package/web/assets/{ProcessControls-Br_aLfW7.js → ProcessControls-CxlDLGiO.js} +1 -1
  38. package/web/assets/{ProcessDetailPage-D3BNcm7N.js → ProcessDetailPage-D93cKCHb.js} +1 -1
  39. package/web/assets/{ProcessMetrics-D-rQkzqK.js → ProcessMetrics-C_7_boMv.js} +1 -1
  40. package/web/assets/{ProjectCreateDialog-BzJRqXun.js → ProjectCreateDialog-Bko_A5wp.js} +1 -1
  41. package/web/assets/{ProjectLocationGate-DjBwSAKc.js → ProjectLocationGate-jsy8WetY.js} +1 -1
  42. package/web/assets/{ProjectPublishDialog-yakoPg1D.js → ProjectPublishDialog-7kR1zZAo.js} +1 -1
  43. package/web/assets/{RandomJobTestPage-Dh0-shVq.js → RandomJobTestPage-Dp9prwa7.js} +1 -1
  44. package/web/assets/{ScenarioEditorPage-DEdlwmf3.js → ScenarioEditorPage-fv9yLH75.js} +1 -1
  45. package/web/assets/{SendToChatDialog-_ai4UP8l.js → SendToChatDialog-BVSbXcbf.js} +1 -1
  46. package/web/assets/{ServiceControlsBar-Bo-jHhJK.js → ServiceControlsBar-DFECGWL8.js} +1 -1
  47. package/web/assets/{ServiceDetailPage-CWB3XIMA.js → ServiceDetailPage-BQA74240.js} +1 -1
  48. package/web/assets/{ServiceFormPage-BzARwyAF.js → ServiceFormPage-ChsRsoLt.js} +1 -1
  49. package/web/assets/SettingsPage-BXKsN9Py.js +2086 -0
  50. package/web/assets/{SettingsPage-NpFX7FAy.css → SettingsPage-Dsuzjo8r.css} +1 -1
  51. package/web/assets/{UnlockPage-C08Itng5.js → UnlockPage-DhEN16uX.js} +1 -1
  52. package/web/assets/{VaultMigrationPage-BLZc5pXH.js → VaultMigrationPage-BgRNUuTP.js} +1 -1
  53. package/web/assets/{VersionBadge-lBKbqt98.js → VersionBadge-CXJ-2h5V.js} +1 -1
  54. package/web/assets/{WikiPage-RCU0T1IS.js → WikiPage-BT5a9d5Q.js} +1 -1
  55. package/web/assets/{WikiView-BV8MZ8qm.js → WikiView-BNReLsq5.js} +1 -1
  56. package/web/assets/{add-scalar-classes-CvUuKrM6.js → add-scalar-classes-C_lKfiMa.js} +2 -2
  57. package/web/assets/{agent.store-yrwtq9oP.js → agent.store-B6OM7edC.js} +1 -1
  58. package/web/assets/{auth-LbzJj0JF.js → auth-5bsz5kSC.js} +2 -2
  59. package/web/assets/{cloud-chat.store-y_9urSQZ.js → cloud-chat.store-Di38xQRJ.js} +1 -1
  60. package/web/assets/{cloud-client-DhjJyZHU.js → cloud-client-CEVx-bg6.js} +2 -2
  61. package/web/assets/{cloud-session-BlihYcy2.js → cloud-session-w6eNQX1X.js} +2 -2
  62. package/web/assets/composables-CCbqJqnd.js +1 -0
  63. package/web/assets/i18n-DbgjJIf8.js +1 -0
  64. package/web/assets/index-DB3-fmza.css +1 -0
  65. package/web/assets/{index-Ci2pSJuu.js → index-mvpLwxNT.js} +74 -74
  66. package/web/assets/modal-Bslt0NZi.js +5 -0
  67. package/web/assets/{notification.store-Bp37Xsss.js → notification.store-CAG1kWYq.js} +1 -1
  68. package/web/assets/{project-launch.store-AB257LRF.js → project-launch.store-Im5SMon9.js} +1 -1
  69. package/web/assets/{project.store-qBZ_R1td.js → project.store-CITAykC3.js} +1 -1
  70. package/web/assets/{scenario.store-B5ybSSzx.js → scenario.store-C9sSoRzb.js} +2 -2
  71. package/web/assets/{service.store-BrKRjCtb.js → service.store-CZJuuJiv.js} +1 -1
  72. package/web/assets/{settings-scope-BSdUKgjx.js → settings-scope-vcJEMNnD.js} +1 -1
  73. package/web/assets/{settings.store-C8guF9Fl.js → settings.store-CydW_2jh.js} +1 -1
  74. package/web/assets/src-CIOvFTGI.js +1960 -0
  75. package/web/assets/{src-Br-M9ln7.js → src-COZZWm-m.js} +1 -1
  76. package/web/assets/{src-DOcCcTQv.js → src-Ck_MutzB.js} +1 -1
  77. package/web/assets/src-DOziuDw8.css +1 -0
  78. package/web/assets/src-DrVR8mhy.css +1 -0
  79. package/web/assets/{trpc-CAKhySL_.js → trpc-BQ0mLnfI.js} +3 -3
  80. package/web/assets/{useCloudOrg-B_JPalTv.js → useCloudOrg-CQvEbrZv.js} +1 -1
  81. package/web/assets/{useEnvVarAutocomplete-DCZCMfLC.js → useEnvVarAutocomplete-hy3rO3SN.js} +1 -1
  82. package/web/assets/{useProjectCatalog-CCJAkQi_.js → useProjectCatalog-CWHpf3Yj.js} +1 -1
  83. package/web/assets/{useProjectCloudOrg-CG4CriU2.js → useProjectCloudOrg-B3rNPes5.js} +1 -1
  84. package/web/assets/{useServiceUrlHost-C1gL6Mjg.js → useServiceUrlHost-BFfie_6h.js} +1 -1
  85. package/web/index.html +19 -19
  86. package/chunk-EUTW2S4P.js.map +0 -1
  87. package/chunk-QJSIN26R.js.map +0 -1
  88. package/mcp-server/external.d.ts +0 -44
  89. package/mcp-server/index.d.ts +0 -1
  90. package/mcp-server/launch.d.ts +0 -89
  91. package/src-NWPED6TK.js.map +0 -1
  92. package/web/assets/AiChatModals-B_Cn5wNS.js +0 -4
  93. package/web/assets/AiChatModals-BmWxg-Sr.css +0 -1
  94. package/web/assets/AppLayout-BsFZ6nG3.js +0 -1
  95. package/web/assets/AppLayout-Djk3-XbN.css +0 -1
  96. package/web/assets/KanbanBoardPage-BOEK_sKt.js +0 -4
  97. package/web/assets/KanbanBoardPage-Bb_8xU-I.css +0 -1
  98. package/web/assets/SettingsPage-CsIXEQrW.js +0 -2086
  99. package/web/assets/composables-DguCUR3O.js +0 -1
  100. package/web/assets/i18n-DxVwqoxL.js +0 -1
  101. package/web/assets/index-Ck_3m_I9.css +0 -1
  102. package/web/assets/modal-KpWdqKSY.js +0 -5
  103. package/web/assets/src-Dbg3CMY2.css +0 -1
  104. package/web/assets/src-dQGrnDw0.css +0 -1
  105. package/web/assets/src-recq0B6o.js +0 -1960
  106. /package/{chat-Z7SFBEXS.js.map → chat-COP27XB3.js.map} +0 -0
  107. /package/{companion-ZDEGNZ2G.js.map → companion-3MW23ONE.js.map} +0 -0
  108. /package/{install-gate-TSCXUCYE.js.map → install-gate-3UVXPA57.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/basic-shape-diamond.svg-CbL0YbwO.js","assets/runtime-core.esm-bundler-DujKY9QV.js","assets/reactivity.esm-bundler-BQ9SB2vv.js","assets/basic-shape-hexagon.svg-DeLvdYeD.js","assets/basic-shape-primary-circle-ellipse-round.svg-at04KJRA.js","assets/basic-shape-primary-square-rectangle.svg-wdn5W7U8.js","assets/basic-shape-shield.svg-p0DTALoy.js","assets/computer-device-desktop-monitor.svg-Bbb2MBoE.js","assets/computer-device-desktop.svg-D1qP_qt7.js","assets/computer-device-laptop.svg-D5pcLi3T.js","assets/computer-device-mobile-phone-android-samsung-back.svg-CbTYGS7Z.js","assets/computer-device-mobile-phone-android-samsung.svg-rLyLcAfC.js","assets/computer-device-mobile-phone-iphone-x-back.svg-DKGOG0cg.js","assets/computer-device-mobile-phone-iphone-x.svg-DmUttG6D.js","assets/computer-device-mobile-tablet-touch.svg-DSJtmXKB.js","assets/computer-device-mobile-tablet.svg-BTaxSvVS.js","assets/computer-device-network-ethernet-cat6.svg-Cs1K_is9.js","assets/computer-device-network-lan-www.svg-BM0ltBzv.js","assets/computer-device-network-wifi-connection.svg-DJm65FPv.js","assets/computer-device-network-wifi-router.svg-DCEwpkDa.js","assets/ecology-science-erlenmeyer-flask.svg-BxK5K06Y.js","assets/image-flash-lightning.svg-DCSIVG7C.js","assets/image-picture-flower.svg-BsEejX6O.js","assets/interface-alert-exclamation-diamond.svg-BjwOR2bo.js","assets/interface-alert-exclamation-triangle-warning.svg-1SukMxji.js","assets/interface-alert-information-circle.svg-BVqVfwvL.js","assets/interface-award-crown.svg-Cm3xXU7G.js","assets/interface-bookmark-tag.svg-D5d54p3J.js","assets/interface-bookmark.svg-D5d54p3J.js","assets/interface-calendar-date-one.svg-B7K0tXEi.js","assets/interface-content-book-open-pages.svg-DJPQwJJI.js","assets/interface-content-book-page.svg-FN0aTs3_.js","assets/interface-content-file.svg-WiQM0-ch.js","assets/interface-content-folder.svg-CnsmgXBU.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/interface-copy-clipboard.svg-0TwftvSy.js","assets/interface-edit-attachment.svg-DjXu_PLs.js","assets/interface-edit-binocular.svg-Bl3wMT-8.js","assets/interface-edit-magic-wand.svg-Dpvbe7RG.js","assets/interface-edit-tool-paint-roller.svg-BwpCkdAP.js","assets/interface-edit-tool-pencil.svg-VPr8VJ89.js","assets/interface-favorite-award.svg-D0EaJDxI.js","assets/interface-favorite-flag.svg-CraaLwWY.js","assets/interface-favorite-heart.svg-DfOA0L_C.js","assets/interface-favorite-star.svg-CIl5P-Aq.js","assets/interface-favorite-stars-sparkles.svg-1uMOnP1K.js","assets/interface-hierarchy-flowchart.svg-D2rofyVR.js","assets/interface-home-house.svg-BN6Fpc8n.js","assets/interface-hyperlink.svg-vGKexSwd.js","assets/interface-lighting-brightness.svg-BhIRQP73.js","assets/interface-lock-closed.svg-CIdKB1Nc.js","assets/interface-lock-open-unlock.svg-8US5jLVS.js","assets/interface-login-key.svg-w2ORztqb.js","assets/interface-search.svg-CD5412RV.js","assets/interface-setting-cog.svg-Dh6u7Swq.js","assets/interface-share-megaphone-bullhorn.svg-ntOLz8hc.js","assets/interface-share-rocket.svg-D1l1aah_.js","assets/interface-share-satellite.svg-8zDd1OpN.js","assets/interface-share-space-ship.svg-CA8lEPIV.js","assets/interface-share.svg-CrTmUueB.js","assets/interface-signal-square.svg-nefpbm5S.js","assets/interface-time-clock-circle.svg-BZrome2v.js","assets/interface-time-hour-glass.svg-CbdnsVsh.js","assets/interface-users-multiple.svg-DN6lDDxS.js","assets/interface-weather-moon.svg-2UVM15Jz.js","assets/mail-chat-bubble-square.svg-CKCmddY2.js","assets/mail-send-email-paper-airplane.svg-Dfy5O4H4.js","assets/mail-send-envelope.svg-BsB44QZ1.js","assets/money-cashier-receipt.svg-ByuPHZR9.js","assets/money-currency-dollar-pay.svg-DpQFx1mN.js","assets/money-graph-arrow-increase.svg-0oHtGnpg.js","assets/money-graph-bar-chart-increase.svg-Dz8pHirV.js","assets/nature-ecology-leaf.svg-B4yp6LL1.js","assets/phone-telephone.svg-BA2C4lmF.js","assets/programming-bug.svg-BjH1TwSZ.js","assets/programming-cloud.svg-CbJbv_c9.js","assets/programming-computer-database-server.svg-M3xLY_NB.js","assets/programming-computer-database.svg-BFt1NNcz.js","assets/programming-module-four-layout.svg-C55F5jrL.js","assets/programming-module-three.svg-BPu12Qr6.js","assets/programming-module.svg-5k6hJiEN.js","assets/programming-script-code.svg-D2GyDV4N.js","assets/shopping-cart.svg-D_B8WBe_.js","assets/shopping-gift-present.svg-DWhyrSsx.js","assets/shopping-shipping-box-parcel-package.svg-DEy_DXQj.js","assets/tag-new-circle.svg-CpNIL5JM.js","assets/travel-map-earth-globe.svg-DQlrY85I.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{A as t,B as n,C as r,D as i,F as a,N as o,O as s,S as c,T as l,_ as u,g as d,l as f,m as p,o as m,x as h}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{$ as g,$t as _,B as v,D as y,E as b,Ft as x,Ht as S,J as ee,L as C,Lt as te,Nt as ne,Pt as re,Rt as ie,S as ae,St as oe,T as se,Ut as ce,Yt as le,_ as w,b as T,bt as E,ct as ue,en as D,et as O,ft as de,g as k,gt as fe,h as pe,it as me,jt as he,k as A,mt as j,nn as ge,o as _e,qt as M,rn as N,rt as ve,st as ye,tn as be,tt as xe,u as Se,v as P,w as Ce,wt as we,xt as F,y as I,z as Te}from"./runtime-core.esm-bundler-DujKY9QV.js";import{C as Ee,S as De,f as Oe,i as ke,m as Ae,t as je,w as Me,x as Ne}from"./runtime-dom.esm-bundler-CyEVRK6B.js";import{c as Pe,d as Fe,f as Ie,i as Le,l as Re,n as ze,r as Be,s as Ve,u as He}from"./floating-ui.dom-DF3oyfHd.js";import{t as Ue}from"./preload-helper-BZ1Pz5am.js";import{G as We,K as Ge,W as eee}from"./index-Ci2pSJuu.js";import{t as tee}from"./interface-content-folder.svg-CnsmgXBU.js";import{i as Ke,r as qe}from"./browser-BpWB_ayN.js";var Je=e=>e[`$ref-value`],Ye=e=>{let{"$ref-value":t,...n}=e;return{...t,...n}},L=(e,t=Je)=>typeof e==`object`&&e&&`$ref`in e?t(e):e,Xe=e=>`type`in e&&(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)),Ze=e=>`type`in e&&(e.type===`array`||Array.isArray(e.type)&&e.type.includes(`array`)),nee=e=>`type`in e&&(e.type===`string`||Array.isArray(e.type)&&e.type.includes(`string`)),ree=e=>`type`in e&&(e.type===`number`||e.type===`integer`||Array.isArray(e.type)&&e.type.includes(`number`)||Array.isArray(e.type)&&e.type.includes(`integer`)),Qe=e=>e!==void 0&&`type`in e,$e=e=>`content`in e&&e.content!==void 0,et=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},tt=e=>typeof e==`object`&&!!e;function nt(e){return Array.isArray?Array.isArray(e):ut(e)===`[object Array]`}function rt(e){if(typeof e==`string`)return e;let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function it(e){return e==null?``:rt(e)}function at(e){return typeof e==`string`}function ot(e){return typeof e==`number`}function iee(e){return e===!0||e===!1||aee(e)&&ut(e)==`[object Boolean]`}function st(e){return typeof e==`object`}function aee(e){return st(e)&&e!==null}function ct(e){return e!=null}function lt(e){return!e.trim().length}function ut(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var oee=`Incorrect 'index' type`,see=e=>`Invalid value for key ${e}`,cee=e=>`Pattern length exceeds max of ${e}.`,lee=e=>`Missing ${e} property in key`,uee=e=>`Property 'weight' in key '${e}' must be a positive integer`,dt=Object.prototype.hasOwnProperty,ft=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=pt(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function pt(e){let t=null,n=null,r=null,i=1,a=null;if(at(e)||nt(e))r=e,t=mt(e),n=ht(e);else{if(!dt.call(e,`name`))throw Error(lee(`name`));let o=e.name;if(r=o,dt.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(uee(o));t=mt(o),n=ht(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function mt(e){return nt(e)?e:e.split(`.`)}function ht(e){return nt(e)?e.join(`.`):e}function gt(e,t){let n=[],r=!1,i=(e,t,a)=>{if(ct(e)){if(!t[a])n.push(e);else{let o=e[t[a]];if(!ct(o))return;if(a===t.length-1&&(at(o)||ot(o)||iee(o)))n.push(it(o));else if(nt(o)){r=!0;for(let e=0,n=o.length;e<n;e+=1)i(o[e],t,a+1)}else t.length&&i(o,t,a+1)}}};return i(e,at(t)?t.split(`.`):t,0),r?n:n[0]}var _t={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},vt={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},yt={location:0,threshold:.6,distance:100},bt={useExtendedSearch:!1,getFn:gt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},xt={...vt,..._t,...yt,...bt},St=/[^ ]+/g;function Ct(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(St).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var wt=class{constructor({getFn:e=xt.getFn,fieldNormWeight:t=xt.fieldNormWeight}={}){this.norm=Ct(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,at(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();at(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!ct(e)||lt(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(ct(i)){if(nt(i)){let e=[],t=[{nestedArrIndex:-1,value:i}];for(;t.length;){let{nestedArrIndex:n,value:r}=t.pop();if(ct(r)){if(at(r)&&!lt(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else nt(r)&&r.forEach((e,n)=>{t.push({nestedArrIndex:n,value:e})})}}n.$[r]=e}else if(at(i)&&!lt(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function Tt(e,t,{getFn:n=xt.getFn,fieldNormWeight:r=xt.fieldNormWeight}={}){let i=new wt({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(pt)),i.setSources(t),i.create(),i}function Et(e,{getFn:t=xt.getFn,fieldNormWeight:n=xt.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new wt({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function Dt(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=xt.distance,ignoreLocation:a=xt.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function Ot(e=[],t=xt.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var kt=32;function At(e,t,n,{location:r=xt.location,distance:i=xt.distance,threshold:a=xt.threshold,findAllMatches:o=xt.findAllMatches,minMatchCharLength:s=xt.minMatchCharLength,includeMatches:c=xt.includeMatches,ignoreLocation:l=xt.ignoreLocation}={}){if(t.length>kt)throw Error(cee(kt));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=s>1||c,g=h?Array(d):[],_;for(;(_=e.indexOf(t,m))>-1;){let e=Dt(t,{currentLocation:_,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),m=_+u,h){let e=0;for(;e<u;)g[_+e]=1,e+=1}}m=-1;let v=[],y=1,b=u+d,x=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=b;for(;a<s;)Dt(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l})<=p?a=s:b=s,s=Math.floor((b-a)/2+a);b=s;let c=Math.max(1,f-s+1),_=o?d:Math.min(f+s,d)+u,S=Array(_+2);S[_+1]=(1<<r)-1;for(let a=_;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(h&&(g[o]=+!!s),S[a]=(S[a+1]<<1|1)&s,r&&(S[a]|=(v[a+1]|v[a])<<1|1|v[a+1]),S[a]&x&&(y=Dt(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),y<=p)){if(p=y,m=o,m<=f)break;c=Math.max(1,2*f-m)}}if(Dt(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l})>p)break;v=S}let S={isMatch:m>=0,score:Math.max(.001,y)};if(h){let e=Ot(g,s);e.length?c&&(S.indices=e):S.isMatch=!1}return S}function jt(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var Mt=String.prototype.normalize?(e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``)):(e=>e),Nt=class{constructor(e,{location:t=xt.location,threshold:n=xt.threshold,distance:r=xt.distance,includeMatches:i=xt.includeMatches,findAllMatches:a=xt.findAllMatches,minMatchCharLength:o=xt.minMatchCharLength,isCaseSensitive:s=xt.isCaseSensitive,ignoreDiacritics:c=xt.ignoreDiacritics,ignoreLocation:l=xt.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?Mt(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:jt(e),startIndex:t})},d=this.pattern.length;if(d>kt){let e=0,t=d%kt,n=d-t;for(;e<n;)u(this.pattern.substr(e,kt),e),e+=kt;if(t){let e=d-kt;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?Mt(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=At(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},Pt=class{constructor(e){this.pattern=e}static isMultiMatch(e){return Ft(e,this.multiRegex)}static isSingleMatch(e){return Ft(e,this.singleRegex)}search(){}};function Ft(e,t){let n=e.match(t);return n?n[1]:null}var dee=class extends Pt{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},fee=class extends Pt{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},pee=class extends Pt{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},mee=class extends Pt{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},hee=class extends Pt{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},gee=class extends Pt{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},It=class extends Pt{constructor(e,{location:t=xt.location,threshold:n=xt.threshold,distance:r=xt.distance,includeMatches:i=xt.includeMatches,findAllMatches:a=xt.findAllMatches,minMatchCharLength:o=xt.minMatchCharLength,isCaseSensitive:s=xt.isCaseSensitive,ignoreDiacritics:c=xt.ignoreDiacritics,ignoreLocation:l=xt.ignoreLocation}={}){super(e),this._bitapSearch=new Nt(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},Lt=class extends Pt{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},Rt=[dee,Lt,pee,mee,gee,hee,fee,It],zt=Rt.length,_ee=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,vee=`|`;function yee(e,t={}){return e.split(vee).map(e=>{let n=e.trim().split(_ee).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<zt;){let e=Rt[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<zt;){let e=Rt[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var bee=new Set([It.type,Lt.type]),xee=class{constructor(e,{isCaseSensitive:t=xt.isCaseSensitive,ignoreDiacritics:n=xt.ignoreDiacritics,includeMatches:r=xt.includeMatches,minMatchCharLength:i=xt.minMatchCharLength,ignoreLocation:a=xt.ignoreLocation,findAllMatches:o=xt.findAllMatches,location:s=xt.location,threshold:c=xt.threshold,distance:l=xt.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?Mt(e):e,this.pattern=e,this.query=yee(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?Mt(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;bee.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}},Bt=[];function See(...e){Bt.push(...e)}function Vt(e,t){for(let n=0,r=Bt.length;n<r;n+=1){let r=Bt[n];if(r.condition(e,t))return new r(e,t)}return new Nt(e,t)}var Ht={AND:`$and`,OR:`$or`},Ut={PATH:`$path`,PATTERN:`$val`},Wt=e=>!!(e[Ht.AND]||e[Ht.OR]),Gt=e=>!!e[Ut.PATH],Kt=e=>!nt(e)&&st(e)&&!Wt(e),qt=e=>({[Ht.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Jt(e,t,{auto:n=!0}={}){let r=e=>{let i=Object.keys(e),a=Gt(e);if(!a&&i.length>1&&!Wt(e))return r(qt(e));if(Kt(e)){let r=a?e[Ut.PATH]:i[0],o=a?e[Ut.PATTERN]:e[r];if(!at(o))throw Error(see(r));let s={keyId:ht(r),pattern:o};return n&&(s.searcher=Vt(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];nt(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Wt(e)||(e=qt(e)),r(e)}function Yt(e,{ignoreFieldNorm:t=xt.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function Xt(e,t){let n=e.matches;t.matches=[],ct(n)&&n.forEach(e=>{if(!ct(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function Zt(e,t){t.score=e.score}function Qt(e,t,{includeMatches:n=xt.includeMatches,includeScore:r=xt.includeScore}={}){let i=[];return n&&i.push(Xt),r&&i.push(Zt),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var $t=class{constructor(e,t={},n){this.options={...xt,...t},this.options.useExtendedSearch,this._keyStore=new ft(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof wt))throw Error(oee);this._myIndex=t||Tt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){ct(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options,s=at(e)?at(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Yt(s,{ignoreFieldNorm:o}),i&&s.sort(a),ot(t)&&t>-1&&(s=s.slice(0,t)),Qt(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=Vt(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!ct(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=Jt(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===Ht.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if(ct(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=Vt(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!ct(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:e,value:t,searcher:n}){if(!ct(t))return[];let r=[];if(nt(t))t.forEach(({v:t,i,n:a})=>{if(!ct(t))return;let{isMatch:o,score:s,indices:c}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c})}return r}};$t.version=`7.1.0`,$t.createIndex=Tt,$t.parseIndex=Et,$t.config=xt,$t.parseQuery=Jt,See(xee);var en=`Models`,tn=e=>!!(!Array.isArray(e)&&e&&`sources`in e&&Array.isArray(e.sources)),nn=e=>decodeURI(e.replace(/~1/g,`/`).replace(/~0/g,`~`)),rn=e=>e.split(`/`).slice(1).map(nn),an=(e,t,n)=>{let[r,i]=e.split(`#`,2);if(r)return n.has(r)?i?i.startsWith(`/`)?`${n.get(r)}${i}`:n.get(`${r}#${i}`):n.get(r):void 0;if(i)return i.startsWith(`/`)?i.slice(1):n.get(`${t}#${i}`)},on=e=>{if(e&&typeof e==`object`&&e.$id&&typeof e.$id==`string`)return e.$id},sn=e=>e.join(`/`),cn=(e,t=``,n=[],r=new Map,i=new WeakSet)=>{if(typeof e!=`object`||!e||i.has(e))return r;i.add(e);let a=on(e);a&&r.set(a,sn(n));let o=a??t;e.$anchor&&typeof e.$anchor==`string`&&r.set(`${o}#${e.$anchor}`,sn(n));for(let t in e)typeof e[t]==`object`&&e[t]!==null&&cn(e[t],o,[...n,t],r,i);return r};function ln(e,t){return t.reduce((e,t)=>e.value===void 0||typeof e.value!=`object`||e.value===null?{context:``,value:void 0}:{context:on(e.value)??e.context,value:e.value?.[t]},{context:``,value:e})}function un(e,t){return t.reduce((e,t)=>(e[t]===void 0&&(e[t]=isNaN(Number(t))?{}:[]),e[t]),e)}var dn=Symbol(`isMagicProxy`),fn=Symbol(`magicProxyTarget`),pn=`$ref-value`,mn=`$ref`,hn=(e,t,n={root:e,proxyCache:new WeakMap,cache:new Map,schemas:cn(e),currentContext:``})=>{if(!et(e)&&!Array.isArray(e))return e;if(n.proxyCache.has(e))return n.proxyCache.get(e);let r=new Proxy(e,{get(e,r,i){if(r===dn)return!0;if(r===fn)return e;if(typeof r==`string`&&r.startsWith(`__scalar_`)&&!t?.showInternal)return;let a=Reflect.get(e,mn,i),o=on(e);if(r===pn&&typeof a==`string`){if(n.cache.has(a))return n.cache.get(a);let e=an(a,o??n.currentContext,n.schemas);if(e===void 0)return;let r=ln(n.root,rn(`/${e}`));if(gn(r.value))return r.value;let i=hn(r.value,t,{...n,currentContext:r.context});return n.cache.set(a,i),i}let s=Reflect.get(e,r,i);return gn(s)?s:hn(s,t,{...n,currentContext:o??n.currentContext})},set(e,r,i,a){let o=Reflect.get(e,mn,a);if(typeof r==`string`&&r.startsWith(`__scalar_`)&&!t?.showInternal)return!0;if(r===pn&&typeof o==`string`){let t=an(o,on(e)??n.currentContext,n.schemas);if(t===void 0)return;let r=rn(`/${t}`);if(r.length===0)return!1;let a=()=>ln(n.root,r.slice(0,-1)).value;return a()===void 0&&(un(n.root,r.slice(0,-1)),console.warn(`Trying to set $ref-value for invalid reference: ${o}\n\nPlease fix your input file to fix this issue.`)),a()[r.at(-1)]=i,!0}return Reflect.set(e,r,i,a)},deleteProperty(e,t){return Reflect.deleteProperty(e,t)},has(e,n){return typeof n==`string`&&n.startsWith(`__scalar_`)&&!t?.showInternal?!1:n===pn&&mn in e||Reflect.has(e,n)},ownKeys(e){let n=Reflect.ownKeys(e).filter(e=>typeof e!=`string`||!(e.startsWith(`__scalar_`)&&!t?.showInternal));return mn in e&&!n.includes(pn)&&n.push(pn),n},getOwnPropertyDescriptor(e,n){if(typeof n==`string`&&n.startsWith(`__scalar_`)&&!t?.showInternal)return;let r=Reflect.get(e,mn);return n===pn&&typeof r==`string`?{configurable:!0,enumerable:!0,value:void 0,writable:!1}:Reflect.getOwnPropertyDescriptor(e,n)}});return n.proxyCache.set(e,r),r},gn=e=>typeof e==`object`&&!!e&&e[dn]===!0;function _n(e){return typeof e!=`object`||!e?e:e[dn]?e[fn]:e}var vn=Symbol(`isDetectChangesProxy`),yn=Symbol(`detectChangesProxyTarget`),bn=(e,t,n={proxyCache:new WeakMap,path:[]})=>{if(!et(e)&&!Array.isArray(e))return e;if(n.proxyCache.has(e))return n.proxyCache.get(e);let r=new Proxy(e,{get(e,r,i){if(r===vn)return!0;if(r===yn)return e;let a=Reflect.get(e,r,i);return Cee(a)?a:bn(a,t,{...n,path:[...n.path,String(r)]})},set(e,r,i,a){let o=[...n.path,String(r)];t?.hooks?.onBeforeChange?.(o,i);let s=Reflect.set(e,r,i,a);return t?.hooks?.onAfterChange?.(o,i),s},deleteProperty(e,r){let i=[...n.path,String(r)];t?.hooks?.onBeforeChange?.(i);let a=Reflect.deleteProperty(e,r);return t?.hooks?.onAfterChange?.(i),a}});return n.proxyCache.set(e,r),r},Cee=e=>typeof e==`object`&&!!e&&e[vn]===!0,wee=e=>typeof e!=`object`||!e?e:e[vn]?e[yn]:e,xn=Symbol(`isOverridesProxy`),Sn=Symbol(`getOverridesTarget`),Cn=(e,t,n={cache:new WeakMap})=>{if(!e||typeof e!=`object`)return e;if(n.cache.has(e))return n.cache.get(e);let{overrides:r}=t??{},i=new Proxy(e,{get(e,t,i){if(t===xn)return!0;if(t===Sn)return e;let a=Reflect.get(e,t,i);return Tee(a)?a:et(a)?Cn(a,{overrides:Reflect.get(r??{},t)},n):Reflect.get(r??{},t)??a},set(e,t,n,i){return t===xn||t===Sn?!1:r&&Reflect.has(r,t)&&r&&typeof r==`object`?(r[t]=n,!0):Reflect.set(e,t,n,i)}});return n.cache.set(e,i),i},Tee=e=>typeof e==`object`&&!!e&&e[xn]===!0;function Eee(e){return typeof e==`object`&&e&&e[xn]?e[Sn]:e}var wn=(e,{depth:n=0}={})=>{let r=(i,a=0)=>{if(typeof i!=`object`||!i)return i;let o=wee(t(_n(Eee(i))));return n!==null&&a>=n?o:(a!==0&&o!==i&&(console.warn(`%c⚠ Warning:%c You tried to assign a proxied object (depth: %d).
2
+ import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{A as t,B as n,C as r,D as i,F as a,N as o,O as s,S as c,T as l,_ as u,g as d,l as f,m as p,o as m,x as h}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{$ as g,$t as _,B as v,D as y,E as b,Ft as x,Ht as S,J as ee,L as C,Lt as te,Nt as ne,Pt as re,Rt as ie,S as ae,St as oe,T as se,Ut as ce,Yt as le,_ as w,b as T,bt as E,ct as ue,en as D,et as O,ft as de,g as k,gt as fe,h as pe,it as me,jt as he,k as A,mt as j,nn as ge,o as _e,qt as M,rn as N,rt as ve,st as ye,tn as be,tt as xe,u as Se,v as P,w as Ce,wt as we,xt as F,y as I,z as Te}from"./runtime-core.esm-bundler-DujKY9QV.js";import{C as Ee,S as De,f as Oe,i as ke,m as Ae,t as je,w as Me,x as Ne}from"./runtime-dom.esm-bundler-CyEVRK6B.js";import{c as Pe,d as Fe,f as Ie,i as Le,l as Re,n as ze,r as Be,s as Ve,u as He}from"./floating-ui.dom-DF3oyfHd.js";import{t as Ue}from"./preload-helper-BZ1Pz5am.js";import{G as We,K as Ge,W as eee}from"./index-mvpLwxNT.js";import{t as tee}from"./interface-content-folder.svg-CnsmgXBU.js";import{i as Ke,r as qe}from"./browser-BpWB_ayN.js";var Je=e=>e[`$ref-value`],Ye=e=>{let{"$ref-value":t,...n}=e;return{...t,...n}},L=(e,t=Je)=>typeof e==`object`&&e&&`$ref`in e?t(e):e,Xe=e=>`type`in e&&(e.type===`object`||Array.isArray(e.type)&&e.type.includes(`object`)),Ze=e=>`type`in e&&(e.type===`array`||Array.isArray(e.type)&&e.type.includes(`array`)),nee=e=>`type`in e&&(e.type===`string`||Array.isArray(e.type)&&e.type.includes(`string`)),ree=e=>`type`in e&&(e.type===`number`||e.type===`integer`||Array.isArray(e.type)&&e.type.includes(`number`)||Array.isArray(e.type)&&e.type.includes(`integer`)),Qe=e=>e!==void 0&&`type`in e,$e=e=>`content`in e&&e.content!==void 0,et=e=>{if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},tt=e=>typeof e==`object`&&!!e;function nt(e){return Array.isArray?Array.isArray(e):ut(e)===`[object Array]`}function rt(e){if(typeof e==`string`)return e;let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function it(e){return e==null?``:rt(e)}function at(e){return typeof e==`string`}function ot(e){return typeof e==`number`}function iee(e){return e===!0||e===!1||aee(e)&&ut(e)==`[object Boolean]`}function st(e){return typeof e==`object`}function aee(e){return st(e)&&e!==null}function ct(e){return e!=null}function lt(e){return!e.trim().length}function ut(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var oee=`Incorrect 'index' type`,see=e=>`Invalid value for key ${e}`,cee=e=>`Pattern length exceeds max of ${e}.`,lee=e=>`Missing ${e} property in key`,uee=e=>`Property 'weight' in key '${e}' must be a positive integer`,dt=Object.prototype.hasOwnProperty,ft=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=pt(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function pt(e){let t=null,n=null,r=null,i=1,a=null;if(at(e)||nt(e))r=e,t=mt(e),n=ht(e);else{if(!dt.call(e,`name`))throw Error(lee(`name`));let o=e.name;if(r=o,dt.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(uee(o));t=mt(o),n=ht(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function mt(e){return nt(e)?e:e.split(`.`)}function ht(e){return nt(e)?e.join(`.`):e}function gt(e,t){let n=[],r=!1,i=(e,t,a)=>{if(ct(e)){if(!t[a])n.push(e);else{let o=e[t[a]];if(!ct(o))return;if(a===t.length-1&&(at(o)||ot(o)||iee(o)))n.push(it(o));else if(nt(o)){r=!0;for(let e=0,n=o.length;e<n;e+=1)i(o[e],t,a+1)}else t.length&&i(o,t,a+1)}}};return i(e,at(t)?t.split(`.`):t,0),r?n:n[0]}var _t={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},vt={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},yt={location:0,threshold:.6,distance:100},bt={useExtendedSearch:!1,getFn:gt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},xt={...vt,..._t,...yt,...bt},St=/[^ ]+/g;function Ct(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(St).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var wt=class{constructor({getFn:e=xt.getFn,fieldNormWeight:t=xt.fieldNormWeight}={}){this.norm=Ct(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,at(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();at(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!ct(e)||lt(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(ct(i)){if(nt(i)){let e=[],t=[{nestedArrIndex:-1,value:i}];for(;t.length;){let{nestedArrIndex:n,value:r}=t.pop();if(ct(r)){if(at(r)&&!lt(r)){let t={v:r,i:n,n:this.norm.get(r)};e.push(t)}else nt(r)&&r.forEach((e,n)=>{t.push({nestedArrIndex:n,value:e})})}}n.$[r]=e}else if(at(i)&&!lt(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}};function Tt(e,t,{getFn:n=xt.getFn,fieldNormWeight:r=xt.fieldNormWeight}={}){let i=new wt({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(pt)),i.setSources(t),i.create(),i}function Et(e,{getFn:t=xt.getFn,fieldNormWeight:n=xt.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new wt({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function Dt(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=xt.distance,ignoreLocation:a=xt.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function Ot(e=[],t=xt.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var kt=32;function At(e,t,n,{location:r=xt.location,distance:i=xt.distance,threshold:a=xt.threshold,findAllMatches:o=xt.findAllMatches,minMatchCharLength:s=xt.minMatchCharLength,includeMatches:c=xt.includeMatches,ignoreLocation:l=xt.ignoreLocation}={}){if(t.length>kt)throw Error(cee(kt));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=s>1||c,g=h?Array(d):[],_;for(;(_=e.indexOf(t,m))>-1;){let e=Dt(t,{currentLocation:_,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),m=_+u,h){let e=0;for(;e<u;)g[_+e]=1,e+=1}}m=-1;let v=[],y=1,b=u+d,x=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=b;for(;a<s;)Dt(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l})<=p?a=s:b=s,s=Math.floor((b-a)/2+a);b=s;let c=Math.max(1,f-s+1),_=o?d:Math.min(f+s,d)+u,S=Array(_+2);S[_+1]=(1<<r)-1;for(let a=_;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(h&&(g[o]=+!!s),S[a]=(S[a+1]<<1|1)&s,r&&(S[a]|=(v[a+1]|v[a])<<1|1|v[a+1]),S[a]&x&&(y=Dt(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),y<=p)){if(p=y,m=o,m<=f)break;c=Math.max(1,2*f-m)}}if(Dt(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l})>p)break;v=S}let S={isMatch:m>=0,score:Math.max(.001,y)};if(h){let e=Ot(g,s);e.length?c&&(S.indices=e):S.isMatch=!1}return S}function jt(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var Mt=String.prototype.normalize?(e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``)):(e=>e),Nt=class{constructor(e,{location:t=xt.location,threshold:n=xt.threshold,distance:r=xt.distance,includeMatches:i=xt.includeMatches,findAllMatches:a=xt.findAllMatches,minMatchCharLength:o=xt.minMatchCharLength,isCaseSensitive:s=xt.isCaseSensitive,ignoreDiacritics:c=xt.ignoreDiacritics,ignoreLocation:l=xt.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?Mt(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:jt(e),startIndex:t})},d=this.pattern.length;if(d>kt){let e=0,t=d%kt,n=d-t;for(;e<n;)u(this.pattern.substr(e,kt),e),e+=kt;if(t){let e=d-kt;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?Mt(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=At(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},Pt=class{constructor(e){this.pattern=e}static isMultiMatch(e){return Ft(e,this.multiRegex)}static isSingleMatch(e){return Ft(e,this.singleRegex)}search(){}};function Ft(e,t){let n=e.match(t);return n?n[1]:null}var dee=class extends Pt{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},fee=class extends Pt{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},pee=class extends Pt{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},mee=class extends Pt{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},hee=class extends Pt{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},gee=class extends Pt{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},It=class extends Pt{constructor(e,{location:t=xt.location,threshold:n=xt.threshold,distance:r=xt.distance,includeMatches:i=xt.includeMatches,findAllMatches:a=xt.findAllMatches,minMatchCharLength:o=xt.minMatchCharLength,isCaseSensitive:s=xt.isCaseSensitive,ignoreDiacritics:c=xt.ignoreDiacritics,ignoreLocation:l=xt.ignoreLocation}={}){super(e),this._bitapSearch=new Nt(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},Lt=class extends Pt{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},Rt=[dee,Lt,pee,mee,gee,hee,fee,It],zt=Rt.length,_ee=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,vee=`|`;function yee(e,t={}){return e.split(vee).map(e=>{let n=e.trim().split(_ee).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<zt;){let e=Rt[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<zt;){let e=Rt[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var bee=new Set([It.type,Lt.type]),xee=class{constructor(e,{isCaseSensitive:t=xt.isCaseSensitive,ignoreDiacritics:n=xt.ignoreDiacritics,includeMatches:r=xt.includeMatches,minMatchCharLength:i=xt.minMatchCharLength,ignoreLocation:a=xt.ignoreLocation,findAllMatches:o=xt.findAllMatches,location:s=xt.location,threshold:c=xt.threshold,distance:l=xt.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?Mt(e):e,this.pattern=e,this.query=yee(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?Mt(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;bee.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}},Bt=[];function See(...e){Bt.push(...e)}function Vt(e,t){for(let n=0,r=Bt.length;n<r;n+=1){let r=Bt[n];if(r.condition(e,t))return new r(e,t)}return new Nt(e,t)}var Ht={AND:`$and`,OR:`$or`},Ut={PATH:`$path`,PATTERN:`$val`},Wt=e=>!!(e[Ht.AND]||e[Ht.OR]),Gt=e=>!!e[Ut.PATH],Kt=e=>!nt(e)&&st(e)&&!Wt(e),qt=e=>({[Ht.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Jt(e,t,{auto:n=!0}={}){let r=e=>{let i=Object.keys(e),a=Gt(e);if(!a&&i.length>1&&!Wt(e))return r(qt(e));if(Kt(e)){let r=a?e[Ut.PATH]:i[0],o=a?e[Ut.PATTERN]:e[r];if(!at(o))throw Error(see(r));let s={keyId:ht(r),pattern:o};return n&&(s.searcher=Vt(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];nt(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Wt(e)||(e=qt(e)),r(e)}function Yt(e,{ignoreFieldNorm:t=xt.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function Xt(e,t){let n=e.matches;t.matches=[],ct(n)&&n.forEach(e=>{if(!ct(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function Zt(e,t){t.score=e.score}function Qt(e,t,{includeMatches:n=xt.includeMatches,includeScore:r=xt.includeScore}={}){let i=[];return n&&i.push(Xt),r&&i.push(Zt),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var $t=class{constructor(e,t={},n){this.options={...xt,...t},this.options.useExtendedSearch,this._keyStore=new ft(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof wt))throw Error(oee);this._myIndex=t||Tt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){ct(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:i,sortFn:a,ignoreFieldNorm:o}=this.options,s=at(e)?at(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Yt(s,{ignoreFieldNorm:o}),i&&s.sort(a),ot(t)&&t>-1&&(s=s.slice(0,t)),Qt(s,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=Vt(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!ct(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=Jt(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===Ht.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if(ct(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=Vt(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!ct(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:e,value:t,searcher:n}){if(!ct(t))return[];let r=[];if(nt(t))t.forEach(({v:t,i,n:a})=>{if(!ct(t))return;let{isMatch:o,score:s,indices:c}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c})}return r}};$t.version=`7.1.0`,$t.createIndex=Tt,$t.parseIndex=Et,$t.config=xt,$t.parseQuery=Jt,See(xee);var en=`Models`,tn=e=>!!(!Array.isArray(e)&&e&&`sources`in e&&Array.isArray(e.sources)),nn=e=>decodeURI(e.replace(/~1/g,`/`).replace(/~0/g,`~`)),rn=e=>e.split(`/`).slice(1).map(nn),an=(e,t,n)=>{let[r,i]=e.split(`#`,2);if(r)return n.has(r)?i?i.startsWith(`/`)?`${n.get(r)}${i}`:n.get(`${r}#${i}`):n.get(r):void 0;if(i)return i.startsWith(`/`)?i.slice(1):n.get(`${t}#${i}`)},on=e=>{if(e&&typeof e==`object`&&e.$id&&typeof e.$id==`string`)return e.$id},sn=e=>e.join(`/`),cn=(e,t=``,n=[],r=new Map,i=new WeakSet)=>{if(typeof e!=`object`||!e||i.has(e))return r;i.add(e);let a=on(e);a&&r.set(a,sn(n));let o=a??t;e.$anchor&&typeof e.$anchor==`string`&&r.set(`${o}#${e.$anchor}`,sn(n));for(let t in e)typeof e[t]==`object`&&e[t]!==null&&cn(e[t],o,[...n,t],r,i);return r};function ln(e,t){return t.reduce((e,t)=>e.value===void 0||typeof e.value!=`object`||e.value===null?{context:``,value:void 0}:{context:on(e.value)??e.context,value:e.value?.[t]},{context:``,value:e})}function un(e,t){return t.reduce((e,t)=>(e[t]===void 0&&(e[t]=isNaN(Number(t))?{}:[]),e[t]),e)}var dn=Symbol(`isMagicProxy`),fn=Symbol(`magicProxyTarget`),pn=`$ref-value`,mn=`$ref`,hn=(e,t,n={root:e,proxyCache:new WeakMap,cache:new Map,schemas:cn(e),currentContext:``})=>{if(!et(e)&&!Array.isArray(e))return e;if(n.proxyCache.has(e))return n.proxyCache.get(e);let r=new Proxy(e,{get(e,r,i){if(r===dn)return!0;if(r===fn)return e;if(typeof r==`string`&&r.startsWith(`__scalar_`)&&!t?.showInternal)return;let a=Reflect.get(e,mn,i),o=on(e);if(r===pn&&typeof a==`string`){if(n.cache.has(a))return n.cache.get(a);let e=an(a,o??n.currentContext,n.schemas);if(e===void 0)return;let r=ln(n.root,rn(`/${e}`));if(gn(r.value))return r.value;let i=hn(r.value,t,{...n,currentContext:r.context});return n.cache.set(a,i),i}let s=Reflect.get(e,r,i);return gn(s)?s:hn(s,t,{...n,currentContext:o??n.currentContext})},set(e,r,i,a){let o=Reflect.get(e,mn,a);if(typeof r==`string`&&r.startsWith(`__scalar_`)&&!t?.showInternal)return!0;if(r===pn&&typeof o==`string`){let t=an(o,on(e)??n.currentContext,n.schemas);if(t===void 0)return;let r=rn(`/${t}`);if(r.length===0)return!1;let a=()=>ln(n.root,r.slice(0,-1)).value;return a()===void 0&&(un(n.root,r.slice(0,-1)),console.warn(`Trying to set $ref-value for invalid reference: ${o}\n\nPlease fix your input file to fix this issue.`)),a()[r.at(-1)]=i,!0}return Reflect.set(e,r,i,a)},deleteProperty(e,t){return Reflect.deleteProperty(e,t)},has(e,n){return typeof n==`string`&&n.startsWith(`__scalar_`)&&!t?.showInternal?!1:n===pn&&mn in e||Reflect.has(e,n)},ownKeys(e){let n=Reflect.ownKeys(e).filter(e=>typeof e!=`string`||!(e.startsWith(`__scalar_`)&&!t?.showInternal));return mn in e&&!n.includes(pn)&&n.push(pn),n},getOwnPropertyDescriptor(e,n){if(typeof n==`string`&&n.startsWith(`__scalar_`)&&!t?.showInternal)return;let r=Reflect.get(e,mn);return n===pn&&typeof r==`string`?{configurable:!0,enumerable:!0,value:void 0,writable:!1}:Reflect.getOwnPropertyDescriptor(e,n)}});return n.proxyCache.set(e,r),r},gn=e=>typeof e==`object`&&!!e&&e[dn]===!0;function _n(e){return typeof e!=`object`||!e?e:e[dn]?e[fn]:e}var vn=Symbol(`isDetectChangesProxy`),yn=Symbol(`detectChangesProxyTarget`),bn=(e,t,n={proxyCache:new WeakMap,path:[]})=>{if(!et(e)&&!Array.isArray(e))return e;if(n.proxyCache.has(e))return n.proxyCache.get(e);let r=new Proxy(e,{get(e,r,i){if(r===vn)return!0;if(r===yn)return e;let a=Reflect.get(e,r,i);return Cee(a)?a:bn(a,t,{...n,path:[...n.path,String(r)]})},set(e,r,i,a){let o=[...n.path,String(r)];t?.hooks?.onBeforeChange?.(o,i);let s=Reflect.set(e,r,i,a);return t?.hooks?.onAfterChange?.(o,i),s},deleteProperty(e,r){let i=[...n.path,String(r)];t?.hooks?.onBeforeChange?.(i);let a=Reflect.deleteProperty(e,r);return t?.hooks?.onAfterChange?.(i),a}});return n.proxyCache.set(e,r),r},Cee=e=>typeof e==`object`&&!!e&&e[vn]===!0,wee=e=>typeof e!=`object`||!e?e:e[vn]?e[yn]:e,xn=Symbol(`isOverridesProxy`),Sn=Symbol(`getOverridesTarget`),Cn=(e,t,n={cache:new WeakMap})=>{if(!e||typeof e!=`object`)return e;if(n.cache.has(e))return n.cache.get(e);let{overrides:r}=t??{},i=new Proxy(e,{get(e,t,i){if(t===xn)return!0;if(t===Sn)return e;let a=Reflect.get(e,t,i);return Tee(a)?a:et(a)?Cn(a,{overrides:Reflect.get(r??{},t)},n):Reflect.get(r??{},t)??a},set(e,t,n,i){return t===xn||t===Sn?!1:r&&Reflect.has(r,t)&&r&&typeof r==`object`?(r[t]=n,!0):Reflect.set(e,t,n,i)}});return n.cache.set(e,i),i},Tee=e=>typeof e==`object`&&!!e&&e[xn]===!0;function Eee(e){return typeof e==`object`&&e&&e[xn]?e[Sn]:e}var wn=(e,{depth:n=0}={})=>{let r=(i,a=0)=>{if(typeof i!=`object`||!i)return i;let o=wee(t(_n(Eee(i))));return n!==null&&a>=n?o:(a!==0&&o!==i&&(console.warn(`%c⚠ Warning:%c You tried to assign a proxied object (depth: %d).
3
3
  %c💡 Tip:%c Pass a plain object instead — wrapping a proxy inside another proxy may cause weird bugs.
4
4
  %c🔍 Debug Info:%c The problematic value is shown below:`,`background: #fdd835; color: #000; font-weight: bold; padding: 2px 4px; border-radius: 3px;`,`color: inherit;`,a,`color: #00bfa5; font-weight: bold;`,`color: inherit;`,`color: #03a9f4; font-weight: bold;`,`color: inherit;`,i,e),console.groupCollapsed(`%c📜 Proxy assignment trace`,`color: #9c27b0; font-weight: bold;`),console.trace({value:i,raw:o}),console.groupEnd()),Object.entries(o).forEach(([e,t])=>{let n=r(t,a+1);Reflect.set(o,e,n)||console.warn(`%c🚫 Readonly Property Error:%c Failed to set property "%s" on object.
5
5
  %c💡 Tip:%c This property is readonly or non-configurable. You cannot unpack a readonly property — the value was not updated.
@@ -384,4 +384,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
384
384
  '"^!|Tf9989!\` YBBBP^'
385
385
  '"^!\` \`
386
386
  `,kYe={class:`flex-center relative flex flex-1 flex-col gap-6 p-2 capitalize`},AYe={key:0,class:`scalar-version-number`},jYe={class:`text-c-3 right-4 mt-auto flex w-full flex-col items-end gap-2 text-sm`},MYe=Kq(A({__name:`ResponseEmpty`,props:{layout:{},totalPerformedRequests:{},appVersion:{}},emits:[`addRequest`,`sendRequest`,`openCommandPalette`],setup(e,{emit:t}){let r=t;return(t,i)=>(j(),T(`div`,kYe,[w(`div`,{class:D([`flex h-[calc(100%_-_50px)] flex-col items-center justify-center`,{"hidden opacity-0":e.totalPerformedRequests>0&&e.layout!==`modal`}])},[e.layout===`modal`?I(``,!0):(j(),T(`div`,AYe,[b(` Scalar App V`+N(e.appVersion)+` Beta `,1),i[3]||=w(`div`,{class:`mt-2`},[w(`a`,{href:`https://github.com/scalar/scalar/issues/2669`,target:`_blank`},` Roadmap `)],-1)])),i[4]||=w(`a`,{class:`gitbook-show scalar-version-number`,href:`https://www.scalar.com`,target:`_blank`},` Powered By Scalar.com `,-1),y(n(DYe),{art:n(OYe),class:`text-c-3`},null,8,[`art`])],2),w(`div`,jYe,[e.layout===`modal`?I(``,!0):(j(),T(`button`,{key:0,class:`flex items-center gap-1.5`,type:`button`,onClick:i[0]||=e=>r(`openCommandPalette`)},[i[5]||=b(` Get Started `,-1),y(n(iJ),{hotkey:`k`,modifier:[`default`]})])),e.layout===`desktop`?(j(),T(`button`,{key:1,class:`flex items-center gap-1.5`,type:`button`,onClick:i[1]||=e=>r(`addRequest`)},[i[6]||=b(` New Request `,-1),y(n(iJ),{hotkey:`N`})])):I(``,!0),w(`button`,{class:`flex items-center gap-1.5`,type:`button`,onClick:i[2]||=e=>r(`sendRequest`)},[i[7]||=b(` Send Request `,-1),y(n(iJ),{hotkey:`↵`})])])]))}}),[[`__scopeId`,`data-v-0895623d`]]),NYe={key:0,class:`bg-b-1 z-overlay absolute inset-0 flex flex-col items-center justify-center gap-6`},PYe=Kq(A({__name:`ResponseLoadingOverlay`,props:{eventBus:{}},setup(e){let t=AE(),i=r(),a=()=>{clearTimeout(i.value),i.value=setTimeout(()=>t.start(),1e3)},o=()=>{clearTimeout(i.value),i.value=void 0,t.clear()};return ue(()=>{e.eventBus.on(`hooks:on:request:sent`,a),e.eventBus.on(`hooks:on:request:complete`,o)}),me(()=>{e.eventBus.off(`hooks:on:request:sent`,a),e.eventBus.off(`hooks:on:request:complete`,o),o()}),(r,i)=>(j(),P(je,null,{default:M(()=>[n(t).isActive?(j(),T(`div`,NYe,[y(n(QS),{class:`text-c-3`,loader:n(t),size:`3xl`},null,8,[`loader`]),y(n(VD),{variant:`ghost`,onClick:i[0]||=t=>e.eventBus.emit(`operation:cancel:request`)},{default:M(()=>[...i[1]||=[b(` Cancel `,-1)]]),_:1})])):I(``,!0)]),_:1}))}}),[[`__scopeId`,`data-v-b80db6e2`]]),H9=[`B`,`kB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],FYe=(e,t=3)=>{if(!Number.isFinite(e)||e<=0)return`0 B`;let n=Math.max(0,Math.min(Math.floor(Math.log10(e)/3),H9.length-1));return Number((e/1e3**n).toPrecision(t))>=1e3&&n<H9.length-1&&(n+=1),`${Number((e/1e3**n).toPrecision(t))} ${H9[n]}`},U9=e=>{let t=Number.parseInt(e.headers?.[`Content-Length`]||e.headers?.[`content-length`]||`0`,10);if(!(isNaN(t)||t<=0))return FYe(t)},W9=e=>Number.isFinite(e)?e:0;function IYe(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(W9(e*1e3)%1e3),nanoseconds:Math.trunc(W9(e*1e6)%1e3)}}function LYe(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function RYe(e){switch(typeof e){case`number`:if(Number.isFinite(e))return IYe(e);break;case`bigint`:return LYe(e)}throw TypeError(`Expected a finite number or bigint`)}var zYe=e=>e===0||e===0n,BYe=(e,t)=>t===1||t===1n?e:`${e}s`,VYe=1e-7,HYe=24n*60n*60n*1000n;function G9(e,t){let n=typeof e==`bigint`;if(!n&&!Number.isFinite(e))throw TypeError(`Expected a finite number or bigint`);t={...t};let r=e<0?`-`:``;e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let i=[],a=(e,t)=>{let n=Math.floor(e*10**t+VYe);return(Math.round(n)/10**t).toFixed(t)},o=(e,n,r,a)=>{if(i.length!==0&&t.colonNotation||!zYe(e)||t.colonNotation&&r===`m`){if(a??=String(e),t.colonNotation){let e=a.includes(`.`)?a.split(`.`)[0].length:a.length,t=i.length>0?2:1;a=`0`.repeat(Math.max(0,t-e))+a}else a+=t.verbose?` `+BYe(n,e):r;i.push(a)}},s=RYe(e),c=BigInt(s.days);if(t.hideYearAndDays?o(BigInt(c)*24n+BigInt(s.hours),`hour`,`h`):(t.hideYear?o(c,`day`,`d`):(o(c/365n,`year`,`y`),o(c%365n,`day`,`d`)),o(Number(s.hours),`hour`,`h`)),o(Number(s.minutes),`minute`,`m`),!t.hideSeconds){if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3&&!t.subSecondsAsDecimals){let e=Number(s.seconds),n=Number(s.milliseconds),r=Number(s.microseconds),i=Number(s.nanoseconds);if(o(e,`second`,`s`),t.formatSubMilliseconds)o(n,`millisecond`,`ms`),o(r,`microsecond`,`µs`),o(i,`nanosecond`,`ns`);else{let e=n+r/1e3+i/1e6,a=typeof t.millisecondsDecimalDigits==`number`?t.millisecondsDecimalDigits:0,s=a?e.toFixed(a):e>=1?Math.round(e):Math.ceil(e);o(Number.parseFloat(s),`millisecond`,`ms`,s)}}else{let r=a((n?Number(e%HYe):e)/1e3%60,typeof t.secondsDecimalDigits==`number`?t.secondsDecimalDigits:1),i=t.keepDecimalsOnWholeSeconds?r:r.replace(/\.0+$/,``);o(Number.parseFloat(i),`second`,`s`,i)}}if(i.length===0)return r+`0`+(t.verbose?` milliseconds`:`ms`);let l=t.colonNotation?`:`:` `;return typeof t.unitCount==`number`&&(i=i.slice(0,Math.max(t.unitCount,1))),r+i.join(l)}var UYe={class:`text-c-1 flex gap-1.5`},WYe={key:0},GYe={key:0},KYe={key:1},qYe=A({__name:`ResponseMetaInformation`,props:{response:{},eventBus:{}},setup(e){let t=r(),i=r(0),a=()=>{clearInterval(t.value),t.value=void 0,i.value=0},o=()=>{t.value=setInterval(()=>i.value+=1e3,1e3)};ue(()=>{e.eventBus.on(`hooks:on:request:sent`,o),e.eventBus.on(`hooks:on:request:complete`,a)}),me(()=>{e.eventBus.off(`hooks:on:request:sent`,o),e.eventBus.off(`hooks:on:request:complete`,a),a()});let s=k(()=>{let t=e.response?.status;if(t)return NX[t]??void 0});return(r,a)=>(j(),T(`div`,UYe,[t.value&&i.value?(j(),T(`span`,WYe,N(n(G9)(i.value)),1)):(j(),T(_e,{key:1},[w(`span`,null,[a[0]||=w(`span`,{class:`sr-only`},`Response Information, Duration:`,-1),b(` `+N(n(G9)(e.response.duration)),1)]),n(U9)(e.response)?(j(),T(`span`,GYe,[a[1]||=w(`span`,{class:`sr-only`},`, Size:`,-1),b(` `+N(n(U9)(e.response)),1)])):I(``,!0),s.value?(j(),T(_e,{key:1},[a[2]||=w(`span`,{class:`sr-only`},`, Status:`,-1),s.value.url?(j(),P(E9,{key:0,class:`flex items-center gap-1.5`,href:s.value.url},{default:M(()=>[b(N(e.response.status)+` `+N(s.value.name)+` `,1),w(`span`,{class:`block h-1.5 w-1.5 rounded-full`,style:ge({backgroundColor:s.value.color})},null,4)]),_:1},8,[`href`])):(j(),T(`span`,KYe,[b(N(e.response.status)+` `+N(s.value.name)+` `,1),w(`span`,{class:`block h-1.5 w-1.5 rounded-full`,style:ge({backgroundColor:s.value.color})},null,4)]))],64)):I(``,!0)],64))]))}}),JYe=e=>{if(!e||typeof e!=`string`)return null;let t=e.indexOf(`=`);if(t===-1)return null;let n=e.substring(0,t).trim(),r=e.substring(t+1).trim();return n?{name:n,value:r}:null},YYe={class:`flex h-8 flex-1 items-center`},XYe=[`id`,`role`],K9=2e5,ZYe=Kq(A({__name:`ResponseBlock`,props:{response:{},requestPayload:{},layout:{},totalPerformedRequests:{},appVersion:{},plugins:{},eventBus:{}},setup(e,{expose:t}){let i=k(()=>{let t=e.response?.headers;return t?Object.keys(t).map(e=>({name:e,value:t[e]??``})):[]}),a=k(()=>e.response?.cookieHeaderKeys.map(e=>JYe(e)).filter(On)??[]),o=[`Cookies`,`Headers`,`Body`],s=r(`All`),c=k(()=>[`All`,...o]),l=k(()=>Object.fromEntries(c.value.map(e=>[e,re()]))),u=k(()=>{if(!e.response||!(`size`in e.response))return!1;let t=e.response.headers?.[`content-type`]||e.response.headers?.[`Content-Type`];return!t||(e.response.size??0)<=K9||t.includes(`text/html`)?!1:zLe.some(e=>t.includes(e))&&(e.response.size??0)>K9}),d=k(()=>{let t=e.requestPayload?.[1]?.headers;return t?[...new Headers(t)].map(([e,t])=>({name:e,value:t,required:!1})):[]}),f=e=>s.value===`All`||s.value===e;return t({responseHeaders:i,responseCookies:a,requestHeaders:d,shouldVirtualize:u,activeFilter:s,filters:c}),(t,r)=>(j(),P(GX,{"aria-label":`Response`},{title:M(()=>[w(`div`,YYe,[w(`div`,{"aria-live":`polite`,class:D([`flex items-center`,{"animate-response-heading":e.response}])},[r[4]||=w(`span`,{class:`response-heading pointer-events-none absolute`},` Response `,-1),e.response?(j(),P(qYe,{key:0,class:`animate-response-children`,eventBus:e.eventBus,response:e.response},null,8,[`eventBus`,`response`])):I(``,!0)],2),y(KX,{modelValue:s.value,"onUpdate:modelValue":r[0]||=e=>s.value=e,filterIds:l.value,filters:c.value},null,8,[`modelValue`,`filterIds`,`filters`])])]),default:M(()=>[w(`div`,{id:l.value.All,class:D([`custom-scroll response-section-content relative grid h-full justify-stretch`,{"content-start":e.response}]),role:s.value===`All`&&e.response?`tabpanel`:`none`},[e.response?(j(),T(_e,{key:1},[f(`Cookies`)?(j(),P(EYe,{key:0,id:l.value.Cookies,class:`response-section-content-cookies`,cookies:a.value,role:s.value===`All`?`none`:`tabpanel`},null,8,[`id`,`cookies`,`role`])):I(``,!0),f(`Headers`)?(j(),P(D9,{key:1,id:l.value.Headers,class:`response-section-content-headers`,headers:d.value,role:s.value===`All`?`none`:`tabpanel`},{title:M(()=>[...r[5]||=[b(`Request Headers`,-1)]]),_:1},8,[`id`,`headers`,`role`])):I(``,!0),f(`Headers`)?(j(),P(D9,{key:2,id:l.value.Headers,class:`response-section-content-headers`,headers:i.value,role:s.value===`All`?`none`:`tabpanel`},{title:M(()=>[...r[6]||=[b(`Response Headers`,-1)]]),_:1},8,[`id`,`headers`,`role`])):I(``,!0),(j(!0),T(_e,null,E(e.plugins,(e,t)=>(j(),P(n(Iq),{key:t},{default:M(()=>[e?.components?.response?le((j(),P(we(e.components.response.component),O({key:0,ref_for:!0},e.components.response.additionalProps),null,16)),[[De,s.value===`All`]]):I(``,!0)]),_:2},1024))),128)),s.value===`All`||s.value===`Body`?(j(),T(_e,{key:3},[`reader`in e.response?(j(),P(SYe,{key:0,id:l.value.Body,class:`response-section-content-body`,reader:e.response.reader},null,8,[`id`,`reader`])):u.value&&typeof e.response?.data==`string`?(j(),P(CYe,{key:1,id:l.value.Body,content:e.response.data,data:e.response?.data,headers:i.value,role:s.value===`All`?`none`:`tabpanel`},null,8,[`id`,`content`,`data`,`headers`,`role`])):(j(),P(_Ye,{key:2,id:l.value.Body,active:!0,class:`response-section-content-body`,data:e.response?.data,headers:i.value,layout:`client`,plugins:e.plugins,role:s.value===`All`?`none`:`tabpanel`,title:`Body`},null,8,[`id`,`data`,`headers`,`plugins`,`role`]))],64)):I(``,!0)],64)):(j(),P(MYe,{key:0,appVersion:e.appVersion,layout:e.layout,totalPerformedRequests:e.totalPerformedRequests,onAddRequest:r[1]||=t=>e.eventBus.emit(`ui:open:command-palette`,{action:`create-request`,payload:void 0}),onOpenCommandPalette:r[2]||=t=>e.eventBus.emit(`ui:open:command-palette`),onSendRequest:r[3]||=t=>e.eventBus.emit(`operation:send:request:hotkey`)},null,8,[`appVersion`,`layout`,`totalPerformedRequests`])),y(PYe,{eventBus:e.eventBus},null,8,[`eventBus`])],10,XYe)]),_:1}))}}),[[`__scopeId`,`data-v-7a7c6611`]]),q9=Kq(A({__name:`HttpMethod`,props:{isSquare:{type:Boolean,default:!1},method:{},isEditable:{type:Boolean,default:!1}},emits:[`change`],setup(e,{emit:t}){let r=e,i=t,a=k(()=>Nv(r.method)),o=W_(Mv).map(([e])=>({id:e,label:e.toUpperCase(),color:Nv(e).colorClass})),s=k({get:()=>o.find(({id:e})=>e===r.method),set:e=>e?.id&&i(`change`,e.id)}),c=My({base:`text-center font-code text-3xs justify-center items-center flex`,variants:{isSquare:{true:`px-2.5 whitespace-nowrap font-bold border-r h-fit m-auto`,false:`rounded-full`},isEditable:{true:`http-bg-gradient rounded-md border`,false:`cursor-auto`}}}),l=k(()=>a.value.short);return(t,r)=>e.isEditable?(j(),P(n(ST),{key:0,modelValue:s.value,"onUpdate:modelValue":r[0]||=e=>s.value=e,class:`font-code scalar-client mt-1 text-sm`,options:n(o)},{default:M(()=>[w(`div`,{class:D([`h-full`,{"pointer-events-none":!e.isEditable}])},[w(`button`,{class:D([`relative h-full`,n(Ny)(n(c)({isSquare:e.isSquare,isEditable:e.isEditable}),a.value.colorClass)]),type:`button`},[w(`span`,null,N(l.value),1)],2)],2)]),_:1},8,[`modelValue`,`options`])):(j(),T(`div`,{key:1,class:D([`relative gap-1 whitespace-nowrap`,n(Ny)(n(c)({isSquare:e.isSquare,isEditable:e.isEditable}),a.value.colorClass)]),type:`button`},N(a.value.short),3))}}),[[`__scopeId`,`data-v-86e2b3ea`]]),QYe=/^\/_scalar_temp[a-f0-9]*$/i,$Ye=(e,t)=>t.toLowerCase()===`drafts`&&e===`/`||QYe.test(e),eXe=e=>{if(!e)return;let t=document.querySelector(e);if(t instanceof HTMLButtonElement){t.click();return}(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.getAttribute(`contenteditable`)===`true`)&&t.focus()},J9=20,Y9=100,tXe=0,X9=15,nXe=60,rXe=400/J9,iXe=()=>{let e=r(Y9),t=r(0),n=r(!1),i=r(),a=()=>{clearInterval(i.value),i.value=void 0,e.value=Y9,n.value=!1},o=()=>{n.value?e.value-=(e.value-X9)/nXe:e.value-=t.value/rXe,e.value<=tXe&&a()};return{startLoading:()=>{if(i.value){n.value=!0;return}n.value=!0,i.value=setInterval(o,J9)},stopLoading:()=>{t.value=e.value,n.value=!1},percentage:e,isLoading:n}},aXe=({isReady:e,operationKey:t,shouldMask:n,onMask:r})=>{S([e,t],([e])=>{e&&n()&&r()},{flush:`post`})},oXe=[`aria-expanded`],sXe={class:`overflow-hidden text-ellipsis whitespace-nowrap`},cXe=[`id`],lXe={key:0},uXe={class:`description text-c-3 px-3 py-1.5`},dXe=Kq(A({__name:`ServerDropdownItem`,props:{server:{},serverOption:{}},emits:[`update:variable`,`update:selectedServer`],setup(e,{emit:t}){let r=t,i=re(),a=()=>Object.keys(e.server?.variables??{}).length>0,o=k(()=>e.serverOption.id===e.server?.url),s=k(()=>o.value&&a());return(t,a)=>(j(),T(`div`,{class:D([`group/item flex min-h-fit flex-col rounded border`,{"border-transparent":!o.value}])},[w(`button`,O(s.value?{"aria-controls":n(i)}:{},{"aria-expanded":s.value,class:[`flex min-h-8 cursor-pointer items-center gap-1.5 rounded px-1.5`,o.value?`text-c-1 bg-b-2`:`hover:bg-b-2`],type:`button`,onClick:a[0]||=e=>r(`update:selectedServer`)}),[y(n(fT),{selected:o.value},null,8,[`selected`]),w(`span`,sXe,N(e.serverOption.label),1)],16,oXe),s.value?(j(),T(`div`,{key:0,id:n(i),class:`bg-b-2 divide divide-y rounded-b border-t *:pl-4`,onClick:a[2]||=Me(()=>{},[`stop`])},[y(KD,{variables:e.server?.variables,"onUpdate:variable":a[1]||=(e,t)=>r(`update:variable`,e,t)},null,8,[`variables`]),e.server?.description?(j(),T(`div`,lXe,[w(`div`,uXe,[y(n(FW),{value:e.server.description},null,8,[`value`])])])):I(``,!0)],8,cXe)):I(``,!0)],2))}}),[[`__scopeId`,`data-v-649f9a0d`]]),fXe=[`onClick`],pXe={class:`flex items-center justify-center`},mXe=A({name:`ServerDropdown`,props:{meta:{},servers:{},server:{},target:{},layout:{}},emits:[`update:selectedServer`,`update:variable`,`update:servers`,`update:open`],setup(e,{emit:t}){let r=t,i=k(()=>e.servers.map(e=>({id:e.url,label:e.url??`Unknown server`}))),a=k(()=>e.server?.url?.endsWith(`/`)?e.server.url.slice(0,-1):e.server?.url||``);return(t,o)=>(j(),P(n(bX),{class:`max-h-[inherit] p-0 text-base`,focus:``,offset:0,placement:`bottom`,resize:``,target:e.target,teleport:`#${e.target}`},{popover:M(({close:t})=>[w(`div`,{class:`custom-scroll flex max-h-[inherit] flex-col gap-1 p-1`,onClick:t},[(j(!0),T(_e,null,E(i.value,(t,n)=>(j(),P(dXe,{key:t.id,server:e.server,serverOption:t,type:`request`,"onUpdate:selectedServer":n=>r(`update:selectedServer`,{url:t.id,meta:e.meta}),"onUpdate:variable":(t,i)=>r(`update:variable`,{index:n,key:t,value:i,meta:e.meta})},null,8,[`server`,`serverOption`,`onUpdate:selectedServer`,`onUpdate:variable`]))),128)),e.layout===`modal`?I(``,!0):(j(),T(`button`,{key:0,class:`text-xxs hover:bg-b-2 flex cursor-pointer items-center gap-1.5 rounded p-1.75`,type:`button`,onClick:o[0]||=e=>r(`update:servers`)},[w(`div`,pXe,[y(n(Ky),{class:`size-4`})]),o[5]||=w(`span`,null,`Update Servers`,-1)]))],8,fXe)]),backdrop:M(({open:e})=>[y(Lq,{value:e,onChange:o[1]||=e=>r(`update:open`,e),onUnmount:o[2]||=e=>r(`update:open`,!1)},null,8,[`value`]),y(n(bT),{class:`inset-x-px rounded-none rounded-b-lg`})]),default:M(()=>[y(n(VD),{class:`hover:bg-b-2 font-code text-c-2 h-auto gap-0.75 rounded border px-1.5 text-base whitespace-nowrap @3xl:ml-0.75`,variant:`ghost`},{default:M(()=>[e.server?(j(),T(_e,{key:0},[o[3]||=w(`span`,{class:`sr-only`},`Server:`,-1),b(` `+N(a.value),1)],64)):(j(),T(_e,{key:1},[o[4]||=w(`span`,{class:`sr-only`},`Add Server`,-1),y(n(qy),{class:`size-3`})],64))]),_:1})]),_:1},8,[`target`,`teleport`]))}}),hXe={100:{color:`text-yellow`},200:{color:`text-green`},202:{color:`text-green`},300:{color:`text-blue`},304:{color:`text-blue`},400:{color:`text-red`},401:{color:`text-orange`},422:{color:`text-yellow`},423:{color:`text-purple`},505:{color:`text-orange`}},gXe=e=>hXe[e]||{color:`text-grey`},_Xe=(e,t=2)=>e>1e3?(e/1e3).toFixed(t)+`s`:e.toFixed(t)+`ms`,vXe={class:`min-w-0`},yXe={class:`text-c-1 min-w-0 truncate`},bXe=Kq(A({__name:`AddressBarHistory`,props:{target:{},history:{}},emits:[`select:history:item`,`update:open`],setup(e,{emit:t}){let r=t;return(t,i)=>(j(),P(n(Xbe),{as:`div`},{default:M(({open:t})=>[y(Lq,{value:t,onChange:i[0]||=e=>r(`update:open`,e),onUnmount:i[1]||=e=>r(`update:open`,!1)},null,8,[`value`]),y(n(yT),{offset:0,resize:``,target:e.target},Ce({default:M(()=>[e.history.length?(j(),P(n(Zbe),{key:0,class:`address-bar-history-button text-c-3 focus:text-c-1 relative mr-1 rounded-lg p-1.5`},{default:M(()=>[y(n(LS),{icon:`History`,size:`sm`,thickness:`2.25`}),i[2]||=w(`span`,{class:`sr-only`},`Request History`,-1)]),_:1})):I(``,!0)]),_:2},[t?{name:`floating`,fn:M(({width:t})=>[y(n(Qbe),{class:`custom-scroll grid max-h-[inherit] grid-cols-[44px_1fr_repeat(3,auto)] items-center p-0.75`,static:``,style:ge({width:t})},{default:M(()=>[(j(!0),T(_e,null,E(e.history,(e,t)=>(j(),P(n($be),{key:t,as:`button`,class:`font-code ui-active:*:bg-b-2 text-c-2 contents text-sm font-medium *:flex *:h-8 *:cursor-pointer *:items-center *:rounded-none *:px-1.5 *:first:rounded-l *:last:rounded-r`,value:t,onClick:e=>r(`select:history:item`,{index:t})},{default:M(()=>[y(n(q9),{class:`text-[11px]`,method:e.method},null,8,[`method`]),w(`div`,vXe,[w(`div`,yXe,N(e.path),1)]),w(`div`,null,N(n(_Xe)(e.duration)),1),w(`div`,{class:D([n(gXe)(e.status).color])},N(e.status),3),w(`div`,null,N(n(NX)[e.status]?.name),1)]),_:2},1032,[`value`,`onClick`]))),128))]),_:1},8,[`style`]),y(n(bT),{class:`inset-x-px rounded-none rounded-b-lg`})]),key:`0`}:void 0]),1032,[`target`])]),_:1}))}}),[[`__scopeId`,`data-v-12140f4f`]]),xXe=e=>{if(!e||!(e instanceof Element))return null;let t=[],n=e;for(;n instanceof Element;){let e=n.localName,r=1,i=n.previousElementSibling;for(;i;)i.localName===e&&r++,i=i.previousElementSibling;t.unshift(r>1?`${e}:nth-of-type(${r})`:e),n=n.parentElement}return t.join(` > `)},SXe=(e=``)=>{if(!e.trim())return null;if(!e.startsWith(`/`)&&!/^[a-z][a-z0-9+\-.]*:\/\//i.test(e)){let t=e.search(/[/?#]/),n=t===-1?e:e.slice(0,t);if(n.includes(`.`))try{let t=new URL(`https://${e}`);if(t.origin===`null`)return null;let r=t.host,i=n.match(/:(\d+)$/);i&&!t.port&&(r=`${t.hostname}:${i[1]}`);let a=decodeURIComponent(t.pathname)+t.search+t.hash;return[r,a]}catch{return null}}if(e.startsWith(`//`))try{let t=new URL(`https:${e}`);return t.origin===`null`?null:[t.origin.replace(/^https?:/,``),decodeURIComponent(t.pathname)+t.search+t.hash]}catch{return null}try{let t=new URL(e);if(t.origin===`null`)return null;let n=decodeURIComponent(t.pathname)+t.search+t.hash;return[t.origin,n]}catch{return null}},CXe={class:`order-last flex h-auto w-full max-w-3xl grow-3 flex-wrap items-stretch [--scalar-address-bar-height:32px] @3xl:order-0 @3xl:flex-nowrap`},wXe=[`id`],TXe={class:`hidden @3xl:flex`},EXe={class:`scroll-timeline-x scroll-timeline-x-hidden relative flex w-full bg-blend-normal`},DXe={key:0,class:`z-context absolute inset-x-0 top-[calc(100%+4px)] flex flex-col items-center rounded px-6`},OXe={class:`text-c-danger bg-b-danger border-c-danger flex items-center gap-1 rounded border p-1`},kXe={class:`min-w-0 flex-1`},AXe={"aria-hidden":`true`,class:`inline-flex items-center gap-1`},jXe={class:`sr-only`},MXe={class:`mt-2 flex h-(--scalar-address-bar-height) w-full items-stretch gap-1 @3xl:hidden`},NXe={"aria-hidden":`true`,class:`inline-flex items-center gap-1`},PXe={class:`sr-only`},FXe=Kq(A({name:`AddressBar`,props:{path:{},method:{},documentSlug:{},exampleKey:{},server:{},servers:{},history:{},layout:{},eventBus:{},environment:{},serverMeta:{}},emits:[`execute`,`select:history:item`],setup(e,{expose:t,emit:i}){let a=i,o=re(),s=ie(`sendButtonRef`),c=ie(`mobileSendButtonRef`),l=ie(`addressBarRef`),{percentage:u,startLoading:d,stopLoading:f,isLoading:p}=iXe(),m=r(null),h=r(null),g=r(!1),_=r(!1),v=r(!1),x=q0.scrollMargins.of(()=>({right:24})),ee=k(()=>({backgroundColor:`color-mix(in srgb, transparent 90%, ${Mv[e.method].colorVar})`,transform:`translate3d(-${u.value}%,0,0)`})),C=k(()=>h.value||m.value),te=k(()=>_.value||v.value),ne=k(()=>WX(e.method,e.path,e.exampleKey,e.documentSlug));S(ne,()=>{m.value=null,h.value=null});let ae=()=>{let e=s.value?.$el,t=c.value?.$el;e&&e.offsetParent!==null?e.focus():t?.focus()},oe=t=>{l.value?.isFocused&&e.layout!==`desktop`||(l.value?.focus(`end`),t&&`clear`in t&&t.clear&&l.value?.setCodeMirrorContent(``),t&&`event`in t&&t.event.preventDefault())};aXe({isReady:()=>l.value?.codeMirror,operationKey:()=>ne.value,shouldMask:()=>$Ye(e.path,e.documentSlug),onMask:()=>requestAnimationFrame(()=>{let t=l.value?.codeMirror?.state.doc.toString();t&&t!==e.path||oe({clear:!0})})});let se=t=>{let n=SXe(t);if(!n)return t;let[r,i]=n;return r===e.server?.url||(e.servers.find(e=>e.url===r)?e.eventBus.emit(`server:update:selected`,{url:r,meta:e.serverMeta}):e.eventBus.emit(`server:add:server`,{url:r,select:!0,meta:{type:`operation`,path:e.path,method:e.method}})),i},ce=e=>e.startsWith(`/`)?e:`/${e}`,le=(t,n,r=null)=>{let i=se(n),a=ce(i);l.value?.setCodeMirrorContent(a),e.eventBus.emit(`operation:update:pathMethod`,{meta:{method:e.method,path:e.path},blurTargetSelector:r,payload:{method:t,path:a},callback:(n,r)=>{if(n===`success`||n===`no-change`)h.value=null,m.value=null;else if(n===`conflict`){t!==e.method&&(h.value=t),a!==e.path&&(m.value=a);return}let o=l.value?.codeMirrorRef?.textContent;n===`no-change`&&o&&o!==i&&l.value?.setCodeMirrorContent(i),xe(()=>eXe(r))}})},E=t=>le(t,m.value??e.path),O=(t,n)=>{let r=n.relatedTarget,i=g.value||`sourceCapabilities`in n&&n.sourceCapabilities===null?null:xXe(r);g.value=!1,le(h.value??e.method,t,i)},de=(t,n)=>{n.stopPropagation(),le(h.value??e.method,t,`[data-addressbar-action="send"]`)},fe=t=>{t.target?.innerText===`
387
- `&&e.eventBus.emit(`server:update:selected`,{url:``,meta:e.serverMeta})},pe=()=>{e.eventBus.emit(`copy-url:address-bar`)},he=()=>{if(e.serverMeta.type===`operation`){e.eventBus.emit(`ui:navigate`,{page:`operation`,path:`servers`,operationPath:e.serverMeta.path,method:e.serverMeta.method});return}e.eventBus.emit(`ui:navigate`,{page:`document`,path:`servers`})},A=[];return ue(()=>{A.push(e.eventBus.on(`ui:focus:address-bar`,oe),e.eventBus.on(`ui:focus:send-button`,ae),e.eventBus.on(`hooks:on:request:sent`,d),e.eventBus.on(`hooks:on:request:complete`,f))}),me(()=>{for(let e of A)e();f()}),t({methodConflict:h,pathConflict:m}),(t,r)=>(j(),T(`div`,CXe,[w(`div`,{id:n(o),class:D([`address-bar-bg-states text-xxs group relative flex h-(--scalar-address-bar-height) w-full flex-1 flex-row items-stretch rounded-lg p-0.75`,{"outline-c-danger outline":C.value,"rounded-b-none":te.value}])},[w(`div`,{class:D([`pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border`,{"rounded-b-none":te.value}])},[w(`div`,{class:`absolute top-0 left-0 h-full w-full`,style:ge(ee.value)},null,4)],2),w(`div`,TXe,[y(n(q9),{isEditable:e.layout!==`modal`,isSquare:``,method:h.value??e.method,teleport:``,onChange:E},null,8,[`isEditable`,`method`])]),w(`div`,EXe,[e.servers.length?(j(),P(n(mXe),{key:0,layout:e.layout,meta:e.serverMeta,server:e.server,servers:e.servers,target:n(o),"onUpdate:open":r[0]||=e=>_.value=e,"onUpdate:selectedServer":r[1]||=t=>e.eventBus.emit(`server:update:selected`,t),"onUpdate:servers":he,"onUpdate:variable":r[2]||=t=>e.eventBus.emit(`server:update:variables`,t)},null,8,[`layout`,`meta`,`server`,`servers`,`target`])):I(``,!0),y(n(n9),{ref_key:`addressBarRef`,ref:l,alwaysEmitChange:``,"aria-label":`Path`,class:`ml-1 min-w-fit pl-px outline-none`,disableCloseBrackets:``,disabled:e.layout===`modal`,disableEnter:``,disableTabIndent:``,emitOnBlur:!1,environment:e.environment,extensions:[n(x)],importCurl:``,layout:e.layout,modelValue:e.path,placeholder:e.server?``:`Enter a URL`,server:``,onBlur:O,onKeydown:[Ee(fe,[`delete`]),r[3]||=Ee(e=>g.value=!0,[`tab`])],onSubmit:de},null,8,[`disabled`,`environment`,`extensions`,`layout`,`modelValue`,`placeholder`])]),y(n(VD),{class:`hover:bg-b-3 mx-1 hidden @3xl:flex`,size:`xs`,variant:`ghost`,onClick:pe},{default:M(()=>[y(n(Uy)),r[8]||=w(`span`,{class:`sr-only`},`Copy URL`,-1)]),_:1}),y(bXe,{history:e.history,target:n(o),"onSelect:history:item":r[4]||=e=>a(`select:history:item`,e),"onUpdate:open":r[5]||=e=>v.value=e},null,8,[`history`,`target`]),C.value?(j(),T(`div`,DXe,[w(`div`,OXe,[y(n(rde),{size:`sm`}),w(`div`,kXe,[r[9]||=b(` A `,-1),w(`em`,null,N(h.value?.toUpperCase()??e.method.toUpperCase()),1),r[10]||=b(` request to `,-1),y(n(eb),{text:m.value??e.path},null,8,[`text`]),r[11]||=b(` already exists in this document `,-1)])])])):I(``,!0),y(n(VD),{ref_key:`sendButtonRef`,ref:s,class:`relative hidden h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold @3xl:flex`,"data-addressbar-action":`send`,disabled:n(p),onClick:r[6]||=e=>a(`execute`)},{default:M(()=>[w(`span`,AXe,[y(n(LS),{class:`relative shrink-0 fill-current`,icon:`Play`,size:`xs`}),r[12]||=w(`span`,{class:`text-xxs flex`},`Send`,-1)]),w(`span`,jXe,` Send `+N(e.method)+` request to `+N(e.server?.url??``)+N(e.path),1)]),_:1},8,[`disabled`])],10,wXe),w(`div`,MXe,[y(n(q9),{isEditable:e.layout!==`modal`,isSquare:``,method:h.value??e.method,teleport:``,onChange:E},null,8,[`isEditable`,`method`]),y(n(VD),{class:`hover:bg-b-3 ml-auto`,size:`xs`,variant:`ghost`,onClick:pe},{default:M(()=>[y(n(Uy)),r[13]||=w(`span`,{class:`sr-only`},`Copy URL`,-1)]),_:1}),y(n(VD),{ref_key:`mobileSendButtonRef`,ref:c,class:`relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold`,"data-addressbar-action":`send`,disabled:n(p),onClick:r[7]||=e=>a(`execute`)},{default:M(()=>[w(`span`,NXe,[y(n(LS),{class:`relative shrink-0 fill-current`,icon:`Play`,size:`xs`}),r[14]||=w(`span`,{class:`text-xxs`},`Send`,-1)]),w(`span`,PXe,` Send `+N(e.method)+` request to `+N(e.server?.url??``)+N(e.path),1)]),_:1},8,[`disabled`])])]))}}),[[`__scopeId`,`data-v-d37cbfcc`]]),IXe={class:`relative flex items-center`},LXe={class:`flex max-w-[220px] min-w-0 items-center gap-1.5`},RXe={class:`text-xxs block max-w-[160px] min-w-0 truncate text-left font-medium`},zXe={class:`min-w-0 flex-1 truncate`},BXe={class:`bg-c-accent text-b-1 mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full p-[3px]`},VXe={class:`min-w-0 flex-1 text-left`},HXe={class:`block truncate`},UXe={class:`flex h-4 w-4 items-center justify-center`},WXe={key:5,class:`text-c-3 px-2 py-1.5 text-xs`},GXe=A({__name:`EnvironmentSelector`,props:{environments:{default:()=>[]},activeEnvironment:{}},emits:[`select:environment`,`add:environment`],setup(e,{emit:t}){let r=t,i=k(()=>!!e.activeEnvironment),a=k(()=>e.environments.length>0),o=k(()=>e.activeEnvironment?e.environments.includes(e.activeEnvironment):!1),s=k(()=>i.value&&!o.value),c=k(()=>s.value?`${e.activeEnvironment} (Unavailable)`:i.value?e.activeEnvironment:a.value?`Select Environment`:`Add Environment`),l=k(()=>s.value?`hover:bg-b-2 text-c-2 border-transparent`:i.value?`bg-c-accent/10 text-c-accent hover:bg-c-accent/20 border-c-accent/30`:a.value?`hover:bg-b-2 text-c-2 border-transparent`:`hover:bg-b-2 text-c-3 border-transparent`),u=()=>{r(`add:environment`)},d=e=>{r(`select:environment`,e)};return(t,r)=>(j(),T(`div`,IXe,[y(n(Xq),null,{items:M(()=>[i.value?(j(),P(n($q),{key:0,class:`group/item flex w-full items-center gap-1.5`,onClick:r[0]||=e=>d(``)},{default:M(()=>[w(`div`,{class:D([`flex h-4 w-4 items-center justify-center rounded-full p-[3px]`,e.activeEnvironment?`shadow-border text-transparent`:`bg-c-accent text-b-1`])},[y(n(LS),{class:`size-2.5`,icon:`Checkmark`,thickness:`3`})],2),r[1]||=w(`span`,{class:`text-c-2`},`No Environment`,-1)]),_:1})):I(``,!0),i.value&&a.value?(j(),P(n(Qq),{key:1})):I(``,!0),(j(!0),T(_e,null,E(e.environments,t=>(j(),P(n($q),{key:t,class:`group/item flex w-full min-w-0 items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap`,onClick:e=>d(t)},{default:M(()=>[w(`div`,{class:D([`flex h-4 w-4 items-center justify-center rounded-full p-[3px]`,e.activeEnvironment===t?`bg-c-accent text-b-1`:`shadow-border text-transparent`])},[y(n(LS),{class:`size-2.5`,icon:`Checkmark`,thickness:`3`})],2),w(`span`,zXe,N(t),1)]),_:2},1032,[`onClick`]))),128)),s.value?(j(),P(n(Qq),{key:2})):I(``,!0),s.value?(j(),P(n($q),{key:3,class:`group/item flex h-auto w-full min-w-0 items-start gap-1.5 overflow-hidden`,disabled:``},{default:M(()=>[w(`div`,BXe,[y(n(LS),{class:`size-2.5`,icon:`Checkmark`,thickness:`3`})]),w(`div`,VXe,[w(`span`,HXe,N(e.activeEnvironment),1),r[2]||=w(`span`,{class:`text-c-3 block truncate text-xs`},` Not available in this context `,-1)])]),_:1})):I(``,!0),a.value?(j(),P(n(Qq),{key:4})):I(``,!0),y(n($q),{class:`text-c-accent flex items-center gap-1.5`,onClick:u},{default:M(()=>[w(`div`,UXe,[y(n(LS),{icon:`Add`,size:`sm`})]),w(`span`,null,N(a.value?`New Environment`:`Create Environment`),1)]),_:1}),!a.value&&!i.value?(j(),T(`div`,WXe,[...r[3]||=[w(`p`,{class:`mb-1`},` Environments let you manage variables like API keys and base URLs across different contexts. `,-1)]])):I(``,!0)]),default:M(()=>[y(n(VD),{"aria-label":`Current environment: ${c.value}`,class:D([`line-clamp-1 h-full w-fit justify-start border px-2 py-1 font-normal transition-colors`,l.value]),size:`sm`,variant:`ghost`},{default:M(()=>[w(`div`,LXe,[y(n(LS),{class:D([`shrink-0`,i.value&&!s.value?`text-c-accent`:`text-c-3`]),icon:`Globe`,size:`sm`},null,8,[`class`]),w(`span`,RXe,N(c.value),1),y(n(LS),{class:`shrink-0`,icon:`ChevronDown`,size:`xs`})])]),_:1},8,[`aria-label`,`class`])]),_:1})]))}}),KXe={class:`lg:min-h-header t-app__top-container @container flex w-full flex-wrap items-center justify-center p-2`},qXe={class:`mb-2 flex flex-1 items-center justify-end gap-2 @3xl:mb-0`},JXe=Kq(A({__name:`Header`,props:{path:{},method:{},layout:{},hideClientButton:{type:Boolean,default:!1},integration:{},documentSlug:{},exampleKey:{},documentUrl:{},source:{},server:{},servers:{},history:{},eventBus:{},environments:{},activeEnvironment:{},environment:{},serverMeta:{}},emits:[`execute`,`select:history:item`,`add:environment`,`navigate:settings`],setup(e,{emit:t}){let r=t,i=t=>{e.eventBus.emit(`workspace:update:active-environment`,t)},a=()=>{e.eventBus.emit(`ui:navigate`,{page:`document`,path:`environment`})};return(t,o)=>(j(),T(`div`,KXe,[o[8]||=w(`div`,{class:`flex flex-1`},null,-1),y(n(FXe),{activeEnvironment:e.activeEnvironment,documentSlug:e.documentSlug,environment:e.environment,environments:e.environments,eventBus:e.eventBus,exampleKey:e.exampleKey,history:e.history,layout:e.layout,method:e.method,path:e.path,server:e.server,serverMeta:e.serverMeta,servers:e.servers,"onAdd:environment":o[0]||=e=>r(`add:environment`),onExecute:o[1]||=e=>r(`execute`),"onSelect:history:item":o[2]||=e=>r(`select:history:item`,e)},null,8,[`activeEnvironment`,`documentSlug`,`environment`,`environments`,`eventBus`,`exampleKey`,`history`,`layout`,`method`,`path`,`server`,`serverMeta`,`servers`]),w(`div`,qXe,[e.layout===`modal`?I(``,!0):(j(),P(GXe,{key:0,activeEnvironment:e.activeEnvironment,environments:e.environments,"onAdd:environment":a,"onSelect:environment":i},null,8,[`activeEnvironment`,`environments`])),e.layout===`modal`?I(``,!0):(j(),P(n(pC),{key:1,icon:n(oue),label:`Operation settings`,size:`sm`,weight:`bold`,onClick:o[3]||=e=>r(`navigate:settings`)},null,8,[`icon`])),e.layout===`modal`&&e.documentUrl&&!e.hideClientButton?(j(),P(wX,{key:2,buttonSource:`modal`,class:`!w-fit lg:-mr-1`,integration:e.integration??null,operationMethod:e.method,operationPath:e.path,source:e.source??`api-reference`,url:e.documentUrl},null,8,[`integration`,`operationMethod`,`operationPath`,`source`,`url`])):I(``,!0),e.layout===`modal`&&e.source!==`gitbook`?(j(),T(`button`,{key:3,class:`app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2`,type:`button`,onClick:o[4]||=t=>e.eventBus.emit(`ui:close:client-modal`)},[y(n(LS),{icon:`Close`,size:`lg`,thickness:`2`}),o[6]||=w(`span`,{class:`sr-only`},`Close Client`,-1)])):I(``,!0),e.layout===`modal`&&e.source===`gitbook`?(j(),T(`button`,{key:4,class:`text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2`,type:`button`,onClick:o[5]||=t=>e.eventBus.emit(`ui:close:client-modal`)},[y(n(LS),{icon:`Close`,size:`md`,thickness:`1.75`}),o[7]||=w(`span`,{class:`sr-only`},`Close Client`,-1)])):I(``,!0)])]))}}),[[`__scopeId`,`data-v-42c563b3`]]),YXe={class:`bg-b-1 flex h-full flex-col`},XXe={class:`lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0`},ZXe=A({name:`OperationBlock`,props:{eventBus:{},appVersion:{},document:{},documentSlug:{},workspaceCookies:{default:()=>[]},documentCookies:{default:()=>[]},path:{},method:{},httpClients:{default:()=>BW},history:{default:()=>[]},layout:{},server:{},selectedClient:{},servers:{},serverMeta:{},hideClientButton:{type:Boolean},integration:{},documentUrl:{},source:{},operation:{},exampleKey:{},authMeta:{},securitySchemes:{},plugins:{default:()=>[]},environments:{},activeEnvironment:{},environment:{},proxyUrl:{},selectedSecurity:{},selectedSecuritySchemes:{},securityRequirements:{},defaultHeaders:{},requestBodyCompositionSelection:{},options:{}},setup(e){let t=k(()=>vK(e.httpClients)),{toast:i}=EE(),{copyToClipboard:o}=kE(),s=r(null),c=r(null),l=r(null),u=()=>s.value?.abort(jX.REQUEST_ABORTED),d=async()=>{let{request:t}=rv({defaultHeaders:e.defaultHeaders,environment:e.environment,exampleName:e.exampleKey,globalCookies:[...e.workspaceCookies,...e.documentCookies],method:e.method,operation:e.operation,path:e.path,proxyUrl:e.proxyUrl,server:e.server,selectedSecuritySchemes:e.selectedSecuritySchemes,isElectron:q_(),requestBodyCompositionSelection:e.requestBodyCompositionSelection});await o(N_(t,U_(e.environment)))},f=async()=>{if(e.eventBus.flushDebouncedEmits?.(),pRe(e.operation.parameters??[],e.exampleKey).ok===!1){i(`Path parameters must have values.`,`error`);return}let t=[...e.workspaceCookies,...e.documentCookies],{request:n}=rv({defaultHeaders:e.defaultHeaders,environment:e.environment,exampleName:e.exampleKey,globalCookies:t,method:e.method,operation:e.operation,path:e.path,proxyUrl:e.proxyUrl,server:e.server,selectedSecuritySchemes:e.selectedSecuritySchemes,isElectron:q_(),requestBodyCompositionSelection:e.requestBodyCompositionSelection});c.value&&`reader`in c.value&&c.value.reader.cancel();let r=Gse();await xX({requestBuilder:n,document:e.document,operation:e.operation,variablesStore:r},`beforeRequest`,e.plugins);let o=F_(n,{envVariables:{...U_(e.environment),...r.getVariables()},allowMissingRequestServerBase:e.layout===`modal`});if(!o.ok){i(o.message??o.error,`error`);return}s.value=o.data.controller;let u=Y_(...o.data.requestPayload);await xX({request:u,requestBuilder:n,document:e.document,operation:e.operation,variablesStore:r},`requestBuilt`,e.plugins),e.eventBus.emit(`hooks:on:request:sent`,{meta:{method:e.method,path:e.path,exampleKey:e.exampleKey}});let[d,f]=await QLe({isUsingProxy:o.data.isUsingProxy,requestPayload:o.data.requestPayload,request:u,plugins:e.plugins,customFetch:a(e.options)?.customFetch});if(f&&await xX({response:f.originalResponse.clone(),requestBuilder:n,request:Y_(...f.requestPayload),document:e.document,operation:e.operation,variablesStore:r},`responseReceived`,e.plugins),e.eventBus.emit(`hooks:on:request:complete`,{payload:f?{response:f.originalResponse.clone(),requestPayload:f.requestPayload,duration:f.response.duration,timestamp:f.timestamp}:void 0,meta:{method:e.method,path:e.path,exampleKey:e.exampleKey}}),d){c.value=null,l.value=null,s.value=null,i(d.message,`error`);return}c.value=f.response,l.value=f.requestPayload,dRe(f.response)||UX.set(WX(e.method,e.path,e.exampleKey),{response:f.response,requestPayload:f.requestPayload})};ue(()=>{e.eventBus.on(`operation:send:request:hotkey`,f),e.eventBus.on(`operation:cancel:request`,u),e.eventBus.on(`copy-url:address-bar`,d),xX({document:e.document,operation:e.operation},`onRequestMount`,e.plugins)}),me(()=>{e.eventBus.off(`operation:send:request:hotkey`,f),e.eventBus.off(`operation:cancel:request`,u),e.eventBus.off(`copy-url:address-bar`,d)});let p=k(()=>e.history.map(e=>({method:e.request.method,path:e.request.url,duration:e.time,status:e.response.status})).reverse()),m=({index:t})=>{let n=(e.history.length??0)-t-1,r=e.history[n];r&&e.eventBus.emit(`operation:reload:history`,{meta:{path:e.path,method:e.method},index:n,callback:()=>e.eventBus.emit(`ui:navigate`,{page:`example`,method:e.method,path:e.path,exampleName:`draft`,callback:t=>{if(t!==`success`)return;let n=HX({harResponse:r.response,url:r.request.url,method:e.method,path:e.path,duration:r.time}),i=oRe({harRequest:r.request});c.value=n,l.value=i}})})},h=()=>{e.eventBus.emit(`ui:navigate`,{page:`operation`,path:`overview`,operationPath:e.path,method:e.method})};return S([()=>e.path,()=>e.method,()=>e.exampleKey],([t,n,r])=>{let i=UX.get(WX(n,t,r));if(i)c.value=i.response,l.value=i.requestPayload;else{let i=(()=>{for(let t=e.history.length-1;t>=0;t--){let n=e.history[t];if(n?.meta.example===r)return n}})();i?(c.value=HX({harResponse:i.response,url:i.request.url,method:n,path:t,duration:i.time}),l.value=null):(c.value=null,l.value=null)}u()},{immediate:!0}),me(()=>{u()}),(r,i)=>(j(),T(`div`,YXe,[w(`div`,XXe,[y(JXe,{activeEnvironment:e.activeEnvironment,documentSlug:e.documentSlug,documentUrl:e.documentUrl,environment:e.environment,environments:e.environments,eventBus:e.eventBus,exampleKey:e.exampleKey,hideClientButton:e.hideClientButton,history:p.value,integration:e.integration,layout:e.layout,method:e.method,path:e.path,server:e.server,serverMeta:e.serverMeta,servers:e.servers,source:e.source,onExecute:f,"onNavigate:settings":h,"onSelect:history:item":m},null,8,[`activeEnvironment`,`documentSlug`,`documentUrl`,`environment`,`environments`,`eventBus`,`exampleKey`,`hideClientButton`,`history`,`integration`,`layout`,`method`,`path`,`server`,`serverMeta`,`servers`,`source`])]),y(tRe,{class:`border-t`},{default:M(()=>[y(aRe,{class:`flex-1`},{default:M(()=>[y(n(AJe),{authMeta:e.authMeta,clientOptions:t.value,defaultHeaders:e.defaultHeaders,documentCookies:e.documentCookies,environment:e.environment,eventBus:e.eventBus,exampleKey:e.exampleKey,layout:e.layout,method:e.method,operation:e.operation,options:a(e.options),path:e.path,plugins:e.plugins,proxyUrl:e.proxyUrl,requestBodyCompositionSelection:e.requestBodyCompositionSelection,securityRequirements:e.securityRequirements,securitySchemes:e.securitySchemes,selectedClient:e.selectedClient,selectedSecurity:e.selectedSecurity,selectedSecuritySchemes:e.selectedSecuritySchemes,server:e.server,workspaceCookies:e.workspaceCookies},null,8,[`authMeta`,`clientOptions`,`defaultHeaders`,`documentCookies`,`environment`,`eventBus`,`exampleKey`,`layout`,`method`,`operation`,`options`,`path`,`plugins`,`proxyUrl`,`requestBodyCompositionSelection`,`securityRequirements`,`securitySchemes`,`selectedClient`,`selectedSecurity`,`selectedSecuritySchemes`,`server`,`workspaceCookies`]),y(n(ZYe),{appVersion:e.appVersion,eventBus:e.eventBus,layout:e.layout,plugins:e.plugins,requestPayload:l.value,response:c.value,totalPerformedRequests:p.value.length},null,8,[`appVersion`,`eventBus`,`layout`,`plugins`,`requestPayload`,`response`,`totalPerformedRequests`])]),_:1})]),_:1})]))}}),Z9=`scalar-app`,Q9=`headlessui-portal-root`,QXe=e=>e!==null&&e instanceof HTMLElement,$9=e=>{e&&!e.classList.contains(Z9)&&e.classList.add(Z9)},$Xe=()=>{$9(document.getElementById(Q9));let e=new MutationObserver(e=>e.forEach(({addedNodes:e})=>e.forEach(e=>{QXe(e)&&e.id===Q9&&$9(e)})));return e.observe(document.body,{childList:!0}),e};export{sOe as $,pr as $i,vv as $n,kd as $r,OC as $t,uq as A,$t as Aa,Ql as Ai,Gy as An,Fp as Ar,kE as At,UK as B,Ol as Bi,Py as Bn,Lf as Br,lT as Bt,xq as C,ln as Ca,Foe as Ci,RS as Cn,Gm as Cr,SD as Ct,mq as D,rn as Da,nu as Di,Xy as Dn,Fm as Dr,GE as Dt,hq as E,an as Ea,Poe as Ei,eb as En,Lm as Er,jE as Et,ake as F,Xe as Fa,Yl as Fi,Vy as Fn,Zf as Fr,ST as Ft,LK as G,ps as Gi,Nv as Gn,hf as Gr,Vw as Gt,BK as H,gl as Hi,Ny as Hn,Ef as Hr,oT as Ht,QK as I,Qe as Ia,Wl as Ii,By as In,Yf as Ir,bT as It,MK as J,ya as Ji,Av as Jn,Zd as Jr,ZC as Jt,IK as K,Ea as Ki,Wse as Kn,rf as Kr,rw as Kt,ZK as L,nee as La,Hl as Li,tle as Ln,qf as Lr,gT as Lt,cq as M,tt as Ma,Zl as Mi,zle as Mn,yp as Mr,EE as Mt,eq as N,Ze as Na,Kl as Ni,Uy as Nn,tp as Nr,ET as Nt,fq as O,en as Oa,Moe as Oi,Yy as On,_m as Or,JE as Ot,oke as P,ree as Pa,$l as Pi,Hy as Pn,$f as Pr,TT as Pt,hK as Q,xr as Qi,xv as Qn,Fd as Qr,HC as Qt,YK as R,L as Ra,Vl as Ri,zy as Rn,Wf as Rr,fT as Rt,Cq as S,_n as Sa,ql as Si,zS as Sn,qm as Sr,fD as St,gq as T,cn as Ta,eu as Ti,nb as Tn,Rm as Tr,WE as Tt,zK as U,z as Ui,Iv as Un,Cf as Ur,zw as Ut,HK as V,wl as Vi,My as Vn,kf as Vr,sT as Vt,RK as W,Vc as Wi,Fv as Wn,_f as Wr,Bw as Wt,_K as X,ga as Xi,Cv as Xn,Vd as Xr,GC as Xt,vK as Y,_a as Yi,kv as Yn,Ud as Yr,KC as Yt,gK as Z,Er as Zi,Sv as Zn,Nd as Zr,XC as Zt,zq as _,Tn as _a,Uoe as _i,dye as _n,U_ as _r,$E as _t,ILe as a,ur as aa,du as ai,H as an,cv as ar,hTe as at,gAe as b,bn as ba,Jl as bi,VS as bn,xh as br,pD as bt,bX as c,ir as ca,lu as ci,yC as cn,Fse as cr,PW as ct,$q as d,lr as da,ese as di,Wye as dn,$_ as dr,zD as dt,nr as ea,Dd as ei,FC as en,_v as er,oOe as et,Qq as f,dr as fa,$oe as fi,mC as fn,X_ as fr,LD as ft,Kq as g,Dn as ga,Goe as gi,Tye as gn,W_ as gr,MD as gt,Jq as h,On as ha,qoe as hi,QS as hn,K_ as hr,FD as ht,wX as i,Yn as ia,cd as ii,CC as in,lv as ir,FW as it,lq as j,et as ja,tu as ji,Wy as jn,kp as jr,DE as jt,dq as k,tn as ka,Gl as ki,qy as kn,Bp as kr,AE as kt,yX as l,or as la,ase as li,Gye as ln,av as lr,KD as lt,Xq as m,rr as ma,Xoe as mi,pC as mn,q_ as mr,PD as mt,ZXe as n,cr as na,yd as ni,kC as nn,hv as nr,RW as nt,PLe as o,sr as oa,use as oi,SC as on,sv as or,AW as ot,Zq as p,$n as pa,Qoe as pi,Lye as pn,Y_ as pr,ID as pt,FK as q,ba as qi,jv as qn,$d as qr,QC as qt,_9 as r,ar as ra,gd as ri,EC as rn,mv as rr,IW as rt,NLe as s,qn as sa,ose as si,Jye as sn,ov as sr,gTe as st,$Xe as t,Kn as ta,Td as ti,IC as tn,gv as tr,uG as tt,aJ as u,Jn as ua,nse as ui,vC as un,iv as ur,VD as ut,Iq as v,wn as va,Voe as vi,GS as vn,F_ as vr,lD as vt,vq as w,on as wa,Noe as wi,LS as wn,Hm as wr,NE as wt,wq as x,hn as xa,Xl as xi,BS as xn,sh as xr,_D as xt,cje as y,Cn as ya,zoe as yi,WS as yn,bh as yr,dD as yt,WK as z,Ye as za,Bl as zi,Ry as zn,Hf as zr,dT as zt};
387
+ `&&e.eventBus.emit(`server:update:selected`,{url:``,meta:e.serverMeta})},pe=()=>{e.eventBus.emit(`copy-url:address-bar`)},he=()=>{if(e.serverMeta.type===`operation`){e.eventBus.emit(`ui:navigate`,{page:`operation`,path:`servers`,operationPath:e.serverMeta.path,method:e.serverMeta.method});return}e.eventBus.emit(`ui:navigate`,{page:`document`,path:`servers`})},A=[];return ue(()=>{A.push(e.eventBus.on(`ui:focus:address-bar`,oe),e.eventBus.on(`ui:focus:send-button`,ae),e.eventBus.on(`hooks:on:request:sent`,d),e.eventBus.on(`hooks:on:request:complete`,f))}),me(()=>{for(let e of A)e();f()}),t({methodConflict:h,pathConflict:m}),(t,r)=>(j(),T(`div`,CXe,[w(`div`,{id:n(o),class:D([`address-bar-bg-states text-xxs group relative flex h-(--scalar-address-bar-height) w-full flex-1 flex-row items-stretch rounded-lg p-0.75`,{"outline-c-danger outline":C.value,"rounded-b-none":te.value}])},[w(`div`,{class:D([`pointer-events-none absolute top-0 left-0 block h-full w-full overflow-hidden rounded-lg border`,{"rounded-b-none":te.value}])},[w(`div`,{class:`absolute top-0 left-0 h-full w-full`,style:ge(ee.value)},null,4)],2),w(`div`,TXe,[y(n(q9),{isEditable:e.layout!==`modal`,isSquare:``,method:h.value??e.method,teleport:``,onChange:E},null,8,[`isEditable`,`method`])]),w(`div`,EXe,[e.servers.length?(j(),P(n(mXe),{key:0,layout:e.layout,meta:e.serverMeta,server:e.server,servers:e.servers,target:n(o),"onUpdate:open":r[0]||=e=>_.value=e,"onUpdate:selectedServer":r[1]||=t=>e.eventBus.emit(`server:update:selected`,t),"onUpdate:servers":he,"onUpdate:variable":r[2]||=t=>e.eventBus.emit(`server:update:variables`,t)},null,8,[`layout`,`meta`,`server`,`servers`,`target`])):I(``,!0),y(n(n9),{ref_key:`addressBarRef`,ref:l,alwaysEmitChange:``,"aria-label":`Path`,class:`ml-1 min-w-fit pl-px outline-none`,disableCloseBrackets:``,disabled:e.layout===`modal`,disableEnter:``,disableTabIndent:``,emitOnBlur:!1,environment:e.environment,extensions:[n(x)],importCurl:``,layout:e.layout,modelValue:e.path,placeholder:e.server?``:`Enter a URL`,server:``,onBlur:O,onKeydown:[Ee(fe,[`delete`]),r[3]||=Ee(e=>g.value=!0,[`tab`])],onSubmit:de},null,8,[`disabled`,`environment`,`extensions`,`layout`,`modelValue`,`placeholder`])]),y(n(VD),{class:`hover:bg-b-3 mx-1 hidden @3xl:flex`,size:`xs`,variant:`ghost`,onClick:pe},{default:M(()=>[y(n(Uy)),r[8]||=w(`span`,{class:`sr-only`},`Copy URL`,-1)]),_:1}),y(bXe,{history:e.history,target:n(o),"onSelect:history:item":r[4]||=e=>a(`select:history:item`,e),"onUpdate:open":r[5]||=e=>v.value=e},null,8,[`history`,`target`]),C.value?(j(),T(`div`,DXe,[w(`div`,OXe,[y(n(rde),{size:`sm`}),w(`div`,kXe,[r[9]||=b(` A `,-1),w(`em`,null,N(h.value?.toUpperCase()??e.method.toUpperCase()),1),r[10]||=b(` request to `,-1),y(n(eb),{text:m.value??e.path},null,8,[`text`]),r[11]||=b(` already exists in this document `,-1)])])])):I(``,!0),y(n(VD),{ref_key:`sendButtonRef`,ref:s,class:`relative hidden h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold @3xl:flex`,"data-addressbar-action":`send`,disabled:n(p),onClick:r[6]||=e=>a(`execute`)},{default:M(()=>[w(`span`,AXe,[y(n(LS),{class:`relative shrink-0 fill-current`,icon:`Play`,size:`xs`}),r[12]||=w(`span`,{class:`text-xxs flex`},`Send`,-1)]),w(`span`,jXe,` Send `+N(e.method)+` request to `+N(e.server?.url??``)+N(e.path),1)]),_:1},8,[`disabled`])],10,wXe),w(`div`,MXe,[y(n(q9),{isEditable:e.layout!==`modal`,isSquare:``,method:h.value??e.method,teleport:``,onChange:E},null,8,[`isEditable`,`method`]),y(n(VD),{class:`hover:bg-b-3 ml-auto`,size:`xs`,variant:`ghost`,onClick:pe},{default:M(()=>[y(n(Uy)),r[13]||=w(`span`,{class:`sr-only`},`Copy URL`,-1)]),_:1}),y(n(VD),{ref_key:`mobileSendButtonRef`,ref:c,class:`relative h-auto shrink-0 overflow-hidden py-1 pr-2.5 pl-2 font-bold`,"data-addressbar-action":`send`,disabled:n(p),onClick:r[7]||=e=>a(`execute`)},{default:M(()=>[w(`span`,NXe,[y(n(LS),{class:`relative shrink-0 fill-current`,icon:`Play`,size:`xs`}),r[14]||=w(`span`,{class:`text-xxs`},`Send`,-1)]),w(`span`,PXe,` Send `+N(e.method)+` request to `+N(e.server?.url??``)+N(e.path),1)]),_:1},8,[`disabled`])])]))}}),[[`__scopeId`,`data-v-d37cbfcc`]]),IXe={class:`relative flex items-center`},LXe={class:`flex max-w-[220px] min-w-0 items-center gap-1.5`},RXe={class:`text-xxs block max-w-[160px] min-w-0 truncate text-left font-medium`},zXe={class:`min-w-0 flex-1 truncate`},BXe={class:`bg-c-accent text-b-1 mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full p-[3px]`},VXe={class:`min-w-0 flex-1 text-left`},HXe={class:`block truncate`},UXe={class:`flex h-4 w-4 items-center justify-center`},WXe={key:5,class:`text-c-3 px-2 py-1.5 text-xs`},GXe=A({__name:`EnvironmentSelector`,props:{environments:{default:()=>[]},activeEnvironment:{}},emits:[`select:environment`,`add:environment`],setup(e,{emit:t}){let r=t,i=k(()=>!!e.activeEnvironment),a=k(()=>e.environments.length>0),o=k(()=>e.activeEnvironment?e.environments.includes(e.activeEnvironment):!1),s=k(()=>i.value&&!o.value),c=k(()=>s.value?`${e.activeEnvironment} (Unavailable)`:i.value?e.activeEnvironment:a.value?`Select Environment`:`Add Environment`),l=k(()=>s.value?`hover:bg-b-2 text-c-2 border-transparent`:i.value?`bg-c-accent/10 text-c-accent hover:bg-c-accent/20 border-c-accent/30`:a.value?`hover:bg-b-2 text-c-2 border-transparent`:`hover:bg-b-2 text-c-3 border-transparent`),u=()=>{r(`add:environment`)},d=e=>{r(`select:environment`,e)};return(t,r)=>(j(),T(`div`,IXe,[y(n(Xq),null,{items:M(()=>[i.value?(j(),P(n($q),{key:0,class:`group/item flex w-full items-center gap-1.5`,onClick:r[0]||=e=>d(``)},{default:M(()=>[w(`div`,{class:D([`flex h-4 w-4 items-center justify-center rounded-full p-[3px]`,e.activeEnvironment?`shadow-border text-transparent`:`bg-c-accent text-b-1`])},[y(n(LS),{class:`size-2.5`,icon:`Checkmark`,thickness:`3`})],2),r[1]||=w(`span`,{class:`text-c-2`},`No Environment`,-1)]),_:1})):I(``,!0),i.value&&a.value?(j(),P(n(Qq),{key:1})):I(``,!0),(j(!0),T(_e,null,E(e.environments,t=>(j(),P(n($q),{key:t,class:`group/item flex w-full min-w-0 items-center gap-1.5 overflow-hidden text-ellipsis whitespace-nowrap`,onClick:e=>d(t)},{default:M(()=>[w(`div`,{class:D([`flex h-4 w-4 items-center justify-center rounded-full p-[3px]`,e.activeEnvironment===t?`bg-c-accent text-b-1`:`shadow-border text-transparent`])},[y(n(LS),{class:`size-2.5`,icon:`Checkmark`,thickness:`3`})],2),w(`span`,zXe,N(t),1)]),_:2},1032,[`onClick`]))),128)),s.value?(j(),P(n(Qq),{key:2})):I(``,!0),s.value?(j(),P(n($q),{key:3,class:`group/item flex h-auto w-full min-w-0 items-start gap-1.5 overflow-hidden`,disabled:``},{default:M(()=>[w(`div`,BXe,[y(n(LS),{class:`size-2.5`,icon:`Checkmark`,thickness:`3`})]),w(`div`,VXe,[w(`span`,HXe,N(e.activeEnvironment),1),r[2]||=w(`span`,{class:`text-c-3 block truncate text-xs`},` Not available in this context `,-1)])]),_:1})):I(``,!0),a.value?(j(),P(n(Qq),{key:4})):I(``,!0),y(n($q),{class:`text-c-accent flex items-center gap-1.5`,onClick:u},{default:M(()=>[w(`div`,UXe,[y(n(LS),{icon:`Add`,size:`sm`})]),w(`span`,null,N(a.value?`New Environment`:`Create Environment`),1)]),_:1}),!a.value&&!i.value?(j(),T(`div`,WXe,[...r[3]||=[w(`p`,{class:`mb-1`},` Environments let you manage variables like API keys and base URLs across different contexts. `,-1)]])):I(``,!0)]),default:M(()=>[y(n(VD),{"aria-label":`Current environment: ${c.value}`,class:D([`line-clamp-1 h-full w-fit justify-start border px-2 py-1 font-normal transition-colors`,l.value]),size:`sm`,variant:`ghost`},{default:M(()=>[w(`div`,LXe,[y(n(LS),{class:D([`shrink-0`,i.value&&!s.value?`text-c-accent`:`text-c-3`]),icon:`Globe`,size:`sm`},null,8,[`class`]),w(`span`,RXe,N(c.value),1),y(n(LS),{class:`shrink-0`,icon:`ChevronDown`,size:`xs`})])]),_:1},8,[`aria-label`,`class`])]),_:1})]))}}),KXe={class:`lg:min-h-header t-app__top-container @container flex w-full flex-wrap items-center justify-center p-2`},qXe={class:`mb-2 flex flex-1 items-center justify-end gap-2 @3xl:mb-0`},JXe=Kq(A({__name:`Header`,props:{path:{},method:{},layout:{},hideClientButton:{type:Boolean,default:!1},integration:{},documentSlug:{},exampleKey:{},documentUrl:{},source:{},server:{},servers:{},history:{},eventBus:{},environments:{},activeEnvironment:{},environment:{},serverMeta:{}},emits:[`execute`,`select:history:item`,`add:environment`,`navigate:settings`],setup(e,{emit:t}){let r=t,i=t=>{e.eventBus.emit(`workspace:update:active-environment`,t)},a=()=>{e.eventBus.emit(`ui:navigate`,{page:`document`,path:`environment`})};return(t,o)=>(j(),T(`div`,KXe,[o[8]||=w(`div`,{class:`flex flex-1`},null,-1),y(n(FXe),{activeEnvironment:e.activeEnvironment,documentSlug:e.documentSlug,environment:e.environment,environments:e.environments,eventBus:e.eventBus,exampleKey:e.exampleKey,history:e.history,layout:e.layout,method:e.method,path:e.path,server:e.server,serverMeta:e.serverMeta,servers:e.servers,"onAdd:environment":o[0]||=e=>r(`add:environment`),onExecute:o[1]||=e=>r(`execute`),"onSelect:history:item":o[2]||=e=>r(`select:history:item`,e)},null,8,[`activeEnvironment`,`documentSlug`,`environment`,`environments`,`eventBus`,`exampleKey`,`history`,`layout`,`method`,`path`,`server`,`serverMeta`,`servers`]),w(`div`,qXe,[e.layout===`modal`?I(``,!0):(j(),P(GXe,{key:0,activeEnvironment:e.activeEnvironment,environments:e.environments,"onAdd:environment":a,"onSelect:environment":i},null,8,[`activeEnvironment`,`environments`])),e.layout===`modal`?I(``,!0):(j(),P(n(pC),{key:1,icon:n(oue),label:`Operation settings`,size:`sm`,weight:`bold`,onClick:o[3]||=e=>r(`navigate:settings`)},null,8,[`icon`])),e.layout===`modal`&&e.documentUrl&&!e.hideClientButton?(j(),P(wX,{key:2,buttonSource:`modal`,class:`!w-fit lg:-mr-1`,integration:e.integration??null,operationMethod:e.method,operationPath:e.path,source:e.source??`api-reference`,url:e.documentUrl},null,8,[`integration`,`operationMethod`,`operationPath`,`source`,`url`])):I(``,!0),e.layout===`modal`&&e.source!==`gitbook`?(j(),T(`button`,{key:3,class:`app-exit-button zoomed:static zoomed:p-1 fixed top-2 right-2 rounded-full p-2`,type:`button`,onClick:o[4]||=t=>e.eventBus.emit(`ui:close:client-modal`)},[y(n(LS),{icon:`Close`,size:`lg`,thickness:`2`}),o[6]||=w(`span`,{class:`sr-only`},`Close Client`,-1)])):I(``,!0),e.layout===`modal`&&e.source===`gitbook`?(j(),T(`button`,{key:4,class:`text-c-1 hover:bg-b-2 active:text-c-1 -mr-1.5 rounded p-2`,type:`button`,onClick:o[5]||=t=>e.eventBus.emit(`ui:close:client-modal`)},[y(n(LS),{icon:`Close`,size:`md`,thickness:`1.75`}),o[7]||=w(`span`,{class:`sr-only`},`Close Client`,-1)])):I(``,!0)])]))}}),[[`__scopeId`,`data-v-42c563b3`]]),YXe={class:`bg-b-1 flex h-full flex-col`},XXe={class:`lg:min-h-header flex w-full flex-wrap items-center justify-center p-2 lg:p-0`},ZXe=A({name:`OperationBlock`,props:{eventBus:{},appVersion:{},document:{},documentSlug:{},workspaceCookies:{default:()=>[]},documentCookies:{default:()=>[]},path:{},method:{},httpClients:{default:()=>BW},history:{default:()=>[]},layout:{},server:{},selectedClient:{},servers:{},serverMeta:{},hideClientButton:{type:Boolean},integration:{},documentUrl:{},source:{},operation:{},exampleKey:{},authMeta:{},securitySchemes:{},plugins:{default:()=>[]},environments:{},activeEnvironment:{},environment:{},proxyUrl:{},selectedSecurity:{},selectedSecuritySchemes:{},securityRequirements:{},defaultHeaders:{},requestBodyCompositionSelection:{},options:{}},setup(e){let t=k(()=>vK(e.httpClients)),{toast:i}=EE(),{copyToClipboard:o}=kE(),s=r(null),c=r(null),l=r(null),u=()=>s.value?.abort(jX.REQUEST_ABORTED),d=async()=>{let{request:t}=rv({defaultHeaders:e.defaultHeaders,environment:e.environment,exampleName:e.exampleKey,globalCookies:[...e.workspaceCookies,...e.documentCookies],method:e.method,operation:e.operation,path:e.path,proxyUrl:e.proxyUrl,server:e.server,selectedSecuritySchemes:e.selectedSecuritySchemes,isElectron:q_(),requestBodyCompositionSelection:e.requestBodyCompositionSelection});await o(N_(t,U_(e.environment)))},f=async()=>{if(e.eventBus.flushDebouncedEmits?.(),pRe(e.operation.parameters??[],e.exampleKey).ok===!1){i(`Path parameters must have values.`,`error`);return}let t=[...e.workspaceCookies,...e.documentCookies],{request:n}=rv({defaultHeaders:e.defaultHeaders,environment:e.environment,exampleName:e.exampleKey,globalCookies:t,method:e.method,operation:e.operation,path:e.path,proxyUrl:e.proxyUrl,server:e.server,selectedSecuritySchemes:e.selectedSecuritySchemes,isElectron:q_(),requestBodyCompositionSelection:e.requestBodyCompositionSelection});c.value&&`reader`in c.value&&c.value.reader.cancel();let r=Gse();await xX({requestBuilder:n,document:e.document,operation:e.operation,variablesStore:r},`beforeRequest`,e.plugins);let o=F_(n,{envVariables:{...U_(e.environment),...r.getVariables()},allowMissingRequestServerBase:e.layout===`modal`});if(!o.ok){i(o.message??o.error,`error`);return}s.value=o.data.controller;let u=Y_(...o.data.requestPayload);await xX({request:u,requestBuilder:n,document:e.document,operation:e.operation,variablesStore:r},`requestBuilt`,e.plugins),e.eventBus.emit(`hooks:on:request:sent`,{meta:{method:e.method,path:e.path,exampleKey:e.exampleKey}});let[d,f]=await QLe({isUsingProxy:o.data.isUsingProxy,requestPayload:o.data.requestPayload,request:u,plugins:e.plugins,customFetch:a(e.options)?.customFetch});if(f&&await xX({response:f.originalResponse.clone(),requestBuilder:n,request:Y_(...f.requestPayload),document:e.document,operation:e.operation,variablesStore:r},`responseReceived`,e.plugins),e.eventBus.emit(`hooks:on:request:complete`,{payload:f?{response:f.originalResponse.clone(),requestPayload:f.requestPayload,duration:f.response.duration,timestamp:f.timestamp}:void 0,meta:{method:e.method,path:e.path,exampleKey:e.exampleKey}}),d){c.value=null,l.value=null,s.value=null,i(d.message,`error`);return}c.value=f.response,l.value=f.requestPayload,dRe(f.response)||UX.set(WX(e.method,e.path,e.exampleKey),{response:f.response,requestPayload:f.requestPayload})};ue(()=>{e.eventBus.on(`operation:send:request:hotkey`,f),e.eventBus.on(`operation:cancel:request`,u),e.eventBus.on(`copy-url:address-bar`,d),xX({document:e.document,operation:e.operation},`onRequestMount`,e.plugins)}),me(()=>{e.eventBus.off(`operation:send:request:hotkey`,f),e.eventBus.off(`operation:cancel:request`,u),e.eventBus.off(`copy-url:address-bar`,d)});let p=k(()=>e.history.map(e=>({method:e.request.method,path:e.request.url,duration:e.time,status:e.response.status})).reverse()),m=({index:t})=>{let n=(e.history.length??0)-t-1,r=e.history[n];r&&e.eventBus.emit(`operation:reload:history`,{meta:{path:e.path,method:e.method},index:n,callback:()=>e.eventBus.emit(`ui:navigate`,{page:`example`,method:e.method,path:e.path,exampleName:`draft`,callback:t=>{if(t!==`success`)return;let n=HX({harResponse:r.response,url:r.request.url,method:e.method,path:e.path,duration:r.time}),i=oRe({harRequest:r.request});c.value=n,l.value=i}})})},h=()=>{e.eventBus.emit(`ui:navigate`,{page:`operation`,path:`overview`,operationPath:e.path,method:e.method})};return S([()=>e.path,()=>e.method,()=>e.exampleKey],([t,n,r])=>{let i=UX.get(WX(n,t,r));if(i)c.value=i.response,l.value=i.requestPayload;else{let i=(()=>{for(let t=e.history.length-1;t>=0;t--){let n=e.history[t];if(n?.meta.example===r)return n}})();i?(c.value=HX({harResponse:i.response,url:i.request.url,method:n,path:t,duration:i.time}),l.value=null):(c.value=null,l.value=null)}u()},{immediate:!0}),me(()=>{u()}),(r,i)=>(j(),T(`div`,YXe,[w(`div`,XXe,[y(JXe,{activeEnvironment:e.activeEnvironment,documentSlug:e.documentSlug,documentUrl:e.documentUrl,environment:e.environment,environments:e.environments,eventBus:e.eventBus,exampleKey:e.exampleKey,hideClientButton:e.hideClientButton,history:p.value,integration:e.integration,layout:e.layout,method:e.method,path:e.path,server:e.server,serverMeta:e.serverMeta,servers:e.servers,source:e.source,onExecute:f,"onNavigate:settings":h,"onSelect:history:item":m},null,8,[`activeEnvironment`,`documentSlug`,`documentUrl`,`environment`,`environments`,`eventBus`,`exampleKey`,`hideClientButton`,`history`,`integration`,`layout`,`method`,`path`,`server`,`serverMeta`,`servers`,`source`])]),y(tRe,{class:`border-t`},{default:M(()=>[y(aRe,{class:`flex-1`},{default:M(()=>[y(n(AJe),{authMeta:e.authMeta,clientOptions:t.value,defaultHeaders:e.defaultHeaders,documentCookies:e.documentCookies,environment:e.environment,eventBus:e.eventBus,exampleKey:e.exampleKey,layout:e.layout,method:e.method,operation:e.operation,options:a(e.options),path:e.path,plugins:e.plugins,proxyUrl:e.proxyUrl,requestBodyCompositionSelection:e.requestBodyCompositionSelection,securityRequirements:e.securityRequirements,securitySchemes:e.securitySchemes,selectedClient:e.selectedClient,selectedSecurity:e.selectedSecurity,selectedSecuritySchemes:e.selectedSecuritySchemes,server:e.server,workspaceCookies:e.workspaceCookies},null,8,[`authMeta`,`clientOptions`,`defaultHeaders`,`documentCookies`,`environment`,`eventBus`,`exampleKey`,`layout`,`method`,`operation`,`options`,`path`,`plugins`,`proxyUrl`,`requestBodyCompositionSelection`,`securityRequirements`,`securitySchemes`,`selectedClient`,`selectedSecurity`,`selectedSecuritySchemes`,`server`,`workspaceCookies`]),y(n(ZYe),{appVersion:e.appVersion,eventBus:e.eventBus,layout:e.layout,plugins:e.plugins,requestPayload:l.value,response:c.value,totalPerformedRequests:p.value.length},null,8,[`appVersion`,`eventBus`,`layout`,`plugins`,`requestPayload`,`response`,`totalPerformedRequests`])]),_:1})]),_:1})]))}}),Z9=`scalar-app`,Q9=`headlessui-portal-root`,QXe=e=>e!==null&&e instanceof HTMLElement,$9=e=>{e&&!e.classList.contains(Z9)&&e.classList.add(Z9)},$Xe=()=>{$9(document.getElementById(Q9));let e=new MutationObserver(e=>e.forEach(({addedNodes:e})=>e.forEach(e=>{QXe(e)&&e.id===Q9&&$9(e)})));return e.observe(document.body,{childList:!0}),e};export{sOe as $,nr as $i,_v as $n,Dd as $r,FC as $t,uq as A,et as Aa,tu as Ai,Wy as An,kp as Ar,DE as At,UK as B,wl as Bi,My as Bn,kf as Br,sT as Bt,xq as C,on as Ca,Noe as Ci,LS as Cn,Hm as Cr,SD as Ct,mq as D,en as Da,Moe as Di,Yy as Dn,_m as Dr,JE as Dt,hq as E,rn as Ea,nu as Ei,Xy as En,Fm as Er,GE as Et,ake as F,Qe as Fa,Wl as Fi,By as Fn,Yf as Fr,bT as Ft,LK as G,Ea as Gi,Wse as Gn,rf as Gr,rw as Gt,BK as H,z as Hi,Iv as Hn,Cf as Hr,zw as Ht,QK as I,nee as Ia,Hl as Ii,tle as In,qf as Ir,gT as It,MK as J,_a as Ji,kv as Jn,Ud as Jr,KC as Jt,IK as K,ba as Ki,jv as Kn,$d as Kr,QC as Kt,ZK as L,L as La,Vl as Li,zy as Ln,Wf as Lr,fT as Lt,cq as M,Ze as Ma,Kl as Mi,Uy as Mn,tp as Mr,ET as Mt,eq as N,ree as Na,$l as Ni,Hy as Nn,$f as Nr,TT as Nt,fq as O,tn as Oa,Gl as Oi,qy as On,Bp as Or,AE as Ot,oke as P,Xe as Pa,Yl as Pi,Vy as Pn,Zf as Pr,ST as Pt,hK as Q,pr as Qi,vv as Qn,kd as Qr,OC as Qt,YK as R,Ye as Ra,Bl as Ri,Ry as Rn,Hf as Rr,dT as Rt,Cq as S,ln as Sa,Foe as Si,RS as Sn,Gm as Sr,fD as St,gq as T,an as Ta,Poe as Ti,eb as Tn,Lm as Tr,jE as Tt,zK as U,Vc as Ui,Fv as Un,_f as Ur,Bw as Ut,HK as V,gl as Vi,Ny as Vn,Ef as Vr,oT as Vt,RK as W,ps as Wi,Nv as Wn,hf as Wr,Vw as Wt,_K as X,Er as Xi,Sv as Xn,Nd as Xr,XC as Xt,vK as Y,ga as Yi,Cv as Yn,Vd as Yr,GC as Yt,gK as Z,xr as Zi,xv as Zn,Fd as Zr,HC as Zt,zq as _,wn as _a,Voe as _i,GS as _n,F_ as _r,$E as _t,ILe as a,sr as aa,use as ai,SC as an,sv as ar,hTe as at,gAe as b,hn as ba,Xl as bi,BS as bn,sh as br,pD as bt,bX as c,or as ca,ase as ci,Gye as cn,av as cr,PW as ct,$q as d,dr as da,$oe as di,mC as dn,X_ as dr,zD as dt,Kn as ea,Td as ei,IC as en,gv as er,oOe as et,Qq as f,$n as fa,Qoe as fi,Lye as fn,Y_ as fr,LD as ft,Kq as g,Tn as ga,Uoe as gi,dye as gn,U_ as gr,MD as gt,Jq as h,Dn as ha,Goe as hi,Tye as hn,W_ as hr,FD as ht,wX as i,ur as ia,du as ii,H as in,cv as ir,FW as it,lq as j,tt as ja,Zl as ji,zle as jn,yp as jr,EE as jt,dq as k,$t as ka,Ql as ki,Gy as kn,Fp as kr,kE as kt,yX as l,Jn as la,nse as li,vC as ln,iv as lr,KD as lt,Xq as m,On as ma,qoe as mi,QS as mn,K_ as mr,PD as mt,ZXe as n,ar as na,gd as ni,EC as nn,mv as nr,RW as nt,PLe as o,qn as oa,ose as oi,Jye as on,ov as or,AW as ot,Zq as p,rr as pa,Xoe as pi,pC as pn,q_ as pr,ID as pt,FK as q,ya as qi,Av as qn,Zd as qr,ZC as qt,_9 as r,Yn as ra,cd as ri,CC as rn,lv as rr,IW as rt,NLe as s,ir as sa,lu as si,yC as sn,Fse as sr,gTe as st,$Xe as t,cr as ta,yd as ti,kC as tn,hv as tr,uG as tt,aJ as u,lr as ua,ese as ui,Wye as un,$_ as ur,VD as ut,Iq as v,Cn as va,zoe as vi,WS as vn,bh as vr,lD as vt,vq as w,cn as wa,eu as wi,nb as wn,Rm as wr,WE as wt,wq as x,_n as xa,ql as xi,zS as xn,qm as xr,_D as xt,cje as y,bn as ya,Jl as yi,VS as yn,xh as yr,dD as yt,WK as z,Ol as zi,Py as zn,Lf as zr,lT as zt};
@@ -1 +1 @@
1
- import{C as e}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{g as t}from"./runtime-core.esm-bundler-DujKY9QV.js";import{i as n}from"./project-launch.store-AB257LRF.js";import{c as r,r as i,s as a}from"./trpc-CAKhySL_.js";import{n as o}from"./error-DpF7X5iu.js";import{a as s}from"./dist-C9Qdh18x.js";var c=n(`agent`,()=>{let n=e([]),c=e(!1),l=e(null),u=null,d=0,f=null,p=t(()=>n.value.length),m=t(()=>n.value.filter(e=>e.status.connected)),h=t(()=>e=>n.value.find(t=>t.config.id===e)??null);async function g(){c.value=!0,l.value=null;try{n.value=await i.agent.list.query()}catch(e){l.value=o(e)??`Failed to fetch agents`}finally{c.value=!1}}async function _(e,t,n){l.value=null;try{let r=await i.agent.register.mutate({name:e,url:t,passphrase:n});return await g(),r}catch(e){return l.value=o(e)??`Failed to register agent`,null}}async function v(e,t){l.value=null;try{let r=await i.agent.update.mutate({id:e,...t}),a=n.value.findIndex(t=>t.config.id===e);if(a>=0){let e=[...n.value];e[a]={...e[a],config:{...e[a].config,...r}},n.value=e}return r}catch(e){return l.value=o(e)??`Failed to update agent`,null}}async function y(e){l.value=null;try{return await i.agent.remove.mutate({id:e}),n.value=n.value.filter(t=>t.config.id!==e),!0}catch(e){return l.value=o(e)??`Failed to remove agent`,!1}}async function b(e,t){l.value=null;try{let r=await i.agent.update.mutate({id:e,passthroughEnv:t}),a=n.value.findIndex(t=>t.config.id===e);if(a>=0){let e=[...n.value];e[a]={...e[a],config:{...e[a].config,passthroughEnv:r.passthroughEnv}},n.value=e}return r}catch(e){return l.value=o(e)??`Failed to update passthrough env`,null}}function x(){if(d>=5){console.warn(`[agent.store] Max status subscription retries (5) reached`);return}let e=s*2**d+Math.random()*300;d++,r(`agent.store`,`nouvelle tentative ${d}/5 dans ${Math.round(e)} ms`),f=setTimeout(()=>{f=null,w()},e)}let S=!1;function C(){S||(S=!0,g().finally(()=>{S=!1}))}function w(){u||=(a(`agent.store`,`souscription agent.onStatus demandée`),i.agent.onStatus.subscribe(void 0,{onData(e){d=0;let t=n.value.findIndex(t=>t.config.id===e.agentId);if(t>=0){let r=[...n.value];r[t]={...r[t],status:e.status},n.value=r}else C()},onError(e){u=null,r(`agent.store`,`agent.onStatus en erreur :`,e.message),x()}}))}function T(){f&&=(clearTimeout(f),null),u&&=(u.unsubscribe(),null),d=0}return{agents:n,loading:c,error:l,agentCount:p,connectedAgents:m,getById:h,fetchAll:g,register:_,update:v,remove:y,updatePassthroughEnv:b,subscribeStatus:w,unsubscribeStatus:T}});export{c as t};
1
+ import{C as e}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{g as t}from"./runtime-core.esm-bundler-DujKY9QV.js";import{i as n}from"./project-launch.store-Im5SMon9.js";import{c as r,r as i,s as a}from"./trpc-BQ0mLnfI.js";import{n as o}from"./error-DpF7X5iu.js";import{a as s}from"./dist-C9Qdh18x.js";var c=n(`agent`,()=>{let n=e([]),c=e(!1),l=e(null),u=null,d=0,f=null,p=t(()=>n.value.length),m=t(()=>n.value.filter(e=>e.status.connected)),h=t(()=>e=>n.value.find(t=>t.config.id===e)??null);async function g(){c.value=!0,l.value=null;try{n.value=await i.agent.list.query()}catch(e){l.value=o(e)??`Failed to fetch agents`}finally{c.value=!1}}async function _(e,t,n){l.value=null;try{let r=await i.agent.register.mutate({name:e,url:t,passphrase:n});return await g(),r}catch(e){return l.value=o(e)??`Failed to register agent`,null}}async function v(e,t){l.value=null;try{let r=await i.agent.update.mutate({id:e,...t}),a=n.value.findIndex(t=>t.config.id===e);if(a>=0){let e=[...n.value];e[a]={...e[a],config:{...e[a].config,...r}},n.value=e}return r}catch(e){return l.value=o(e)??`Failed to update agent`,null}}async function y(e){l.value=null;try{return await i.agent.remove.mutate({id:e}),n.value=n.value.filter(t=>t.config.id!==e),!0}catch(e){return l.value=o(e)??`Failed to remove agent`,!1}}async function b(e,t){l.value=null;try{let r=await i.agent.update.mutate({id:e,passthroughEnv:t}),a=n.value.findIndex(t=>t.config.id===e);if(a>=0){let e=[...n.value];e[a]={...e[a],config:{...e[a].config,passthroughEnv:r.passthroughEnv}},n.value=e}return r}catch(e){return l.value=o(e)??`Failed to update passthrough env`,null}}function x(){if(d>=5){console.warn(`[agent.store] Max status subscription retries (5) reached`);return}let e=s*2**d+Math.random()*300;d++,r(`agent.store`,`nouvelle tentative ${d}/5 dans ${Math.round(e)} ms`),f=setTimeout(()=>{f=null,w()},e)}let S=!1;function C(){S||(S=!0,g().finally(()=>{S=!1}))}function w(){u||=(a(`agent.store`,`souscription agent.onStatus demandée`),i.agent.onStatus.subscribe(void 0,{onData(e){d=0;let t=n.value.findIndex(t=>t.config.id===e.agentId);if(t>=0){let r=[...n.value];r[t]={...r[t],status:e.status},n.value=r}else C()},onError(e){u=null,r(`agent.store`,`agent.onStatus en erreur :`,e.message),x()}}))}function T(){f&&=(clearTimeout(f),null),u&&=(u.unsubscribe(),null),d=0}return{agents:n,loading:c,error:l,agentCount:p,connectedAgents:m,getById:h,fetchAll:g,register:_,update:v,remove:y,updatePassthroughEnv:b,subscribeStatus:w,unsubscribeStatus:T}});export{c as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Ci2pSJuu.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/reactivity.esm-bundler-BQ9SB2vv.js","assets/runtime-core.esm-bundler-DujKY9QV.js","assets/runtime-dom.esm-bundler-CyEVRK6B.js","assets/vue-i18n-o7yraQpR.js","assets/project-launch.store-AB257LRF.js","assets/trpc-CAKhySL_.js","assets/preload-helper-BZ1Pz5am.js","assets/i18n-DxVwqoxL.js","assets/useApi-s_02lHjl-DZYO2tHU.js","assets/vue-router-fin80h5W.js","assets/src-DOcCcTQv.js","assets/floating-ui.dom-DF3oyfHd.js","assets/src-Dbg3CMY2.css","assets/scenario.store-B5ybSSzx.js","assets/project.store-qBZ_R1td.js","assets/error-DpF7X5iu.js","assets/use-polling-CEkhIY_9.js","assets/useAiChatDrawer-D_ofn8Eo.js","assets/settings-scope-BSdUKgjx.js","assets/dist-C9Qdh18x.js","assets/schemas-68I2iCLF.js","assets/service.store-BrKRjCtb.js","assets/notification.store-Bp37Xsss.js","assets/scenario-DOeZsRCE.css","assets/app-mode-BVpTuh0i.js","assets/cloud-auth-D_am4FlK.js","assets/useProjectCatalog-CCJAkQi_.js","assets/cloud-session-BlihYcy2.js","assets/cloud-client-DhjJyZHU.js","assets/editor.api-Bef3xeth.js","assets/editor-8AbsNvUX.css","assets/AiChatModals-B_Cn5wNS.js","assets/toggleHighContrast-Dqz1Qao1.js","assets/toggleHighContrast--ixms01u.css","assets/register-BLGIM2pN.js","assets/agent.store-yrwtq9oP.js","assets/AiChatModals-BmWxg-Sr.css","assets/process-BWkHpZOM.js","assets/theme-BZCAxfJD.js","assets/index-Ck_3m_I9.css"])))=>i.map(i=>d[i]);
2
- import{t as e}from"./preload-helper-BZ1Pz5am.js";var t=`runeya:jwt`;function n(n){sessionStorage.setItem(t,n),c(),e(async()=>{let{announceThemeToServer:e}=await import(`./index-Ci2pSJuu.js`).then(e=>e.t);return{announceThemeToServer:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41])).then(({announceThemeToServer:e})=>e())}function r(){return sessionStorage.getItem(t)}function i(){sessionStorage.removeItem(t),s&&clearTimeout(s),s=null}function a(e){try{let t=JSON.parse(atob(e.split(`.`)[1]??``));return typeof t.exp==`number`?t.exp:null}catch{return null}}var o=1e3,s=null;function c(){s&&clearTimeout(s),s=null;let e=r(),t=e?a(e):null;if(!e||t===null)return;let n=t*1e3-Date.now();n<=0||(s=setTimeout(()=>{l(e)},n/2))}async function l(e){s=null;let n;try{n=await fetch(`/api/auth/refresh`,{method:`POST`,headers:{Authorization:`Bearer ${e}`},signal:AbortSignal.timeout(5e3)})}catch{f(e);return}if(r()!==e||n.status===401)return;if(!n.ok){f(e);return}let i=await n.json().catch(()=>null);if(typeof i?.token==`string`&&r()===e){sessionStorage.setItem(t,i.token),c();for(let e of u)e(i.token)}}var u=new Set;function d(e){return u.add(e),()=>u.delete(e)}function f(e){if(r()!==e)return;let t=a(e);t===null||t*1e3-Date.now()<=o||(s=setTimeout(()=>{l(e)},o))}var p=!1;function m(e){p=e}function h(){return r()!==null||p}async function g(){let e=await fetch(`/api/status`,{signal:AbortSignal.timeout(5e3)});if(!e.ok)throw Error(`Failed to fetch server status`);return e.json()}async function _(e){let t=r(),n=await fetch(`/api/migrate-vault`,{method:`POST`,headers:{"Content-Type":`application/json`,...t?{Authorization:`Bearer ${t}`}:{}},body:JSON.stringify({masterPassword:e}),signal:AbortSignal.timeout(12e4)}),i=await n.json().catch(()=>null);if(!n.ok)throw Error(i?.error??`La migration a échoué`);return i}async function v(e){let t=await fetch(`/api/unlock`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({masterPassword:e}),signal:AbortSignal.timeout(3e4)});if(t.status===429)throw Error(`Trop de tentatives. Réessayez dans 15 minutes.`);if(t.status===401)throw Error(`Master password incorrect`);if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`Erreur serveur`)}return(await t.json()).token}async function y(e,t){let n={masterPassword:e};t&&(n.encryptionKey=t);let r=await fetch(`/api/setup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n),signal:AbortSignal.timeout(3e4)});if(r.status===429)throw Error(`Trop de tentatives. Réessayez dans 15 minutes.`);if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`Erreur serveur`)}return(await r.json()).token}export{a,m as c,v as d,_ as f,h as i,n as l,g as n,d as o,r,c as s,i as t,y as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-mvpLwxNT.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/reactivity.esm-bundler-BQ9SB2vv.js","assets/runtime-core.esm-bundler-DujKY9QV.js","assets/runtime-dom.esm-bundler-CyEVRK6B.js","assets/vue-i18n-o7yraQpR.js","assets/project-launch.store-Im5SMon9.js","assets/trpc-BQ0mLnfI.js","assets/preload-helper-BZ1Pz5am.js","assets/i18n-DbgjJIf8.js","assets/useApi-s_02lHjl-DZYO2tHU.js","assets/vue-router-fin80h5W.js","assets/src-Ck_MutzB.js","assets/floating-ui.dom-DF3oyfHd.js","assets/src-DOziuDw8.css","assets/scenario.store-C9sSoRzb.js","assets/project.store-CITAykC3.js","assets/error-DpF7X5iu.js","assets/use-polling-CEkhIY_9.js","assets/useAiChatDrawer-D_ofn8Eo.js","assets/settings-scope-vcJEMNnD.js","assets/dist-C9Qdh18x.js","assets/schemas-68I2iCLF.js","assets/service.store-CZJuuJiv.js","assets/notification.store-CAG1kWYq.js","assets/scenario-DOeZsRCE.css","assets/app-mode-BVpTuh0i.js","assets/cloud-auth-D_am4FlK.js","assets/useProjectCatalog-CWHpf3Yj.js","assets/cloud-session-w6eNQX1X.js","assets/cloud-client-CEVx-bg6.js","assets/editor.api-Bef3xeth.js","assets/editor-8AbsNvUX.css","assets/AiChatModals-BV3vIIqN.js","assets/toggleHighContrast-Dqz1Qao1.js","assets/toggleHighContrast--ixms01u.css","assets/register-BLGIM2pN.js","assets/agent.store-B6OM7edC.js","assets/AiChatModals-DS5R3Oz1.css","assets/process-BWkHpZOM.js","assets/theme-BZCAxfJD.js","assets/index-DB3-fmza.css"])))=>i.map(i=>d[i]);
2
+ import{t as e}from"./preload-helper-BZ1Pz5am.js";var t=`runeya:jwt`;function n(n){sessionStorage.setItem(t,n),c(),e(async()=>{let{announceThemeToServer:e}=await import(`./index-mvpLwxNT.js`).then(e=>e.t);return{announceThemeToServer:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41])).then(({announceThemeToServer:e})=>e())}function r(){return sessionStorage.getItem(t)}function i(){sessionStorage.removeItem(t),s&&clearTimeout(s),s=null}function a(e){try{let t=JSON.parse(atob(e.split(`.`)[1]??``));return typeof t.exp==`number`?t.exp:null}catch{return null}}var o=1e3,s=null;function c(){s&&clearTimeout(s),s=null;let e=r(),t=e?a(e):null;if(!e||t===null)return;let n=t*1e3-Date.now();n<=0||(s=setTimeout(()=>{l(e)},n/2))}async function l(e){s=null;let n;try{n=await fetch(`/api/auth/refresh`,{method:`POST`,headers:{Authorization:`Bearer ${e}`},signal:AbortSignal.timeout(5e3)})}catch{f(e);return}if(r()!==e||n.status===401)return;if(!n.ok){f(e);return}let i=await n.json().catch(()=>null);if(typeof i?.token==`string`&&r()===e){sessionStorage.setItem(t,i.token),c();for(let e of u)e(i.token)}}var u=new Set;function d(e){return u.add(e),()=>u.delete(e)}function f(e){if(r()!==e)return;let t=a(e);t===null||t*1e3-Date.now()<=o||(s=setTimeout(()=>{l(e)},o))}var p=!1;function m(e){p=e}function h(){return r()!==null||p}async function g(){let e=await fetch(`/api/status`,{signal:AbortSignal.timeout(5e3)});if(!e.ok)throw Error(`Failed to fetch server status`);return e.json()}async function _(e){let t=r(),n=await fetch(`/api/migrate-vault`,{method:`POST`,headers:{"Content-Type":`application/json`,...t?{Authorization:`Bearer ${t}`}:{}},body:JSON.stringify({masterPassword:e}),signal:AbortSignal.timeout(12e4)}),i=await n.json().catch(()=>null);if(!n.ok)throw Error(i?.error??`La migration a échoué`);return i}async function v(e){let t=await fetch(`/api/unlock`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({masterPassword:e}),signal:AbortSignal.timeout(3e4)});if(t.status===429)throw Error(`Trop de tentatives. Réessayez dans 15 minutes.`);if(t.status===401)throw Error(`Master password incorrect`);if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error??`Erreur serveur`)}return(await t.json()).token}async function y(e,t){let n={masterPassword:e};t&&(n.encryptionKey=t);let r=await fetch(`/api/setup`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n),signal:AbortSignal.timeout(3e4)});if(r.status===429)throw Error(`Trop de tentatives. Réessayez dans 15 minutes.`);if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(e.error??`Erreur serveur`)}return(await r.json()).token}export{a,m as c,v as d,_ as f,h as i,n as l,g as n,d as o,r,c as s,i as t,y as u};
@@ -1 +1 @@
1
- import{Ht as e,g as t}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n}from"./vue-i18n-o7yraQpR.js";import{i as r,n as i}from"./project-launch.store-AB257LRF.js";import{n as a}from"./project.store-qBZ_R1td.js";import{r as o}from"./cloud-session-BlihYcy2.js";import{n as s,t as c}from"./cloud-client-DhjJyZHU.js";import{r as l,s as u}from"./composables-DguCUR3O.js";import{t as d}from"./shared-sse-Dcj_cNvF.js";import{i as f,r as p}from"./src-Br-M9ln7.js";function m(){let e=n();return(t,n)=>t&&e.te(`authErrors.${t}`)?e.t(`authErrors.${t}`):t?e.t(`authErrors.default`):n}var h=r(`cloud-chat`,()=>{let{user:n}=o(),r=t(()=>!!n.value),h=u(s,m());e(()=>n.value?.id,e=>{e&&h.refresh()},{immediate:!0});let g=a();i();let _=t(()=>g.currentProjectOrgId),v=t(()=>{let e=h.organizations.value;if(!e.length)return``;let t=_.value;return t&&e.some(e=>e.id===t)?t:e[0].id}),y=l(s,v,{streamUrl:c,streamFactory:d,currentUserId:t(()=>n.value?.id)}),b=t(()=>Object.values(y.unread.value).reduce((e,t)=>e+t,0));e(()=>n.value?.id,e=>{e&&p(s)},{immediate:!0});let x=0,S=!1;e(b,e=>{S&&e>x&&f(),x=e,S=!0},{immediate:!0});function C(){y.unread.value={}}function w(e){y.unread.value[e]&&(y.unread.value={...y.unread.value,[e]:0})}return{connected:r,unreadCount:b,clearUnread:C,noteChannelRead:w}});export{m as n,h as t};
1
+ import{Ht as e,g as t}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n}from"./vue-i18n-o7yraQpR.js";import{i as r,n as i}from"./project-launch.store-Im5SMon9.js";import{n as a}from"./project.store-CITAykC3.js";import{r as o}from"./cloud-session-w6eNQX1X.js";import{n as s,t as c}from"./cloud-client-CEVx-bg6.js";import{r as l,s as u}from"./composables-CCbqJqnd.js";import{t as d}from"./shared-sse-Dcj_cNvF.js";import{i as f,r as p}from"./src-COZZWm-m.js";function m(){let e=n();return(t,n)=>t&&e.te(`authErrors.${t}`)?e.t(`authErrors.${t}`):t?e.t(`authErrors.default`):n}var h=r(`cloud-chat`,()=>{let{user:n}=o(),r=t(()=>!!n.value),h=u(s,m());e(()=>n.value?.id,e=>{e&&h.refresh()},{immediate:!0});let g=a();i();let _=t(()=>g.currentProjectOrgId),v=t(()=>{let e=h.organizations.value;if(!e.length)return``;let t=_.value;return t&&e.some(e=>e.id===t)?t:e[0].id}),y=l(s,v,{streamUrl:c,streamFactory:d,currentUserId:t(()=>n.value?.id)}),b=t(()=>Object.values(y.unread.value).reduce((e,t)=>e+t,0));e(()=>n.value?.id,e=>{e&&p(s)},{immediate:!0});let x=0,S=!1;e(b,e=>{S&&e>x&&f(),x=e,S=!0},{immediate:!0});function C(){y.unread.value={}}function w(e){y.unread.value[e]&&(y.unread.value={...y.unread.value,[e]:0})}return{connected:r,unreadCount:b,clearUnread:C,noteChannelRead:w}});export{m as n,h as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cloud-session-BlihYcy2.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/reactivity.esm-bundler-BQ9SB2vv.js","assets/runtime-core.esm-bundler-DujKY9QV.js","assets/project-launch.store-AB257LRF.js","assets/trpc-CAKhySL_.js","assets/preload-helper-BZ1Pz5am.js","assets/auth-LbzJj0JF.js","assets/project.store-qBZ_R1td.js","assets/error-DpF7X5iu.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./trpc-CAKhySL_.js";import{t as n}from"./preload-helper-BZ1Pz5am.js";import{r}from"./auth-LbzJj0JF.js";function i(e,t,{onProgress:n,withCredentials:r=!1,timeoutMs:i=3e5}={}){return new Promise(a=>{let o=new XMLHttpRequest;o.open(`POST`,e,!0),o.withCredentials=r,o.timeout=i,o.setRequestHeader(`Content-Type`,t.type||`application/octet-stream`),n&&(o.upload.onprogress=e=>{e.lengthComputable&&e.total>0&&n(e.loaded/e.total)}),o.onload=()=>{let e=null;try{e=JSON.parse(o.responseText)}catch{}n&&o.status>=200&&o.status<300&&n(1),a({data:o.status>=200&&o.status<300?e:null,status:o.status})},o.onerror=()=>a({data:null,status:0}),o.ontimeout=()=>a({data:null,status:0}),o.send(t)})}var a=e({cloudChatStreamUrl:()=>l,cloudClient:()=>s,cloudKanbanStreamUrl:()=>u,deleteKanbanAttachment:()=>m,fetchKanbanAttachment:()=>p,uploadKanbanImage:()=>d});async function o(e,r={}){let{resolvedAccountId:i}=await n(async()=>{let{resolvedAccountId:e}=await import(`./cloud-session-BlihYcy2.js`).then(e=>e.t);return{resolvedAccountId:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),a=r.accountId??await i();if(!a)return{data:null,error:{status:412,code:`CLOUD_NO_ACCOUNT_FOR_PROJECT`,message:`No cloud account on this machine answers for the open project.`}};try{return await t.cloudAuth.proxy.mutate({path:e,method:r.method??`GET`,...r.query?{query:r.query}:{},...r.body===void 0?{}:{body:r.body},accountId:a})}catch(e){return{data:null,error:e}}}var s={$fetch:o,organization:{getFullOrganization:e=>o(`/organization/get-full-organization`,{query:{organizationId:e.query.organizationId}}),list:async e=>{if(e)return o(`/organization/list`,{accountId:e});try{let{listCloudOrganizations:e}=await n(async()=>{let{listCloudOrganizations:e}=await import(`./cloud-session-BlihYcy2.js`).then(e=>e.t);return{listCloudOrganizations:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));return{data:await e(),error:null}}catch(e){return{data:null,error:e}}},listTeams:e=>o(`/organization/list-teams`,{query:e.query}),listUserTeams:()=>o(`/organization/list-user-teams`),createTeam:e=>o(`/organization/create-team`,{method:`POST`,body:e}),removeTeam:e=>o(`/organization/remove-team`,{method:`POST`,body:e}),listTeamMembers:e=>o(`/organization/list-team-members`,{query:e.query}),addTeamMember:e=>o(`/organization/add-team-member`,{method:`POST`,body:e}),removeTeamMember:e=>o(`/organization/remove-team-member`,{method:`POST`,body:e}),checkSlug:e=>o(`/organization/check-slug`,{method:`POST`,body:e}),create:e=>o(`/organization/create`,{method:`POST`,body:e}),inviteMember:e=>o(`/organization/invite-member`,{method:`POST`,body:e})}};function c(e,t){let n=r(),i=new URLSearchParams({organizationId:t});return n&&i.set(`token`,n),`${e}?${i.toString()}`}function l(e){return c(`/api/cloud/chat/stream`,e)}function u(e){return c(`/api/cloud/kanban/stream`,e)}async function d(e,t,n){let a=r(),o=new URLSearchParams({organizationId:e,name:t.name});a&&o.set(`token`,a);let s=await i(`/api/cloud/kanban/image?${o.toString()}`,t,{onProgress:n});return s.data?.id?s.data:null}var f=/^(image\/(png|jpeg|webp|gif)|application\/pdf|video\/(mp4|webm|ogg)|audio\/(mpeg|mp3|ogg|wav|x-wav|webm))$/;async function p(e,t=``,n=``){try{let i=r(),a=new URLSearchParams;i&&a.set(`token`,i),n&&a.set(`organizationId`,n);let o=await fetch(`/api/cloud/kanban/file/${encodeURIComponent(e)}?${a.toString()}`,{signal:AbortSignal.timeout(3e5)});if(!o.ok)return null;let s=f.test(t)?t:`application/octet-stream`;return URL.createObjectURL(new Blob([await o.arrayBuffer()],{type:s}))}catch{return null}}async function m(e,t=``){try{let n=r(),i=new URLSearchParams;n&&i.set(`token`,n),t&&i.set(`organizationId`,t),await fetch(`/api/cloud/kanban/file/${encodeURIComponent(e)}?${i.toString()}`,{method:`DELETE`,signal:AbortSignal.timeout(15e3)})}catch{}}export{m as a,a as i,s as n,p as o,u as r,d as s,l as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cloud-session-w6eNQX1X.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/reactivity.esm-bundler-BQ9SB2vv.js","assets/runtime-core.esm-bundler-DujKY9QV.js","assets/project-launch.store-Im5SMon9.js","assets/trpc-BQ0mLnfI.js","assets/preload-helper-BZ1Pz5am.js","assets/auth-5bsz5kSC.js","assets/project.store-CITAykC3.js","assets/error-DpF7X5iu.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{r as t}from"./trpc-BQ0mLnfI.js";import{t as n}from"./preload-helper-BZ1Pz5am.js";import{r}from"./auth-5bsz5kSC.js";function i(e,t,{onProgress:n,withCredentials:r=!1,timeoutMs:i=3e5}={}){return new Promise(a=>{let o=new XMLHttpRequest;o.open(`POST`,e,!0),o.withCredentials=r,o.timeout=i,o.setRequestHeader(`Content-Type`,t.type||`application/octet-stream`),n&&(o.upload.onprogress=e=>{e.lengthComputable&&e.total>0&&n(e.loaded/e.total)}),o.onload=()=>{let e=null;try{e=JSON.parse(o.responseText)}catch{}n&&o.status>=200&&o.status<300&&n(1),a({data:o.status>=200&&o.status<300?e:null,status:o.status})},o.onerror=()=>a({data:null,status:0}),o.ontimeout=()=>a({data:null,status:0}),o.send(t)})}var a=e({cloudChatStreamUrl:()=>l,cloudClient:()=>s,cloudKanbanStreamUrl:()=>u,deleteKanbanAttachment:()=>m,fetchKanbanAttachment:()=>p,uploadKanbanImage:()=>d});async function o(e,r={}){let{resolvedAccountId:i}=await n(async()=>{let{resolvedAccountId:e}=await import(`./cloud-session-w6eNQX1X.js`).then(e=>e.t);return{resolvedAccountId:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),a=r.accountId??await i();if(!a)return{data:null,error:{status:412,code:`CLOUD_NO_ACCOUNT_FOR_PROJECT`,message:`No cloud account on this machine answers for the open project.`}};try{return await t.cloudAuth.proxy.mutate({path:e,method:r.method??`GET`,...r.query?{query:r.query}:{},...r.body===void 0?{}:{body:r.body},accountId:a})}catch(e){return{data:null,error:e}}}var s={$fetch:o,organization:{getFullOrganization:e=>o(`/organization/get-full-organization`,{query:{organizationId:e.query.organizationId}}),list:async e=>{if(e)return o(`/organization/list`,{accountId:e});try{let{listCloudOrganizations:e}=await n(async()=>{let{listCloudOrganizations:e}=await import(`./cloud-session-w6eNQX1X.js`).then(e=>e.t);return{listCloudOrganizations:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));return{data:await e(),error:null}}catch(e){return{data:null,error:e}}},listTeams:e=>o(`/organization/list-teams`,{query:e.query}),listUserTeams:()=>o(`/organization/list-user-teams`),createTeam:e=>o(`/organization/create-team`,{method:`POST`,body:e}),removeTeam:e=>o(`/organization/remove-team`,{method:`POST`,body:e}),listTeamMembers:e=>o(`/organization/list-team-members`,{query:e.query}),addTeamMember:e=>o(`/organization/add-team-member`,{method:`POST`,body:e}),removeTeamMember:e=>o(`/organization/remove-team-member`,{method:`POST`,body:e}),checkSlug:e=>o(`/organization/check-slug`,{method:`POST`,body:e}),create:e=>o(`/organization/create`,{method:`POST`,body:e}),inviteMember:e=>o(`/organization/invite-member`,{method:`POST`,body:e})}};function c(e,t){let n=r(),i=new URLSearchParams({organizationId:t});return n&&i.set(`token`,n),`${e}?${i.toString()}`}function l(e){return c(`/api/cloud/chat/stream`,e)}function u(e){return c(`/api/cloud/kanban/stream`,e)}async function d(e,t,n){let a=r(),o=new URLSearchParams({organizationId:e,name:t.name});a&&o.set(`token`,a);let s=await i(`/api/cloud/kanban/image?${o.toString()}`,t,{onProgress:n});return s.data?.id?s.data:null}var f=/^(image\/(png|jpeg|webp|gif)|application\/pdf|video\/(mp4|webm|ogg)|audio\/(mpeg|mp3|ogg|wav|x-wav|webm))$/;async function p(e,t=``,n=``){try{let i=r(),a=new URLSearchParams;i&&a.set(`token`,i),n&&a.set(`organizationId`,n);let o=await fetch(`/api/cloud/kanban/file/${encodeURIComponent(e)}?${a.toString()}`,{signal:AbortSignal.timeout(3e5)});if(!o.ok)return null;let s=f.test(t)?t:`application/octet-stream`;return URL.createObjectURL(new Blob([await o.arrayBuffer()],{type:s}))}catch{return null}}async function m(e,t=``){try{let n=r(),i=new URLSearchParams;n&&i.set(`token`,n),t&&i.set(`organizationId`,t),await fetch(`/api/cloud/kanban/file/${encodeURIComponent(e)}?${i.toString()}`,{method:`DELETE`,signal:AbortSignal.timeout(15e3)})}catch{}}export{m as a,a as i,s as n,p as o,u as r,d as s,l as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cloud-client-DhjJyZHU.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/trpc-CAKhySL_.js","assets/reactivity.esm-bundler-BQ9SB2vv.js","assets/runtime-core.esm-bundler-DujKY9QV.js","assets/preload-helper-BZ1Pz5am.js","assets/auth-LbzJj0JF.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ht as n,g as r}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as i}from"./project-launch.store-AB257LRF.js";import{n as a,r as o}from"./trpc-CAKhySL_.js";import{t as s}from"./preload-helper-BZ1Pz5am.js";import{n as c}from"./project.store-qBZ_R1td.js";var l=e({listCloudOrganizations:()=>E,resolvedAccountId:()=>y,useCloudSession:()=>k}),u=t([]),d=t({}),f=t(!1),p=t(!1),m=t(null),h=t(null),g=!1;function _(e){return e?{id:e.userId,name:e.name,email:e.email,image:e.image}:null}var v=r(()=>u.value.find(e=>e.id===h.value)??null);async function y(){for(let e=0;S&&e<5;e++)await S;return v.value?.id??null}var b=0;async function x(){let e=++b;f.value=!0;try{let t=await o.cloudAuth.accounts.query();if(e!==b)return;u.value=t.accounts,d.value=t.orgAccounts;let n=u.value.filter(e=>!e.userId);if(n.length>0){await Promise.all(n.map(e=>o.cloudAuth.session.query({accountId:e.id}).catch(()=>null)));let t=await o.cloudAuth.accounts.query();if(e!==b)return;u.value=t.accounts,d.value=t.orgAccounts}}catch{if(e!==b)return;u.value=[],d.value={}}finally{e===b&&(f.value=!1,p.value=!0)}}a(()=>{(p.value||f.value)&&x().then(()=>{g&&w()})});var S=null;async function C(){let e=m.value;if(!e){h.value=null;return}try{let{accountId:t}=await o.cloudAuth.accountForOrg.query({orgId:e});m.value===e&&(h.value=t)}catch{m.value===e&&(h.value=null)}}function w(){S=C().finally(()=>{S=null})}function T(){if(g)return;let e=c(),t=i();g=!0,n(()=>t.activeOrgId??e.currentProjectOrgId,e=>{m.value=e??null,w()},{immediate:!0})}async function E(){let{cloudClient:e}=await s(async()=>{let{cloudClient:e}=await import(`./cloud-client-DhjJyZHU.js`).then(e=>e.i);return{cloudClient:e}},__vite__mapDeps([0,1,2,3,4,5,6]));!p.value&&!f.value&&await x();let t=0,n=await Promise.all(u.value.map(async n=>{try{let r=await e.organization.list(n.id);return r.error?(t++,[]):(r.data??[]).map(e=>({...e,accountId:n.id}))}catch{return t++,[]}}));if(t>0&&t===u.value.length)throw Error(`CLOUD_ORGS_UNREACHABLE`);let r=n.flat();return r.length>0&&o.cloudSync.rememberOrgAccounts.mutate({orgs:r.map(e=>({orgId:e.id,accountId:e.accountId}))}).then(()=>(w(),S)).catch(()=>{}),r}async function D(){let{url:e}=await o.cloudAuth.startLogin.mutate({returnTo:window.location.origin});window.location.href=e}async function O(e){let t=e??v.value?.id;t&&(await o.cloudAuth.signOut.mutate({accountId:t}),await x())}function k(){return!p.value&&!f.value&&x(),T(),{user:r(()=>_(v.value??void 0)),accounts:u,orgAccounts:d,currentAccount:v,loading:f,isLinked:r(()=>u.value.length>0),activeOrgId:r(()=>m.value),refresh:x,signIn:D,signOut:O}}export{E as n,k as r,l as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cloud-client-CEVx-bg6.js","assets/rolldown-runtime-Dd_uD5pT.js","assets/trpc-BQ0mLnfI.js","assets/reactivity.esm-bundler-BQ9SB2vv.js","assets/runtime-core.esm-bundler-DujKY9QV.js","assets/preload-helper-BZ1Pz5am.js","assets/auth-5bsz5kSC.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./rolldown-runtime-Dd_uD5pT.js";import{C as t}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ht as n,g as r}from"./runtime-core.esm-bundler-DujKY9QV.js";import{n as i}from"./project-launch.store-Im5SMon9.js";import{n as a,r as o}from"./trpc-BQ0mLnfI.js";import{t as s}from"./preload-helper-BZ1Pz5am.js";import{n as c}from"./project.store-CITAykC3.js";var l=e({listCloudOrganizations:()=>E,resolvedAccountId:()=>y,useCloudSession:()=>k}),u=t([]),d=t({}),f=t(!1),p=t(!1),m=t(null),h=t(null),g=!1;function _(e){return e?{id:e.userId,name:e.name,email:e.email,image:e.image}:null}var v=r(()=>u.value.find(e=>e.id===h.value)??null);async function y(){for(let e=0;S&&e<5;e++)await S;return v.value?.id??null}var b=0;async function x(){let e=++b;f.value=!0;try{let t=await o.cloudAuth.accounts.query();if(e!==b)return;u.value=t.accounts,d.value=t.orgAccounts;let n=u.value.filter(e=>!e.userId);if(n.length>0){await Promise.all(n.map(e=>o.cloudAuth.session.query({accountId:e.id}).catch(()=>null)));let t=await o.cloudAuth.accounts.query();if(e!==b)return;u.value=t.accounts,d.value=t.orgAccounts}}catch{if(e!==b)return;u.value=[],d.value={}}finally{e===b&&(f.value=!1,p.value=!0)}}a(()=>{(p.value||f.value)&&x().then(()=>{g&&w()})});var S=null;async function C(){let e=m.value;if(!e){h.value=null;return}try{let{accountId:t}=await o.cloudAuth.accountForOrg.query({orgId:e});m.value===e&&(h.value=t)}catch{m.value===e&&(h.value=null)}}function w(){S=C().finally(()=>{S=null})}function T(){if(g)return;let e=c(),t=i();g=!0,n(()=>t.activeOrgId??e.currentProjectOrgId,e=>{m.value=e??null,w()},{immediate:!0})}async function E(){let{cloudClient:e}=await s(async()=>{let{cloudClient:e}=await import(`./cloud-client-CEVx-bg6.js`).then(e=>e.i);return{cloudClient:e}},__vite__mapDeps([0,1,2,3,4,5,6]));!p.value&&!f.value&&await x();let t=0,n=await Promise.all(u.value.map(async n=>{try{let r=await e.organization.list(n.id);return r.error?(t++,[]):(r.data??[]).map(e=>({...e,accountId:n.id}))}catch{return t++,[]}}));if(t>0&&t===u.value.length)throw Error(`CLOUD_ORGS_UNREACHABLE`);let r=n.flat();return r.length>0&&o.cloudSync.rememberOrgAccounts.mutate({orgs:r.map(e=>({orgId:e.id,accountId:e.accountId}))}).then(()=>(w(),S)).catch(()=>{}),r}async function D(){let{url:e}=await o.cloudAuth.startLogin.mutate({returnTo:window.location.origin});window.location.href=e}async function O(e){let t=e??v.value?.id;t&&(await o.cloudAuth.signOut.mutate({accountId:t}),await x())}function k(){return!p.value&&!f.value&&x(),T(),{user:r(()=>_(v.value??void 0)),accounts:u,orgAccounts:d,currentAccount:v,loading:f,isLinked:r(()=>u.value.length>0),activeOrgId:r(()=>m.value),refresh:x,signIn:D,signOut:O}}export{E as n,k as r,l as t};
@@ -0,0 +1 @@
1
+ import{C as e,O as t,_ as n,l as r}from"./reactivity.esm-bundler-BQ9SB2vv.js";import{Ht as i,g as a}from"./runtime-core.esm-bundler-DujKY9QV.js";function o(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,100).replace(/-+$/g,``)}function s(e){if(e&&typeof e==`object`){let t=e;return{message:t.error?.message??t.message??`Une erreur est survenue`,code:t.error?.code??t.code}}return{message:`Une erreur est survenue`}}function c(e,t){let{message:n,code:r}=s(e);return t?t(r,n):n}function l(e){return(e??``).split(`,`).map(e=>e.trim()).some(e=>e===`owner`||e===`admin`)}function u(n,r){let i=t([]),a=t([]),o=e(!1),s=e(null);async function l(e){o.value=!0,s.value=null;try{let t=await n.organization.listTeams({query:{organizationId:e}});if(t.error){s.value=c(t.error,r);return}i.value=t.data??[]}catch(e){s.value=c(e,r)}finally{o.value=!1}}async function u(e){try{let t=await n.organization.listUserTeams();if(t.error){s.value=c(t.error,r);return}a.value=(t.data??[]).filter(t=>t.organizationId===e).map(e=>e.id)}catch(e){s.value=c(e,r)}}async function d(e,t){s.value=null;try{let t=await e();if(t.error)return s.value=c(t.error,r),!1}catch(e){return s.value=c(e,r),!1}return await l(t),!0}async function f(e,t){return d(()=>n.organization.createTeam({name:t,organizationId:e}),e)}async function p(e,t){return d(()=>n.organization.removeTeam({teamId:t,organizationId:e}),e)}async function m(e){s.value=null;try{let t=await n.organization.listTeamMembers({query:{teamId:e}});return t.error?(s.value=c(t.error,r),[]):(t.data??[]).map(e=>e.userId)}catch(e){return s.value=c(e,r),[]}}async function h(e,t,r){return d(()=>n.organization.addTeamMember({teamId:t,userId:r}),e)}async function g(e,t,r){return d(()=>n.organization.removeTeamMember({teamId:t,userId:r}),e)}return{teams:i,myTeamIds:a,loading:o,error:s,refresh:l,refreshMine:u,create:f,remove:p,memberIds:m,addMember:h,removeMember:g}}function d(n,r){let i=t([]),a=e(!1),s=e(null);async function l(){a.value=!0,s.value=null;try{let e=await n.organization.list();if(e.error){s.value=c(e.error,r);return}i.value=e.data??[]}catch(e){s.value=c(e,r)}finally{a.value=!1}}async function u(e){let t=e||`org`;for(let e=1;e<=50;e+=1){let r=e===1?t:`${t}-${e}`,i=await n.organization.checkSlug({slug:r});if(!i.error&&i.data?.status)return r}return`${t}-${e.length+51}`}async function d(e){s.value=null;let t=await u(o(e)),i=await n.organization.create({name:e,slug:t});return i.error?(s.value=c(i.error,r),!1):(await l(),!0)}async function f(e,t,i=`member`,a=!1){s.value=null;let o=await n.organization.inviteMember({organizationId:e,email:t,role:i,resend:a});return!o.error||(s.value=c(o.error,r),!1)}return{organizations:i,loading:a,error:s,refresh:l,create:d,invite:f}}var f=(e,t)=>new EventSource(e,t);function p(t,r,a={}){let o=a.pollMs??5e3,c=e([]),l=e(null),u=e([]),d=e({}),p=e(!1),m=e(!1),h=e(!1),g=e(!1),_=e(null),v=null,y=new Set,b=null,x=null,S=null;async function C(e,n){let r=await t.$fetch(e,n);return r?.error?(_.value=s(r.error).message,null):r?.data??null}function w(e){let t=e.filter(e=>!y.has(e.id));if(t.length){for(let e of t)y.add(e.id);u.value=[...u.value,...t],v=t.at(-1)?.createdAt??v}}async function T(){if(!r.value)return;let e=await C(`/chat/channel/list`,{method:`GET`,query:{organizationId:r.value}});e&&(c.value=e.channels,d.value=Object.fromEntries(e.channels.map(e=>[e.id,e.id===l.value?0:e.unreadCount??0])))}async function E(e){await C(`/chat/channel/read`,{method:`POST`,body:{channelId:e}})}async function D(){if(!l.value)return;p.value=!0,_.value=null,y.clear(),v=null,h.value=!1;let e=await C(`/chat/message/list`,{method:`GET`,query:{channelId:l.value,limit:`50`}});if(p.value=!1,e){for(let t of e.messages)y.add(t.id);u.value=e.messages,v=e.messages.at(-1)?.createdAt??null,h.value=e.hasMore??!1}}async function O(){let e=l.value;if(!e||m.value||!h.value)return;let t=u.value[0];if(!t)return;m.value=!0;let n=await C(`/chat/message/list`,{method:`GET`,query:{channelId:e,before:t.id,limit:`50`}});if(m.value=!1,!n)return;let r=n.messages.filter(e=>!y.has(e.id));for(let e of r)y.add(e.id);r.length&&(u.value=[...r,...u.value]),h.value=n.hasMore??!1}async function k(e){l.value!==e&&(l.value=e,u.value=[],d.value={...d.value,[e]:0},E(e),await D())}async function A(e){let t=e.trim();if(!t||!l.value)return!1;g.value=!0;let n=await C(`/chat/message/send`,{method:`POST`,body:{channelId:l.value,content:t}});return g.value=!1,n?(w([n.message]),!0):!1}async function j(e,t){if(!r.value)return null;let n=await C(`/chat/channel/create`,{method:`POST`,body:{organizationId:r.value,name:e,isPrivate:t}});return n?(await T(),await k(n.channel.id),n.channel):null}async function ee(e){return await C(`/chat/channel/join`,{method:`POST`,body:{channelId:e}})?(await T(),await k(e),!0):!1}async function te(e,t){return!!await C(`/chat/channel/invite`,{method:`POST`,body:{channelId:e,userId:t}})}async function M(e){await C(`/chat/channel/leave`,{method:`POST`,body:{channelId:e}}),l.value===e&&(l.value=null),await T()}async function N(e){if(!r.value||!e.length)return null;let t=await C(`/chat/dm/open`,{method:`POST`,body:{organizationId:r.value,userIds:e}});return t?(await T(),await k(t.channel.id),t.channel):null}async function P(){return r.value?(await C(`/chat/channel/browse`,{method:`GET`,query:{organizationId:r.value}}))?.channels??[]:[]}function F(e){c.value.some(t=>t.id===e.channelId)||T(),e.channelId===l.value?w([e.message]):e.message.userId!==a.currentUserId?.value&&(d.value={...d.value,[e.channelId]:(d.value[e.channelId]??0)+1})}async function I(){if(!l.value)return;let e={channelId:l.value};v&&(e.since=v);let t=await C(`/chat/message/list`,{method:`GET`,query:e});t&&w(t.messages)}function L(){b||=setInterval(()=>void I(),o)}function R(){b&&=(clearInterval(b),null)}function ne(e){let t=a.streamUrl?a.streamUrl(e):a.baseURL?`${a.baseURL}/api/chat/stream?organizationId=${encodeURIComponent(e)}`:null;if(!t||typeof EventSource>`u`){L();return}S=(a.streamFactory??f)(t,{withCredentials:!a.streamUrl}),S.onopen=()=>R(),S.onmessage=e=>{try{F(JSON.parse(e.data))}catch{}},S.onerror=()=>L(),L()}function z(){S?.close(),S=null}return i(r,e=>{z(),R(),x&&=(clearInterval(x),null),c.value=[],u.value=[],d.value={},l.value=null,y.clear(),v=null,e&&(T(),ne(e),x=setInterval(()=>void T(),2e4))},{immediate:!0}),n(()=>{z(),R(),x&&clearInterval(x)}),{channels:c,activeChannelId:l,messages:u,unread:d,loading:p,loadingOlder:m,hasMore:h,sending:g,error:_,reloadChannels:T,selectChannel:k,send:A,createChannel:j,joinChannel:ee,inviteToChannel:te,leaveChannel:M,openDm:N,browseChannels:P,markRead:E,loadOlder:O}}function m(t,r,o={}){let c=o.pollMs??15e3,l=e([]),u=e(null),d=e(null),p=e(!1),m=e(!1),h=e(null),g=e(!1),_=null,v=null,y=a(()=>d.value?.canWrite??!1),b=a(()=>d.value!==null&&!d.value.canWrite);async function x(e,n){let r=await t.$fetch(e,n);return r?.error?(h.value=s(r.error).message,null):r?.data??null}async function S(){if(!r.value)return;let e=await x(`/kanban/access`,{method:`GET`,query:{organizationId:r.value}});e&&(d.value=e)}async function C(){if(!r.value)return;let e=await x(`/kanban/board/list`,{method:`GET`,query:{organizationId:r.value,includeArchived:`true`}});e&&(l.value=e.boards)}async function w(e){p.value=!0,h.value=null,g.value=!1,A();let t=await x(`/kanban/board/get`,{method:`GET`,query:{id:e}});p.value=!1,t&&(u.value=t.board),t&&await Y()}function T(){u.value=null,g.value=!1,A(),q.value=[],J.value=[]}async function E(){let e=u.value;if(!e||g.value||m.value)return;let t=await x(`/kanban/board/get`,{method:`GET`,query:{id:e.id}});if(!t||g.value||m.value||t.board.updatedAt===e.updatedAt)return;let n=X(e);u.value=t.board,Y();for(let[e,r]of X(t.board))O.value[e]&&n.get(e)!==r&&k(e,!0)}async function D(e,t=``,n=``,i,a,o,s){if(!r.value)return null;let c=await x(`/kanban/board/create`,{method:`POST`,body:{organizationId:r.value,name:e,description:t,instructions:n,...i?.length?{columns:i}:{},...a?.length?{columnGroups:a}:{},...o?.length?{projectIds:o}:{},...s?{defaultView:s}:{}}});return c?(await Promise.all([C(),S()]),c.board):null}let O=e({});async function k(e,t=!1){let n=u.value;if(!n)return[];let r=O.value[e];if(r&&!t)return r;let i=(await x(`/kanban/card/history`,{method:`GET`,query:{boardId:n.id,cardId:e}}))?.history??[];return O.value={...O.value,[e]:i},i}function A(){O.value={}}function j(e,t){O.value={...O.value,[e]:t}}async function ee(e,t,n={}){let r=u.value;if(!r)return null;let i=await x(`/kanban/card/comment/add`,{method:`POST`,body:{boardId:r.id,cardId:e,detail:t,...n}});return i?(j(e,[...O.value[e]??[],i.event]),De(e,1,i.event.timestamp,{...i.event.authorUser,...i.event.author?{author:i.event.author}:{}}),i.event):null}async function te(e,t,n){let r=u.value;if(!r)return null;let i=await x(`/kanban/card/event/add`,{method:`POST`,body:{boardId:r.id,cardId:e,type:t,detail:n}});return i?(O.value[e]&&j(e,[...O.value[e],i.event]),u.value={...r,columns:r.columns.map(t=>({...t,cards:t.cards.map(t=>t.id===e?{...t,conversationEvents:[...t.conversationEvents??[],i.event]}:t)}))},i.event):null}async function M(e,t,n,r){let i=u.value;if(!i)return!1;let a=await x(`/kanban/card/comment/update`,{method:`POST`,body:{boardId:i.id,cardId:e,eventId:t,detail:n,attachments:r}});return a?(j(e,(O.value[e]??[]).map(e=>e.id===t?a.event:e)),!0):!1}async function N(e,t){let n=u.value;return!n||!await x(`/kanban/card/comment/delete`,{method:`POST`,body:{boardId:n.id,cardId:e,eventId:t}})?!1:(j(e,(O.value[e]??[]).filter(e=>e.id!==t)),De(e,-1),!0)}async function P(e,t,n){let r=u.value;if(!r)return!1;m.value=!0;let i=await x(`/kanban/card/move`,{method:`POST`,body:{boardId:r.id,cardId:e,toColumnId:t,toIndex:n}});return m.value=!1,i?(u.value=i.board,g.value=!1,!0):!1}async function F(e,t,n){let r=u.value;if(!r)return!1;m.value=!0;let i=await x(`/kanban/card/move-many`,{method:`POST`,body:{boardId:r.id,cardIds:e,toColumnId:t,toIndex:n}});return m.value=!1,i?(u.value=i.board,g.value=!1,i.moved??!0):!1}async function I(e,t){let n=u.value;if(!n)return null;m.value=!0;let r=await x(`/kanban/card/add`,{method:`POST`,body:{boardId:n.id,column:e,...t}});return m.value=!1,r?(u.value={...n,columns:n.columns.map(t=>t.id===e?{...t,cards:[...t.cards,r.card]}:t)},g.value=!1,r.card):null}async function L(e,t){let n=u.value;if(!n)return!1;m.value=!0;let r=await x(`/kanban/card/update`,{method:`POST`,body:{boardId:n.id,cardId:e,...t}});return m.value=!1,r?(me(e,r.card),!0):!1}async function R(e){let t=u.value;if(!t)return!1;m.value=!0;let n=await x(`/kanban/card/delete`,{method:`POST`,body:{boardId:t.id,cardId:e}});return m.value=!1,n?(V(e),!0):!1}async function ne(e){let t=u.value;if(!t)return!1;m.value=!0;let n=await x(`/kanban/column/add`,{method:`POST`,body:{boardId:t.id,title:e}});return m.value=!1,n?(u.value={...t,columns:[...t.columns,n.column]},g.value=!1,!0):!1}async function z(e,t,n){return x(`/kanban/board/flow`,{method:`GET`,query:{id:e,from:t.toISOString(),to:n.toISOString()}})}async function re(e,t){return x(`/kanban/board/history`,{method:`GET`,query:t?{id:e,before:t}:{id:e}})}async function ie(e,t){let n=u.value;if(!n)return!1;m.value=!0;let r=await x(`/kanban/column/set-done`,{method:`POST`,body:{boardId:n.id,columnId:e,done:t}});return m.value=!1,r?(u.value={...n,columns:n.columns.map(n=>n.id===e?{...n,done:t||void 0}:n)},g.value=!1,!0):!1}async function ae(e,t){let n=u.value;if(!n)return!1;m.value=!0;let r=await x(`/kanban/column/rename`,{method:`POST`,body:{boardId:n.id,columnId:e,title:t}});return m.value=!1,r?(u.value={...n,columns:n.columns.map(n=>n.id===e?{...n,title:t}:n)},g.value=!1,!0):!1}async function oe(e){let t=u.value;if(!t)return!1;m.value=!0;let n=await x(`/kanban/column/delete`,{method:`POST`,body:{boardId:t.id,columnId:e}});return m.value=!1,n?(u.value={...t,columns:t.columns.filter(t=>t.id!==e)},g.value=!1,!0):!1}async function se(e){let t=u.value;if(!t)return!1;m.value=!0;let n=await x(`/kanban/column/reorder`,{method:`POST`,body:{boardId:t.id,columnIds:e}});if(m.value=!1,!n)return!1;let r=new Map(e.map((e,t)=>[e,t]));return u.value={...t,columns:t.columns.map(e=>({...e,order:r.get(e.id)??e.order}))},g.value=!1,!0}async function B(){let e=u.value;if(!e)return;let t=await x(`/kanban/board/get`,{method:`GET`,query:{id:e.id}});t&&(u.value=t.board),g.value=!1}async function ce(e,t={}){let n=u.value;if(!n)return null;m.value=!0;let r=await x(`/kanban/group/add`,{method:`POST`,body:{boardId:n.id,title:e,...t}});return m.value=!1,r?(await B(),r.group):null}async function le(e,t){let n=u.value;if(!n)return!1;m.value=!0;let r=await x(`/kanban/group/update`,{method:`POST`,body:{boardId:n.id,groupId:e,...t}});return m.value=!1,r?(await B(),!0):!1}async function ue(e,t){let n=u.value;if(!n)return!1;m.value=!0;let r=await x(`/kanban/card-group/color`,{method:`POST`,body:{boardId:n.id,group:e,color:t}});return m.value=!1,r?(await B(),!0):!1}async function de(e){let t=u.value;if(!t)return!1;m.value=!0;let n=await x(`/kanban/group/delete`,{method:`POST`,body:{boardId:t.id,groupId:e}});return m.value=!1,n?(await B(),!0):!1}async function fe(e,t,n){let r=u.value;if(!r)return!1;m.value=!0;let i=await x(`/kanban/group/assign`,{method:`POST`,body:{boardId:r.id,member:e,groupId:t,...n?{columnIds:n}:{}}});return m.value=!1,i?(await B(),!0):!1}async function pe(){g.value=!1,await E()}function me(e,t){let n=u.value;n&&(u.value={...n,columns:n.columns.map(n=>({...n,cards:n.cards.map(n=>n.id===e?{...n,...t}:n)}))},g.value=!1)}function V(e){let t=u.value;t&&(u.value={...t,columns:t.columns.map(t=>({...t,cards:t.cards.filter(t=>t.id!==e)}))},g.value=!1)}let H=e([]),U=e(!1),W=e(!1);async function he(e=``,t=``){let n=u.value;if(!n)return[];U.value=!0;let r=await x(`/kanban/board/archive`,{method:`GET`,query:{boardId:n.id,...e.trim()?{q:e.trim()}:{},...t?{columnId:t}:{}}});return U.value=!1,r?(H.value=r.cards,W.value=!!r.truncated,r.cards):[]}async function ge(e){let t=u.value;return t?x(`/kanban/card/get`,{method:`GET`,query:{boardId:t.id,cardId:e}}):null}let G=e(null),K=e(!1);async function _e(e){let t=u.value,n=e.trim();if(!t||!n){G.value=null,K.value=!1;return}let r=await x(`/kanban/board/search`,{method:`GET`,query:{boardId:t.id,q:n}});r&&(G.value=new Set(r.cardIds),K.value=!!r.truncated)}async function ve(e){let t=u.value;if(!t)return!1;m.value=!0;let n=await x(`/kanban/card/archive`,{method:`POST`,body:{boardId:t.id,cardId:e}});return m.value=!1,n?(V(e),H.value=[n.card,...H.value.filter(t=>t.id!==e)],!0):!1}async function ye(e,t){let n=u.value;if(!n)return!1;m.value=!0;let r=await x(`/kanban/card/unarchive`,{method:`POST`,body:{boardId:n.id,cardId:e,...t?{toColumnId:t}:{}}});if(m.value=!1,!r)return!1;H.value=H.value.filter(t=>t.id!==e);let i=u.value;return i&&(u.value={...i,columns:i.columns.map(e=>e.id===r.columnId?{...e,cards:[...e.cards,r.card]}:e)}),g.value=!1,!0}async function be(){return r.value?(await x(`/kanban/board/columns`,{method:`GET`,query:{organizationId:r.value}}))?.boards??[]:[]}async function xe(e,t,n){let r=u.value;if(!r)return!1;m.value=!0,h.value=null;let i=await x(`/kanban/card/move-to-board`,{method:`POST`,body:{boardId:r.id,cardId:e,toBoardId:t,...n?{toColumnId:n}:{}}});return m.value=!1,i?(u.value=i.board,g.value=!1,await Promise.all([C(),Y()]),!0):!1}let q=e([]),J=e([]);async function Y(){let e=u.value;if(!e)return;let t=await x(`/kanban/card-link/list`,{method:`GET`,query:{boardId:e.id}});t&&(q.value=t.links,J.value=t.cards)}async function Se(e){let t=u.value;return t?(await x(`/kanban/card-placement/list`,{method:`GET`,query:{boardId:t.id,cardId:e}}))?.placements??null:null}async function Ce(e){return!r.value||!e.trim()?[]:(await x(`/kanban/card/search`,{method:`GET`,query:{organizationId:r.value,q:e.trim(),limit:`20`}}))?.cards??[]}async function we(e,t,n,r){return h.value=null,await x(`/kanban/card-placement/add`,{method:`POST`,body:{boardId:e,cardId:t,column:n,...r===void 0?{}:{index:r}}})?(u.value?.id===e&&await E(),!0):!1}async function Te(e,t){return h.value=null,await x(`/kanban/card-placement/remove`,{method:`POST`,body:{boardId:e,cardId:t}})?(u.value?.id===e&&await E(),!0):!1}async function Ee(e,t){let n=u.value;return!n||(h.value=null,!await x(`/kanban/card-link/set`,{method:`POST`,body:{boardId:n.id,cardId:e,parentBoardId:t?.boardId??null,parentCardId:t?.cardId??null}}))?!1:(await Y(),!0)}function De(e,t,n,r){let i=u.value;i&&(u.value={...i,columns:i.columns.map(i=>({...i,cards:i.cards.map(i=>i.id===e?{...i,commentCount:Math.max(0,(i.commentCount??0)+t),...n?{lastCommentAt:n}:{},...r?{lastCommentBy:r}:{}}:i)}))})}async function Oe(e,t){h.value=null;let n=await x(`/kanban/board/update`,{method:`POST`,body:{id:e,...t}});return n?(u.value?.id===e&&(u.value=n.board),await C(),!0):!1}async function ke(e){return await x(`/kanban/board/delete`,{method:`POST`,body:{id:e}})?(u.value?.id===e&&T(),await Promise.all([C(),S()]),!0):!1}async function Ae(e,t,n,r){let i=await x(`/kanban/column/subscribe`,{method:`POST`,body:{boardId:e,columnId:t,subscription:n,...r?{teamId:r}:{}}});return i?(u.value?.id===e&&(u.value={...u.value,columnSubscriptions:i.columnSubscriptions,columnTeamSubscriptions:i.columnTeamSubscriptions??u.value.columnTeamSubscriptions}),!0):!1}function X(e){let t=new Map;for(let n of e.columns)for(let e of n.cards)t.set(e.id,`${e.updatedAt}|${e.commentCount??0}`);return t}function je(){g.value=!0}function Z(){_||=setInterval(()=>{C(),E()},c)}function Q(){_&&=(clearInterval(_),null)}function Me(e){e.type===`board.changed`&&e.updatedAt&&e.boardId===u.value?.id&&e.updatedAt===u.value.updatedAt||(C(),e.boardId===u.value?.id&&E())}function Ne(e){let t=o.streamUrl?o.streamUrl(e):o.baseURL?`${o.baseURL}/api/kanban/stream?organizationId=${encodeURIComponent(e)}`:null;if(!t||typeof EventSource>`u`){Z();return}v=(o.streamFactory??f)(t,{withCredentials:!o.streamUrl}),v.onopen=()=>Q(),v.onmessage=e=>{try{Me(JSON.parse(e.data))}catch{}};let n=e=>{try{o.onConversationChanged?.(JSON.parse(e))}catch{}},r=v;typeof r.addEventListener==`function`?r.addEventListener(`conversation`,e=>n(e.data)):v.onnamed=(e,t)=>{e===`conversation`&&n(t.data)},v.onerror=()=>Z(),Z()}function $(){v?.close(),v=null}return i(r,e=>{$(),Q(),l.value=[],d.value=null,T(),e&&(C(),S(),Ne(e))},{immediate:!0}),n(()=>{Q(),$()}),{boards:l,activeBoard:u,access:d,canWrite:y,planLocked:b,loading:p,saving:m,dirty:g,error:h,reloadBoards:C,refreshAccess:S,openBoard:w,closeBoard:T,refreshActiveBoard:E,discardLocalEdits:pe,createBoard:D,updateBoardById:Oe,deleteBoard:ke,markDirty:je,boardFlow:z,boardHistory:re,addCard:I,updateCard:L,deleteCard:R,addColumn:ne,renameColumn:ae,setColumnDone:ie,deleteColumn:oe,reorderColumns:se,addColumnGroup:ce,updateColumnGroup:le,setCardGroupColor:ue,deleteColumnGroup:de,assignToColumnGroup:fe,setColumnSubscription:Ae,cardHistories:O,loadCardHistory:k,addComment:ee,addCardEvent:te,updateComment:M,deleteComment:N,moveCard:P,moveCards:F,moveCardToBoard:xe,loadBoardColumns:be,archivedCards:H,loadingArchive:U,archiveTruncated:W,loadArchivedCards:he,archiveCard:ve,unarchiveCard:ye,searchMatches:G,searchTruncated:K,searchCards:_e,loadCard:ge,cardLinks:q,linkedCards:J,loadCardLinks:Y,setCardParent:Ee,addCardPlacement:we,removeCardPlacement:Te,loadCardPlacements:Se,searchOrgCards:Ce}}function h(t,n,r={}){let a=e([]),o=e(null);async function c(e,n){let r=await t.$fetch(e,n);return r?.error?(o.value=s(r.error).message,null):r?.data??null}async function l(){if(!n.value){a.value=[];return}let e=await c(`/kanban/board-template/list`,{method:`GET`,query:{organizationId:n.value}});e&&(a.value=e.templates)}async function u(e,t=``,r=[],i=[]){return!n.value||(o.value=null,!await c(`/kanban/board-template/create`,{method:`POST`,body:{organizationId:n.value,name:e,instructions:t,columns:r,columnGroups:i}}))?!1:(await l(),!0)}async function d(e){return o.value=null,await c(`/kanban/board-template/delete`,{method:`POST`,body:{id:e}})?(await l(),!0):!1}let f=!1;async function p(){f||(f=!0,await l())}return i(n,()=>{f=!1,a.value=[],r.lazy||l()},{immediate:!0}),{templates:a,error:o,reload:l,ensureLoaded:p,createTemplate:u,deleteTemplate:d}}function g(t,n,r={}){let a=e([]),o=e(null);async function c(e,n){let r=await t.$fetch(e,n);return r?.error?(o.value=s(r.error).message,null):r?.data??null}async function l(){if(!n.value){a.value=[];return}let e=await c(`/kanban/template/list`,{method:`GET`,query:{organizationId:n.value}});e&&(a.value=e.templates)}async function u(e,t=``){return!n.value||(o.value=null,!await c(`/kanban/template/create`,{method:`POST`,body:{organizationId:n.value,name:e,content:t}}))?!1:(await l(),!0)}async function d(e,t){return o.value=null,await c(`/kanban/template/update`,{method:`POST`,body:{id:e,...t}})?(await l(),!0):!1}async function f(e){return o.value=null,await c(`/kanban/template/delete`,{method:`POST`,body:{id:e}})?(await l(),!0):!1}let p=!1;async function m(){p||(p=!0,await l())}return i(n,()=>{p=!1,a.value=[],r.lazy||l()},{immediate:!0}),{templates:a,error:o,reload:l,ensureLoaded:m,createTemplate:u,updateTemplate:d,deleteTemplate:f}}function _(t,a,o){let s=e([]),l=e({}),u=e(null);async function d(e,n){let r=await t.$fetch(e,n);return r?.error?(u.value=c(r.error,o),null):r?.data??null}async function f(){if(!a.value){s.value=[];return}let e=await d(`/integration/available`,{method:`GET`,query:{organizationId:a.value}});s.value=e?.integrations??[]}async function p(e,t){u.value=null;let n=await d(`/integration/card/conversations`,{method:`GET`,query:{boardId:e,cardId:t}});return n&&h(e,t,n.conversations),l.value[t]??[]}let m=new Map;function h(e,t,n){l.value={...l.value,[t]:n};let r=m.get(t);r&&clearTimeout(r.timer);let i=r?.count??0;if(!n.some(e=>e.filesPending)||i>=40){m.delete(t);return}m.set(t,{count:i+1,timer:setTimeout(()=>{p(e,t)},3e3)})}async function g(e,t){return u.value=null,(await d(`/integration/conversations/search`,{method:`GET`,query:{connectionId:e,query:t}}))?.results??[]}async function _(e,t,n,r){u.value=null;let i=await d(`/integration/card/link`,{method:`POST`,body:{boardId:e,cardId:t,connectionId:n,externalId:r}});return i?(m.delete(t),h(e,t,i.conversations),!0):!1}async function v(e,t,n){u.value=null;let r=await d(`/integration/card/resync`,{method:`POST`,body:{boardId:e,cardId:t,conversationId:n}});return r?(h(e,t,r.conversations),!0):!1}async function y(e,t,n){return u.value=null,await d(`/integration/card/unlink`,{method:`POST`,body:{boardId:e,cardId:t,conversationId:n}})?(l.value={...l.value,[t]:(l.value[t]??[]).filter(e=>e.id!==n)},!0):!1}return i(a,()=>{f()},{immediate:!0}),r()&&n(()=>{for(let{timer:e}of m.values())clearTimeout(e);m.clear()}),{integrations:s,byCard:l,error:u,loadIntegrations:f,load:p,search:g,link:_,resync:v,unlink:y}}export{h as a,u as c,m as i,_ as n,g as o,p as r,d as s,l as t};