planche 0.8.14 → 0.9.0

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 (141) hide show
  1. package/app/assets/1p4z4GHT.js +2 -0
  2. package/app/assets/{ClQzFEcL.js → 6NUleTnS.js} +1 -1
  3. package/app/assets/ANL7Od0T.js +1 -0
  4. package/app/assets/B7zF7RU4.js +2 -0
  5. package/app/assets/B8zpsP_u.js +959 -0
  6. package/app/assets/B9DHeSQH.js +1 -0
  7. package/app/assets/B9NCreMu.js +1 -0
  8. package/app/assets/{CjoKIEBz.js → B9dhM8vw.js} +1 -1
  9. package/app/assets/BFw3KCAr.js +1 -0
  10. package/app/assets/BGuDcBB_.js +1 -0
  11. package/app/assets/BHe42P9W.js +1 -0
  12. package/app/assets/BJFk0Zzq.js +2 -0
  13. package/app/assets/BMGo7X_N.js +2 -0
  14. package/app/assets/BRZhVXRC.js +1 -0
  15. package/app/assets/BVwlLPu6.js +1 -0
  16. package/app/assets/BYWnKgIY.js +3 -0
  17. package/app/assets/BYvM8E39.js +1 -0
  18. package/app/assets/B_1rFijd.js +1 -0
  19. package/app/assets/Bgu3teFB.js +11 -0
  20. package/app/assets/BgvMpmFj.js +1 -0
  21. package/app/assets/BhPOHTk7.js +7 -0
  22. package/app/assets/BiyRPyXV.js +1 -0
  23. package/app/assets/Bkq2aetC.js +1 -0
  24. package/app/assets/BnI4D_rY.js +1 -0
  25. package/app/assets/BniymiMs.js +2 -0
  26. package/app/assets/Br4335vw.js +1 -0
  27. package/app/assets/BsYZ-U7K.js +1 -0
  28. package/app/assets/BvEGx3Si.js +4 -0
  29. package/app/assets/Bvu_eiyU.js +3 -0
  30. package/app/assets/C1gqjEN3.js +1 -0
  31. package/app/assets/C2S2GXdP.js +1 -0
  32. package/app/assets/C3w9xAkk.js +1 -0
  33. package/app/assets/C4QyqQoa.js +1 -0
  34. package/app/assets/C5Yv1gpQ.js +1 -0
  35. package/app/assets/CCQ6oQgi.js +1 -0
  36. package/app/assets/{CoSpkBZh.js → CDfSdkjY.js} +1 -1
  37. package/app/assets/CIIDOG9Y.js +1 -0
  38. package/app/assets/CP2U-viH.js +1 -0
  39. package/app/assets/CVZ3Bw6o.js +1 -0
  40. package/app/assets/CWb3a6Xp.js +1 -0
  41. package/app/assets/CWota0kb.js +1 -0
  42. package/app/assets/{B1pia_Rg.js → CYz610vE.js} +1 -1
  43. package/app/assets/Cdop6jK1.js +2 -0
  44. package/app/assets/CgQ0qqq4.js +1 -0
  45. package/app/assets/CiL8zoYm.js +1 -0
  46. package/app/assets/CkIm3SJy.js +1 -0
  47. package/app/assets/ClytWHSf.js +1 -0
  48. package/app/assets/CnoXRrek.js +1 -0
  49. package/app/assets/CqTgU2vp.css +2 -0
  50. package/app/assets/Cu_sGzNJ.js +1 -0
  51. package/app/assets/CwsH45Wr.js +2 -0
  52. package/app/assets/D3_CBO8-.js +1 -0
  53. package/app/assets/D4l4mWtD.js +1 -0
  54. package/app/assets/D6oRJsd8.js +1 -0
  55. package/app/assets/D8_hwGjG.js +1 -0
  56. package/app/assets/{CEtGUZGE.js → D8dVzi6I.js} +1 -1
  57. package/app/assets/DDeeBXtX.js +1 -0
  58. package/app/assets/DDjCZLb0.js +1 -0
  59. package/app/assets/DFeHpd8Y.js +1 -0
  60. package/app/assets/DKf3DkR6.js +1 -0
  61. package/app/assets/DO0W14Ho.js +1 -0
  62. package/app/assets/DPnYgSl3.js +1 -0
  63. package/app/assets/DU-Eln5x.js +1 -0
  64. package/app/assets/DY1k-USH.js +1 -0
  65. package/app/assets/DeNEO8HN.js +1 -0
  66. package/app/assets/DkqeIq13.js +1 -0
  67. package/app/assets/DnRoHgQS.js +1 -0
  68. package/app/assets/Dy6-E_uL.js +1 -0
  69. package/app/assets/DyQ8cEic.js +1 -0
  70. package/app/assets/DzRyVlxz.js +41 -0
  71. package/app/assets/FAouNaq9.js +1 -0
  72. package/app/assets/Nro86Y63.js +1 -0
  73. package/app/assets/Q6DQerac.js +8 -0
  74. package/app/assets/S7HbowYz.js +373 -0
  75. package/app/assets/UX-csQNt.js +2 -0
  76. package/app/assets/Udlj1Cgf.js +1 -0
  77. package/app/assets/{C0bzfYFC.js → XCH_yrJ8.js} +1 -1
  78. package/app/assets/_zaonxnw.js +1 -0
  79. package/app/assets/f6MhVR01.js +27 -0
  80. package/app/assets/tQiLT0zv.js +2 -0
  81. package/app/index.html +35 -27
  82. package/app/landing.css +17 -0
  83. package/dist/{chunk-XAI7WLQN.js → chunk-SDRLD5PK.js} +995 -121
  84. package/dist/embed.js +1 -1
  85. package/dist/index.js +1 -1
  86. package/package.json +6 -2
  87. package/app/assets/8RmjiG1u.js +0 -1
  88. package/app/assets/B6E7IbMa.js +0 -1
  89. package/app/assets/BBLekwhn.js +0 -1
  90. package/app/assets/BCmzDvBt.js +0 -1
  91. package/app/assets/BHsXOlR9.js +0 -2
  92. package/app/assets/BLPGwQub.js +0 -1
  93. package/app/assets/BO_H_8D-.js +0 -1
  94. package/app/assets/BUcTqhSL.js +0 -1
  95. package/app/assets/BX4n4TJQ.js +0 -1
  96. package/app/assets/BZ6aghND.js +0 -959
  97. package/app/assets/BbFio3pA.js +0 -1
  98. package/app/assets/BbdU8Zop.js +0 -2
  99. package/app/assets/Bdp1DKAx.js +0 -1
  100. package/app/assets/BgkATqP8.js +0 -1
  101. package/app/assets/Bpq2Whsw.js +0 -3
  102. package/app/assets/BuhEpB12.js +0 -1
  103. package/app/assets/BxW20weH.js +0 -1
  104. package/app/assets/C-8gMuEc.js +0 -1
  105. package/app/assets/C29gYFqD.js +0 -2
  106. package/app/assets/C3PpGnxB.js +0 -1
  107. package/app/assets/CF6jyexg.js +0 -41
  108. package/app/assets/CNC8pjhK.js +0 -1
  109. package/app/assets/CS2mpWDL.js +0 -1
  110. package/app/assets/CSYxJn5_.js +0 -1
  111. package/app/assets/CVpzA8TC.js +0 -8
  112. package/app/assets/CZoj-eMm.js +0 -1
  113. package/app/assets/Cf8o-5U6.js +0 -2
  114. package/app/assets/CkPnfgzt.js +0 -2
  115. package/app/assets/ClIJYMXh.js +0 -1
  116. package/app/assets/CxGlndnu.js +0 -1
  117. package/app/assets/D0jMUNSI.js +0 -2
  118. package/app/assets/D3ZaTPbf.js +0 -1
  119. package/app/assets/D6kbK-ng.js +0 -1
  120. package/app/assets/DEEGN6UG.js +0 -6
  121. package/app/assets/DF5d9evm.js +0 -1
  122. package/app/assets/DGpfJHer.js +0 -1
  123. package/app/assets/DOU2MWdA.js +0 -1
  124. package/app/assets/DPdwSUSw.js +0 -1
  125. package/app/assets/DXtaGfxh.js +0 -1
  126. package/app/assets/DbqogdCK.js +0 -356
  127. package/app/assets/DdHg_zlz.js +0 -1
  128. package/app/assets/DiIO0MJM.js +0 -1
  129. package/app/assets/DnZlL3PP.js +0 -1
  130. package/app/assets/H8HkC925.js +0 -1
  131. package/app/assets/KuSp3gJs.css +0 -2
  132. package/app/assets/VZqLr_d1.js +0 -7
  133. package/app/assets/_OOlglTI.js +0 -1
  134. package/app/assets/bgQ-QVd7.js +0 -1
  135. package/app/assets/mA5FXiEh.js +0 -2
  136. package/app/assets/mZyfO6B4.js +0 -1
  137. package/app/assets/p4yYbMPY.js +0 -2
  138. package/app/assets/pjlgs2cl.js +0 -1
  139. package/app/assets/pneb1la9.js +0 -1
  140. package/app/assets/uVZVQeN3.js +0 -27
  141. package/app/assets/zspOy9D_.js +0 -2
@@ -1,2 +0,0 @@
1
- import{d as e,p as t}from"./B1pia_Rg.js";var n=e=>typeof e==`string`,r=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},i=e=>e==null?``:String(e),a=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},o=/###/g,s=e=>e&&e.includes(`###`)?e.replace(o,`.`):e,c=e=>!e||n(e),l=(e,t,r)=>{let i=n(t)?t.split(`.`):t,a=0;for(;a<i.length-1;){if(c(e))return{};let t=s(i[a]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return c(e)?{}:{obj:e,k:s(i[a])}},u=(e,t,n)=>{let{obj:r,k:i}=l(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=l(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=l(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},d=(e,t,n,r)=>{let{obj:i,k:a}=l(e,t,Object);i[a]=i[a]||[],i[a].push(n)},f=(e,t)=>{let{obj:n,k:r}=l(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},p=(e,t,n)=>{let r=f(e,n);return r===void 0?f(t,n):r},m=(e,t,r)=>{for(let i in t)i!==`__proto__`&&i!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,i)?n(e[i])||e[i]instanceof String||n(t[i])||t[i]instanceof String?r&&(e[i]=t[i]):m(e[i],t[i],r):e[i]=t[i]);return e},h=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),g={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},_=e=>n(e)?e.replace(/[&<>"'\/]/g,e=>g[e]):e,v=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},y=[` `,`,`,`?`,`!`,`;`],b=new v(20),x=(e,t,n)=>{t||=``,n||=``;let r=y.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=b.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},S=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},C=e=>e?.replace(/_/g,`-`),w={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},T=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||w,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,r,i){return i&&!this.debug?null:(e=e.map(e=>n(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),n(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},E=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},D=class extends E{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r,i={}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=i.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:i.ignoreJSONStructure,s;e.includes(`.`)?s=e.split(`.`):(s=[e,t],r&&(Array.isArray(r)?s.push(...r):n(r)&&a?s.push(...r.split(a)):s.push(r)));let c=f(this.data,s);return!c&&!t&&!r&&e.includes(`.`)&&(e=s[0],t=s[1],r=s.slice(2).join(`.`)),c||!o||!n(r)?c:S(this.data?.[e]?.[t],r,a)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),u(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,r,i={silent:!1}){for(let i in r)(n(r[i])||Array.isArray(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});i.silent||this.emit(`added`,e,t,r)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=f(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?m(s,n,i):s={...s,...n},u(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},O={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},k=Symbol(`i18next/PATH_KEY`);function A(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===k?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function j(e,t){let{[k]:n}=e(A()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var M=e=>!n(e)&&typeof e!=`boolean`&&typeof e!=`number`,N=class e extends E{constructor(e,t={}){super(),a([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=T.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=M(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let r=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;r===void 0&&(r=`:`);let i=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,a=t.ns||this.options.defaultNS||[],o=r&&e.includes(r),s=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!x(e,r,i);if(o&&!s){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:n(a)?[a]:a};let o=e.split(r);(r!==i||r===i&&this.options.ns.includes(o[0]))&&(a=o.shift()),e=o.join(i)}return{key:e,namespaces:n(a)?[a]:a}}translate(t,r,i){let a=typeof r==`object`?{...r}:r;if(typeof a!=`object`&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a==`object`&&(a={...a}),a||={},t==null)return``;typeof t==`function`&&(t=j(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?j(e,{...this.options,...a}):String(e));let o=a.returnDetails===void 0?this.options.returnDetails:a.returnDetails,s=a.keySeparator===void 0?this.options.keySeparator:a.keySeparator,{key:c,namespaces:l}=this.extractFromKey(t[t.length-1],a),u=l[l.length-1],d=a.nsSeparator===void 0?this.options.nsSeparator:a.nsSeparator;d===void 0&&(d=`:`);let f=a.lng||this.language,p=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()===`cimode`)return p?o?{res:`${u}${d}${c}`,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:`${u}${d}${c}`:o?{res:c,usedKey:c,exactUsedKey:c,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(a)}:c;let m=this.resolve(t,a),h=m?.res,g=m?.usedKey||c,_=m?.exactUsedKey||c,v=[`[object Number]`,`[object Function]`,`[object RegExp]`],y=a.joinArrays===void 0?this.options.joinArrays:a.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,x=a.count!==void 0&&!n(a.count),S=e.hasDefaultValue(a),C=x?this.pluralResolver.getSuffix(f,a.count,a):``,w=a.ordinal&&x?this.pluralResolver.getSuffix(f,a.count,{ordinal:!1}):``,T=x&&!a.ordinal&&a.count===0,E=T&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${C}`]||a[`defaultValue${w}`]||a.defaultValue,D=h;b&&!h&&S&&(D=E);let O=M(D),k=Object.prototype.toString.apply(D);if(b&&D&&O&&!v.includes(k)&&!(n(y)&&Array.isArray(D))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,D,{...a,ns:l}):`key '${c} (${this.language})' returned an object instead of string.`;return o?(m.res=e,m.usedParams=this.getUsedParamsDetails(a),m):e}if(s){let e=Array.isArray(D),t=e?[]:{},n=e?_:g;for(let e in D)if(Object.prototype.hasOwnProperty.call(D,e)){let r=`${n}${s}${e}`;t[e]=S&&!h?this.translate(r,{...a,defaultValue:M(E)?E[e]:void 0,joinArrays:!1,ns:l}):this.translate(r,{...a,joinArrays:!1,ns:l}),t[e]===r&&(t[e]=D[e])}h=t}}else if(b&&n(y)&&Array.isArray(h))h=h.join(y),h&&=this.extendTranslation(h,t,a,i);else{let e=!1,n=!1;!this.isValidLookup(h)&&S&&(e=!0,h=E),this.isValidLookup(h)||(n=!0,h=c);let r=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:h,o=S&&E!==h&&this.options.updateMissing;if(n||e||o){if(this.logger.log(o?`updateKey`:`missingKey`,f,u,x&&!o?`${c}${this.pluralResolver.getSuffix(f,a.count,a)}`:c,o?E:h),s){let e=this.resolve(c,{...a,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(a.lng||this.language):e.push(a.lng||this.language);let n=(e,t,n)=>{let i=S&&n!==h?n:r;this.options.missingKeyHandler?this.options.missingKeyHandler(e,u,t,i,o,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,u,t,i,o,a),this.emit(`missingKey`,e,u,t,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&x?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,a);T&&a[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],c+t,a[`defaultValue${t}`]||E)})}):n(e,c,E))}h=this.extendTranslation(h,t,a,m,i),n&&h===c&&this.options.appendNamespaceToMissingKey&&(h=`${u}${d}${c}`),(n||e)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${c}`:c,e?h:void 0,a))}return o?(m.res=h,m.usedParams=this.getUsedParamsDetails(a),m):h}extendTranslation(e,t,r,i,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});let o=n(e)&&(r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables),s;if(o){let t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let c=r.replace&&!n(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,r.lng||this.language||i.usedLng,r),o){let t=e.match(this.interpolator.nestingRegexp),n=t&&t.length;s<n&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>a?.[0]===e[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),r)),r.interpolation&&this.interpolator.reset()}let o=r.postProcess||this.options.postProcess,s=n(o)?[o]:o;return e!=null&&s?.length&&r.applyPostProcessor!==!1&&(e=O.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,t={}){let r,i,a,o,s;return n(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?j(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(r))return;let c=this.extractFromKey(e,t),l=c.key;i=l;let u=c.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let d=t.count!==void 0&&!n(t.count),f=d&&!t.ordinal&&t.count===0,p=t.context!==void 0&&(n(t.context)||typeof t.context==`number`)&&t.context!==``,m=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(r)||(s=e,!this.checkedLoadedFor[`${m[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(this.checkedLoadedFor[`${m[0]}-${e}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(`, `)}" won't get resolved as namespace "${s}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),m.forEach(n=>{if(this.isValidLookup(r))return;o=n;let i=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(i,l,n,e,t);else{let e;d&&(e=this.pluralResolver.getSuffix(n,t.count,t));let r=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(t.ordinal&&e.startsWith(a)&&i.push(l+e.replace(a,this.options.pluralSeparator)),i.push(l+e),f&&i.push(l+r)),p){let n=`${l}${this.options.contextSeparator||`_`}${t.context}`;i.push(n),d&&(t.ordinal&&e.startsWith(a)&&i.push(n+e.replace(a,this.options.pluralSeparator)),i.push(n+e),f&&i.push(n+r))}}let s;for(;s=i.pop();)this.isValidLookup(r)||(a=s,r=this.getResource(n,e,s,t))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],r=e.replace&&!n(e.replace),i=r?e.replace:e;if(r&&e.count!==void 0&&(i={...i,count:e.count}),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(let e of t)delete i[e]}return i}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},P=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=T.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=C(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=C(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(n(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),n(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||=e[this.getScriptPartFromCode(t)],r||=e[this.formatLanguageCode(t)],r||=e[this.getLanguagePartFromCode(t)],r||=e.default,r||[]}toResolveHierarchy(e,t){let r=this.options.fallbackLng,i=Array.isArray(r)?r.join(`|`):r;i!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=i);let a=t===void 0||t===!1||n(t),o=t===void 0&&typeof this.options.fallbackLng==`function`,s=n(e)&&a&&!o,c=null;if(s){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,c=`${e.length}:${e}|${n}`}if(c!==null){let e=this.resolveHierarchyCache[c];if(e!==void 0)return e.slice()}let l=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),u=[],d=e=>{e&&(this.isSupportedCode(e)?u.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return n(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&d(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&d(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&d(this.getLanguagePartFromCode(e))):n(e)&&d(this.formatLanguageCode(e)),l.forEach(e=>{u.includes(e)||d(this.formatLanguageCode(e))}),c===null?u:(this.resolveHierarchyCache[c]=u,u.slice())}},F={zero:0,one:1,two:2,few:3,many:4,other:5},I={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},L=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=T.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=C(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),I;if(!e.match(/-|_/))return I;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>F[e]-F[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},R=(e,t,r,i=`.`,a=!0)=>{let o=p(e,t,r);return!o&&a&&n(r)&&(o=S(e,r,i),o===void 0&&(o=S(t,r,i))),o},ee=e=>e.replace(/\$/g,`$$$$`),z=class{constructor(e={}){this.logger=T.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:y}=e.interpolation;this.escape=t===void 0?_:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?h(i):a||`{{`,this.suffix=o?h(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?h(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?h(l):``,this.nestingPrefix=d?h(d):f||h(`$t(`),this.nestingSuffix=p?h(p):m||h(`)`),this.nestingOptionsSeparator=g||`,`,this.maxReplaces=v||1e3,this.alwaysFormat=y!==void 0&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,r,a){let o,s,c,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(!e.includes(this.formatSeparator)){let n=R(t,l,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(n,void 0,r,{...a,...t,interpolationkey:e}):n}let n=e.split(this.formatSeparator),i=n.shift().trim(),o=n.join(this.formatSeparator).trim();return this.format(R(t,l,i,this.options.keySeparator,this.options.ignoreJSONStructure),o,r,{...a,...t,interpolationkey:i})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let d=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=a?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:a.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(c=0;o=t.regex.exec(e);){let r=o[1].trim();if(s=u(r),s===void 0){if(typeof d==`function`){let t=d(e,o,a);s=n(t)?t:``}else if(a&&Object.prototype.hasOwnProperty.call(a,r))s=``;else if(f){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),s=``}else!n(s)&&!this.useRawValueToEscape&&(s=i(s));let l=t.safeValue(s);if(e=e.replace(o[0],ee(l)),f?(t.regex.lastIndex+=l.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),e}nest(e,t,r={}){let a,o,s,c=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${h(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,s);let a=i.match(/'/g),o=i.match(/"/g);((a?.length??0)%2==0&&!o||(o?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{s=JSON.parse(i),t&&(s={...t,...s})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return s.defaultValue&&s.defaultValue.includes(this.prefix)&&delete s.defaultValue,e};for(;a=this.nestingRegexp.exec(e);){let l=[];s={...r},s=s.replace&&!n(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=/{.*}/s.test(a[1])?a[1].lastIndexOf(`}`)+1:a[1].indexOf(this.formatSeparator);if(u!==-1&&(l=a[1].slice(u).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),a[1]=a[1].slice(0,u)),o=t(c.call(this,a[1].trim(),s),s),o&&a[0]===e&&!n(o))return o;n(o)||(o=i(o)),o||=(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),``),l.length&&(o=l.reduce((e,t)=>this.format(e,t,r.lng,{...r,interpolationkey:a[1].trim()}),o.trim())),e=e.replace(a[0],o),this.regexp.lastIndex=0}return e}},B=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},V=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(C(r),i),t[o]=s),s(n)}},te=e=>(t,n,r)=>e(C(n),r)(t),ne=class{constructor(e={}){this.logger=T.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?V:te;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=V(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=B(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},re=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},ie=class extends E{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=T.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{d(n.loaded,[i],a),re(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,r={},i){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),i&&i();n(e)&&(e=this.languageUtils.toResolveHierarchy(e)),n(t)&&(t=[t]);let a=this.queueLoad(e,t,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},H=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),n(e[1])&&(t.defaultValue=e[1]),n(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),U=e=>(n(e.ns)&&(e.ns=[e.ns]),n(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),n(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),W=()=>{},G=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},K=class e extends E{constructor(e={},t){if(super(),this.options=U(e),this.services={},this.logger=T,this.modules={external:[]},G(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(n(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let i=H();this.options={...i,...this.options,...U(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);let a=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?T.init(a(this.modules.logger),this.options):T.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ne;let t=new P(this.options);this.store=new D(this.options.resources,this.options);let n=this.services;n.logger=T,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new L(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=a(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new z(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new ie(a(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=a(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=a(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new N(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=W,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let o=r(),s=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),o.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?s():setTimeout(s,0),o}loadResources(e,t=W){let r=t,i=n(e)?e:this.language;if(typeof e==`function`&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return r();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};i?t(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(e)})}else r(null)}reloadResources(e,t,n){let i=r();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=W,this.services.backendConnector.reload(e,t,e=>{i.resolve(),n(e)}),i}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&O.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let i=r();this.emit(`languageChanging`,e);let a=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},o=(n,r)=>{r?this.isLanguageChangingTo===e&&(a(r),this.translator.changeLanguage(r),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,r),this.logger.log(`languageChanged`,r)):this.isLanguageChangingTo=void 0,i.resolve((...e)=>this.t(...e)),t&&t(n,(...e)=>this.t(...e))},s=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let r=n(t)?t:t&&t[0],i=this.store.hasLanguageSomeTranslations(r)?r:this.services.languageUtils.getBestMatchFromCodes(n(t)?[t]:t);i&&(this.language||a(i),this.translator.language||this.translator.changeLanguage(i),this.services.languageDetector?.cacheUserLanguage?.(i)),this.loadResources(i,e=>{o(e,i)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(e),i}getFixedT(e,t,r,i){let a=i?.scopeNs,o=(e,t,...n)=>{let i;i=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(n)),i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs;let s=i.ns!==void 0&&i.ns!==null;i.ns=i.ns||o.ns,i.keyPrefix!==``&&(i.keyPrefix=i.keyPrefix||r||o.keyPrefix);let c={...this.options,...i};Array.isArray(a)&&!s&&(c.ns=a),typeof i.keyPrefix==`function`&&(i.keyPrefix=j(i.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return i.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=j(e,c)),`${i.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=j(e,c)),u=i.keyPrefix?`${i.keyPrefix}${l}${e}`:e),this.t(u,i)};return n(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,o}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let i=r();return this.options.ns?(n(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}loadLanguages(e,t){let i=r();n(e)&&(e=[e]);let a=this.options.preload||[],o=e.filter(e=>!a.includes(e)&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=a.concat(o),this.loadResources(e=>{i.resolve(),t&&t(e)}),i):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new P(H());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=W){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new D(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...H().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new z(n)}return a.translator=new N(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();K.createInstance,K.dir,K.init,K.loadResources,K.reloadResources,K.use,K.changeLanguage,K.getFixedT,K.t,K.exists,K.setDefaultNamespace,K.hasLoadedNamespace,K.loadNamespaces,K.loadLanguages;var q={type:`3rdParty`,init(n){t(n.options.react),e(n)}},J={app:{reconnecting:`Reconnecting…`,dropSqlite:`Drop to open the SQLite file`,dropSqliteHint:`Opened in your browser with WebAssembly — the file stays on your computer. Drop the -wal sidecar together with it if there is one.`,dropFailedTitle:`Could not open the dropped file`,dropNotSqlite:`{{name}} is not a SQLite database file.`,crashTitle:`Something went wrong`,crashBody:`The app hit an unexpected error. Reloading restores your connections and tabs; unsaved grid edits are lost.`,crashReload:`Reload`},language:{auto:`System language ({{name}})`,en:`English`,ko:`한국어`,zh:`中文(简体)`,ja:`日本語`,de:`Deutsch`,fr:`Français`},settings:{title:`Safety`,description:`Guard rails against accidental data loss. Read-only, environment colour and transaction mode are set per connection.`,language:`Language`,languageHint:`Applies immediately. "System language" follows your browser.`,resetDefaults:`Reset to defaults`,done:`Done`,analytics:`Share anonymous usage statistics`,analyticsHint:`Sends anonymous usage events (engine, feature, statement type) to Google Analytics. Never SQL text, host names, table or user names.`,analyticsUnavailableHint:`Not active in this build (no measurement id configured).`,persistHistory:`Keep query history across reloads`,persistHistoryHint:`Statement text is stored in this browser (password literals are masked; the open editor tabs themselves are always kept). Off: history and versions live only until the tab closes.`,ai:{intro:`Planche can ask a model why a statement failed or why a plan is slow. The question is put together here in the app and sent by your local agent to the provider below — nothing about your SQL or your schema reaches planche.dev.`,provider:`Provider`,openaiCompatible:`OpenAI-compatible`,model:`Model`,baseUrl:`Base URL`,baseUrlHint:`Leave empty for the provider's own endpoint. Any OpenAI-compatible server works — Azure, OpenRouter, a local Ollama.`,key:`API key`,keyHint:`Handed to the local agent and used there. It is never kept in this browser and never sent to planche.dev.`,remember:`Remember this key on this machine`,rememberHint:`Writes it to {{path}}, readable only by you. Without this the key lives in the running agent and is gone when it stops.`,save:`Save`,forget:`Forget key`,saved:`Saved.`,none:`No key set.`,configuredSession:`A key is set for this agent session only.`,configuredFile:`A key is stored at {{path}}.`,configuredEnv:`This agent's AI settings come from its environment and cannot be changed here.`,unreachable:`The agent is not reachable, so AI settings cannot be changed.`,title:`AI explanations`,description:`Which model explains a failure or a plan, and whose key pays for it.`,cli:`Local CLI (no key)`,cliCommand:`Command`,cliHint:`Runs an agent CLI already installed and signed in on this machine, so there is no key to enter. It explains failures and plans; the AI panel needs a provider that can call tools.`,cliNone:`No agent CLI was found on this machine. Install Claude Code or Codex, or pick another provider.`,profile:`Anthropic (this machine's login)`,profileHint:"Uses the credential this machine is already signed in with — the SDK finds it on its own after `ant auth login`. Nothing to paste, and unlike a local CLI this is the real API, so the AI panel works too.",profileNone:"No Anthropic credential was found on this machine. Run `ant auth login`, or set a key instead.",configuredChoice:`Using {{provider}} — no key held; the choice is kept in {{path}}.`},query:{title:`Query`,description:`How a statement is run: what F9 executes, how many rows come back, and what is previewed first.`},general:{title:`General`,description:`Language, what survives a reload, and what leaves this machine.`}},menu:{settings:{safety:`Safety…`,language:`Language`,title:`Settings`,theme:`Theme`,query:`Query…`,general:`General…`,ai:`AI…`},help:{gettingStarted:`Getting Started`,about:`About Planche`,title:`Help`,documentation:`Documentation`,learn:`Learn SQL`,terms:`Terms of Use`,license:`Licence`,support:`Contact support`,mcp:`Connect an AI agent (MCP)…`,privacy:`Privacy policy`},connection:{title:`Connection`,connect:`Connect`,disconnect:`Disconnect`,readOnly:`Read-only`,manualTransactions:`Manual Transactions`,saveDatabaseFile:`Save Database File`,saveDatabaseFileBlocked:`Save Database File (load -wal first)`,exit:`Exit`,sync:`Connection sync`},query:{title:`Query`,execute:`Execute`,executeStatementAtCursor:`Execute Statement at Cursor`,executeWholeScript:`Execute Whole Script`,newQueryTab:`New Query Tab`,findReplace:`Find & Replace`,localHistory:`Local History…`,explainPlan:`Explain Plan`,explainAnalyze:`Explain Analyze (runs the statement)`,structure:`Query Structure`},edit:{title:`Edit`,undo:`Undo`,redo:`Redo`,cut:`Cut`,copy:`Copy`,paste:`Paste`,selectAll:`Select All`},database:{title:`Database`,create:`Create Database`,alter:`Alter Database`,drop:`Drop Database`,copy:`Copy Database`,compare:`Compare Schemas…`,truncate:`Truncate Database`,compareData:`Compare Data…`,groupBy:`Group and Count…`},table:{title:`Table`,create:`Create Table`,alter:`Alter Table`,drop:`Drop Table`,rename:`Rename Table`,truncate:`Truncate Table`,duplicateStructure:`Duplicate Table Structure`},export:{title:`Export`,csv:`Download to CSV`,tsv:`Download to TSV`,schemaHtml:`Schema to HTML`,links:`Export column links…`,importLinks:`Import column links…`},tools:{title:`Tools`,userManager:`User Manager`,processList:`Process List`,variables:`Variables`,status:`Status`,flush:`Flush`,quickCommand:`Quick Command`,viewErd:`View ERD`,scratchpad:`Scratchpad (in-browser SQLite)`,federated:`Federated query (join across connections)…`,federatedTab:`Federated {{n}}`,ai:`AI assistant`},messages:{databaseFileSaved:`Database file saved`,databaseExported:`Database exported as download`,databaseExportedWithReason:`Database exported as download — {{reason}}`,errorSavingDatabase:`Error saving database: {{message}}`,noDatabaseSelected:`No database selected`,noTableSelected:`No table selected`,noActiveConnection:`No active connection`,databaseDropped:`Database "{{database}}" dropped successfully`,errorDroppingDatabase:`Error dropping database: {{message}}`,noTablesInDatabase:`No tables found in database "{{database}}"`,databaseTruncated_one:`All {{count}} table in "{{database}}" truncated successfully`,databaseTruncated_other:`All {{count}} tables in "{{database}}" truncated successfully`,errorTruncatingDatabase:`Error truncating database: {{message}}`,tableDropped:`Table "{{table}}" dropped successfully`,errorDroppingTable:`Error dropping table: {{message}}`,tableTruncated:`Table "{{table}}" truncated successfully`,errorTruncatingTable:`Error truncating table: {{message}}`,renameTablePrompt:`Rename table "{{table}}" to:`,tableRenamed:`Table "{{table}}" renamed to "{{newName}}" successfully`,errorRenamingTable:`Error renaming table: {{message}}`,truncateDatabaseTitle:`Truncate all tables in "{{name}}"?`,truncateDatabaseDescription:`Every row in {{count}} table(s) of "{{name}}" will be deleted. Table structures are kept. This cannot be undone.`,truncateDatabaseConfirm:`Truncate all tables`,renameTableTitle:`Rename table`,renameTableConfirm:`Rename`,noLinksToExport:`No column links to export.`,linksExported:`Exported {{count}} column links.`,linksImported:`Imported {{count}} column links.`,linksImportedPartial:`Imported {{count}} column links; no matching profile for: {{profiles}}`,linksImportFailed:`Could not import column links: {{reason}}`}},about:{title:`About Planche`,tagline:`A database client for MySQL, MariaDB, PostgreSQL and SQLite.`,version:`Version`,website:`Website`,licenses:`Licenses`,licensesLink:`Third-party notices`,disclaimer:`Planche is provided "as is", without warranty of any kind. The authors are not liable for any damage or data loss arising from its use. Back up your data before running destructive statements.`,rights:`All rights reserved.`,legal:`Legal`,terms:`Terms`,privacy:`Privacy`,refund:`Refunds`},connection:JSON.parse('{"dialog":{"title":"Connect to Database","firstQueryTab":"Query 1","colHostName":"Host Name","colTarget":"Target","colDbms":"DBMS","noSaved":"No saved connections","unnamed":"(unnamed)","pickOnConnect":"(pick on connect)","noFile":"(no file)","selectPrompt":"Select a connection or add a new one","addNew":"Add New","delete":"Delete","testConnection":"Test Connection","connect":"Connect","close":"Close","unknownError":"Unknown error","browserTestHint":"In-browser SQLite connections open a local file when you click Connect.","testSuccess":"Connection successful","restoredUnsaved":"{{file}}: restored unsaved changes from the cached copy","restoredUnsavedDiskChanged":"{{file}}: restored unsaved changes from the cached copy — note the file on disk changed since","walPending":"{{file}} is in WAL mode: recent changes may still be in its -wal file. Use \\"Load -wal file\\" above to include them.","walApplied":"{{file}} opened with its -wal changes applied","connectFailedTitle":"Connection failed","testSuccessDescription":"The server accepted the credentials.","testFailedTitle":"Connection test failed","privacy":"Nothing you enter here is sent to or stored on planche.dev servers. Connection profiles live only in this browser\'s local storage; queries go straight from the local agent to your database.","hostKeyTitle":"Unknown SSH host key","hostKeyDescription":"{{host}}:{{port}} presented a {{type}} key with fingerprint {{fingerprint}}. Compare it with the fingerprint your server administrator gave you; accepting the wrong key lets an attacker read your traffic.","hostKeyAccept":"Trust this host","gatewayTitle":"Gateway profiles","gatewayAdd":"Add","gatewayAdded":"Added gateway profile {{name}}.","gatewayReadOnly":"read-only","gatewayWritable":"writable","gatewayProfileHint":"This connection uses the profile \\"{{name}}\\" held by the gateway; there is nothing to configure here.","gatewayLoadFailed":"Could not load the gateway profiles: {{error}}","export":"Export…","exportWithoutSecrets":"Without password","exportWithSecrets":"With password and keys","import":"Import…","exported":"Exported connection \\"{{name}}\\".","imported":"Imported connection \\"{{name}}\\".","importFailedTitle":"Could not import the connection"},"form":{"hostName":"Host Name","hostNamePlaceholder":"My Connection","dataSource":"Data Source","openVia":"Open Via","viaBrowser":"Browser (local file)","viaAgent":"Local agent","viaBrowserHint":"Nothing to install. Best for files no other program is using: the browser works on an in-memory copy and cannot lock the file, so edits made elsewhere while it is open are not seen and Save overwrites them.","viaAgentHint":"Opens the file with SQLite itself via npx planche — proper locking and WAL, safe alongside other programs using the same database.","databaseFile":"Database File","changeFile":"Change file","filePickerHint":"A file picker opens when you click Connect (tip: ⌘⇧. shows hidden files, ⌘⇧G lets you type a path).","fileRememberedHint":"The chosen file is remembered (Chromium) so reconnecting only asks for permission. Use Connection > Save Database File to write changes back.","authToken":"Auth Token","authTokenPlaceholder":"Leave empty to use the paired agent token","filePathPlaceholder":"/path/to/database.sqlite or :memory:","createIfMissing":"Create If Missing","createIfMissingHint":"Path is resolved on the tunneling server host","host":"Host","port":"Port","database":"Database","serviceName":"Service name","user":"User","password":"Password","savePassword":"Save password","savePasswordHint":"Off: the password is kept only for this browser session and never written to disk.","charset":"Charset","autoConnection":"Auto Connection","safety":"Safety","environment":"Environment","environmentHint":"tints the tab and workspace","readOnly":"Read-only","readOnlyHint":"Refuse statements that modify data or schema","transactions":"Transactions","txAuto":"Auto-commit","txManual":"Manual — Commit / Rollback from the toolbar","ssh":"SSH","sshTunnel":"SSH tunnel","sshTunnelHint":"Reach the database through an SSH jump host (opened by the local agent)","sshHost":"SSH Host","sshPort":"SSH port","sshUser":"SSH User","sshAuth":"SSH Auth","sshAuthKey":"Private key","sshAuthPassword":"Password","sshAuthAgent":"ssh-agent","sshAuthAgentHint":"Uses the keys loaded in the ssh-agent of the machine running npx planche (SSH_AUTH_SOCK).","sshPassword":"SSH Password","sshKey":"Private Key","sshKeyPick":"Choose key file…","sshKeyLoaded":"Key loaded","sshKeyHint":"Leave empty to use the IdentityFile from ~/.ssh/config (or ~/.ssh/id_*) on the agent\'s machine; a picked key is stored with this profile","sshPassphrase":"Passphrase","sshPassphrasePlaceholder":"Leave empty if the key has none","sshSecretsHint":"The SSH password, private key and passphrase follow the \\"Save password\\" setting above. Unknown host keys are shown for you to verify before the first connection and saved to ~/.planche/known_hosts on the agent\'s machine.","sshHostPlaceholder":"bastion.example.com or a Host alias from ~/.ssh/config","sshUserPlaceholder":"Leave empty to use ~/.ssh/config","sshTargetHint":"The database host and port are resolved on the jump host — use the database\'s real address (e.g. the RDS endpoint), not localhost or a local port forward.","connectionString":"Connection string","connectionStringApplied":"Applied to the fields below. The string itself is not saved — only the fields are.","connectionStringInvalid":"Not a PostgreSQL URI (expected postgresql://user:password@host/database).","neonHint":"Paste the URI from the Neon console (Connect > Connection string); the fields below are filled in from it.","supabaseHint":"Paste the URI from Supabase (Connect > Session pooler or Direct connection); the fields below are filled in from it.","supabasePoolerWarning":"Port 6543 is the transaction-mode pooler: each statement may run on a different backend, so switching schemas, temp tables, prepared statements and manual transactions do not work. Use the session pooler (port 5432) or the direct connection.","managedTlsHint":"TLS is always on for this service; the connection goes straight from the local agent to the service (no SSH tunnel).","d1AccountId":"Account ID","d1DatabaseId":"Database ID","d1ApiToken":"API Token","d1Hint":"Account ID: Cloudflare dashboard, right side of the account home. Database ID: Storage & Databases > D1 > your database. Token: My Profile > API Tokens > Create Token with the \\"D1 Edit\\" permission (or \\"D1 Read\\" for read-only). The local agent calls the Cloudflare API with it.","d1LimitsHint":"D1 runs each request on its own and auto-commits, so manual transactions are unavailable; the database appears as the single schema \\"main\\".","doDevUrl":"wrangler dev URL","doHint":"Start `wrangler dev` in your Worker project and paste the URL it prints (the port is 8787 unless you changed it). The local agent reads the Durable Objects of that session — including other `wrangler dev` sessions running at the same time.","doLimitsHint":"Local development only: deployed Durable Objects are reachable only from a Worker, so Cloudflare offers no API to query them. Each object appears as a database named \\"<namespace>/<object>\\"; every request auto-commits, so manual transactions are unavailable.","tls":"TLS","tlsEnable":"Encrypt the connection","tlsVerify":"Verify server certificate","tlsVerifyHint":"Off: self-signed certificates are accepted (encrypted, but the server is not authenticated). Not available over an SSH tunnel.","d1DevUrl":"Local dev URL","d1DevUrlHint":"Leave empty to use a Cloudflare account. Filled in, Planche reads the database that `wrangler dev` is running on this machine — no account and no API token, and the account fields below are ignored. Leave the Database ID empty when the dev server binds only one.","d1PickDatabase":"Pick a database"},"agent":{"copy":"Copy","looking":"Looking for the Planche agent…","online":"Agent <b>v{{version}}</b> is running at <mono>{{url}}</mono>","outdated":"Agent v{{version}} speaks protocol {{protocol}}, but this app needs a newer one. Restart it with <cmd/>","unauthorized":"Agent <b>v{{version}}</b> is running at <mono>{{url}}</mono>, but this app is not paired with it (the token changes on every start). Open the link printed in the agent\'s terminal, or paste the token under Configure.","offline":"No agent at <mono>{{url}}</mono>. Start it in a terminal — it opens this app already paired.","close":"Close","configure":"Configure","checkAgain":"Check again","urlLabel":"Agent URL","urlPlaceholder":"http://127.0.0.1:8888 (default)","tokenLabel":"Token","tokenPlaceholder":"Printed by the agent","reset":"Reset","save":"Save","remoteWarning":"This agent is not on your computer ({{host}}): every connection sends its passwords and SSH keys there.","remoteRefusedTitle":"Remote agent not allowed","remoteRefused":"The agent must run on this computer (127.0.0.1 or localhost). To use one on another machine, forward its port with `ssh -L 8888:127.0.0.1:8888 user@host` and keep the URL at http://127.0.0.1:8888.","gateway":"Gateway \\"{{name}}\\": {{count}} server-side profiles. Credentials stay on the gateway; pick a profile below."},"tab":{"noConnections":"No connections open. Press Connect to get started.","theSqliteFile":"the SQLite file","reopened":"Reopened {{file}}","reopenFailed":"Could not reopen file: {{message}}","reopenPrompt":"The browser needs your permission again to read <b>{{file}}</b>.","reopenFile":"Reopen file","closeConnection":"Close connection","reconnected":"Reconnected {{file}}","accessNotGranted":"File access was not granted; Save will export a download instead.","detachedPrompt":"Working on a cached copy of <b>{{file}}</b>. Reconnect the file to save changes in place.","reconnectFile":"Reconnect file","detachedHide":"Hide (Save will ask for the file when needed)","walFramesApplied_one":"Applied {{count}} WAL frame from {{file}}-wal","walFramesApplied_other":"Applied {{count}} WAL frames from {{file}}-wal","walNoChanges":"The -wal file had no committed changes","walLoadFailed":"Could not load -wal file: {{message}}","walPrompt":"<b>{{file}}</b> is in WAL mode: it may not show the latest data until its <mono>{{file}}-wal</mono> file is loaded, and saving is disabled until then. If no such file exists next to it (the database was closed cleanly), confirm that instead. If another program is still using this database, open it through the local agent (<mono>npx planche</mono>) instead: the browser cannot share the file safely.","loadWal":"Load -wal file","noWalHint":"I checked: there is no -wal file next to the database","noWal":"No -wal file","dismiss":"Dismiss","walHide":"Hide (saving stays disabled)","readOnlyBadge":"read-only"}}'),toolbar:{connect:`Connect (Alt+N)`,disconnect:`Disconnect`,newQueryTab:`New Query Tab (Alt+T)`,execute:`Execute (F9)`,executeStatement:`Execute statement at cursor / selection (Ctrl+Enter)`,commit:`Commit`,commitHint:`Commit the open transaction`,noOpenTransaction:`No open transaction`,rollback:`Rollback`,rollbackHint:`Discard the open transaction`,readOnlyBadge:`read-only`,readOnlyHint:`This connection refuses statements that modify data or schema`,userManager:`User Manager (Alt+U)`,quickCommand:`Quick Command`,processList:`Process List`,variables:`Variables`,status:`Status`,flush:`Flush`,fullscreen:`Fullscreen`},footer:{readOnly:`read-only`,txOpen:`tx open`,manualTx:`manual tx`},palette:{title:`Quick Command`,description:`Search for a command to run...`,inputPlaceholder:`Type a command or search...`,empty:`No commands found.`,groups:{connection:`Connection`,query:`Query`,database:`Database`,table:`Table`,tools:`Tools`},commands:{connect:`Connect`,disconnect:`Disconnect`,executeQuery:`Execute Query`,newQueryTab:`New Query Tab`,createDatabase:`Create Database`,dropDatabase:`Drop Database`,createTable:`Create Table`,alterTable:`Alter Table`,dropTable:`Drop Table`,processList:`Process List`,serverVariables:`Server Variables`,serverStatus:`Server Status`,flush:`Flush`,userManager:`User Manager`}},welcome:{title:`Welcome to Planche`,intro:`A SQL client that runs in your browser. Your databases are reached through a small agent on your machine, so credentials and data never leave your computer.`,skip:`Skip`,skipTitle:`Hide this screen (Help > Getting Started brings it back)`,copy:`Copy`,copied:`Copied`,sampleOpenFailed:`Could not open the sample database: {{message}}`,steps:{agent:{title:`Run the local agent`,body:`Run one of these in a terminal. It starts the agent and pairs it with this page.`},connection:{title:`Add a connection`,body:`Pick your database to open the connection form with the right defaults.`},sample:{title:`No database at hand? Try the sample`,body:`Load a sample web-shop database (24 tables, ~50k rows, views and triggers) into the browser to try the editor, grid and schema tree.`,loading:`Loading sample…`,button:`Try the sample database`}},terms:{title:`Before you start`,local:`Everything runs locally: credentials, queries and results stay on your machine and are never sent to us.`,asIs:`Planche is provided as is, without warranty. The safeguards (destructive confirms, read-only mode) are conveniences, not guarantees.`,dataLoss:`You are responsible for every statement executed through Planche. Back up your data before running anything destructive.`,agree:`I have read and agree to the Terms of Use.`,accepted:`You accepted the Terms of Use.`,readFull:`Read the full terms`}},schema:{treeLabel:`Schema`,unreachableHint:`Not the database this connection is bound to; create a profile for it to browse it`,objectType:{table:`Table`,view:`View`,procedure:`Procedure`,function:`Function`,trigger:`Trigger`,event:`Event`},menu:{showCreate:`Show Create {{type}}`,alter:`Alter {{type}}`,drop:`Drop {{type}}`,create:`Create {{type}}`,refresh:`Refresh`,unreachable:`Connect with a profile bound to this database to browse it`,openDatabase:`Open Database`,createSchema:`Create Schema…`,createTable:`Create Table`,dropDatabase:`Drop Database`,openSchema:`Open Schema`,dropSchema:`Drop Schema`,newQueryTab:`New Query Tab`,generateSql:`Generate SQL`,openTable:`Open Table`,alterTable:`Alter Table`,showCreateTable:`Show Create Table`,duplicateStructure:`Duplicate Structure`,copyTable:`Copy Table to…`,compare:`Compare {{type}}…`,truncateTable:`Truncate Table`,dropTable:`Drop Table`,exportCsv:`Export to CSV`,exportTsv:`Export to TSV…`,openView:`Open View`,alterView:`Alter View`,showCreateView:`Show Create View`,dropView:`Drop View`,compareData:`Compare Data…`,groupBy:`Group and Count…`},actions:{createStatementUnavailable:`-- Could not retrieve CREATE statement for {{type}} {{name}}`,getCreateFailed:`Failed to get CREATE {{type}}: {{message}}`,createTabTitle:`Create {{type}}`,createSchemaTabTitle:`Create Schema`,generateSqlFailed:`Could not generate SQL: {{message}}`,dropTableTitle:`Drop table "{{name}}"?`,dropTableDescription:`This permanently deletes the table and every row in it{{from}}. This cannot be undone.`,dropTableConfirm:`Drop table`,dropObjectTitle:`Drop {{type}} "{{name}}"?`,dropObjectDescription:`The {{type}} definition will be removed{{from}}. This cannot be undone.`,dropObjectConfirm:`Drop {{type}}`,fromDatabase:` from database "{{database}}"`,dropped:`Dropped {{type}} {{name}}`,dropFailed:`Failed to drop {{type}}`,dropDatabaseTitle:`Drop database "{{name}}"?`,dropDatabaseDescription:`This permanently deletes the database with all of its tables and data. This cannot be undone.`,dropDatabaseConfirm:`Drop database`,droppedDatabase:`Dropped database {{name}}`,dropDatabaseFailed:`Failed to drop database`,dropSchemaTitle:`Drop schema "{{name}}"?`,dropSchemaDescription:`This permanently deletes the schema with all of its tables and data. This cannot be undone.`,dropSchemaConfirm:`Drop schema`,droppedSchema:`Dropped schema {{name}}`,dropSchemaFailed:`Failed to drop schema`,truncateTitle:`Truncate table "{{name}}"?`,truncateDescription:`Every row in "{{name}}" will be deleted. The table structure is kept. This cannot be undone.`,truncateConfirm:`Truncate table`,truncated:`Truncated {{name}}`,truncateFailed:`Failed to truncate`},tree:{loadDatabasesFailed:`Failed to load databases: {{message}}`}},query:{editor:{destructiveMarker:`Destructive: {{action}} {{names}}`,readOnlyMarker:`Connection is read-only; this statement modifies data or schema`,actionExecute:`Execute (per settings)`,actionExecuteStatement:`Execute Statement at Cursor / Selection`,actionExecuteScript:`Execute Whole Script`,actionExplainPlan:`Explain Plan`,actionQueryStructure:`Query Structure`},tabs:{newQuery:`New Query`,queryTitle:`Query {{n}}`,erdViewer:`ERD Viewer`,close:`Close`,closeOthers:`Close Others`,closeLeft:`Close Tabs to the Left`,closeRight:`Close Tabs to the Right`,closeAll:`Close All`},executor:{noActiveConnection:`No active connection`,uncommittedTitle:`Uncommitted transaction`,uncommittedDescription:`This connection has an open transaction. Disconnecting will roll back its changes.`,uncommittedConfirm:`Rollback and disconnect`,unsavedTitle:`Unsaved changes`,unsavedDescription:`{{file}} has changes that were not saved to its file. Disconnecting discards them (use Connection > Save Database File first to keep them).`,theSqliteDatabase:`The SQLite database`,unsavedConfirm:`Discard and disconnect`}},result:JSON.parse('{"tabs":{"message":"Message","info":"Info","history":"History","result":"Result","resultN":"Result {{n}}","plan":"Plan","structure":"Structure","structureN":"Structure {{n}}"},"message":{"executing":"Executing query...","error":"Error: {{message}}","total":" (Total: {{ms}}ms)","ready":"Ready.","log":"Execution log","statementN":"Statement {{n}}","limitedBadge":"limit hit","insertId":"insert id {{id}}","failed":"Failed","failedStatement":"Failed statement","summary":"{{ok}} succeeded · {{failed}} failed · {{ms}} total","copy":"Copy","copied":"Copied","showSql":"Show SQL","hideSql":"Hide SQL"},"hints":{"title":"Hint","unknownColumn":"No column named {{name}} here. Did you mean {{suggestions}}?","unknownTable":"No table named {{name}} here. Did you mean {{suggestions}}?","syntaxSwap":"{{engine}} writes {{expected}} where this uses {{found}}.","doubleQuotedLiteral":"{{engine}} reads \\"{{value}}\\" as a column name, not text. Write \'{{value}}\' for a string."},"ai":{"title":"AI explanation","explain":"Explain with AI","thinking":"Reading the failure…","by":"by {{model}}","applyFix":"Open the fix in a new tab","failed":"Could not explain this: {{message}}","noFailure":"There is no failed statement to explain.","noPack":"The prompt could not be fetched from planche.dev.","badShape":"The model did not answer in the expected shape.","noPlan":"There is no plan to explain yet.","explainPlan":"Explain this plan"},"info":{"empty":"No query information available.","resultN":"Result {{n}}","metadata":"Query Metadata","executionTime":"Execution Time","notAvailable":"N/A","affectedRows":"Affected Rows","fields":"Fields","fieldDetails":"Field Details","colName":"Name","colType":"Type","colTable":"Table","resultSets":"Result Sets","rowsReturned":"Rows Returned","insertId":"Last Insert ID","lastQuery":"Last executed statement","copy":"Copy","copied":"Copied","colOrigin":"Origin","primaryKey":"Primary key","rowsAndFields":"{{rows}} rows × {{fields}} fields","noFields":"This statement returned no columns."},"rowForm":{"colColumn":"Column","colValue":"Value","insertTitle":"Insert row","editTitle":"Edit row","loading":"Loading columns...","preview":"Statement","nothingToWrite":"Nothing to write","insert":"Insert","update":"Update","stageInsert":"Add as pending row","stageEdit":"Apply to grid","stageHint":"Put the values in the grid without running anything; commit later with the other edits.","inserted":"Row inserted into {{table}}","updated":"Row updated in {{table}}","confirmInsertTitle":"Insert a row into {{table}}?","confirmUpdateTitle":"Update a row in {{table}}?","inTransaction":"Runs inside the open transaction","pickDate":"Pick a date","now":"Now","formatJson":"Format","binaryUnsupported":"Binary columns cannot be edited here; leave NULL / DEFAULT or set them with SQL.","generateUuid":"Generate UUID","defaultValue":"Default value","clickToChange":"Click to change","empty":"(empty)","autoHint":"Generated by the server","mode":{"keep":"Keep","auto":"Auto","value":"Value"},"invalid":{"integer":"Enter a whole number","unsigned":"This column does not accept negative numbers","number":"Enter a number","json":"Invalid JSON","date":"Use YYYY-MM-DD","datetime":"Use YYYY-MM-DD HH:MM:SS","time":"Use HH:MM:SS","length":"At most {{max}} characters"}},"history":{"copied":"Copied to clipboard","searchPlaceholder":"Search history...","all":"All","success":"Succeeded","failed":"Failed","thisTab":"This tab only","noMatch":"No entries match.","count":"{{count}} entries","clear":"Clear","clearTitle":"Clear query history?","clearDescription":"All {{count}} entries for this connection will be removed. This cannot be undone.","clearConfirm":"Clear history","insert":"Insert into editor","inserted":"Inserted into the editor","copy":"Copy","rows":"{{count}} rows","affected":"{{count}} affected","today":"Today","yesterday":"Yesterday","empty":"No query history."},"json":{"arrayLength":"Array[{{count}}]","keys_one":"{{count}} key","keys_other":"{{count}} keys","invalid":"Invalid JSON","clickToView":"Click to view JSON","expandAll":"Expand all","collapseAll":"Collapse all","edit":"Edit","view":"View","copied":"Copied","copy":"Copy","shortcutHint":"{{mod}}+Enter to save · Esc to cancel","cancel":"Cancel","save":"Save"},"text":{"clickToView":"Click to view text","size":"{{chars}} chars · {{lines}} lines","wrap":"Wrap"},"grid":{"readOnlyConnection":"Read-only connection","readOnlyWal":"Read-only: -wal file not loaded","readOnlyNoPk":"Read-only: table has no primary key","commitTitle":"Commit {{count}} change(s) to {{table}}?","commitDescription":"The following statements will be executed.","commitConfirm":"Commit","rowPrefix":"Row {{row}}:","cancelled":"cancelled","commitFailed":"Commit failed: {{message}}","executedInTransaction":"Executed {{count}} change(s) inside the open transaction — press Commit in the toolbar to make them permanent (reloading rolls them back)","committed":"Committed {{count}} change(s) to {{table}}","noData":"No data to display.","commit":"Commit","discard":"Discard","addRow":"Add row","removeNewRow":"Cancel this new row","addRowForm":"Add with form","addRowFormHint":"Open a form with an input per column (committed as INSERT)","editRowForm":"Edit this row in a form","addRowHint":"Add a new row (committed as INSERT)","delete":"Delete","deleteCount":"Delete ({{count}})","deleteHint":"Delete the selected rows (committed as DELETE). Select rows with the row-number column.","field":"Field","searchPlaceholder":"Search...","orderBy":"Order by","none":"None","refresh":"Refresh","dismiss":"Dismiss","clearSelection":"Clear selection","columns":"Columns","showAllColumns":"Show all","hideAllColumns":"Hide all","resetWidths":"Reset widths","selectAll":"Select all rows","emptyTable":"This table has no rows.","noRows":"No rows returned.","addARow":"Add a row","markedForDeletion":"Marked for deletion — click to restore","newRow":"New row","clickToSelect":"Click to select; Shift/Ctrl for multiple","rows":"Rows: {{count}}","rowsWithNew":"Rows: {{count}} (+{{added}})","sortedBy":"Sorted by: {{column}} {{direction}}","pageRange":"Rows {{from}}–{{to}}","firstPage":"First page","prevPage":"Previous page","nextPage":"Next page","lastPage":"Last page","pagingBlocked":"Commit or discard your changes before changing page","selected":"{{count}} selected","cellsModified":"{{count}} cell(s) modified","newCount":"{{count}} new","toDelete":"{{count}} to delete","searchMode":"Match mode","contains":"contains","equals":"equals","followLink":"Open {{table}} where {{column}} = value","linkColumn":"Link \\"{{column}}\\" to another table…","editLink":"Edit link of \\"{{column}}\\"…","removeLink":"Remove link","copyValue":"Copy value","filterByValue":"Filter: {{column}} = this value","clearFilter":"Clear filter","copyColumnName":"Copy column name","editCell":"Edit cell","setNull":"Set NULL","setEmpty":"Set empty string","restoreRow":"Restore row","hideColumn":"Hide column \\"{{column}}\\"","copyRowsTsv_one":"Copy row as TSV (with header)","copyRowsTsv_other":"Copy {{count}} rows as TSV (with header)","copyRowsCsv_one":"Copy row as CSV","copyRowsCsv_other":"Copy {{count}} rows as CSV","copyRowsJson_one":"Copy row as JSON","copyRowsJson_other":"Copy {{count}} rows as JSON","copyRowsInsert_one":"Copy row as INSERT","copyRowsInsert_other":"Copy {{count}} rows as INSERT","deleteRowsPending_one":"Delete row (pending until Commit)","deleteRowsPending_other":"Delete {{count}} rows (pending until Commit)","sendRowsToScratchpad_one":"Send row to scratchpad","sendRowsToScratchpad_other":"Send {{count}} rows to scratchpad","sendAllToScratchpad":"Send all {{count}} loaded rows to scratchpad","sentToScratchpad":"{{count}} rows copied into scratchpad table {{table}}.","changesSince":"Since last load: {{changed}} changed · {{added}} new · {{gone}} gone","changesToggle":"Toggle highlighting of what changed since the previous load","changesDismiss":"Forget these changes","previousValue":"Previous value: {{value}}","groupByValue":"Group and count by {{column}}"},"link":{"title":"Link column to another table","source":"Column","hint":"Values of this column become links: clicking one opens the target table filtered to the matching row(s). Real foreign keys are linked automatically.","targetDatabase":"Target database","targetTable":"Target table","targetColumn":"Target column","pickTable":"Choose a table","pickColumn":"Choose a column","remove":"Remove link","cancel":"Cancel","save":"Save link","targetConnection":"Target connection","targetNotConnected":"The linked connection is not open. Connect it first."},"running":{"label":"Querying…","elapsed":"{{seconds}}s","stop":"Stop","stopping":"Stopping…","cannotCancel":"This engine cannot interrupt a statement once it is running.","agentOutdated":"The local agent is too old to stop a query. Update it with `npx planche@latest` (or `planche upgrade`) and reconnect.","cancelFailed":"The agent could not be reached to stop the query.","abandoned":"Stopped waiting for the request. This engine has no cancel of its own, so the query may still finish upstream."},"plan":{"empty":"Run Explain Plan (Ctrl+Shift+E) to see how the engine will execute the statement at the cursor.","unreadable":"The plan could not be read as a tree; the engine output is shown as-is.","estimated":"Estimated","analyzed":"Measured","estimatedHint":"The planner’s estimates. The statement was not executed.","analyzedHint":"The statement was executed; row counts and timings are real.","totalCost":"Highest node cost","totalTime":"Slowest node","rows":"Estimated rows","actualRows":"Actual rows","cost":"Cost","time":"Time","showRaw":"Raw output","showTree":"Plan tree","selectNode":"Select a node to see what the engine reported about it.","noDetails":"The engine reported nothing else about this node.","warnings":{"fullScan":"Full scan","noIndex":"No index","estimateOff":"Estimate off","temporary":"Temp table","filesort":"Sort"},"hints":{"fullScan":"Every row of the table is read. An index on the filtered columns would avoid it.","noIndex":"The engine found no usable index for this access.","estimateOff":"The planner expected a very different number of rows. Refreshing table statistics often fixes the plan.","temporary":"Rows are materialized into a temporary table before the next step.","filesort":"Rows are sorted outside an index. An index matching the ORDER BY would remove the sort."}},"structure":{"empty":"Show Query Structure (Ctrl+Shift+G) to see where the rows of the statement at the cursor come from.","notQuery":"Only SELECT statements have a structure graph.","unsupported":"{{engine}} statements cannot be read as a structure graph.","parseError":"The statement could not be parsed: {{message}}","columns_one":"{{count}} column","columns_other":"{{count}} columns","columnsUnknown":"width unknown","fit":"Fit","reveal":"Select this in the editor","notDrawn":"Not drawn: {{what}}","kindTable":"TABLE","kindCte":"CTE","kindCteRef":"REF","kindDerived":"SUBQUERY","kindScalar":"SCALAR","kindSetop":"SET","kindResult":"RESULT","fullscreen":"Fullscreen","exitFullscreen":"Exit fullscreen"}}'),confirm:{defaultDescription:`This action cannot be undone.`,typeToConfirm:`Type <name/> to confirm`,cancel:`Cancel`,confirm:`Confirm`,ok:`OK`},table:{dialog:{createTitle:`Create Table`,alterTitle:`Alter Table`,duplicateTitle:`Duplicate Table Structure`,create:`Create`,alter:`Alter`,cancel:`Cancel`,tableName:`Table Name`,tableNamePlaceholder:`Enter table name...`,loading:`Loading table schema...`,tabSchema:`Schema`,tabIndexes:`Indexes`,tabProperties:`Properties`,applying:`Applying…`,cannotAlterColumns:`{{engine}} cannot change a column that already exists ({{columns}}). Adding, dropping and renaming columns and changing indexes all work; to change a column definition, recreate the table.`},schema:{colField:`Field Name`,colType:`Datatype`,colLength:`Length`,colDefault:`Default`,colPk:`PK`,colNotNull:`Not Null`,colUnsigned:`Unsigned`,colAutoIncrement:`Auto Incr`,colZerofill:`Zerofill`,colComment:`Comment`,empty:`No columns defined. Click "Add Column" to add one.`,add:`Add Column`,remove:`Remove Column`},indexes:{colName:`Index Name`,colType:`Index Type`,colColumns:`Columns`,empty:`No indexes defined. Click "Add Index" to add one.`,add:`Add Index`,remove:`Remove Index`},index:{addTitle:`Add Index`,editTitle:`Edit Index`,name:`Index Name`,namePlaceholder:`Enter index name`,type:`Index Type`,columns:`Columns`,noColumns:`No columns available. Define columns in the Schema tab first.`,unnamed:`(unnamed)`,cancel:`Cancel`,ok:`OK`},properties:{engine:`Engine`,charset:`Charset`,collation:`Collation`,autoIncrement:`Auto Increment`,autoIncrementPlaceholder:`Default`,comment:`Comment`},info:{engine:`Engine`,version:`Version`,rowFormat:`Row Format`,rows:`Rows`,avgRowLength:`Avg Row Length`,dataLength:`Data Length`,createTime:`Create Time`,updateTime:`Update Time`,collation:`Collation`,comment:`Comment`},copy:{title:`Copy Table`,source:`Source`,targetConnection:`Target connection`,targetDatabase:`Target database`,targetTable:`Target table name`,what:`Copy`,structureAndData:`Structure & data`,structureOnly:`Structure only`,ifExists:`If the target table exists`,abort:`Abort (default)`,dropAndRecreate:`Drop and recreate (asks to retype the name)`,preview:`CREATE TABLE on the target (editable)`,crossEngineHint:`The target is {{engine}}: review the types below, MySQL-specific attributes were dropped.`,readOnly:`read-only`,loading:`Loading…`,progressCreate:`Creating table…`,progressCount:`Counting rows…`,progressRows:`Copied {{copied}} of {{total}} rows`,progressDone:`Done`,doneTitle:`Table copied`,doneRows:`{{count}} rows copied into {{table}}.`,doneStructure:`Structure of {{table}} created.`,noColumns:`The source table has no columns.`,exists:`Table {{table}} already exists in the target. Choose another name or "Drop and recreate".`,dropTitle:`Drop existing table {{table}}?`,dropDescription:`The target table and all of its rows will be dropped before the copy. This cannot be undone.`,dropConfirm:`Drop and copy`,cancelled:`Copy cancelled.`,stop:`Stop`,cancel:`Cancel`,copy:`Copy`}},database:{copy:{title:`Copy Database`,source:`Source Database`,target:`Target Database Name`,targetPlaceholder:`Enter target database name`,options:`Options`,structureAndData:`Structure & Data`,structureOnly:`Structure Only`,cancel:`Cancel`,copy:`Copy`,creating:`Creating {{database}}…`,copying:`Copying {{table}} ({{index}} of {{total}})…`},diff:{title:`Compare Schemas`,source:`Source`,target:`Target`,pickConnection:`Connection`,pickDatabase:`Database`,crossEngineHint:`Different engines: type names differ by dialect, so most columns will show a type change.`,sameSide:`Source and target are the same database.`,summary:`{{changed}} changed, {{missingTarget}} missing in target, {{missingSource}} only in target, {{identical}} identical`,showIdentical:`Show identical tables`,identicalAll:`The tables are identical.`,column:`Column`,index:`Index`,object:`Object`,selectTable:`Select a table to see its differences.`,missingInTarget:`{{table}} does not exist in the target; the script creates it.`,missingInSource:`{{table}} exists only in the target; the script drops it (commented out unless DROPs are included).`,includeDrops:`Include DROP statements as live SQL (default: commented out)`,tabTitle:`Sync {{database}}`,close:`Close`,compare:`Compare`,comparing:`Comparing…`,openScript:`Open script in editor`,noDefinition:`No CREATE statement available`},create:{title:`Create Database`,name:`Database Name`,namePlaceholder:`Enter database name`,charset:`Character Set`,collation:`Collation`,cancel:`Cancel`,create:`Create`},csv:{title:`Download to {{format}}`,target:`Target`,targetQueryResult:`Current Query Result`,targetTableData:`Table Data`,tableName:`Table Name`,tableNamePlaceholder:`Enter table name`,delimiter:`Delimiter`,delimiterComma:`Comma (,)`,delimiterTab:`Tab (\\t)`,delimiterSemicolon:`Semicolon (;)`,delimiterPipe:`Pipe (|)`,includeHeaders:`Include Headers`,cancel:`Cancel`,download:`Download`,downloading:`Downloading...`,progress:`{{loaded}} of {{total}} rows written`,progressUnknown:`{{loaded}} rows written`,stop:`Stop`,done:`Exported {{count}} rows of {{table}} to {{format}}.`,database:`Database`,databasePlaceholder:`Choose a database`},html:{title:`Schema to HTML`,database:`Database`,selectDatabase:`Select database`,tables:`Tables to Include`,selectAll:`Select All`,deselectAll:`Deselect All`,noTables:`No tables available.`,include:`Include`,includeColumns:`Columns`,includeIndexes:`Indexes`,includeProperties:`Properties`,cancel:`Cancel`,generate:`Generate`,generating:`Generating...`,sectionColumns:`Columns`,sectionIndexes:`Indexes`,sectionProperties:`Properties`,docTitle:`Schema: {{database}}`,heading:`Database: {{database}}`,summary:`Tables: {{count}} | Generated: {{date}}`,footer:`Generated by Planche 2026`},dataDiff:{title:`Compare Data`,pickTable:`Table`,hint:`Rows are matched by the source table's primary key and compared as text. Up to {{cap}} rows per side are loaded; narrow big tables with a filter first.`,sameSide:`Source and target are the same table.`,noPrimaryKey:`{{table}} has no primary key; the comparison needs one to match rows.`,keyMissingInTarget:`The target table lacks the key column(s): {{columns}}`,summary:`Key: {{key}} — {{added}} missing in target, {{changed}} different, {{removed}} only in target, {{identical}} identical`,capped:`Only the first {{cap}} rows of each side were compared.`,ignoredColumns:`Columns ignored (one side only): {{columns}}`,added_one:`{{count}} missing in target`,added_other:`{{count}} missing in target`,changed_one:`{{count}} different`,changed_other:`{{count}} different`,removed_one:`{{count}} only in target`,removed_other:`{{count}} only in target`,none:`Nothing in this group.`,more:`… {{count}} more not listed`,includeDeletes:`Include DELETE statements as live SQL (default: commented out)`,tabTitle:`Sync data {{table}}`,loading:`Loading rows — source: {{source}}, target: {{target}}`},schema:{createTitle:`Create Schema`,name:`Schema name`,namePlaceholder:`Enter schema name`,create:`Create`,cancel:`Cancel`},groupBy:{title:`Group and Count`,description:`Count rows of {{table}} by the columns you pick.`,columns:`Group by`,aggregate:`Extra aggregate`,countOnly:`Count only`,column:`Column`,minCount:`Minimum rows per group`,useFilter:`Apply the grid's current filter`,noIndexWarning:`No grouped column leads an index, so the database has to read and sort the whole table. On a large table that can take a while.`,preview:`Query`,pickColumn:`Pick at least one column to group by.`,openInTab:`Open in new tab`,run:`Run`,tabTitle:`Group {{table}}`,indexed:`Leads an index`,connection:`Connection`,database:`Database`,table:`Table`}},user:{manager:{title:`User Manager`,addUser:`Add User`,removeUser:`Remove User`,noUsers:`No users loaded`,grantScope:`Grant Scope`,apply:`Apply`,close:`Close`,removed:`User '{{user}}'@'{{host}}' removed`,selectUserFirst:`Please select a user first`,applied:`Changes applied successfully`,noChanges:`No privilege changes to apply.`},add:{title:`Add User`,username:`Username`,usernamePlaceholder:`Enter username`,host:`Host`,password:`Password`,passwordPlaceholder:`Enter password`,confirmPassword:`Confirm Password`,confirmPasswordPlaceholder:`Confirm password`,plugin:`Plugin`,cancel:`Cancel`,add:`Add`,usernameRequired:`Username is required`,passwordMismatch:`Passwords do not match`,added:`User '{{user}}'@'{{host}}' added`},privileges:{globalTitle:`Global Privileges`,databaseTitle:`Database Privileges`,tableTitle:`Table Privileges`,checkAll:`Check All`,uncheckAll:`Uncheck All`,categoryData:`Data`,categoryStructure:`Structure`,categoryAdministration:`Administration`},grantTree:{globalPrivileges:`Global Privileges`}},command:{close:`Close`,noActiveConnection:`No active connection`,variableName:`Variable Name`,value:`Value`,scope:{session:`Session`,global:`Global`},findReplace:{findPlaceholder:`Find`,replacePlaceholder:`Replace`,found:`{{count}} found`,noResults:`No results`,previous:`Previous`,next:`Next`,close:`Close`,replace:`Replace`,all:`All`,caseSensitive:`Case Sensitive`,regex:`Regex`,wholeWord:`Whole Word`},flush:{title:`Flush`,executed:`Executed: {{command}}`,executeError:`Error executing {{command}}: {{message}}`},localHistory:{title:`Local History`,description:`Versions of the editor text for this connection: on each run, after a pause in typing, and when a tab is closed.`,empty:`No versions recorded yet.`,noMatch:`No version matches this search.`,notPersisted:`“Keep query history across reloads” is off in Settings > Safety, so versions are kept for this session only.`,searchPlaceholder:`Search versions`,scopeTab:`This tab`,scopeAll:`All tabs`,compareCurrent:`vs current`,comparePrevious:`vs previous`,diffAgainstCurrent:`Compared with the current editor text`,diffAgainstPrevious:`Compared with the version from {{time}}`,noPrevious:`No earlier version of this tab to compare with`,restored:`Editor content restored from local history`,restore:`Restore this version`,openInNewTab:`Open in new tab`,openedInTab:`Version opened in a new tab`,delete:`Delete this version`,clearAll:`Clear history`,chars:`{{count}} chars`,reason:{execute:`before run`,edit:`while editing`,replaced:`before overwrite`,restore:`before restore`,close:`before close`}},processList:{title:`Process List`,refresh:`Refresh`,autoRefresh:`Auto-refresh`,empty:`No processes to display`,kill:`Kill`,killProcess:`Kill Process`,selectToKill:`Please select a process to kill`,killed:`Process {{id}} killed successfully`,killError:`Error killing process: {{message}}`,loadError:`Error loading process list: {{message}}`,updatedAt:`updated {{time}}`,filterPlaceholder:`Filter by user, host, db, SQL...`,hideIdle:`Hide idle`,noMatch:`No processes match the filter`,self:`me`,selfHint:`This is Planche's own session`,statementOf:`Statement of #{{id}}`,noStatement:`No statement`,copy:`Copy`,copied:`Copied`,killConfirmTitle:`Kill process {{id}}?`,killConfirmDescription:`The session of {{user}}@{{host}} will be terminated and its running statement aborted. An open transaction is rolled back.`,stats:{total:`Total`,active:`Active`,idle:`Idle`,longest:`Longest running`},columns:{id:`Id`,user:`User`,host:`Host`,db:`db`,command:`Command`,time:`Time`,state:`State`,info:`Info`,action:`Action`}},status:{title:`Server Status`,filterPlaceholder:`Filter status variables...`,empty:`No status variables to display`,loadError:`Error loading status: {{message}}`},variables:{title:`Server Variables`,filterPlaceholder:`Filter variables...`,empty:`No variables to display`,loadError:`Error loading variables: {{message}}`}},erd:{empty:{title:`Open a Prisma schema file (.prisma) to view the ERD`,description:`Models, enums, and relations will be automatically analyzed`,openFile:`Open .prisma File`,dropHint:`or drag and drop a file onto this area`},entity:{enumBadge:`ENUM`,modelBadge:`MODEL`,columns:{value:`Value`,comment:`Comment`,type:`Type`,column:`Column`},linkBadge:`LINK`,externalTitle:`Linked table on {{location}} (column link, not a real foreign key)`,nullable:`Nullable column`},toolbar:{refresh:`Refresh`,zoomIn:`Zoom In`,zoomOut:`Zoom Out`,resetView:`Reset View`,center:`Center`,fitAll:`Fit All`,spreadAll:`Untangle`,resetLayout:`Reset Layout`,legendOneToMany:`1:N (FK)`,tables:`Tables:`,relations:`Relations:`,columns:`Columns:`,fullscreen:`Fullscreen`,exitFullscreen:`Exit fullscreen`},viewer:{noServerConnection:`No active server connection`,loading:`Loading schema from {{database}}...`,loadFailed:`Failed to load ERD`,noDatabase:`No database selected.`,selectDatabaseHint:`Select a database in the Schema Tree, then open View ERD.`}},services:{runAnyway:`Run anyway`,query:{rowsReturned:`{{count}} row(s) returned`,rowsAffected:`{{count}} row(s) affected`,rowsReturnedLimited:`{{count}} row(s) returned (limited to {{limit}}; add LIMIT to fetch more)`,notConnected:`Not connected`,fileNotOpen:`The SQLite file is not open yet — click "Reopen file" above to grant access again.`,failed:`Query failed`,nothingToExecute:`Nothing to execute`,dryRunMismatch:`Dry run expected {{predicted}} rows, {{actual}} were changed. The data may have changed since the preview was read; if it did not, the preview did not match this statement.`},destructive:{title_one:`Run destructive statement?`,title_other:`Run {{count}} destructive statements?`,description:`The following will permanently modify or delete data. This cannot be undone.`,unknownTarget:`(unknown)`,deleteAll:`DELETE all rows from {{target}}`,updateAll:`UPDATE all rows in {{target}}`,alterDrop:`DROP COLUMN/PARTITION on {{target}}`},readOnly:{refused:`Connection "{{label}}" is read-only. {{count}} statement(s) would modify data or schema.`,title:`"{{label}}" is read-only`,description:`These statements modify data or schema. Run them on this connection anyway?`},transaction:{startFailed:`Could not start transaction`,started:`Transaction started — Commit or Rollback when done`,implicitCommit:`{{kind}} caused an implicit COMMIT of the open transaction`,committed:`Transaction committed`,rolledBack:`Transaction rolled back`,commandFailed:`{{name}} failed`,commandFailedWith:`{{name}} failed: {{message}}`},save:{notBrowserSqlite:`Not a browser SQLite connection.`,inMemory:`In-memory database: it can only be exported as a download.`,noFileSystemAccess:`This browser has no File System Access API (Chrome/Edge only): the database is exported as a download instead of written in place.`,noWritableHandle:`The file was opened without a writable handle: it is exported as a download.`},agent:{devProxyUrl:`{{url}} (via dev proxy)`,notPlanche:`Something answered, but it is not a Planche agent`,unreachable:"Planche agent unreachable at {{url}} — run `npx planche` ({{message}})",httpError:`HTTP error: {{status}} {{statusText}}`,emptyResponse:`Tunneling server returned an empty response`,reconnected:`Reconnected to {{name}} — the agent had dropped the connection (restart or idle timeout).`},sample:{profileName:`Sample shop (in-browser)`,downloadFailed:`Could not download the sample database ({{status}})`,tabTitle:`Query 1`},sqliteFile:{tooSmall:`File is too small to be a SQLite database.`,notSqlite:`Not a SQLite database (or an encrypted one, e.g. SQLCipher). The 16-byte header does not read "SQLite format 3".`,badPageSize:`Corrupt SQLite header: invalid page size {{size}}.`,unreadable:`SQLite could not read the file: {{message}}`,pickerDescription:`SQLite database`,walNotLoaded:`This database is in WAL mode and its -wal file was not loaded. Load it, or confirm in the banner that no -wal file exists, before saving.`,changedOnDisk:`{{name}} changed on disk after it was loaded (another program wrote to it). Saving would overwrite those changes — reopen the file and redo your edits, or use the tunneling server.`,walHasChanges:`{{name}}-wal contains new changes; load it before saving.`,walChangedOnDisk:`{{name}}-wal was written by another program after it was loaded; reopen the file before saving.`,writeDenied:`Write access to {{name}} was not granted. Allow it in the browser prompt, or export as a download instead.`},environment:{none:`None`,green:`Green (dev)`,blue:`Blue`,yellow:`Yellow (staging)`,orange:`Orange`,red:`Red (production)`,purple:`Purple`},scratchpad:{profileName:`Scratchpad`,namePromptTitle:`Scratchpad table name`,namePromptDescription:`A table named {{table}} already exists in the scratchpad. Choose another name.`,nameTaken:`Table {{table}} already exists.`},federated:{pulling:`Pulling {{table}} from {{connection}}…`,capped:`{{table}}: only the first {{limit}} rows were pulled.`,templateLine1:`Reference a table of any open connection as "Connection name".database.table; it is copied into this scratchpad before the statement runs.`,templateLine2:`Tables are capped at {{limit}} rows. The query itself runs in SQLite (in your browser).`,templateConnections:`Open connections: {{names}}`,templateNone:`No other connection is open yet. Connect one, then reference it here.`,done:`Pulled {{rows}} rows from {{tables}} remote tables into the scratchpad.`,pullingProgress:`Pulling {{table}} from {{connection}}: {{loaded}} / {{total}} rows…`},paged:{noColumns:`{{table}} has no columns.`,cancelled:`Cancelled.`}},terms:{title:`Terms of Use`,version:`Version {{version}}`,englishOnly:`The terms are provided in English. The summary on the welcome screen is available in your language.`,privacyLink:`Privacy policy`,refundLink:`Refund policy`,online:`Read on planche.dev`,updated:`Last updated {{date}}`},dryRun:{title:`{{kind}} would affect {{count}} rows`,titleUnknown:`{{kind}} — affected rows unknown`,description:`These are the rows the statement would touch right now, read with a SELECT. Nothing has been written yet.`,previewFailed:`The preview query failed: {{error}}
2
- You can still run the statement.`,noRows:`No rows match — the statement would change nothing.`,truncated:`Showing the first {{shown}} of {{count}} rows.`,previewQuery:`Preview query`,run:`Run {{kind}} ({{count}} rows)`,runAnyway:`Run anyway`},pro:{badge:`PRO`,tooltip:`Requires a Pro licence.`,noticeTitle:`Pro features`,notice:`Features marked PRO need a Pro licence.`,licenseTitle:`Planche Pro`,licenseDescription:`Paste the licence key from your purchase email. It is checked on this computer; nothing is sent anywhere.`,blocked:`{{feature}} needs a Pro licence.`,keyLabel:`Licence key`,activate:`Activate`,remove:`Remove licence`,active:`Pro is active.`,licensedTo:`Licensed to {{email}}`,validUntil:`Valid until {{date}}`,expiredOn:`This licence ran out on {{date}}. Renew it to keep using Pro features.`,invalidKey:`That is not a Planche licence key.`,notConfigured:`This build cannot check licence keys. Please report it.`,noWebcrypto:`This browser cannot check licence keys.`,pricing:`See pricing`,features:{ssh_tunnel:`SSH tunnels`,compare_schemas:`Compare Schemas`,compare_data:`Compare Data`,copy_table:`Copy Table`,dry_run:`Dry run`,federated:`Federated queries`,scratchpad:`Scratchpad`,column_link:`Column links`,sync:`Connection sync`,ai_explain:`AI explanations`},included:`Pro includes`,haveKey:`Already have a licence key?`,perMonth:`/ month`,priceNote:`Billed {{annual}} once a year. Month to month is {{monthly}}.`,featureDetails:{sync:`Your profiles on every computer, encrypted in the browser before they leave it`,ssh_tunnel:`Reach a database behind a jump host with a password, a key or ssh-agent`,compare_schemas:`Diff two open connections and get the ALTER script`,compare_data:`Diff rows between two tables and get the INSERT and UPDATE script`,copy_table:`Rebuild a table on another connection, or another engine`,dry_run:`See how many rows an UPDATE or DELETE changes, and which, before it runs`,federated:`Join tables that live in different connections`,scratchpad:`A local SQLite database for working data`,column_link:`Virtual foreign keys you can follow in the grid`,ai_explain:`Ask a model why a statement failed, or why a plan is slow — with your schema attached`}},install:{npxNote:`Needs Node.js 22 or newer. Nothing is installed permanently — npx runs the agent straight from the npm registry.`,installNote:`No Node.js needed. It installs under your home directory without an administrator; afterwards the planche command starts it any time.`},explain:{unsupported:`{{engine}} does not report query plans.`,oneStatement:`Explain works on one statement at a time. Put the cursor in the statement to explain, or select it.`},ai:{title:`AI assistant`,intro:`Ask for a query, or tell it what to do — it reads the schema, writes SQL into a tab and runs it. It works on the connection you have open, and each one keeps its own conversation.`,privacy:`What the tools read — including sample rows — is sent to your provider. Nothing reaches planche.dev.`,placeholder:`e.g. build a monthly revenue query on the demo database`,send:`Send`,stop:`Stop`,clear:`New conversation`,working:`Working…`,tabTitle:`AI query`,approvalTitle:`This one writes. Run it?`,approve:`Run`,reject:`Skip`,rejected:`The user declined to run this.`,notConfigured:`No AI key is set on the agent. Add one in Settings ▸ AI.`,needsAgent:`This local agent cannot run tools yet. Update it and pair again.`,failed:`Failed`,empty:`Nothing asked yet.`,steps:`{{count}} steps`,tooManySteps:`Stopped after {{count}} steps without reaching an answer.`,collapse:`Collapse`,planWarningTitle:`That query is a full scan. Run it anyway?`,interrupted:`Interrupted by a reload.`,external:`Asked for from outside Planche`},mcp:{title:`Connect an AI agent (MCP)`,description:`Let an AI agent that speaks MCP use Planche's tools.`,readsLabel:`Reads`,reads:`It reads the open database, and the results go to that program.`,writesLabel:`Writes`,writes:`A statement that writes data needs your approval. DROP and TRUNCATE it cannot run.`,needsLabel:`Needs`,needs:`The AI panel has to be open.`,tokenLabel:`Token`,token:`One token, shared by every program you give it to. Revoking it disconnects them all.`,command:`Add to Claude Code`,json:`Configure by hand`,stored:`Stored at {{path}}.`,revoke:`Revoke token`,revoked:`Revoked. Open this again to issue a new one.`},sync:{title:`Connection sync`,description:`Your connection profiles, encrypted in this browser and kept on planche.dev so your other computers can use them.`,stored:`The service stores one encrypted blob. It cannot read your hosts, users, passwords or SSH keys.`,unavailable:`Sync runs on planche.dev only. This copy of Planche is served by your local agent, which is not allowed to reach out to the internet.`,signIn:`Sign in with GitHub`,signedInAs:`Signed in as {{email}}`,signOut:`Sign out`,createTitle:`Choose a passphrase`,createHint:`This passphrase is what encrypts your profiles. It never reaches the server, so if you lose it the stored copy cannot be recovered — only re-created from a computer that still has your profiles.`,passphrase:`Passphrase`,confirm:`Confirm passphrase`,mismatch:`The two passphrases do not match.`,tooShort:`Use at least {{count}} characters.`,enable:`Turn on sync`,unlockTitle:`Unlock your profiles`,unlockHint:`Enter the passphrase you chose when you turned sync on.`,unlock:`Unlock`,wrongPassphrase:`Wrong passphrase, or the stored copy is damaged.`,syncNow:`Sync now`,lastSynced:`Last synced {{when}}`,neverSynced:`Not synced yet`,profiles_one:`{{count}} profile`,profiles_other:`{{count}} profiles`,changePassphrase:`Change passphrase`,deleteVault:`Delete from server`,deleteVaultConfirm:`Remove the encrypted copy from planche.dev? The profiles on this computer are not touched.`,offline:`Cannot reach planche.dev.`,working:`Working…`,serverError:`planche.dev could not complete that. Try again in a moment.`,signInShort:`Sign in`,needsPro:`You are signed in. Syncing your profiles needs a Pro licence — it starts working as soon as you have one.`,deleteAccount:`Delete account`,deleteAccountConfirm:`Delete your account? The stored copy and your sign-in go with it. The profiles on this computer are not touched.`,notDeployed:`Connection sync is not switched on for this site yet.`},desktop:{closeTitle:`Close Planche?`,closeDescription:`There is unsaved work: an open transaction, uncommitted edits or a running query. Closing discards it and rolls back.`,closeAnyway:`Close anyway`}},ae=`modulepreload`,Y=function(e){return`/`+e},X={},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Y(t,n),t=s(t),t in X)return;X[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ae,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Q=[`en`,`ko`,`zh`,`ja`,`de`,`fr`];function $(e=navigator.languages??[navigator.language]){for(let t of e){let e=t.toLowerCase().split(`-`)[0];if(Q.includes(e))return e}return`en`}function oe(e){return e===`auto`?$():e}var se={ko:()=>Z(()=>import(`./BHsXOlR9.js`),[]),zh:()=>Z(()=>import(`./zspOy9D_.js`),[]),ja:()=>Z(()=>import(`./p4yYbMPY.js`),[]),de:()=>Z(()=>import(`./BbdU8Zop.js`),[]),fr:()=>Z(()=>import(`./Cf8o-5U6.js`),[])};K.use(q).init({lng:`en`,fallbackLng:`en`,resources:{en:{translation:J}},interpolation:{escapeValue:!1},returnNull:!1});async function ce(e){let t=oe(e);if(t!==`en`&&!K.hasResourceBundle(t,`translation`)){let e=await se[t]();K.addResourceBundle(t,`translation`,e.default,!0,!0)}K.language!==t&&await K.changeLanguage(t),document.documentElement.lang=t}export{K as a,Z as i,ce as n,j as o,$ as r,Q as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./hePW80VL.js";import{h as t,n,t as r}from"./B1pia_Rg.js";import{l as i,m as a,t as o}from"./pjlgs2cl.js";import{t as s}from"./BCmzDvBt.js";import{a as c}from"./CS2mpWDL.js";import{n as l}from"./pneb1la9.js";import{l as u,m as d}from"./mA5FXiEh.js";import{U as f,W as p,c as m,l as h}from"./BZ6aghND.js";import{a as g,i as _,n as v,o as y,t as b}from"./BgkATqP8.js";var x=e(t(),1),S=i();function C(){let{t:e}=a(),{activeDialog:t,closeDialog:i}=n(),C=r(`copy-database`),w=t===`copy-database`,T=C?.database??``,[E,D]=(0,x.useState)(``),[O,k]=(0,x.useState)(`structure_data`),[A,j]=(0,x.useState)(null),[M,N]=(0,x.useState)(null);function P(e){e||(i(),N(null),j(null),D(``),k(`structure_data`))}async function F(){let t=s.getState().activeConnectionId,n=E.trim();if(!t||!n||!T)return;N(null);let r=l(t),i=s.getState().activeConnections.find(e=>e.id===t);if(i?.serverConnectionId)try{j(e(`database.copy.creating`,{database:n})),await u(t,r.getQuery(`CREATE_DATABASE`,n,`utf8mb4`,`utf8mb4_general_ci`));let a=c(i.serverConnectionId),o=await r.introspect.listTables(a,T);for(let[r,i]of o.entries()){j(e(`database.copy.copying`,{table:i.name,index:r+1,total:o.length}));let a={connectionId:t,database:T,table:i.name},s={connectionId:t,database:n,table:i.name},c=await f(a,s);await p({source:a,target:s,mode:O,onConflict:`abort`,createSql:l(t).ddl.createTable(c)})}await d(t),P(!1)}catch(e){N(e instanceof Error?e.message:String(e))}finally{j(null)}}return(0,S.jsx)(b,{open:w,onOpenChange:P,children:(0,S.jsxs)(v,{className:`sm:max-w-[450px]`,children:[(0,S.jsx)(g,{children:(0,S.jsx)(y,{children:e(`database.copy.title`)})}),(0,S.jsxs)(`div`,{className:`space-y-4`,children:[(0,S.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,S.jsx)(m,{children:e(`database.copy.source`)}),(0,S.jsx)(h,{value:T,disabled:!0})]}),(0,S.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,S.jsx)(m,{htmlFor:`target-db-name`,children:e(`database.copy.target`)}),(0,S.jsx)(h,{id:`target-db-name`,value:E,onChange:e=>D(e.target.value),placeholder:e(`database.copy.targetPlaceholder`)})]}),(0,S.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,S.jsx)(m,{children:e(`database.copy.options`)}),(0,S.jsxs)(`div`,{className:`space-y-2`,children:[(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-sm cursor-pointer`,children:[(0,S.jsx)(`input`,{type:`radio`,name:`copy-option`,value:`structure_data`,checked:O===`structure_data`,onChange:()=>k(`structure_data`)}),e(`database.copy.structureAndData`)]}),(0,S.jsxs)(`label`,{className:`flex items-center gap-2 text-sm cursor-pointer`,children:[(0,S.jsx)(`input`,{type:`radio`,name:`copy-option`,value:`structure_only`,checked:O===`structure_only`,onChange:()=>k(`structure_only`)}),e(`database.copy.structureOnly`)]})]})]})]}),A&&(0,S.jsx)(`p`,{className:`px-1 text-xs text-muted-foreground`,children:A}),M&&(0,S.jsx)(`p`,{className:`px-1 text-xs text-destructive leading-relaxed`,children:M}),(0,S.jsxs)(_,{children:[(0,S.jsx)(o,{variant:`outline`,onClick:()=>P(!1),children:e(`database.copy.cancel`)}),(0,S.jsx)(o,{onClick:()=>void F(),disabled:!E.trim()||A!==null,children:e(`database.copy.copy`)})]})]})})}export{C as CopyDatabaseDialog};
@@ -1 +0,0 @@
1
- import{c as e,r as t}from"./B1pia_Rg.js";import{i as n,t as r}from"./eFSiW0Lh.js";var i={anthropic:`claude-opus-5`,"anthropic-profile":`claude-opus-5`,openai:`gpt-4o`,gemini:`gemini-2.5-flash`,cli:`claude`};function a(e,t){let n=e.trim();return n===``||Object.values(i).includes(n)?i[t]:e}var o={confirmDestructive:!0,warnInEditor:!0,previewAffectedRows:!0,allowReadOnlyOverride:!0,previewGridCommit:!0,resultRowLimit:500,executeScope:`script`},s=t()(n(t=>({...o,locale:`auto`,onboardingDismissed:!1,termsAcceptedVersion:0,analyticsEnabled:!0,persistQueryHistory:!0,aiPreferences:{provider:`anthropic`,model:i.anthropic,baseUrl:``,remember:!1},update:e=>t(e),setOnboardingDismissed:e=>t({onboardingDismissed:e}),acceptTerms:()=>{e(`terms_accept`,{version:1}),t({termsAcceptedVersion:1})},setLocale:n=>{e(`locale_change`,{locale:n}),t({locale:n})},setAnalyticsEnabled:e=>t({analyticsEnabled:e}),setPersistQueryHistory:e=>t({persistQueryHistory:e}),setAiPreferences:e=>t(t=>({aiPreferences:{...t.aiPreferences,...e}}))}),{name:`planche-settings`,storage:r()})),c=()=>s(e=>e.termsAcceptedVersion>=1);export{a as i,s as n,c as r,o as t};
@@ -1,6 +0,0 @@
1
- import{a as e}from"./D0jMUNSI.js";import{t}from"./Bit0Kfog.js";var n=new Set([`neon`,`supabase`]);function r(e){return e===`postgres`||n.has(e)}var i=`_rowid_`,a=`http://127.0.0.1:8888`,o=t(`tunnelAgent`,()=>({url:null,token:null}));function s(e){o.url=e.url?.replace(/\/+$/,``)||null,o.token=e.token?.trim()||null}var c=new Set([`127.0.0.1`,`localhost`,`[::1]`,`::1`]);function l(e){try{let t=new URL(e);return(t.protocol===`http:`||t.protocol===`https:`)&&c.has(t.hostname)}catch{return!1}}function u(e){try{return typeof window<`u`&&new URL(e).origin===window.location.origin}catch{return!1}}function d(e){return l(e)||u(e)}function f(){return o.url!==null&&o.url!==`/api`&&!d(o.url)}function p(){return o.url??a}function m(){let t=p();return t===`/api`?e.t(`services.agent.devProxyUrl`,{url:`http://localhost:8888`}):t}async function h(){let t=m(),n;try{let e={};o.token&&(e.Authorization=`Bearer ${o.token}`),n=await(await fetch(`${p()}/health`,{cache:`no-store`,headers:e})).json()}catch(e){return{state:`offline`,url:t,message:e instanceof Error?e.message:String(e)}}return n.name!==`planche`||typeof n.version!=`string`||!/^[\w.+-]{1,32}$/.test(n.version)?{state:`offline`,url:t,message:e.t(`services.agent.notPlanche`)}:n.protocolVersion===2?n.authorized===!1||o.token===null&&n.authorized===void 0?{state:`unauthorized`,url:t,version:n.version}:{state:`online`,url:t,version:n.version,activeConnections:n.activeConnections??0,...n.gateway?{gateway:n.gateway}:{}}:{state:`outdated`,url:t,version:n.version,protocolVersion:n.protocolVersion??0,install:n.install===`standalone`?`standalone`:`npx`}}async function g(){let t=await fetch(`${p()}/profiles`,{cache:`no-store`,headers:N()}),n=await t.json().catch(()=>null);if(!t.ok||!n||n.success!==!0)throw new P(n?.message??e.t(`services.agent.httpError`,{status:t.status,statusText:t.statusText}),t.status);return n}async function _(){return D(`/ai/config`,{method:`GET`})}async function v(e){return D(`/ai/config`,{method:`PUT`,body:JSON.stringify(e)})}async function y(){return D(`/ai/config`,{method:`DELETE`})}async function b(){try{return(await(await fetch(`${p()}/health`,{cache:`no-store`,headers:N()})).json()).ai?.tools===!0}catch{return!1}}async function x(e){await D(`/bridge/tools`,{method:`POST`,body:JSON.stringify({tools:e})})}async function S(e,t,n){await D(`/bridge/result`,{method:`POST`,body:JSON.stringify({id:e,content:t,isError:n})})}async function C(t,n){let r=new AbortController,i=await fetch(`${p()}/bridge/events`,{headers:N(),signal:r.signal,cache:`no-store`});if(!i.ok||!i.body)throw new P(e.t(`services.agent.httpError`,{status:i.status,statusText:i.statusText}),i.status);return(async()=>{let e=i.body.getReader(),r=new TextDecoder,a=``;try{for(;;){let{done:n,value:i}=await e.read();if(n)break;a+=r.decode(i,{stream:!0});let o=a.indexOf(`
2
-
3
- `);for(;o!==-1;){let e=a.slice(0,o);a=a.slice(o+2);for(let n of e.split(`
4
- `))n.startsWith(`data: `)&&t(n.slice(6));o=a.indexOf(`
5
-
6
- `)}}}catch{}n()})(),()=>r.abort()}async function w(){return D(`/mcp/setup`,{method:`POST`})}async function T(){await D(`/mcp/setup`,{method:`DELETE`})}async function E(e,t){return D(`/ai/run`,{method:`POST`,body:JSON.stringify(e),signal:t})}async function D(t,n){let r=await fetch(`${p()}${t}`,{cache:`no-store`,headers:N(),...n}),i=await r.json().catch(()=>null);if(!r.ok||!i||i.success!==!0)throw new P(i?.message??e.t(`services.agent.httpError`,{status:r.status,statusText:r.statusText}),r.status);return i}function O(e){let t=e.ssh;if(t?.enabled)return{host:t.host,port:t.port,user:t.user,auth:t.auth,password:t.auth===`password`?t.password??``:void 0,privateKey:t.auth===`key`?t.privateKey:void 0,passphrase:t.auth===`key`&&t.passphrase||void 0}}function k(e){return e.gatewayProfile?{profile:e.gatewayProfile}:e.dbms===`sqlite`?{driver:`sqlite`,file:e.file??``,createIfMissing:e.createIfMissing??!1,readonly:e.readOnly??!1}:e.dbms===`do`?{driver:`do`,devUrl:e.devUrl??``}:e.dbms===`d1`?e.devUrl?{driver:`d1`,devUrl:e.devUrl,databaseId:e.databaseId||void 0}:{driver:`d1`,accountId:e.accountId??``,databaseId:e.databaseId??``,apiToken:e.pass}:e.dbms===`postgres`?{driver:`postgres`,host:e.host,port:e.port,user:e.user,password:e.pass,database:e.database||`postgres`,ssl:e.ssl??!1,sslVerify:e.sslVerify??!1,ssh:O(e)}:n.has(e.dbms)?{driver:`postgres`,host:e.host,port:e.port,user:e.user,password:e.pass,database:e.database||`postgres`,ssl:!0,sslVerify:e.dbms===`neon`}:e.dbms===`mssql`?{driver:`mssql`,host:e.host,port:e.port,user:e.user,password:e.pass,database:e.database||`master`,ssl:e.ssl??!1,sslVerify:e.sslVerify??!1,ssh:O(e)}:e.dbms===`oracle`?{driver:`oracle`,host:e.host,port:e.port,user:e.user,password:e.pass,serviceName:e.database||`FREEPDB1`,ssh:O(e)}:{driver:`mysql`,host:e.host,port:e.port,user:e.user,password:e.pass,charset:e.charset===`utf8`?`utf8mb4`:e.charset,ssl:e.ssl??!1,sslVerify:e.sslVerify??!1,ssh:O(e)}}var A=t(`tunnelAuthTokens`,()=>new Map);function j(e,t){let n=t?.trim();n?A.set(e,n):A.delete(e)}function M(e){return e?.trim()||o.token||void 0}function N(e){let t={"Content-Type":`application/json`},n=M(e);return n&&(t.Authorization=`Bearer ${n}`),t}var P=class extends Error{status;body;constructor(e,t,n=null){super(e),this.status=t,this.body=n}};function F(e){if(!(e instanceof P)||e.status!==409)return null;let t=e.body,n=t?.hostKey;if(t?.code!==`host-key-unknown`||!n)return null;let r=typeof n.host==`string`&&/^[A-Za-z0-9._:[\]-]{1,253}$/.test(n.host)?n.host:null,i=typeof n.type==`string`&&/^[\w.@-]{1,64}$/.test(n.type)?n.type:null,a=typeof n.fingerprint==`string`&&/^SHA256:[A-Za-z0-9+/]{43}$/.test(n.fingerprint)?n.fingerprint:null,o=Number.isInteger(n.port)&&n.port>0&&n.port<65536?n.port:null;return r&&i&&a&&o?{host:r,port:o,type:i,fingerprint:a}:null}async function I(t,n){let r=await fetch(`${t.replace(/\/+$/,``)}/pair`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({code:n})}),i=await r.json().catch(()=>null);if(!r.ok||!i?.success||typeof i.token!=`string`)throw Error(i?.message??e.t(`services.agent.httpError`,{status:r.status,statusText:r.statusText}));return i.token}async function L(t,n,r){let i;try{i=await fetch(`${p()}${t}`,{method:`POST`,headers:N(r),body:JSON.stringify(n)})}catch(t){throw Error(e.t(`services.agent.unreachable`,{url:m(),message:t instanceof Error?t.message:String(t)}))}let a=null;try{a=await i.json()}catch{a=null}if(!i.ok)throw new P(a?.message??e.t(`services.agent.httpError`,{status:i.status,statusText:i.statusText}),i.status,a);if(!a)throw Error(e.t(`services.agent.emptyResponse`));return a}async function R(e,t){let n=await L(`/connect`,e,t);return n.success&&n.connectionId&&(j(n.connectionId,M(t)),V()),n}async function z(e){try{let t=await L(`/cancel`,{connectionId:e},A.get(e));return t.cancelled?t.abandoned?`abandoned`:`cancelled`:`unsupported`}catch(e){return e instanceof P&&e.status===404?`agent-outdated`:`failed`}}async function B(e,t,n){let r=performance.now(),i=await L(`/query`,{connectionId:e,sql:t,database:n},A.get(e));return i.execTime||=Math.round(performance.now()-r),i}function V(){if(typeof window>`u`)return;let e=t(`tunnelPageHide`,()=>({done:!1}));e.done||(e.done=!0,window.addEventListener(`pagehide`,()=>{for(let[e,t]of A)fetch(`${p()}/disconnect`,{method:`POST`,headers:N(t),body:JSON.stringify({connectionId:e}),keepalive:!0}).catch(()=>void 0)}))}async function H(e){try{await L(`/disconnect`,{connectionId:e},A.get(e))}finally{A.delete(e)}}async function U(e,t){return L(`/test-connection`,e,t)}var W=0;function G(e){W>=3||(async()=>{try{(await fetch(`${p()}/usage`,{method:`POST`,headers:N(),body:JSON.stringify({feature:e})})).ok?W=0:W+=1}catch{W+=1}})()}export{E as C,i as D,n as E,r as O,T as S,k as T,I as _,h as a,v as b,y as c,_ as d,g as f,C as g,d as h,z as i,H as l,F as m,f as n,s as o,w as p,b as r,R as s,P as t,B as u,S as v,U as w,x,G as y};
@@ -1 +0,0 @@
1
- import{r as e}from"./hePW80VL.js";import{c as t,h as n,i as r,n as i}from"./B1pia_Rg.js";import{l as a,m as ee,t as o}from"./pjlgs2cl.js";import{i as s,t as c}from"./BCmzDvBt.js";import{n as l}from"./D6kbK-ng.js";import{n as u,t as d}from"./BO_H_8D-.js";import{T as f,Z as p,en as m,ht as h,l as g,lt as _,ot as v,xt as y}from"./BZ6aghND.js";import{a as b,i as x,n as S,o as C,r as w,t as T}from"./BgkATqP8.js";var E=e(n(),1),D=a(),O={execute:`command.localHistory.reason.execute`,edit:`command.localHistory.reason.edit`,replaced:`command.localHistory.reason.replaced`,restore:`command.localHistory.reason.restore`,close:`command.localHistory.reason.close`},k=Object.freeze([]);function A(e){let t=(Date.now()-e)/36e5;return t<1?`<1h`:t<24?`1-24h`:t<168?`1-7d`:`7d+`}function j(){let{t:e}=ee(),n=i(e=>e.activeDialog),a=i(e=>e.closeDialog),j=i(e=>e.setFooterMessage),M=c(e=>e.activeConnectionId),N=u(e=>M?e.activeTabId[M]:null),P=u(e=>M?e.tabs[M]??d:d),F=s(e=>M?e.revisions[M]??k:k),I=l(e=>e.persistQueryHistory),L=p(e=>e.themeId),R=f(L),[z,B]=(0,E.useState)(!0),[V,H]=(0,E.useState)(``),[U,W]=(0,E.useState)(null),[G,K]=(0,E.useState)(`current`),q=P.find(e=>e.id===N),J=n===`local-history`;(0,E.useEffect)(()=>{if(!J)return;let e=N?F.filter(e=>e.docId===N).length:0;t(`local_history_open`,{revisions:r(F.length),tab_revisions:r(e)})},[J]);let Y=(0,E.useMemo)(()=>{let e=V.trim().toLowerCase();return F.filter(t=>z&&N&&t.docId!==N?!1:!e||t.text.toLowerCase().includes(e)||t.title.toLowerCase().includes(e))},[F,V,z,N]),X=q?.query??``,Z=Y.find(e=>e.id===U)??Y.find(e=>e.text!==X)??Y[0],Q=(0,E.useMemo)(()=>{if(!Z)return;let e=F.filter(e=>e.docId===Z.docId);return e[e.findIndex(e=>e.id===Z.id)+1]},[F,Z]),te=G===`current`?X:Q?.text??``;function $(e,n){t(`local_history_recover`,{action:e,reason:n.reason,age:A(n.timestamp),same_tab:n.docId===N,compare:G})}function ne(){if(!M||!N||!Z)return;$(`restore`,Z);let t=u.getState();t.captureRevision(M,N,`restore`),t.setEditorContent(M,N,Z.text),j(e(`command.localHistory.restored`)),a()}function re(){!M||!Z||($(`new_tab`,Z),v(M,Z.text,Z.database,Z.title),j(e(`command.localHistory.openedInTab`)),a())}function ie(e){M&&(s.getState().removeRevision(M,e.id),U===e.id&&W(null))}function ae(){M&&(s.getState().clearRevisions(M),W(null))}return(0,D.jsx)(T,{open:J,onOpenChange:e=>{e||a()},children:(0,D.jsxs)(S,{className:`flex max-h-[85vh] flex-col sm:max-w-[1000px]`,children:[(0,D.jsxs)(b,{children:[(0,D.jsx)(C,{children:e(`command.localHistory.title`)}),(0,D.jsx)(w,{children:e(`command.localHistory.description`)})]}),!I&&(0,D.jsx)(`p`,{className:`rounded-md border border-dashed px-3 py-2 text-xs text-muted-foreground`,children:e(`command.localHistory.notPersisted`)}),(0,D.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,D.jsxs)(`div`,{className:`relative min-w-[200px] flex-1`,children:[(0,D.jsx)(y,{className:`absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground`}),(0,D.jsx)(g,{value:V,onChange:e=>H(e.target.value),placeholder:e(`command.localHistory.searchPlaceholder`),className:`h-8 pl-7 text-xs`})]}),(0,D.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border`,children:[(0,D.jsx)(`button`,{type:`button`,onClick:()=>B(!0),className:`px-2 py-1 text-xs ${z?`bg-accent`:`hover:bg-accent/50`}`,children:e(`command.localHistory.scopeTab`)}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>B(!1),className:`border-l px-2 py-1 text-xs ${z?`hover:bg-accent/50`:`bg-accent`}`,children:e(`command.localHistory.scopeAll`)})]}),(0,D.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border`,children:[(0,D.jsx)(`button`,{type:`button`,onClick:()=>K(`current`),className:`px-2 py-1 text-xs ${G===`current`?`bg-accent`:`hover:bg-accent/50`}`,children:e(`command.localHistory.compareCurrent`)}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>K(`previous`),className:`border-l px-2 py-1 text-xs ${G===`previous`?`bg-accent`:`hover:bg-accent/50`}`,children:e(`command.localHistory.comparePrevious`)})]})]}),Y.length===0?(0,D.jsx)(`div`,{className:`py-10 text-center text-sm text-muted-foreground`,children:F.length===0?e(`command.localHistory.empty`):e(`command.localHistory.noMatch`)}):(0,D.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-cols-[260px_1fr] gap-3`,children:[(0,D.jsx)(_,{className:`h-[440px] rounded-md border`,children:(0,D.jsx)(`ul`,{className:`divide-y`,children:Y.map(t=>(0,D.jsxs)(`li`,{className:`group relative`,children:[(0,D.jsxs)(`button`,{type:`button`,onClick:()=>W(t.id),className:`flex w-full flex-col items-start gap-0.5 px-3 py-2 pr-8 text-left text-xs hover:bg-accent ${t.id===Z?.id?`bg-accent`:``}`,children:[(0,D.jsx)(`span`,{className:`font-medium`,children:new Date(t.timestamp).toLocaleString()}),(0,D.jsxs)(`span`,{className:`w-full truncate text-muted-foreground`,children:[t.title,` · `,e(O[t.reason]),` · `,e(`command.localHistory.chars`,{count:t.text.length})]})]}),(0,D.jsx)(`button`,{type:`button`,onClick:()=>ie(t),title:e(`command.localHistory.delete`),className:`absolute right-1.5 top-1.5 rounded p-1 text-muted-foreground opacity-0 hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100`,children:(0,D.jsx)(h,{className:`h-3.5 w-3.5`})})]},t.id))})}),(0,D.jsxs)(`div`,{className:`flex h-[440px] flex-col overflow-hidden rounded-md border`,children:[(0,D.jsx)(`div`,{className:`border-b bg-muted/40 px-3 py-1.5 text-xs text-muted-foreground`,children:G===`current`?e(`command.localHistory.diffAgainstCurrent`):Q?e(`command.localHistory.diffAgainstPrevious`,{time:new Date(Q.timestamp).toLocaleString()}):e(`command.localHistory.noPrevious`)}),(0,D.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,D.jsx)(m,{language:`sql`,theme:R,original:Z?.text??``,modified:te,options:{readOnly:!0,renderSideBySide:!1,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:12,renderOverviewRuler:!1}})})]})]}),(0,D.jsxs)(x,{className:`sm:justify-between`,children:[(0,D.jsx)(o,{variant:`ghost`,onClick:ae,disabled:F.length===0,children:e(`command.localHistory.clearAll`)}),(0,D.jsxs)(`div`,{className:`flex gap-2`,children:[(0,D.jsx)(o,{variant:`outline`,onClick:a,children:e(`command.close`)}),(0,D.jsx)(o,{variant:`outline`,onClick:re,disabled:!Z,children:e(`command.localHistory.openInNewTab`)}),(0,D.jsx)(o,{onClick:ne,disabled:!Z||!q,children:e(`command.localHistory.restore`)})]})]})]})})}export{j as LocalHistoryDialog};
@@ -1 +0,0 @@
1
- import{r as e}from"./hePW80VL.js";import{h as t,n}from"./B1pia_Rg.js";import{l as r,m as i,t as a}from"./pjlgs2cl.js";import{a as o,i as s,n as c,r as l,t as u}from"./BuhEpB12.js";import{t as d}from"./BCmzDvBt.js";import{c as f,l as p}from"./BZ6aghND.js";import{a as m,i as h,n as g,o as _,t as v}from"./BgkATqP8.js";import{n as y}from"./C0bzfYFC.js";var b=e(t(),1),x=r();function S(){let{t:e}=i(),{activeDialog:t,closeDialog:r,setFooterMessage:S}=n(),C=d(e=>e.activeConnectionId)??``,w=y(e=>e.addUser),[T,E]=(0,b.useState)(``),[D,O]=(0,b.useState)(`%`),[k,A]=(0,b.useState)(``),[j,M]=(0,b.useState)(``),[N,P]=(0,b.useState)(`caching_sha2_password`),F=t===`user-add`;function I(e){e||(L(),r())}function L(){E(``),O(`%`),A(``),M(``),P(`caching_sha2_password`)}function R(){if(!T.trim()){S(e(`user.add.usernameRequired`));return}if(k!==j){S(e(`user.add.passwordMismatch`));return}w(C,{user:T.trim(),host:D.trim()||`%`,privileges:[],maxQuestions:0,maxUpdates:0,maxConnections:0,maxUserConnections:0,plugin:N,authenticationString:``,passwordExpired:!1,accountLocked:!1}),S(e(`user.add.added`,{user:T,host:D})),L(),r()}return(0,x.jsx)(v,{open:F,onOpenChange:I,children:(0,x.jsxs)(g,{className:`sm:max-w-[450px]`,children:[(0,x.jsx)(m,{children:(0,x.jsx)(_,{children:e(`user.add.title`)})}),(0,x.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,x.jsxs)(`div`,{className:`space-y-2`,children:[(0,x.jsx)(f,{htmlFor:`user-add-username`,children:e(`user.add.username`)}),(0,x.jsx)(p,{id:`user-add-username`,value:T,onChange:e=>E(e.target.value),placeholder:e(`user.add.usernamePlaceholder`)})]}),(0,x.jsxs)(`div`,{className:`space-y-2`,children:[(0,x.jsx)(f,{htmlFor:`user-add-host`,children:e(`user.add.host`)}),(0,x.jsx)(p,{id:`user-add-host`,value:D,onChange:e=>O(e.target.value),placeholder:`%`})]}),(0,x.jsxs)(`div`,{className:`space-y-2`,children:[(0,x.jsx)(f,{htmlFor:`user-add-password`,children:e(`user.add.password`)}),(0,x.jsx)(p,{id:`user-add-password`,type:`password`,value:k,onChange:e=>A(e.target.value),placeholder:e(`user.add.passwordPlaceholder`)})]}),(0,x.jsxs)(`div`,{className:`space-y-2`,children:[(0,x.jsx)(f,{htmlFor:`user-add-confirm-password`,children:e(`user.add.confirmPassword`)}),(0,x.jsx)(p,{id:`user-add-confirm-password`,type:`password`,value:j,onChange:e=>M(e.target.value),placeholder:e(`user.add.confirmPasswordPlaceholder`)})]}),(0,x.jsxs)(`div`,{className:`space-y-2`,children:[(0,x.jsx)(f,{children:e(`user.add.plugin`)}),(0,x.jsxs)(u,{value:N,onValueChange:P,children:[(0,x.jsx)(s,{className:`w-full`,children:(0,x.jsx)(o,{})}),(0,x.jsxs)(c,{children:[(0,x.jsx)(l,{value:`mysql_native_password`,children:`mysql_native_password`}),(0,x.jsx)(l,{value:`caching_sha2_password`,children:`caching_sha2_password`})]})]})]})]}),(0,x.jsxs)(h,{children:[(0,x.jsx)(a,{variant:`outline`,onClick:()=>I(!1),children:e(`user.add.cancel`)}),(0,x.jsx)(a,{onClick:R,children:e(`user.add.add`)})]})]})})}export{S as UserAddDialog};
@@ -1 +0,0 @@
1
- import{r as e}from"./hePW80VL.js";import{c as t,h as n,n as r,t as i}from"./B1pia_Rg.js";import{l as a,m as o,t as s}from"./pjlgs2cl.js";import{a as c,i as l,n as u,r as d,t as f}from"./BuhEpB12.js";import{t as p}from"./BCmzDvBt.js";import{a as m}from"./CS2mpWDL.js";import{n as h}from"./pneb1la9.js";import{t as g}from"./DPdwSUSw.js";import{H as _,_ as v,c as y,g as b,h as x,ot as S}from"./BZ6aghND.js";import{a as ee,i as te,n as ne,o as C,t as re}from"./BgkATqP8.js";var w=e(n(),1),T=a(),ie=e=>e instanceof Error?e.message:String(e),E=e=>e.hostName||e.host||e.file||e.id,D=5e4;function O({id:e,label:t,side:n,onChange:r,connections:i,disabled:a}){let{t:s}=o(),[p,g]=(0,w.useState)([]),[_,v]=(0,w.useState)([]),b=i.find(e=>e.id===n.connectionId);return(0,w.useEffect)(()=>{if(!b?.serverConnectionId)return;let e=!1;return(async()=>{try{let t=await h(b.id).introspect.listDatabases(m(b.serverConnectionId));if(e)return;g(t),t.includes(n.database)||r({connectionId:b.id,database:t[0]??``,table:``})}catch{e||g([])}})(),()=>{e=!0}},[b?.id,b?.serverConnectionId]),(0,w.useEffect)(()=>{if(!b?.serverConnectionId||!n.database)return;let e=!1;return(async()=>{try{let t=await h(b.id).introspect.listTables(m(b.serverConnectionId),n.database);if(e)return;let i=t.map(e=>e.name);v(i),n.table&&!i.includes(n.table)&&r({...n,table:``})}catch{e||v([])}})(),()=>{e=!0}},[b?.id,b?.serverConnectionId,n.database]),(0,T.jsxs)(`div`,{className:`space-y-2 rounded-md border p-3`,children:[(0,T.jsx)(y,{className:`font-medium`,children:t}),(0,T.jsxs)(f,{value:n.connectionId,onValueChange:e=>r({connectionId:e,database:``,table:``}),disabled:a,children:[(0,T.jsx)(l,{id:`${e}-conn`,className:`w-full`,children:(0,T.jsx)(c,{placeholder:s(`database.diff.pickConnection`)})}),(0,T.jsx)(u,{children:i.map(e=>(0,T.jsx)(d,{value:e.id,children:E(e)},e.id))})]}),(0,T.jsxs)(f,{value:n.database,onValueChange:e=>r({...n,database:e,table:``}),disabled:a||p.length===0,children:[(0,T.jsx)(l,{id:`${e}-db`,className:`w-full`,children:(0,T.jsx)(c,{placeholder:s(`database.diff.pickDatabase`)})}),(0,T.jsx)(u,{children:p.map(e=>(0,T.jsx)(d,{value:e,children:e},e))})]}),(0,T.jsxs)(f,{value:n.table,onValueChange:e=>r({...n,table:e}),disabled:a||_.length===0,children:[(0,T.jsx)(l,{id:`${e}-table`,className:`w-full`,children:(0,T.jsx)(c,{placeholder:s(`database.dataDiff.pickTable`)})}),(0,T.jsx)(u,{children:_.map(e=>(0,T.jsx)(d,{value:e,children:e},e))})]})]})}async function k(e,t){let n=await _({connectionId:e.connectionId,database:e.database,table:e.table,limit:D,onProgress:t}),r=[];for await(let e of n.pages)r.push(...e);return{rows:r,columns:n.fields.map(e=>e.name),capped:r.length>=D}}function A({diff:e,row:t,other:n,changed:r}){let{t:i}=o(),a=[...e.keyColumns,...e.compareColumns];return(0,T.jsxs)(`table`,{className:`w-full text-xs font-mono`,children:[(0,T.jsx)(`thead`,{className:`text-muted-foreground`,children:(0,T.jsxs)(`tr`,{children:[(0,T.jsx)(`th`,{className:`text-left font-normal pr-2`,children:i(`database.diff.column`)}),(0,T.jsx)(`th`,{className:`text-left font-normal pr-2`,children:i(`database.diff.source`)}),(0,T.jsx)(`th`,{className:`text-left font-normal`,children:i(`database.diff.target`)})]})}),(0,T.jsx)(`tbody`,{children:a.map(e=>(0,T.jsxs)(`tr`,{className:r?.includes(e)?`text-amber-600 dark:text-amber-400`:``,children:[(0,T.jsx)(`td`,{className:`pr-2 align-top whitespace-nowrap`,children:e}),(0,T.jsx)(`td`,{className:`pr-2 align-top break-all`,children:b(t[e])}),(0,T.jsx)(`td`,{className:`align-top break-all`,children:n?b(n[e]):`—`})]},e))})]})}function j(){let{t:e}=o(),n=r(e=>e.activeDialog),a=r(e=>e.closeDialog),c=i(`data-diff`),l=p(e=>e.activeConnections),u=(0,w.useMemo)(()=>l.filter(e=>e.serverConnectionId),[l]),d=p(e=>e.activeConnectionId),f=n===`data-diff`,[_,y]=(0,w.useState)(()=>c&&u.some(e=>e.id===c.connectionId)?{connectionId:c.connectionId,database:c.database,table:c.table}:{connectionId:d&&u.some(e=>e.id===d)?d:u[0]?.id??``,database:``,table:``}),[E,j]=(0,w.useState)(()=>({connectionId:u.find(e=>e.id!==_.connectionId)?.id??_.connectionId,database:``,table:``})),[M,N]=(0,w.useState)([]),[P,F]=(0,w.useState)(null),[I,L]=(0,w.useState)(!1),[R,z]=(0,w.useState)(`changed`),[B,V]=(0,w.useState)(0),[H,ae]=(0,w.useState)(!1),[U,W]=(0,w.useState)(!1),[G,K]=(0,w.useState)({source:null,target:null}),[q,J]=(0,w.useState)(null),oe=e=>j(e.database&&!e.table&&_.table?{...e,table:_.table}:e),Y=_.connectionId===E.connectionId&&_.database===E.database&&_.table===E.table,se=!!_.table&&!!E.table&&!Y,X=E.connectionId?h(E.connectionId):null;async function ce(){W(!0),J(null),F(null);try{let n=p.getState().activeConnections.find(e=>e.id===_.connectionId);if(!n?.serverConnectionId)throw Error(e(`services.query.notConnected`));let r=await h(_.connectionId).introspect.getPrimaryKeys(m(n.serverConnectionId),_.database,_.table);if(r.length===0)throw Error(e(`database.dataDiff.noPrimaryKey`,{table:_.table}));K({source:{loaded:0,total:null},target:{loaded:0,total:null}});let[i,a]=await Promise.all([k(_,e=>K(t=>({...t,source:e}))),k(E,e=>K(t=>({...t,target:e})))]);if(r.some(e=>!a.columns.includes(e)))throw Error(e(`database.dataDiff.keyMissingInTarget`,{columns:r.join(`, `)}));let o=v(i.rows,a.rows,r,i.columns,a.columns);N(r),L(i.capped||a.capped),F(o),z(o.changed.length>0?`changed`:o.added.length>0?`added`:`removed`),V(0),g(`compare_data`),t(`data_diff`,{source_dbms:h(_.connectionId).id,target_dbms:X?.id??`unknown`,added:o.added.length,changed:o.changed.length,removed:o.removed.length})}catch(e){J(ie(e))}finally{W(!1),K({source:null,target:null})}}let Z=e=>e?e.total===null?e.loaded.toLocaleString():`${e.loaded.toLocaleString()} / ${e.total.toLocaleString()}`:``,Q=(0,w.useMemo)(()=>P&&X?x(P,X,{database:E.database,table:E.table},{includeDeletes:H}):``,[P,X,E.database,E.table,H]);function le(){Q&&(S(E.connectionId,Q,E.database,e(`database.dataDiff.tabTitle`,{table:E.table})),a())}let $=P?R===`added`?P.added:R===`removed`?P.removed:P.changed.map(e=>e.source):[],ue=!!P&&P.added.length+P.changed.length+P.removed.length>0,de=e=>M.map(t=>b(e[t])).join(`, `);return(0,T.jsx)(re,{open:f,onOpenChange:e=>{e||a()},children:(0,T.jsxs)(ne,{className:`sm:max-w-[900px]`,children:[(0,T.jsx)(ee,{children:(0,T.jsx)(C,{children:e(`database.dataDiff.title`)})}),(0,T.jsxs)(`div`,{className:`space-y-3`,children:[(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,T.jsx)(O,{id:`ddiff-source`,label:e(`database.diff.source`),side:_,onChange:y,connections:u,disabled:U}),(0,T.jsx)(O,{id:`ddiff-target`,label:e(`database.diff.target`),side:E,onChange:oe,connections:u,disabled:U})]}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`database.dataDiff.hint`,{cap:D.toLocaleString()})}),Y&&_.table&&(0,T.jsx)(`p`,{className:`text-xs text-destructive`,children:e(`database.dataDiff.sameSide`)}),q&&(0,T.jsx)(`p`,{className:`text-sm text-destructive whitespace-pre-wrap`,children:q}),U&&(G.source||G.target)&&(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`database.dataDiff.loading`,{source:Z(G.source),target:Z(G.target)})}),P&&(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-xs`,children:[(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:e(`database.dataDiff.summary`,{key:M.join(`, `),added:P.added.length,changed:P.changed.length,removed:P.removed.length,identical:P.identical})}),I&&(0,T.jsx)(`span`,{className:`text-amber-600 dark:text-amber-400`,children:e(`database.dataDiff.capped`,{cap:D.toLocaleString()})}),(P.sourceOnlyColumns.length>0||P.targetOnlyColumns.length>0)&&(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:e(`database.dataDiff.ignoredColumns`,{columns:[...P.sourceOnlyColumns,...P.targetOnlyColumns].join(`, `)})})]}),(0,T.jsx)(`div`,{className:`flex gap-1 text-xs`,children:[`added`,`changed`,`removed`].map(t=>(0,T.jsx)(`button`,{type:`button`,onClick:()=>{z(t),V(0)},className:`rounded border px-2 py-0.5 ${R===t?`bg-accent`:``}`,children:e(`database.dataDiff.${t}`,{count:t===`added`?P.added.length:t===`removed`?P.removed.length:P.changed.length})},t))}),(0,T.jsxs)(`div`,{className:`grid grid-cols-[240px_1fr] gap-3 h-[280px]`,children:[(0,T.jsxs)(`ul`,{className:`overflow-auto rounded-md border text-sm font-mono`,children:[$.slice(0,2e3).map((e,t)=>(0,T.jsx)(`li`,{className:`px-2 py-1 cursor-pointer ${B===t?`bg-accent`:``}`,onClick:()=>V(t),children:de(e)},t)),$.length===0&&(0,T.jsx)(`li`,{className:`px-2 py-1 text-muted-foreground`,children:e(`database.dataDiff.none`)}),$.length>2e3&&(0,T.jsx)(`li`,{className:`px-2 py-1 text-muted-foreground`,children:e(`database.dataDiff.more`,{count:$.length-2e3})})]}),(0,T.jsx)(`div`,{className:`overflow-auto rounded-md border p-2`,children:$[B]?R===`changed`?(0,T.jsx)(A,{diff:P,row:P.changed[B].source,other:P.changed[B].target,changed:P.changed[B].columns}):R===`removed`?(0,T.jsx)(A,{diff:P,row:{},other:$[B]}):(0,T.jsx)(A,{diff:P,row:$[B]}):(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`database.diff.selectTable`)})})]}),(0,T.jsxs)(`label`,{className:`flex items-center gap-1.5 text-xs cursor-pointer`,children:[(0,T.jsx)(`input`,{type:`checkbox`,checked:H,onChange:e=>ae(e.target.checked)}),(0,T.jsx)(`span`,{className:H?`text-destructive`:``,children:e(`database.dataDiff.includeDeletes`)})]})]})]}),(0,T.jsxs)(te,{children:[(0,T.jsx)(s,{variant:`outline`,onClick:a,children:e(`database.diff.close`)}),(0,T.jsx)(s,{variant:`secondary`,onClick:()=>{ce()},disabled:!se||U,children:e(U?`database.diff.comparing`:`database.diff.compare`)}),(0,T.jsx)(s,{onClick:le,disabled:!ue,children:e(`database.diff.openScript`)})]})]})})}export{j as DataDiffDialog};
@@ -1 +0,0 @@
1
- import{c as e}from"./BCmzDvBt.js";import{y as t}from"./DEEGN6UG.js";function n(n){t(n),e(n)}export{n as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./hePW80VL.js";import{h as t,n}from"./B1pia_Rg.js";import{l as r,m as i,t as a}from"./pjlgs2cl.js";import{a as o}from"./D0jMUNSI.js";import{t as s}from"./BCmzDvBt.js";import{c}from"./CS2mpWDL.js";import{t as l}from"./pneb1la9.js";import{C as u,S as d,b as f,l as p,lt as m,v as h,x as g,y as _}from"./BZ6aghND.js";import{a as v,i as y,n as b,o as x,t as S}from"./BgkATqP8.js";var C=e(t(),1),w=r();function T(){let e=s.getState();return e.activeConnections.find(t=>t.id===e.activeConnectionId)?.serverConnectionId??null}async function E(e){let t=T();if(!t)throw Error(o.t(`command.noActiveConnection`));let n=l().getQuery(e===`global`?`SHOW_GLOBAL_STATUS`:`SHOW_SESSION_STATUS`);return(await c(t,n)).records.map(e=>({Variable_name:e[0],Value:e[1]}))}function D(){let{t:e}=i(),{activeDialog:t,closeDialog:r,setFooterMessage:o}=n(),[s,c]=(0,C.useState)([]),[l,T]=(0,C.useState)(``),[D,O]=(0,C.useState)(`session`),k=t===`status`,A=(0,C.useCallback)(t=>E(t).then(c).catch(t=>o(e(`command.status.loadError`,{message:t instanceof Error?t.message:String(t)}))),[o,e]);(0,C.useEffect)(()=>{k&&A(D)},[k,D,A]);let j=(0,C.useMemo)(()=>{if(!l.trim())return s;let e=l.toLowerCase();return s.filter(t=>t.Variable_name.toLowerCase().includes(e)||t.Value.toLowerCase().includes(e))},[s,l]);function M(e){e||(T(``),r())}function N(e){O(e)}return(0,w.jsx)(S,{open:k,onOpenChange:M,children:(0,w.jsxs)(b,{className:`sm:max-w-[900px] max-h-[80vh] flex flex-col`,children:[(0,w.jsx)(v,{children:(0,w.jsx)(x,{children:e(`command.status.title`)})}),(0,w.jsxs)(`div`,{className:`flex items-center gap-3 pb-2`,children:[(0,w.jsxs)(`div`,{className:`flex gap-1`,children:[(0,w.jsx)(a,{variant:D===`session`?`default`:`outline`,size:`sm`,onClick:()=>N(`session`),children:e(`command.scope.session`)}),(0,w.jsx)(a,{variant:D===`global`?`default`:`outline`,size:`sm`,onClick:()=>N(`global`),children:e(`command.scope.global`)})]}),(0,w.jsx)(p,{placeholder:e(`command.status.filterPlaceholder`),value:l,onChange:e=>T(e.target.value),className:`max-w-xs`})]}),(0,w.jsx)(`div`,{className:`flex-1 border rounded-md overflow-hidden min-h-0`,children:(0,w.jsx)(m,{className:`h-[400px]`,children:(0,w.jsxs)(h,{children:[(0,w.jsx)(d,{children:(0,w.jsxs)(u,{children:[(0,w.jsx)(g,{className:`w-[300px]`,children:e(`command.variableName`)}),(0,w.jsx)(g,{children:e(`command.value`)})]})}),(0,w.jsx)(_,{children:j.length===0?(0,w.jsx)(u,{children:(0,w.jsx)(f,{colSpan:2,className:`text-center text-muted-foreground`,children:e(`command.status.empty`)})}):j.map(e=>(0,w.jsxs)(u,{children:[(0,w.jsx)(f,{className:`font-mono text-xs`,children:e.Variable_name}),(0,w.jsx)(f,{className:`font-mono text-xs`,children:e.Value})]},e.Variable_name))})]})})}),(0,w.jsx)(y,{children:(0,w.jsx)(a,{variant:`outline`,onClick:()=>M(!1),children:e(`command.close`)})})]})})}export{D as StatusDialog};