harperdb 4.4.0-alpha.1 → 4.4.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/README.md +12 -3
  2. package/application-template/config.yaml +2 -5
  3. package/bin/harperdb.js +85 -67
  4. package/bin/lite.js +118 -27
  5. package/config/yaml/defaultConfig.yaml +3 -3
  6. package/config/yaml/defaultNatsConfig.yaml +1 -1
  7. package/index.js +3 -12
  8. package/json/hdbConnectorOptions.json +14 -14
  9. package/json/interNodeConnectorOptions.json +15 -15
  10. package/json/systemSchema.json +260 -260
  11. package/launchServiceScripts/launchInstallNATSServer.js +3 -3
  12. package/launchServiceScripts/launchNatsIngestService.js +118 -27
  13. package/launchServiceScripts/launchNatsReplyService.js +118 -27
  14. package/launchServiceScripts/launchUpdateNodes4-0-0.js +118 -27
  15. package/logs/README.md +1 -1
  16. package/npm-shrinkwrap.json +7556 -7555
  17. package/package.json +130 -133
  18. package/resources/ErrorResource.d.ts +26 -0
  19. package/resources/IterableEventQueue.d.ts +6 -0
  20. package/resources/Resource.d.ts +6 -0
  21. package/resources/ResourceInterface.d.ts +1 -1
  22. package/resources/Table.d.ts +14 -3
  23. package/resources/auditStore.d.ts +5 -5
  24. package/resources/crdt.d.ts +1 -1
  25. package/resources/databases.d.ts +13 -1
  26. package/resources/search.d.ts +15 -2
  27. package/resources/tracked.d.ts +1 -1
  28. package/server/jobs/jobProcess.js +118 -27
  29. package/server/serverHelpers/Headers.d.ts +1 -1
  30. package/server/threads/threadServer.js +118 -27
  31. package/studio/build-local/asset-manifest.json +47 -46
  32. package/studio/build-local/index.html +1 -1
  33. package/studio/build-local/static/css/main.fee3019a.css +13 -0
  34. package/studio/build-local/static/js/23.3b9f7144.chunk.js +1 -0
  35. package/studio/build-local/static/js/239.183c6cbc.chunk.js +2 -0
  36. package/studio/build-local/static/js/{228.302d7db9.chunk.js → 279.7890bce3.chunk.js} +1 -1
  37. package/studio/build-local/static/js/311.9e648b13.chunk.js +2 -0
  38. package/studio/build-local/static/js/311.9e648b13.chunk.js.LICENSE.txt +38 -0
  39. package/studio/build-local/static/js/43.73dc432d.chunk.js +2 -0
  40. package/studio/build-local/static/js/452.d771b05a.chunk.js +2 -0
  41. package/studio/build-local/static/js/{446.5237e847.chunk.js.LICENSE.txt → 452.d771b05a.chunk.js.LICENSE.txt} +2 -2
  42. package/studio/build-local/static/js/545.be2e36f9.chunk.js +1 -0
  43. package/studio/build-local/static/js/759.7c5150cd.chunk.js +2 -0
  44. package/studio/build-local/static/js/805.6aab06e2.chunk.js +1 -0
  45. package/studio/build-local/static/js/806.afb99f70.chunk.js +1 -0
  46. package/studio/build-local/static/js/833.5b133801.chunk.js +1 -0
  47. package/studio/build-local/static/js/851.4c6536d6.chunk.js +1 -0
  48. package/studio/build-local/static/js/860.727e7fc8.chunk.js +1 -0
  49. package/studio/build-local/static/js/browse-csvupload.02fdfbea.chunk.js +1 -0
  50. package/studio/build-local/static/js/browse-datatable.0e20a171.chunk.js +1 -0
  51. package/studio/build-local/static/js/browse-entitymanager.0db076c3.chunk.js +1 -0
  52. package/studio/build-local/static/js/browse-jsonviewer.b690b1bb.chunk.js +1 -0
  53. package/studio/build-local/static/js/custom-functions.04b93135.chunk.js +1 -0
  54. package/studio/build-local/static/js/instance-charts.217c477d.chunk.js +1 -0
  55. package/studio/build-local/static/js/instance-cluster.0ba07710.chunk.js +1 -0
  56. package/studio/build-local/static/js/instance-config.2274de0a.chunk.js +1 -0
  57. package/studio/build-local/static/js/instance-query.fdc5f922.chunk.js +1 -0
  58. package/studio/build-local/static/js/instance-roles.38ef8e77.chunk.js +1 -0
  59. package/studio/build-local/static/js/instance-status.d09551b0.chunk.js +1 -0
  60. package/studio/build-local/static/js/instance-users-datatable.9b5617bc.chunk.js +1 -0
  61. package/studio/build-local/static/js/instance-users-edit.6ea9cc6f.chunk.js +1 -0
  62. package/studio/build-local/static/js/instance-users.876f6070.chunk.js +1 -0
  63. package/studio/build-local/static/js/instance.ad30f892.chunk.js +1 -0
  64. package/studio/build-local/static/js/instances.f4fec0cb.chunk.js +1 -0
  65. package/studio/build-local/static/js/main.e70e768f.js +2 -0
  66. package/studio/build-local/static/js/{main.4fd117ad.js.LICENSE.txt → main.e70e768f.js.LICENSE.txt} +0 -33
  67. package/studio/build-local/static/js/offline-app.31ad36fc.chunk.js +1 -0
  68. package/studio/build-local/static/js/online-app.91033fd0.chunk.js +1 -0
  69. package/studio/build-local/static/js/organization-billing.21b2d3c9.chunk.js +1 -0
  70. package/studio/build-local/static/js/organization-users.6f50ca02.chunk.js +1 -0
  71. package/studio/build-local/static/js/organization.89b902c4.chunk.js +1 -0
  72. package/studio/build-local/static/js/organizations.4933fdbc.chunk.js +1 -0
  73. package/studio/build-local/static/js/profile.c05c7042.chunk.js +1 -0
  74. package/studio/build-local/static/js/resetPassword.3478535b.chunk.js +1 -0
  75. package/studio/build-local/static/js/roles-jsonviewer.bf1011d5.chunk.js +1 -0
  76. package/studio/build-local/static/js/signIn.996cf7ee.chunk.js +1 -0
  77. package/studio/build-local/static/js/signUp.c8fce52d.chunk.js +1 -0
  78. package/studio/build-local/static/js/structure-reloader.f65842a1.chunk.js +1 -0
  79. package/studio/build-local/static/js/topnav.0fa4de77.chunk.js +1 -0
  80. package/studio/build-local/static/js/updatePassword.bc881b36.chunk.js +1 -0
  81. package/utility/install/README.md +23 -0
  82. package/utility/scripts/restartHdb.js +118 -27
  83. package/application-template/routes/index.js +0 -14
  84. package/studio/build-local/static/css/main.6c0f1b63.css +0 -13
  85. package/studio/build-local/static/js/110.ca4244a6.chunk.js +0 -2
  86. package/studio/build-local/static/js/287.21477cf9.chunk.js +0 -1
  87. package/studio/build-local/static/js/409.17daa4fe.chunk.js +0 -2
  88. package/studio/build-local/static/js/424.ad87c8fd.chunk.js +0 -1
  89. package/studio/build-local/static/js/446.5237e847.chunk.js +0 -2
  90. package/studio/build-local/static/js/662.92e32ffc.chunk.js +0 -1
  91. package/studio/build-local/static/js/718.74e9355d.chunk.js +0 -1
  92. package/studio/build-local/static/js/723.c58acced.chunk.js +0 -2
  93. package/studio/build-local/static/js/731.8a941eb3.chunk.js +0 -1
  94. package/studio/build-local/static/js/807.510f66df.chunk.js +0 -2
  95. package/studio/build-local/static/js/807.510f66df.chunk.js.LICENSE.txt +0 -5
  96. package/studio/build-local/static/js/926.88d6f9ce.chunk.js +0 -1
  97. package/studio/build-local/static/js/browse-csvupload.453237f3.chunk.js +0 -1
  98. package/studio/build-local/static/js/browse-datatable.b9ef2d28.chunk.js +0 -1
  99. package/studio/build-local/static/js/browse-entitymanager.50827a5a.chunk.js +0 -1
  100. package/studio/build-local/static/js/browse-jsonviewer.a2534004.chunk.js +0 -1
  101. package/studio/build-local/static/js/custom-functions.dd7e182c.chunk.js +0 -1
  102. package/studio/build-local/static/js/instance-charts.34d15f02.chunk.js +0 -1
  103. package/studio/build-local/static/js/instance-cluster.5bce430c.chunk.js +0 -1
  104. package/studio/build-local/static/js/instance-config.70c17b53.chunk.js +0 -1
  105. package/studio/build-local/static/js/instance-query.4f6eec62.chunk.js +0 -1
  106. package/studio/build-local/static/js/instance-roles.507a4ed0.chunk.js +0 -1
  107. package/studio/build-local/static/js/instance-status.ce9d7f64.chunk.js +0 -1
  108. package/studio/build-local/static/js/instance-users-datatable.190640fd.chunk.js +0 -1
  109. package/studio/build-local/static/js/instance-users-edit.d2444479.chunk.js +0 -1
  110. package/studio/build-local/static/js/instance-users.eabfbbde.chunk.js +0 -1
  111. package/studio/build-local/static/js/instance.a163623f.chunk.js +0 -1
  112. package/studio/build-local/static/js/instances.6b88a87c.chunk.js +0 -1
  113. package/studio/build-local/static/js/main.4fd117ad.js +0 -2
  114. package/studio/build-local/static/js/offline-app.7371216b.chunk.js +0 -1
  115. package/studio/build-local/static/js/online-app.db436eec.chunk.js +0 -1
  116. package/studio/build-local/static/js/organization-billing.b2f260f0.chunk.js +0 -1
  117. package/studio/build-local/static/js/organization-users.b6171b18.chunk.js +0 -1
  118. package/studio/build-local/static/js/organization.7800f16a.chunk.js +0 -1
  119. package/studio/build-local/static/js/organizations.8bb505f2.chunk.js +0 -1
  120. package/studio/build-local/static/js/profile.292bdd86.chunk.js +0 -1
  121. package/studio/build-local/static/js/resetPassword.8fdfba77.chunk.js +0 -1
  122. package/studio/build-local/static/js/roles-jsonviewer.c11f1816.chunk.js +0 -1
  123. package/studio/build-local/static/js/signIn.b11bdc50.chunk.js +0 -1
  124. package/studio/build-local/static/js/signUp.564d4e0b.chunk.js +0 -1
  125. package/studio/build-local/static/js/structure-reloader.b6de4091.chunk.js +0 -1
  126. package/studio/build-local/static/js/topnav.4fd41d60.chunk.js +0 -1
  127. package/studio/build-local/static/js/updatePassword.e23019c7.chunk.js +0 -1
  128. /package/studio/build-local/static/js/{723.c58acced.chunk.js.LICENSE.txt → 239.183c6cbc.chunk.js.LICENSE.txt} +0 -0
  129. /package/studio/build-local/static/js/{110.ca4244a6.chunk.js.LICENSE.txt → 43.73dc432d.chunk.js.LICENSE.txt} +0 -0
  130. /package/studio/build-local/static/js/{409.17daa4fe.chunk.js.LICENSE.txt → 759.7c5150cd.chunk.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkharperdb_studio=self.webpackChunkharperdb_studio||[]).push([[23],{5023:(e,t,r)=>{function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){n(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function f(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(o,n))}}}function d(e){return{}.toString.call(e).includes("Object")}function g(e){return"function"===typeof e}r.d(t,{Ay:()=>oe,wG:()=>U});var p=f((function(e,t){throw new Error(e[t]||e.default)}))({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),h={changes:function(e,t){return d(t)||p("changeType"),Object.keys(t).some((function(t){return r=e,n=t,!Object.prototype.hasOwnProperty.call(r,n);var r,n}))&&p("changeField"),t},selector:function(e){g(e)||p("selectorType")},handler:function(e){g(e)||d(e)||p("handlerType"),d(e)&&Object.values(e).some((function(e){return!g(e)}))&&p("handlersType")},initial:function(e){var t;e||p("initialIsRequired"),d(e)||p("initialType"),t=e,Object.keys(t).length||p("initialContent")}};function y(e,t){return g(t)?t(e.current):t}function v(e,t){return e.current=s(s({},e.current),t),t}function m(e,t,r){return g(t)?t(e.current):Object.keys(r).forEach((function(r){var n;return null===(n=t[r])||void 0===n?void 0:n.call(t,e.current[r])})),r}const b={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h.initial(e),h.handler(t);var r={current:e},n=f(m)(r,t),o=f(v)(r),i=f(h.changes)(e),c=f(y)(r);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return h.selector(e),e(r.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight((function(e,t){return t(e)}),e)}}(n,o,i,c)(e)}]}};const w={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};const O=function(e){return{}.toString.call(e).includes("Object")};var j={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},M=function(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return t.apply(r,[].concat(o,n))}}}((function(e,t){throw new Error(e[t]||e.default)}))(j),E={config:function(e){return e||M("configIsRequired"),O(e)||M("configType"),e.urls?(console.warn(j.deprecation),{paths:{vs:e.urls.monacoBase}}):e}};const P=E;const R=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return t.reduceRight((function(e,t){return t(e)}),e)}};const k=function e(t,r){return Object.keys(r).forEach((function(n){r[n]instanceof Object&&t[n]&&Object.assign(r[n],e(t[n],r[n]))})),i(i({},t),r)};var S={type:"cancelation",msg:"operation is manually canceled"};const C=function(e){var t=!1,r=new Promise((function(r,n){e.then((function(e){return t?n(S):r(e)})),e.catch(n)}));return r.cancel=function(){return t=!0},r};var T,x,I=b.create({config:w,isInitialized:!1,resolve:null,reject:null,monaco:null}),A=(x=2,function(e){if(Array.isArray(e))return e}(T=I)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(n=(c=u.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(a){o=!0,i=a}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}return r}}(T,x)||function(e,t){if(e){if("string"===typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(T,x)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),V=A[0],D=A[1];function L(e){return document.body.appendChild(e)}function q(e){var t=V((function(e){return{config:e.config,reject:e.reject}})),r=function(e){var t=document.createElement("script");return e&&(t.src=e),t}("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function z(){var e=V((function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}})),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],(function(t){_(t),e.resolve(t)}),(function(t){e.reject(t)}))}function _(e){V().monaco||D({monaco:e})}var N=new Promise((function(e,t){return D({resolve:e,reject:t})})),F={config:function(e){var t=P.config(e),r=t.monaco,n=c(t,["monaco"]);D((function(e){return{config:k(e.config,n),monaco:r}}))},init:function(){var e=V((function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}}));if(!e.isInitialized){if(D({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),C(N);if(window.monaco&&window.monaco.editor)return _(window.monaco),e.resolve(window.monaco),C(N);R(L,q)(z)}return C(N)},__getMonacoInstance:function(){return V((function(e){return e.monaco}))}};const U=F;var B=r(9950),W={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},G={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}};var Y=function(e){let{children:t}=e;return B.createElement("div",{style:G.container},t)};var $=function(e){let{width:t,height:r,isEditorReady:n,loading:o,_ref:i,className:c,wrapperProps:u}=e;return B.createElement("section",{style:{...W.wrapper,width:t,height:r},...u},!n&&B.createElement(Y,null,o),B.createElement("div",{ref:i,style:{...W.fullWidth,...!n&&W.hide},className:c}))},H=(0,B.memo)($);var J=function(e){(0,B.useEffect)(e,[])};var K=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=(0,B.useRef)(!0);(0,B.useEffect)(n.current||!r?()=>{n.current=!1}:e,t)};function Q(){}function X(e,t,r,n){return function(e,t){return e.editor.getModel(Z(e,t))}(e,n)||function(e,t,r,n){return e.editor.createModel(t,r,n?Z(e,n):void 0)}(e,t,r,n)}function Z(e,t){return e.Uri.parse(t)}var ee=function(e){let{original:t,modified:r,language:n,originalLanguage:o,modifiedLanguage:i,originalModelPath:c,modifiedModelPath:u,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:s="light",loading:f="Loading...",options:d={},height:g="100%",width:p="100%",className:h,wrapperProps:y={},beforeMount:v=Q,onMount:m=Q}=e,[b,w]=(0,B.useState)(!1),[O,j]=(0,B.useState)(!0),M=(0,B.useRef)(null),E=(0,B.useRef)(null),P=(0,B.useRef)(null),R=(0,B.useRef)(m),k=(0,B.useRef)(v),S=(0,B.useRef)(!1);J((()=>{let e=U.init();return e.then((e=>(E.current=e)&&j(!1))).catch((e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e))),()=>M.current?function(){let e=M.current?.getModel();a||e?.original?.dispose(),l||e?.modified?.dispose(),M.current?.dispose()}():e.cancel()})),K((()=>{if(M.current&&E.current){let e=M.current.getOriginalEditor(),r=X(E.current,t||"",o||n||"text",c||"");r!==e.getModel()&&e.setModel(r)}}),[c],b),K((()=>{if(M.current&&E.current){let e=M.current.getModifiedEditor(),t=X(E.current,r||"",i||n||"text",u||"");t!==e.getModel()&&e.setModel(t)}}),[u],b),K((()=>{let e=M.current.getModifiedEditor();e.getOption(E.current.editor.EditorOption.readOnly)?e.setValue(r||""):r!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:r||"",forceMoveMarkers:!0}]),e.pushUndoStop())}),[r],b),K((()=>{M.current?.getModel()?.original.setValue(t||"")}),[t],b),K((()=>{let{original:e,modified:t}=M.current.getModel();E.current.editor.setModelLanguage(e,o||n||"text"),E.current.editor.setModelLanguage(t,i||n||"text")}),[n,o,i],b),K((()=>{E.current?.editor.setTheme(s)}),[s],b),K((()=>{M.current?.updateOptions(d)}),[d],b);let C=(0,B.useCallback)((()=>{if(!E.current)return;k.current(E.current);let e=X(E.current,t||"",o||n||"text",c||""),a=X(E.current,r||"",i||n||"text",u||"");M.current?.setModel({original:e,modified:a})}),[n,r,i,t,o,c,u]),T=(0,B.useCallback)((()=>{!S.current&&P.current&&(M.current=E.current.editor.createDiffEditor(P.current,{automaticLayout:!0,...d}),C(),E.current?.editor.setTheme(s),w(!0),S.current=!0)}),[d,s,C]);return(0,B.useEffect)((()=>{b&&R.current(M.current,E.current)}),[b]),(0,B.useEffect)((()=>{!O&&!b&&T()}),[O,b,T]),B.createElement(H,{width:p,height:g,isEditorReady:b,loading:f,_ref:P,className:h,wrapperProps:y})};(0,B.memo)(ee);var te=function(e){let t=(0,B.useRef)();return(0,B.useEffect)((()=>{t.current=e}),[e]),t.current},re=new Map;var ne=function(e){let{defaultValue:t,defaultLanguage:r,defaultPath:n,value:o,language:i,path:c,theme:u="light",line:a,loading:l="Loading...",options:s={},overrideServices:f={},saveViewState:d=!0,keepCurrentModel:g=!1,width:p="100%",height:h="100%",className:y,wrapperProps:v={},beforeMount:m=Q,onMount:b=Q,onChange:w,onValidate:O=Q}=e,[j,M]=(0,B.useState)(!1),[E,P]=(0,B.useState)(!0),R=(0,B.useRef)(null),k=(0,B.useRef)(null),S=(0,B.useRef)(null),C=(0,B.useRef)(b),T=(0,B.useRef)(m),x=(0,B.useRef)(),I=(0,B.useRef)(o),A=te(c),V=(0,B.useRef)(!1),D=(0,B.useRef)(!1);J((()=>{let e=U.init();return e.then((e=>(R.current=e)&&P(!1))).catch((e=>"cancelation"!==e?.type&&console.error("Monaco initialization: error:",e))),()=>k.current?(x.current?.dispose(),g?d&&re.set(c,k.current.saveViewState()):k.current.getModel()?.dispose(),void k.current.dispose()):e.cancel()})),K((()=>{let e=X(R.current,t||o||"",r||i||"",c||n||"");e!==k.current?.getModel()&&(d&&re.set(A,k.current?.saveViewState()),k.current?.setModel(e),d&&k.current?.restoreViewState(re.get(c)))}),[c],j),K((()=>{k.current?.updateOptions(s)}),[s],j),K((()=>{!k.current||void 0===o||(k.current.getOption(R.current.editor.EditorOption.readOnly)?k.current.setValue(o):o!==k.current.getValue()&&(D.current=!0,k.current.executeEdits("",[{range:k.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),k.current.pushUndoStop(),D.current=!1))}),[o],j),K((()=>{let e=k.current?.getModel();e&&i&&R.current?.editor.setModelLanguage(e,i)}),[i],j),K((()=>{void 0!==a&&k.current?.revealLine(a)}),[a],j),K((()=>{R.current?.editor.setTheme(u)}),[u],j);let L=(0,B.useCallback)((()=>{if(S.current&&R.current&&!V.current){T.current(R.current);let e=c||n,l=X(R.current,o||t||"",r||i||"",e||"");k.current=R.current?.editor.create(S.current,{model:l,automaticLayout:!0,...s},f),d&&k.current.restoreViewState(re.get(e)),R.current.editor.setTheme(u),void 0!==a&&k.current.revealLine(a),M(!0),V.current=!0}}),[t,r,n,o,i,c,s,f,d,u,a]);return(0,B.useEffect)((()=>{j&&C.current(k.current,R.current)}),[j]),(0,B.useEffect)((()=>{!E&&!j&&L()}),[E,j,L]),I.current=o,(0,B.useEffect)((()=>{j&&w&&(x.current?.dispose(),x.current=k.current?.onDidChangeModelContent((e=>{D.current||w(k.current.getValue(),e)})))}),[j,w]),(0,B.useEffect)((()=>{if(j){let e=R.current.editor.onDidChangeMarkers((e=>{let t=k.current.getModel()?.uri;if(t&&e.find((e=>e.path===t.path))){let e=R.current.editor.getModelMarkers({resource:t});O?.(e)}}));return()=>{e?.dispose()}}return()=>{}}),[j,O]),B.createElement(H,{width:p,height:h,isEditorReady:j,loading:l,_ref:S,className:y,wrapperProps:v})},oe=(0,B.memo)(ne)}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 239.183c6cbc.chunk.js.LICENSE.txt */
2
+ (self.webpackChunkharperdb_studio=self.webpackChunkharperdb_studio||[]).push([[239],{2594:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(4467);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&i.push.apply(i,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach((function(t){(0,r.A)(e,t,n[t])}))}return e}var o=n(9950);const s={dark_vscode_tribute:{default:"#D4D4D4",background:"#1E1E1E",background_warning:"#1E1E1E",string:"#CE8453",number:"#B5CE9F",colon:"#49B8F7",keys:"#9CDCFE",keys_whiteSpace:"#AF74A5",primitive:"#6392C6"},light_mitsuketa_tribute:{default:"#D4D4D4",background:"#FCFDFD",background_warning:"#FEECEB",string:"#FA7921",number:"#70CE35",colon:"#49B8F7",keys:"#59A5D8",keys_whiteSpace:"#835FB6",primitive:"#386FA4"}};var a=n(3727);const l={getCaller:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;var t=(new Error).stack.replace(/^Error\s+/,"");return t=(t=t.split("\n")[e]).replace(/^\s+at Object./,"").replace(/^\s+at /,"").replace(/ \(.+\)$/,"")},throwError:function(){throw["@",arguments.length>0&&void 0!==arguments[0]?arguments[0]:"unknown function","(): Expected parameter '",arguments.length>1&&void 0!==arguments[1]?arguments[1]:"unknown parameter","' ",arguments.length>2&&void 0!==arguments[2]?arguments[2]:"to be defined"].join("")},isUndefined:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>";[null,void 0].indexOf(arguments.length>1?arguments[1]:void 0)>-1&&l.throwError(l.getCaller(2),e)},isFalsy:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>";(arguments.length>1?arguments[1]:void 0)||l.throwError(l.getCaller(2),e)},isNoneOf:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];-1===n.indexOf(t)&&l.throwError(l.getCaller(2),e,"to be any of"+JSON.stringify(n))},isAnyOf:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];n.indexOf(t)>-1&&l.throwError(l.getCaller(2),e,"not to be any of"+JSON.stringify(n))},isNotType:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";(0,a.getType)(t)!==n.toLowerCase()&&l.throwError(l.getCaller(2),e,"to be type "+n.toLowerCase())},isAnyTypeOf:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0;(arguments.length>2&&void 0!==arguments[2]?arguments[2]:[]).forEach((n=>{(0,a.getType)(t)===n&&l.throwError(l.getCaller(2),e,"not to be type of "+n.toLowerCase())}))},missingKey:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";l.isUndefined(e,t),-1===Object.keys(t).indexOf(n)&&l.throwError(l.getCaller(2),e,"to contain '"+n+"' key")},missingAnyKeys:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""];l.isUndefined(e,t);const r=Object.keys(t);n.forEach((t=>{-1===r.indexOf(t)&&l.throwError(l.getCaller(2),e,"to contain '"+t+"' key")}))},containsUndefined:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0;[void 0,null].forEach((n=>{const r=(0,a.locate)(t,n);r&&l.throwError(l.getCaller(2),e,"not to contain '"+JSON.stringify(n)+"' at "+r)}))},isInvalidPath:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0;l.isUndefined(e,t),l.isNotType(e,t,"string"),l.isAnyOf(e,t,["","/"]),".$[]#".split().forEach((n=>{t.indexOf(n)>-1&&l.throwError(l.getCaller(2),e,"not to contain invalid character '"+n+"'")})),t.match(/\/{2,}/g)&&l.throwError(l.getCaller(2),e,"not to contain consecutive forward slash characters")},isInvalidWriteData:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"<unknown parameter>",t=arguments.length>1?arguments[1]:void 0;l.isUndefined(e,t),l.containsUndefined(e,t)}},c=l,u=(e,t)=>t?Object.keys(t).reduce(((e,n)=>e.replace(new RegExp(`\\{${n}\\}`,"gi"),(e=>Array.isArray(e)?e.join(", "):"string"===typeof e?e:""+e)(t[n]))),e):e,p={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"};class h extends o.Component{constructor(e){super(e),this.updateInternalProps=this.updateInternalProps.bind(this),this.createMarkup=this.createMarkup.bind(this),this.onClick=this.onClick.bind(this),this.onBlur=this.onBlur.bind(this),this.update=this.update.bind(this),this.getCursorPosition=this.getCursorPosition.bind(this),this.setCursorPosition=this.setCursorPosition.bind(this),this.scheduledUpdate=this.scheduledUpdate.bind(this),this.setUpdateTime=this.setUpdateTime.bind(this),this.renderLabels=this.renderLabels.bind(this),this.newSpan=this.newSpan.bind(this),this.renderErrorMessage=this.renderErrorMessage.bind(this),this.onScroll=this.onScroll.bind(this),this.showPlaceholder=this.showPlaceholder.bind(this),this.tokenize=this.tokenize.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onPaste=this.onPaste.bind(this),this.stopEvent=this.stopEvent.bind(this),this.refContent=null,this.refLabels=null,this.updateInternalProps(),this.renderCount=1,this.state={prevPlaceholder:"",markupText:"",plainText:"",json:"",jsObject:void 0,lines:!1,error:!1},this.props.locale||console.warn("[react-json-editor-ajrm - Deprecation Warning] You did not provide a 'locale' prop for your JSON input - This will be required in a future version. English has been set as a default.")}updateInternalProps(){let e={},t={},n=s.dark_vscode_tribute;"theme"in this.props&&"string"===typeof this.props.theme&&this.props.theme in s&&(n=s[this.props.theme]),e=n,"colors"in this.props&&(e={default:"default"in this.props.colors?this.props.colors.default:e.default,string:"string"in this.props.colors?this.props.colors.string:e.string,number:"number"in this.props.colors?this.props.colors.number:e.number,colon:"colon"in this.props.colors?this.props.colors.colon:e.colon,keys:"keys"in this.props.colors?this.props.colors.keys:e.keys,keys_whiteSpace:"keys_whiteSpace"in this.props.colors?this.props.colors.keys_whiteSpace:e.keys_whiteSpace,primitive:"primitive"in this.props.colors?this.props.colors.primitive:e.primitive,error:"error"in this.props.colors?this.props.colors.error:e.error,background:"background"in this.props.colors?this.props.colors.background:e.background,background_warning:"background_warning"in this.props.colors?this.props.colors.background_warning:e.background_warning}),this.colors=e,t="style"in this.props?{outerBox:"outerBox"in this.props.style?this.props.style.outerBox:{},container:"container"in this.props.style?this.props.style.container:{},warningBox:"warningBox"in this.props.style?this.props.style.warningBox:{},errorMessage:"errorMessage"in this.props.style?this.props.style.errorMessage:{},body:"body"in this.props.style?this.props.style.body:{},labelColumn:"labelColumn"in this.props.style?this.props.style.labelColumn:{},labels:"labels"in this.props.style?this.props.style.labels:{},contentBox:"contentBox"in this.props.style?this.props.style.contentBox:{}}:{outerBox:{},container:{},warningBox:{},errorMessage:{},body:{},labelColumn:{},labels:{},contentBox:{}},this.style=t,this.confirmGood=!("confirmGood"in this.props)||this.props.confirmGood;const r=this.props.height||"610px",i=this.props.width||"479px";this.totalHeight=r,this.totalWidth=i,!("onKeyPressUpdate"in this.props)||this.props.onKeyPressUpdate?this.timer||(this.timer=setInterval(this.scheduledUpdate,100)):this.timer&&(clearInterval(this.timer),this.timer=!1),this.updateTime=!1,this.waitAfterKeyPress="waitAfterKeyPress"in this.props?this.props.waitAfterKeyPress:1e3,this.resetConfiguration="reset"in this.props&&this.props.reset}render(){const e=this.props.id,t=this.state.markupText,n=this.props.error||this.state.error,r=this.colors,s=this.style,a=this.confirmGood,l=this.totalHeight,c=this.totalWidth,u=!!this.props.error||!!n&&"token"in n;return this.renderCount++,o.createElement("div",{name:"outer-box",id:e&&e+"-outer-box",style:i({display:"block",overflow:"none",height:l,width:c,margin:0,boxSizing:"border-box",position:"relative"},s.outerBox)},a?o.createElement("div",{style:{opacity:u?0:1,height:"30px",width:"30px",position:"absolute",top:0,right:0,transform:"translate(-25%,25%)",pointerEvents:"none",transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"}},o.createElement("svg",{height:"30px",width:"30px",viewBox:"0 0 100 100"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"green",opacity:"0.85",d:"M39.363,79L16,55.49l11.347-11.419L39.694,56.49L72.983,23L84,34.085L39.363,79z"}))):void 0,o.createElement("div",{name:"container",id:e&&e+"-container",style:i({display:"block",height:l,width:c,margin:0,boxSizing:"border-box",overflow:"hidden",fontFamily:"Roboto, sans-serif"},s.container),onClick:this.onClick},o.createElement("div",{name:"warning-box",id:e&&e+"-warning-box",style:i({display:"block",overflow:"hidden",height:u?"60px":"0px",width:"100%",margin:0,backgroundColor:r.background_warning,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},s.warningBox),onClick:this.onClick},o.createElement("span",{style:{display:"inline-block",height:"60px",width:"60px",margin:0,boxSizing:"border-box",overflow:"hidden",verticalAlign:"top",pointerEvents:"none"},onClick:this.onClick},o.createElement("div",{style:{position:"relative",top:0,left:0,height:"60px",width:"60px",margin:0,pointerEvents:"none"},onClick:this.onClick},o.createElement("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},onClick:this.onClick},o.createElement("svg",{height:"25px",width:"25px",viewBox:"0 0 100 100"},o.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",fill:"red",d:"M73.9,5.75c0.467-0.467,1.067-0.7,1.8-0.7c0.7,0,1.283,0.233,1.75,0.7l16.8,16.8 c0.467,0.5,0.7,1.084,0.7,1.75c0,0.733-0.233,1.334-0.7,1.801L70.35,50l23.9,23.95c0.5,0.467,0.75,1.066,0.75,1.8 c0,0.667-0.25,1.25-0.75,1.75l-16.8,16.75c-0.534,0.467-1.117,0.7-1.75,0.7s-1.233-0.233-1.8-0.7L50,70.351L26.1,94.25 c-0.567,0.467-1.167,0.7-1.8,0.7c-0.667,0-1.283-0.233-1.85-0.7L5.75,77.5C5.25,77,5,76.417,5,75.75c0-0.733,0.25-1.333,0.75-1.8 L29.65,50L5.75,26.101C5.25,25.667,5,25.066,5,24.3c0-0.666,0.25-1.25,0.75-1.75l16.8-16.8c0.467-0.467,1.05-0.7,1.75-0.7 c0.733,0,1.333,0.233,1.8,0.7L50,29.65L73.9,5.75z"}))))),o.createElement("span",{style:{display:"inline-block",height:"60px",width:"calc(100% - 60px)",margin:0,overflow:"hidden",verticalAlign:"top",position:"absolute",pointerEvents:"none"},onClick:this.onClick},this.renderErrorMessage())),o.createElement("div",{name:"body",id:e&&e+"-body",style:i({display:"flex",overflow:"none",height:u?"calc(100% - 60px)":"100%",width:"",margin:0,resize:"none",fontFamily:"Roboto Mono, Monaco, monospace",fontSize:"11px",backgroundColor:r.background,transitionDuration:"0.2s",transitionTimingFunction:"cubic-bezier(0, 1, 0.5, 1)"},s.body),onClick:this.onClick},o.createElement("span",{name:"labels",id:e&&e+"-labels",ref:e=>this.refLabels=e,style:i({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"44px",margin:0,padding:"5px 0px 5px 10px",overflow:"hidden",color:"#D4D4D4"},s.labelColumn),onClick:this.onClick},this.renderLabels()),o.createElement("span",{id:e,ref:e=>this.refContent=e,contentEditable:!0,style:i({display:"inline-block",boxSizing:"border-box",verticalAlign:"top",height:"100%",width:"",flex:1,margin:0,padding:"5px",overflowX:"hidden",overflowY:"auto",wordWrap:"break-word",whiteSpace:"pre-line",color:"#D4D4D4",outline:"none"},s.contentBox),dangerouslySetInnerHTML:this.createMarkup(t),onKeyPress:this.onKeyPress,onKeyDown:this.onKeyDown,onClick:this.onClick,onBlur:this.onBlur,onScroll:this.onScroll,onPaste:this.onPaste,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}))))}renderErrorMessage(){const e=this.props.locale||p,t=this.props.error||this.state.error,n=this.style;if(t)return o.createElement("p",{style:i({color:"red",fontSize:"12px",position:"absolute",width:"calc(100% - 60px)",height:"60px",boxSizing:"border-box",margin:0,padding:0,paddingRight:"10px",overflowWrap:"break-word",display:"flex",flexDirection:"column",justifyContent:"center"},n.errorMessage)},u(e.format,t))}renderLabels(){const e=this.colors,t=this.style,n=this.props.error||this.state.error,r=n?n.line:-1,s=this.state.lines?this.state.lines:1;let a=new Array(s);for(var l=0;l<s-1;l++)a[l]=l+1;return a.map((n=>{const s=n!==r?e.default:"red";return o.createElement("div",{key:n,style:i({},t.labels,{color:s})},n)}))}createMarkup(e){return void 0===e?{__html:""}:{__html:""+e}}newSpan(e,t,n){let r=this.colors,i=t.type,o=t.string,s="";switch(i){case"string":case"number":case"primitive":case"error":s=r[t.type];break;case"key":s=" "===o?r.keys_whiteSpace:r.keys;break;case"symbol":s=":"===o?r.colon:r.default;break;default:s=r.default}return o.length!==o.replace(/</g,"").replace(/>/g,"").length&&(o="<xmp style=display:inline;>"+o+"</xmp>"),'<span type="'+i+'" value="'+o+'" depth="'+n+'" style="color:'+s+'">'+o+"</span>"}getCursorPosition(e){let t,n=window.getSelection(),r=-1,i=0;if(n.focusNode&&(e=>{for(;null!==e;){if(e===this.refContent)return!0;e=e.parentNode}return!1})(n.focusNode))for(t=n.focusNode,r=n.focusOffset;t&&t!==this.refContent;)if(t.previousSibling)t=t.previousSibling,e&&"BR"===t.nodeName&&i++,r+=t.textContent.length;else if(t=t.parentNode,null===t)break;return r+i}setCursorPosition(e){if([!1,null,void 0].indexOf(e)>-1)return;const t=(e,n,r)=>{if(r||((r=document.createRange()).selectNode(e),r.setStart(e,0)),0===n.count)r.setEnd(e,n.count);else if(e&&n.count>0)if(e.nodeType===Node.TEXT_NODE)e.textContent.length<n.count?n.count-=e.textContent.length:(r.setEnd(e,n.count),n.count=0);else for(var i=0;i<e.childNodes.length&&(r=t(e.childNodes[i],n,r),0!==n.count);i++);return r};e>0?(e=>{if(e<0)return;let n=window.getSelection(),r=t(this.refContent,{count:e});r&&(r.collapse(!1),n.removeAllRanges(),n.addRange(r))})(e):this.refContent.focus()}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.refContent,r=this.tokenize(n);"onChange"in this.props&&this.props.onChange({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error});let i=this.getCursorPosition(r.error)+e;this.setState({plainText:r.indented,markupText:r.markup,json:r.json,jsObject:r.jsObject,lines:r.lines,error:r.error}),this.updateTime=!1,t&&this.setCursorPosition(i)}scheduledUpdate(){if("onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate)return;const{updateTime:e}=this;!1!==e&&(e>(new Date).getTime()||this.update())}setUpdateTime(){"onKeyPressUpdate"in this.props&&!1===this.props.onKeyPressUpdate||(this.updateTime=(new Date).getTime()+this.waitAfterKeyPress)}stopEvent(e){e&&(e.preventDefault(),e.stopPropagation())}onKeyPress(e){const t=e.ctrlKey||e.metaKey;this.props.viewOnly&&!t&&this.stopEvent(e),t||this.setUpdateTime()}onKeyDown(e){const t=!!this.props.viewOnly,n=e.ctrlKey||e.metaKey;switch(e.key){case"Tab":if(this.stopEvent(e),t)break;document.execCommand("insertText",!1," "),this.setUpdateTime();break;case"Backspace":case"Delete":t&&this.stopEvent(e),this.setUpdateTime();break;case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this.setUpdateTime();break;case"a":case"c":t&&!n&&this.stopEvent(e);break;default:t&&this.stopEvent(e)}}onPaste(e){if(this.props.viewOnly)this.stopEvent(e);else{e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)}this.update()}onClick(){!("viewOnly"in this.props)||this.props.viewOnly}onBlur(){if("viewOnly"in this.props&&this.props.viewOnly)return;const e=this.refContent,t=this.tokenize(e);"onBlur"in this.props&&this.props.onBlur({plainText:t.indented,markupText:t.markup,json:t.json,jsObject:t.jsObject,lines:t.lines,error:t.error})}onScroll(e){this.refLabels.scrollTop=e.target.scrollTop}componentDidUpdate(){this.updateInternalProps(),this.showPlaceholder()}componentDidMount(){this.showPlaceholder()}componentWillUnmount(){this.timer&&clearInterval(this.timer)}showPlaceholder(){if(!("placeholder"in this.props))return;const{placeholder:e}=this.props;if([void 0,null].indexOf(e)>-1)return;const{prevPlaceholder:t,jsObject:n}=this.state,{resetConfiguration:r}=this,i=(0,a.getType)(e);-1===["object","array"].indexOf(i)&&c.throwError("showPlaceholder","placeholder","either an object or an array");let o=!(0,a.identical)(e,t);if(o||r&&void 0!==n&&(o=!(0,a.identical)(e,n)),!o)return;const s=this.tokenize(e);this.setState({prevPlaceholder:e,plainText:s.indentation,markupText:s.markup,lines:s.lines,error:s.error})}tokenize(e){if("object"!==typeof e)return console.error("tokenize() expects object type properties only. Got '"+typeof e+"' type instead.");const t=this.props.locale||p,n=this.newSpan;if("nodeType"in e){const d=e.cloneNode(!0);if(!d.hasChildNodes())return"";const f=d.childNodes;let g={tokens_unknown:[],tokens_proto:[],tokens_split:[],tokens_fallback:[],tokens_normalize:[],tokens_merge:[],tokens_plainText:"",indented:"",json:"",jsObject:void 0,markup:""};for(var r=0;r<f.length;r++){let D=f[r],K={};switch(D.nodeName){case"SPAN":K={string:D.textContent,type:D.attributes.type.textContent},g.tokens_unknown.push(K);break;case"DIV":case"FONT":g.tokens_unknown.push({string:D.textContent,type:"unknown"});break;case"BR":""===D.textContent&&g.tokens_unknown.push({string:"\n",type:"unknown"});break;case"#text":g.tokens_unknown.push({string:D.wholeText,type:"unknown"});break;default:console.error("Unrecognized node:",{child:D})}}function k(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n={active:!1,string:"",number:"",symbol:"",space:"",delimiter:"",quarks:[]};function r(e,r){switch(r){case"symbol":case"delimiter":n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e;break;default:r!==n.active||[n.string,e].indexOf("\n")>-1?(n.active&&n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=r,n[n.active]=e):n[r]+=e}}for(var i=0;i<e.length;i++){const t=e.charAt(i);switch(t){case'"':case"'":r(t,"delimiter");break;case" ":case"\xa0":r(t,"space");break;case"{":case"}":case"[":case"]":case":":case",":r(t,"symbol");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":"string"===n.active?r(t,"string"):r(t,"number");break;case"-":if(i<e.length-1&&"0123456789".indexOf(e.charAt(i+1))>-1){r(t,"number");break}case".":if(i<e.length-1&&i>0&&"0123456789".indexOf(e.charAt(i+1))>-1&&"0123456789".indexOf(e.charAt(i-1))>-1){r(t,"number");break}default:r(t,"string")}}return n.active&&(n.quarks.push({string:n[n.active],type:t+"-"+n.active}),n[n.active]="",n.active=!1),n.quarks}for(r=0;r<g.tokens_unknown.length;r++){let B=g.tokens_unknown[r];g.tokens_proto=g.tokens_proto.concat(k(B.string,"proto"))}function b(e,t){const n="'\"";let r="",i="",o=!1;switch(t){case"primitive":if(-1===["true","false","null","undefined"].indexOf(e))return!1;break;case"string":if(e.length<2)return!1;if(r=e.charAt(0),i=e.charAt(e.length-1),o=n.indexOf(r),-1===o)return!1;if(r!==i)return!1;for(var s=0;s<e.length;s++)if(s>0&&s<e.length-1&&e.charAt(s)===n[o]&&"\\"!==e.charAt(s-1))return!1;break;case"key":if(0===e.length)return!1;if(r=e.charAt(0),i=e.charAt(e.length-1),o=n.indexOf(r),o>-1){if(1===e.length)return!1;if(r!==i)return!1;for(s=0;s<e.length;s++)if(s>0&&s<e.length-1&&e.charAt(s)===n[o]&&"\\"!==e.charAt(s-1))return!1}else{const t="'\"`.,:;{}[]&<>=~*%\\|/-+!?@^ \xa0";for(s=0;s<t.length;s++){const n=t.charAt(s);if(e.indexOf(n)>-1)return!1}}break;case"number":for(s=0;s<e.length;s++)if(-1==="0123456789".indexOf(e.charAt(s)))if(0===s){if("-"!==e.charAt(0))return!1}else if("."!==e.charAt(s))return!1;break;case"symbol":if(e.length>1)return!1;if(-1==="{[:]},".indexOf(e))return!1;break;case"colon":if(e.length>1)return!1;if(":"!==e)return!1;break;default:return!0}return!0}for(r=0;r<g.tokens_proto.length;r++){let N=g.tokens_proto[r];-1===N.type.indexOf("proto")?b(N.string,N.type)?g.tokens_split.push(N):g.tokens_split=g.tokens_split.concat(k(N.string,"split")):g.tokens_split.push(N)}for(r=0;r<g.tokens_split.length;r++){let M=g.tokens_split[r],U=M.type,z=M.string,L=z.length,V=[];U.indexOf("-")>-1&&(U=U.slice(U.indexOf("-")+1),"string"!==U&&V.push("string"),V.push("key"),V.push("error"));let F={string:z,length:L,type:U,fallback:V};g.tokens_fallback.push(F)}function y(){const e=g.tokens_normalize.length-1;if(e<1)return!1;for(var t=e;t>=0;t--){const e=g.tokens_normalize[t];switch(e.type){case"space":case"linebreak":break;default:return e}}return!1}let m={brackets:[],stringOpen:!1,isValue:!1};for(r=0;r<g.tokens_fallback.length;r++){let I=g.tokens_fallback[r];const W=I.type,R=I.string;let Q={type:W,string:R};switch(W){case"symbol":case"colon":if(m.stringOpen){m.isValue?Q.type="string":Q.type="key";break}switch(R){case"[":case"{":m.brackets.push(R),m.isValue="["===m.brackets[m.brackets.length-1];break;case"]":case"}":m.brackets.pop(),m.isValue="["===m.brackets[m.brackets.length-1];break;case",":if("colon"===y().type)break;m.isValue="["===m.brackets[m.brackets.length-1];break;case":":Q.type="colon",m.isValue=!0}break;case"delimiter":if(m.isValue?Q.type="string":Q.type="key",!m.stringOpen){m.stringOpen=R;break}if(r>0){const G=g.tokens_fallback[r-1],J=G.string,H=G.type,$=J.charAt(J.length-1);if("string"===H&&"\\"===$)break}if(m.stringOpen===R){m.stringOpen=!1;break}break;case"primitive":case"string":if(["false","true","null","undefined"].indexOf(R)>-1){const X=g.tokens_normalize.length-1;if(X>=0){if("string"!==g.tokens_normalize[X].type){Q.type="primitive";break}Q.type="string";break}Q.type="primitive";break}if("\n"===R&&!m.stringOpen){Q.type="linebreak";break}m.isValue?Q.type="string":Q.type="key";break;case"space":case"number":m.stringOpen&&(m.isValue?Q.type="string":Q.type="key")}g.tokens_normalize.push(Q)}for(r=0;r<g.tokens_normalize.length;r++){const Y=g.tokens_normalize[r];let Z={string:Y.string,type:Y.type,tokens:[r]};if(-1===["symbol","colon"].indexOf(Y.type)&&r+1<g.tokens_normalize.length){let ee=0;for(var i=r+1;i<g.tokens_normalize.length;i++){const te=g.tokens_normalize[i];if(Y.type!==te.type)break;Z.string+=te.string,Z.tokens.push(i),ee++}r+=ee}g.tokens_merge.push(Z)}const v="'\"",x="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$";var o=!1,s=g.tokens_merge.length>0?1:0;function w(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;o={token:e,line:s,reason:t},g.tokens_merge[e+n].type="error"}function O(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),e===g.tokens_merge.length-1)return!1;for(var n=e+1;n<g.tokens_merge.length;n++){const e=g.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1&&n;default:return!1}}return!1}function T(e,t){if(void 0===e&&console.error("tokenID argument must be an integer."),void 0===t&&console.error("options argument must be an array."),0===e)return!1;for(var n=e-1;n>=0;n--){const e=g.tokens_merge[n];switch(e.type){case"space":case"linebreak":break;case"symbol":case"colon":return t.indexOf(e.string)>-1;default:return!1}}return!1}function j(e){if(void 0===e&&console.error("tokenID argument must be an integer."),0===e)return!1;for(var t=e-1;t>=0;t--){const e=g.tokens_merge[t];switch(e.type){case"space":case"linebreak":break;default:return e.type}}return!1}m={brackets:[],stringOpen:!1,isValue:!1};let C=[];for(r=0;r<g.tokens_merge.length&&!o;r++){let ne=g.tokens_merge[r],re=ne.string,ie=ne.type,oe=!1;switch(ie){case"space":break;case"linebreak":s++;break;case"symbol":switch(re){case"{":case"[":if(oe=T(r,["}","]"]),oe){w(r,u(t.invalidToken.tokenSequence.prohibited,{firstToken:g.tokens_merge[oe].string,secondToken:re}));break}if("["===re&&r>0&&!T(r,[":","[",","])){w(r,u(t.invalidToken.tokenSequence.permitted,{firstToken:"[",secondToken:[":","[",","]}));break}if("{"===re&&T(r,["{"])){w(r,u(t.invalidToken.double,{token:"{"}));break}m.brackets.push(re),m.isValue="["===m.brackets[m.brackets.length-1],C.push({i:r,line:s,string:re});break;case"}":case"]":if("}"===re&&"{"!==m.brackets[m.brackets.length-1]){w(r,u(t.brace.curly.missingOpen));break}if("}"===re&&T(r,[","])){w(r,u(t.invalidToken.tokenSequence.prohibited,{firstToken:",",secondToken:"}"}));break}if("]"===re&&"["!==m.brackets[m.brackets.length-1]){w(r,u(t.brace.square.missingOpen));break}if("]"===re&&T(r,[":"])){w(r,u(t.invalidToken.tokenSequence.prohibited,{firstToken:":",secondToken:"]"}));break}m.brackets.pop(),m.isValue="["===m.brackets[m.brackets.length-1],C.push({i:r,line:s,string:re});break;case",":if(oe=T(r,["{"]),oe){if(O(r,["}"])){w(r,u(t.brace.curly.cannotWrap,{token:","}));break}w(r,u(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}if(O(r,["}",",","]"])){w(r,u(t.noTrailingOrLeadingComma));break}switch(oe=j(r),oe){case"key":case"colon":w(r,u(t.invalidToken.termSequence.prohibited,{firstTerm:"key"===oe?t.types.key:t.symbols.colon,secondTerm:t.symbols.comma}));break;case"symbol":if(T(r,["{"])){w(r,u(t.invalidToken.tokenSequence.prohibited,{firstToken:"{",secondToken:","}));break}}m.isValue="["===m.brackets[m.brackets.length-1]}g.json+=re;break;case"colon":if(oe=T(r,["["]),oe&&O(r,["]"])){w(r,u(t.brace.square.cannotWrap,{token:":"}));break}if(oe){w(r,u(t.invalidToken.tokenSequence.prohibited,{firstToken:"[",secondToken:":"}));break}if("key"!==j(r)){w(r,u(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.key}));break}if(O(r,["}","]"])){w(r,u(t.invalidToken.termSequence.permitted,{firstTerm:t.symbols.colon,secondTerm:t.types.value}));break}m.isValue=!0,g.json+=re;break;case"key":case"string":let se=re.charAt(0),ae=re.charAt(re.length-1);v.indexOf(se);if(-1===v.indexOf(se)&&-1!==v.indexOf(ae)){w(r,u(t.string.missingOpen,{quote:se}));break}if(-1===v.indexOf(ae)&&-1!==v.indexOf(se)){w(r,u(t.string.missingClose,{quote:se}));break}if(v.indexOf(se)>-1&&se!==ae){w(r,u(t.string.missingClose,{quote:se}));break}if("string"===ie&&-1===v.indexOf(se)&&-1===v.indexOf(ae)){w(r,u(t.string.mustBeWrappedByQuotes));break}if("key"===ie&&O(r,["}","]"])&&w(r,u(t.invalidToken.termSequence.permitted,{firstTerm:t.types.key,secondTerm:t.symbols.colon})),-1===v.indexOf(se)&&-1===v.indexOf(ae))for(var a=0;a<re.length&&!o;a++){const le=re.charAt(a);if(-1===x.indexOf(le)){w(r,u(t.string.nonAlphanumeric,{token:le}));break}}if("'"===se?re='"'+re.slice(1,-1)+'"':'"'!==se&&(re='"'+re+'"'),"key"===ie&&"key"===j(r)){if(r>0&&!isNaN(g.tokens_merge[r-1])){g.tokens_merge[r-1]+=g.tokens_merge[r],w(r,u(t.key.numberAndLetterMissingQuotes));break}w(r,u(t.key.spaceMissingQuotes));break}if("key"===ie&&!T(r,["{",","])){w(r,u(t.invalidToken.tokenSequence.permitted,{firstToken:ie,secondToken:["{",","]}));break}if("string"===ie&&!T(r,["[",":",","])){w(r,u(t.invalidToken.tokenSequence.permitted,{firstToken:ie,secondToken:["[",":",","]}));break}if("key"===ie&&m.isValue){w(r,u(t.string.unexpectedKey));break}if("string"===ie&&!m.isValue){w(r,u(t.key.unexpectedString));break}g.json+=re;break;case"number":case"primitive":if(T(r,["{"]))g.tokens_merge[r].type="key",ie=g.tokens_merge[r].type,re='"'+re+'"';else if("key"===j(r))g.tokens_merge[r].type="key",ie=g.tokens_merge[r].type;else if(!T(r,["[",":",","])){w(r,u(t.invalidToken.tokenSequence.permitted,{firstToken:ie,secondToken:["[",":",","]}));break}"key"!==ie&&(m.isValue||(g.tokens_merge[r].type="key",ie=g.tokens_merge[r].type,re='"'+re+'"')),"primitive"===ie&&"undefined"===re&&w(r,u(t.invalidToken.useInstead,{badToken:"undefined",goodToken:"null"})),g.json+=re}}let _="";for(r=0;r<g.json.length;r++){let ce=g.json.charAt(r),ue="";r+1<g.json.length&&(ue=g.json.charAt(r+1),"\\"===ce&&"'"===ue)?(_+=ue,r++):_+=ce}if(g.json=_,!o){const pe=Math.ceil(C.length/2);let he=0,de=!1;function fe(e){C.splice(e+1,1),C.splice(e,1),de||(de=!0)}for(;C.length>0;){de=!1;for(var c=0;c<C.length-1;c++){const ge=C[c].string+C[c+1].string;["[]","{}"].indexOf(ge)>-1&&fe(c)}if(he++,!de)break;if(he>=pe)break}if(C.length>0){const ke=C[0].string,be=C[0].i,ye="["===ke?"]":"}";s=C[0].line,w(be,u(t.brace["]"===ye?"square":"curly"].missingClose))}}if(!o&&-1===[void 0,""].indexOf(g.json))try{g.jsObject=JSON.parse(g.json)}catch(l){const ve=l.message,xe=ve.indexOf("position");if(-1===xe)throw new Error("Error parsing failed");const we=ve.substring(xe+9,ve.length),Oe=parseInt(we);let Te=0,je=0,Ce=!1,_e=1,Ee=!1;for(;Te<Oe&&!Ee&&(Ce=g.tokens_merge[je],"linebreak"===Ce.type&&_e++,-1===["space","linebreak"].indexOf(Ce.type)&&(Te+=Ce.string.length),!(Te>=Oe));)je++,g.tokens_merge[je+1]||(Ee=!0);s=_e;let Ae=0;for(let Se=0;Se<Ce.string.length;Se++){const qe=Ce.string.charAt(Se);"\\"===qe?Ae=Ae>0?Ae+1:1:(Ae%2===0&&0!==Ae||-1==="'\"bfnrt".indexOf(qe)&&w(je,u(t.invalidToken.unexpected,{token:"\\"})),Ae=0)}o||w(je,u(t.invalidToken.unexpected,{token:Ce.string}))}let E=1,A=0;function S(){for(var e=[],t=0;t<2*A;t++)e.push("&nbsp;");return e.join("")}function q(){return E++,A>0||arguments.length>0&&void 0!==arguments[0]&&arguments[0]?"<br>":""}function P(){return q(arguments.length>0&&void 0!==arguments[0]&&arguments[0])+S()}if(!o)for(r=0;r<g.tokens_merge.length;r++){const Pe=g.tokens_merge[r],De=Pe.string;switch(Pe.type){case"space":case"linebreak":break;case"string":case"number":case"primitive":case"error":g.markup+=(T(r,[",","["])?P():"")+n(r,Pe,A);break;case"key":g.markup+=P()+n(r,Pe,A);break;case"colon":g.markup+=n(r,Pe,A)+"&nbsp;";break;case"symbol":switch(De){case"[":case"{":g.markup+=(T(r,[":"])?"":P())+n(r,Pe,A),A++;break;case"]":case"}":A--;const Ke=r===g.tokens_merge.length-1,Be=r>0?["[","{"].indexOf(g.tokens_merge[r-1].string)>-1?"":P(Ke):"";g.markup+=Be+n(r,Pe,A);break;case",":g.markup+=n(r,Pe,A)}}}if(o){let Ne=1;function Me(e){let t=0;for(var n=0;n<e.length;n++)["\n","\r"].indexOf(e[n])>-1&&t++;return t}E=1;for(r=0;r<g.tokens_merge.length;r++){const Ue=g.tokens_merge[r],ze=Ue.type,Le=Ue.string;"linebreak"===ze&&E++,g.markup+=n(r,Ue,A),Ne+=Me(Le)}E++,Ne++,E<Ne&&(E=Ne)}for(r=0;r<g.tokens_merge.length;r++){let Ve=g.tokens_merge[r];g.indented+=Ve.string,-1===["space","linebreak"].indexOf(Ve.type)&&(g.tokens_plainText+=Ve.string)}if(o){"modifyErrorText"in this.props&&((h=this.props.modifyErrorText)&&"[object Function]"==={}.toString.call(h)&&(o.reason=this.props.modifyErrorText(o.reason)))}return{tokens:g.tokens_merge,noSpaces:g.tokens_plainText,indented:g.indented,json:g.json,jsObject:g.jsObject,markup:g.markup,lines:E,error:o}}var h;if(!("nodeType"in e)){let Fe={inputText:JSON.stringify(e),position:0,currentChar:"",tokenPrimary:"",tokenSecondary:"",brackets:[],isValue:!1,stringOpen:!1,stringStart:0,tokens:[]};function Ie(){return"\\"===Fe.currentChar}function We(){if(-1==="'\"".indexOf(Fe.currentChar))return!1;if(!Fe.stringOpen)return Qe(),Fe.stringStart=Fe.position,Fe.stringOpen=Fe.currentChar,!0;if(Fe.stringOpen===Fe.currentChar){Qe();return Ge(Fe.inputText.substring(Fe.stringStart,Fe.position+1)),Fe.stringOpen=!1,!0}return!1}function Re(){if(-1===":,{}[]".indexOf(Fe.currentChar))return!1;if(Fe.stringOpen)return!1;switch(Qe(),Ge(Fe.currentChar),Fe.currentChar){case":":return Fe.isValue=!0,!0;case"{":case"[":Fe.brackets.push(Fe.currentChar);break;case"}":case"]":Fe.brackets.pop()}return":"!==Fe.currentChar&&(Fe.isValue="["===Fe.brackets[Fe.brackets.length-1]),!0}function Qe(){return 0!==Fe.tokenSecondary.length&&(Fe.tokens.push(Fe.tokenSecondary),Fe.tokenSecondary="",!0)}function Ge(e){return 0!==e.length&&(Fe.tokens.push(e),!0)}for(r=0;r<Fe.inputText.length;r++){Fe.position=r,Fe.currentChar=Fe.inputText.charAt(Fe.position);const nt=Re(),rt=We(),it=Ie();nt||rt||it||Fe.stringOpen||(Fe.tokenSecondary+=Fe.currentChar)}let Je={brackets:[],isValue:!1,tokens:[]};Je.tokens=Fe.tokens.map((e=>{let t="",n="",r="";switch(e){case",":t="symbol",n=e,r=e,Je.isValue="["===Je.brackets[Je.brackets.length-1];break;case":":t="symbol",n=e,r=e,Je.isValue=!0;break;case"{":case"[":t="symbol",n=e,r=e,Je.brackets.push(e),Je.isValue="["===Je.brackets[Je.brackets.length-1];break;case"}":case"]":t="symbol",n=e,r=e,Je.brackets.pop(),Je.isValue="["===Je.brackets[Je.brackets.length-1];break;case"undefined":t="primitive",n=e,r=void 0;break;case"null":t="primitive",n=e,r=null;break;case"false":t="primitive",n=e,r=!1;break;case"true":t="primitive",n=e,r=!0;break;default:const o=e.charAt(0);function s(e){if(0===e.length)return e;if(['""',"''"].indexOf(e)>-1)return"''";let t=!1;for(var n=0;n<2;n++)if([e.charAt(0),e.charAt(e.length-1)].indexOf(['"',"'"][n])>-1){t=!0;break}t&&e.length>=2&&(e=e.slice(1,-1));const r=e.replace(/\w/g,""),i=(e.replace(/\W+/g,""),((e,t)=>{let n=!1;for(var r=0;r<t.length&&(0!==r||!isNaN(t.charAt(r)));r++)if(isNaN(t.charAt(r))){n=!0;break}return!(e.length>0||n)})(r,e)),o=(e=>{for(var t=0;t<e.length;t++)if(["'",'"'].indexOf(e.charAt(t))>-1)return!0;return!1})(r);if(o){let t="";const n=e.split("");for(var s=0;s<n.length;s++){let e=n[s];["'",'"'].indexOf(e)>-1&&(e="\\"+e),t+=e}e=t}return i?e:"'"+e+"'"}if("'\"".indexOf(o)>-1){if(t=Je.isValue?"string":"key","key"===t&&(n=s(e)),"string"===t){n="";const a=e.slice(1,-1).split("");for(var i=0;i<a.length;i++){let l=a[i];"'\"".indexOf(l)>-1&&(l="\\"+l),n+=l}n="'"+n+"'"}r=n;break}if(!isNaN(e)){t="number",n=e,r=Number(e);break}if(e.length>0&&!Je.isValue){t="key",n=e,n.indexOf(" ")>-1&&(n="'"+n+"'"),r=n;break}}return{type:t,string:n,value:r,depth:Je.brackets.length}}));let He="";for(r=0;r<Je.tokens.length;r++){He+=Je.tokens[r].string}function $e(e){for(var t=[],n=0;n<2*e;n++)t.push(" ");return(e>0?"\n":"")+t.join("")}let Xe="";for(r=0;r<Je.tokens.length;r++){let ot=Je.tokens[r];switch(ot.string){case"[":case"{":const st=r<Je.tokens.length-1-1?Je.tokens[r+1]:"";-1==="}]".indexOf(st.string)?Xe+=ot.string+$e(ot.depth):Xe+=ot.string;break;case"]":case"}":const at=r>0?Je.tokens[r-1]:"";-1==="[{".indexOf(at.string)?Xe+=$e(ot.depth)+ot.string:Xe+=ot.string;break;case":":Xe+=ot.string+" ";break;case",":Xe+=ot.string+$e(ot.depth);break;default:Xe+=ot.string}}let Ye=1;function Ze(e){var t=[];e>0&&Ye++;for(var n=0;n<2*e;n++)t.push("&nbsp;");return(e>0?"<br>":"")+t.join("")}let et="";const tt=Je.tokens.length-1;for(r=0;r<Je.tokens.length;r++){let lt=Je.tokens[r],ct=n(r,lt,lt.depth);switch(lt.string){case"{":case"[":const ut=r<Je.tokens.length-1-1?Je.tokens[r+1]:"";-1==="}]".indexOf(ut.string)?et+=ct+Ze(lt.depth):et+=ct;break;case"}":case"]":const pt=r>0?Je.tokens[r-1]:"";-1==="[{".indexOf(pt.string)?et+=Ze(lt.depth)+(tt===r?"<br>":"")+ct:et+=ct;break;case":":et+=ct+" ";break;case",":et+=ct+Ze(lt.depth);break;default:et+=ct}}return Ye+=2,{tokens:Je.tokens,noSpaces:He,indented:Xe,json:JSON.stringify(e),jsObject:e,markup:et,lines:Ye}}}}const d=h},3727:(e,t)=>{function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;var r=[];function i(e,t,n){let o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(null!==n&&s<n)b(e)&&(o=Object.keys(e),o.forEach((r=>{i(e[r],t,n,s+1)})));else{if(null!==n&&s==n)return 0==n?void(r=i(e,t,null,s)):void(b(e)&&r.push(i(e,t,n,s+1)));switch(x(e)){case"array":var a=[];if(o=Object.keys(e),null===t||s<t)for(var l=0,c=o.length;l<c;l++){const r=o[l],c=e[r];a[r]=i(c,t,n,s+1)}return a;case"object":var u={};if(o=Object.keys(e),null===t||s<t)for(l=0,c=o.length;l<c;l++){const r=o[l],a=e[r];u[r]=i(a,t,n,s+1)}return u;case"string":return""+e;case"number":return 0+e;case"boolean":return!!e;case"null":return null;case"undefined":return}}}return null===n?i(e,t,n,0):(i(e,t,n,0),r)}function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"===x(t)&&""!==t){var r=[];return function e(t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if((arguments.length>2&&void 0!==arguments[2]?arguments[2]:"")===n&&(r[r.length]=i),null!==o&&s>=o)return!1;if(b(t))for(var a=0,l=Object.keys(t),c=l.length;a<c;a++){const r=l[a];e(t[r],n,r,(""===i?i:i+".")+r,o,s+1)}}(e,t,"","",n),0!==(r=r.map((e=>"boolean"===x(e)||""===e?e:((e=e.split(".")).pop(),e=e.join("."))))).length&&r}}function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"===x(t)&&""!==t){var r=function e(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(r===n)return r;var s=!1;if(null!==i&&o>=i)return s;if(b(t))for(var a=0,l=Object.keys(t),c=l.length;a<c;a++){const c=l[a],u=e(t[c],n,c,i,o+1);if(u){r=""===r?r:r+".",s=r+u;break}}return s}(e,t,"",n,0);return"boolean"===x(r)||""===r?r:((r=r.split(".")).pop(),r=r.join("."))}}function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!c(t=a(t)))return function e(t,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(k(t,[n]))return c(t[n]);if(null!==r&&i>=r)return!1;if(b(t))for(var o=0,s=Object.keys(t),a=s.length;o<a;o++){if(e(t[s[o]],n,r,i+1))return!0}return!1}(e,t,n)}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!c(t=a(t)))return function e(t,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(k(t,[n]))return l(t[n]);if(null!==r&&i>=r)return!1;if(b(t))for(var o=0,s=Object.keys(t),a=s.length;o<a;o++){if(e(t[s[o]],n,r,i+1))return!0}return!1}(e,t,n,0)}function a(e){const t=u(e);return!(t>1)&&(1===t?Object.keys(e)[0]:0===t&&["string","number"].indexOf(x(e))>-1&&e)}function l(e){return!c(e)}function c(e){return!1===function(e){return b(e)?e:!(["null","undefined"].indexOf(x(e))>-1)&&(!(["",0,!1].indexOf(e)>-1)&&e)}(e)}function u(e){return-1===["array","object"].indexOf(x(e))?0:Object.keys(e).length}function p(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(y(e,t))return!0;if(b(t)&&v(e,t)&&k(e,Object.keys(t))){if(y(g(e,Object.keys(t)),t))return!0}if((null===n||r<n)&&b(e))for(var i=0,o=Object.keys(e),s=o.length;i<s;i++){if(p(e[o[i]],t,n,r+1))return!0}return!1}function h(e,t){var n=d(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);if(!1===n)return;return n.map((n=>{if(""===n)return e;n=n.split("."),-1===["array","object"].indexOf(x(t))&&n.splice(-1,1);var r=e;return Array.isArray(n)?(n.forEach((e=>{r=r[e]})),r):r[n]}))}function d(e,t){var n=[];return function e(t,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;if(b(r)&&v(t,r)&&k(t,Object.keys(r))){y(g(t,Object.keys(r)),r)&&(n[n.length]=i)}if(y(t,r)&&(n[n.length]=i),null!==o&&s>=o)return!1;if(b(t))for(var a=0,l=Object.keys(t),c=l.length;a<c;a++){const n=l[a];e(t[n],r,(""===i?i:i+".")+n,o,s+1)}}(e,t,"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,0),0!==n.length&&n}function f(e,t){return function e(t,n){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(b(n)&&v(t,n)&&k(t,Object.keys(n))){if(y(g(t,Object.keys(n)),n))return r}if(y(t,n))return r;var s=!1;if(null!==i&&o>=i)return s;if(b(t))for(var a=0,l=Object.keys(t),c=l.length;a<c;a++){const c=l[a],u=e(t[c],n,c,i,o+1);if(u){r=""===r?r:r+".",s=r+u;break}}return s}(e,t,"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,0)}function g(e,t){const n=x(e);if(-1===["array","object"].indexOf(n))return;if(0!==t.length){var r;switch(n){case"object":r={},t.forEach((t=>{t in e&&(r[t]=e[t])}));break;case"array":r=[],t.forEach((t=>{t in e&&r.push(e[t])}))}return r}}function k(e,t){const n=t.length;if(0===n||!b(e))return!1;const r=Object.keys(e);for(var i=!0,o=0;o<n;o++){const e=""+t[o];if(-1===r.indexOf(e)){i=!1;break}}return i}function b(e){return-1!==["array","object"].indexOf(x(e))&&0!==Object.keys(e).length}function y(e,t){const n=m(e,t);if(!1===n)return n;if(-1===["array","object"].indexOf(n))return e===t;const r=Object.keys(e),i=r.length;for(var o=!0,s=0;s<i;s++){const n=r[s],i=y(e[n],t[n]);if(!1===i){o=i;break}}return o}function m(e,t){const n=v(e,t);if(!1===n)return!1;if(["array","object"].indexOf(n)>-1){const n=Object.keys(e),i=Object.keys(t),o=n.length;if(o!==i.length)return!1;if(0===o)return!0;for(var r=0;r<o;r++)if(n[r]!==i[r])return!1}return n}function v(e,t){const n=x(e);return n===x(t)&&n}function x(e){if(null===e)return"null";const t=typeof e;return"object"===t&&Array.isArray(e)?"array":t}var w={getType:function(e){return x(e)},sameType:function(e,t){return v(e,t)},sameStructure:function(e,t){return m(e,t)},identical:function(e,t){return y(e,t)},isIterable:function(e){return b(e)},containsKeys:function(e,t){return k(e,t)},trim:function(e,t){return g(e,t)},locate:function(e,t,n){return f(e,t,n)},deepGet:function(e,t,n){return function(e,t){var n=f(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);if(!1!==n){if(""===n)return e;n=n.split("."),-1===["array","object"].indexOf(x(t))&&n.splice(-1,1);var r=e;return Array.isArray(n)?(n.forEach((e=>{r=r[e]})),r):r[n]}}(e,t,n)},locateAll:function(e,t,n){return d(e,t,n)},deepFilter:function(e,t,n){return h(e,t,n)},exists:function(e,t,n){return p(e,t,n)},onlyExisting:function(e,t,n){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("array"===x(t)){let r=[];return t.forEach((t=>{p(e,t,n)&&r.push(t)})),r}if("object"===x(t)){let r={};return Object.keys(t).forEach((i=>{let o=t[i];p(e,o,n)&&(r[i]=o)})),r}if(p(e,t,n))return t}(e,t,n)},onlyMissing:function(e,t,n){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("array"===x(t)){let r=[];return t.forEach((t=>{p(e,t,n)||r.push(t)})),r}if("object"===x(t)){let r={};return Object.keys(t).forEach((i=>{let o=t[i];p(e,o,n)||(r[i]=o)})),r}if(!p(e,t,n))return t}(e,t,n)},length:function(e){return u(e)},isFalsy:function(e){return c(e)},isTruthy:function(e){return l(e)},foundTruthy:function(e,t,n){return s(e,t,n)},onlyTruthy:function(e,t,n,r){return function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if("array"===x(t)){let i=[];return t.forEach((t=>{const o=h(e,t);l(o)&&s(o,n,r)&&i.push(t)})),i}if("object"===x(t)){let i={};return Object.keys(t).forEach((o=>{const a=t[o],c=h(e,a);l(c)&&s(c,n,r)&&(i[o]=a)})),i}if(s(e,n,r))return t}(e,t,n,r)},foundFalsy:function(e,t,n){return o(e,t,n)},onlyFalsy:function(e,t,n,r){return function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if("array"===x(t)){let i=[];return t.forEach((t=>{const s=h(e,t);l(s)&&o(s,n,r)&&i.push(t)})),i}if("object"===x(t)){let i={};return Object.keys(t).forEach((s=>{const a=t[s],c=h(e,a);l(c)&&o(c,n,r)&&(i[s]=a)})),i}if(o(e,n,r))return t}(e,t,n,r)},countMatches:function(e,t,n,r){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;var i=null===n,o=null===r,s=d(e,t,i&&o?null:i||o?n||r:n<r?n:r);if(!1===s)return 0;if(null===n)return s.length;if("number"===x(n)){let e=0;return s.forEach((t=>{(t=t.split(".")).length===n&&e++})),e}}(e,t,n,r)},matchDepth:function(e,t,n){return function(e,t){var n=f(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:null);return!1!==n&&(""===n?0:(n=n.split(".")).length)}(e,t,n)},maxDepth:function(e,t){return function(e){let t=0;return function e(n,r){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t<i&&(t=i),null!==r&&i>=r||b(n)&&Object.keys(n).forEach((t=>{e(n[t],r,i+1)}))}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:null),t}(e,t)},locate_Key:function(e,t,n){return i(e,t,n)},deepGet_Key:function(e,t,n){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"===x(t)&&""!==t){var r=i(e,t,n);if(!1!==r){""===r?r=t:r+="."+t,r=r.split(".");var o=e;return Array.isArray(r)?(r.forEach((e=>{o=o[e]})),o):o[r]}}}(e,t,n)},locateAll_Key:function(e,t,n){return r(e,t,n)},deepFilter_Key:function(e,t,n){return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if("string"!==x(t))return;if(""===t)return;var i=r(e,t,n);if(!1===i)return;return i.map((n=>{if(!1!==n){""===n?n=t:n+="."+t,n=n.split(".");var r=e;return Array.isArray(n)?(n.forEach((e=>{r=r[e]})),r):r[n]}}))}(e,t,n)},deepClone:function(e,t,r){return n(e,t,r)},renameKey:function(e,t,n,r){return function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if("string"===x(t)&&"string"===x(n)&&""!==t&&""!==n){var i=!1;return function e(t,n,r,o){let s,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;switch(x(t)){case"array":var l=[];s=Object.keys(t);for(var c=0,u=s.length;c<u;c++){let i=s[c],u=t[i];l[i]=e(u,n,r,o,a+1)}return l;case"object":var p={};for(s=Object.keys(t),c=0,u=s.length;c<u;c++){let l=s[c],u=t[l];(null===o||a<o)&&(i||l===n&&(l=r,i=!0)),p[l]=e(u,n,r,o,a+1)}return p;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}}(e,t,n,r)},renameKeys:function(e,t,n,r){return function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if("string"===x(t)&&"string"===x(n)&&""!==t&&""!==n)return function e(t,n,r,i){let o,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;switch(x(t)){case"array":var a=[];o=Object.keys(t);for(var l=0,c=o.length;l<c;l++){let c=o[l],u=t[c];a[c]=e(u,n,r,i,s+1)}return a;case"object":var u={};for(o=Object.keys(t),l=0,c=o.length;l<c;l++){let a=o[l],c=t[a];(null===i||s<i)&&a===n&&(a=r),u[a]=e(c,n,r,i,s+1)}return u;case"string":return""+t;case"number":return 0+t;case"boolean":return!!t;case"null":return null;case"undefined":return}}(e,t,n,r,0)}(e,t,n,r)},deepRemove_Key:function(e,t,r){return function(e,t,r){if("string"!==x(t))return;if(""===t)return;let o=n(e);var s=i(o,t,r);if(!1===s)return o;""===s?s=t:s+="."+t,s=s.split(".");var a=o;return Array.isArray(s)||delete a[s],s.forEach(((e,t)=>{t<s.length-1?a=a[e]:delete a[e]})),o}(e,t,r)},deepRemoveAll_Key:function(e,t,i){return function(e,t,i){if("string"!==x(t))return;if(""===t)return;let o=n(e);var s=r(o,t,i);return s===[]||!1===s||s.forEach((e=>{""===e?e=t:e+="."+t,e=e.split(".");var n=o;Array.isArray(e)||delete n[e];for(var r=0;r<e.length;r++){var i=e[r];if(!(i in n))break;r<e.length-1?n=n[i]:delete n[i]}})),o}(e,t,i)}};e.exports=w},5012:(e,t)=>{"use strict";t.A=void 0;t.A={format:"{reason} at line {line}",symbols:{colon:"colon",comma:"comma",semicolon:"semicolon",slash:"slash",backslash:"backslash",brackets:{round:"round brackets",square:"square brackets",curly:"curly brackets",angle:"angle brackets"},period:"period",quotes:{single:"single quote",double:"double quote",grave:"grave accent"},space:"space",ampersand:"ampersand",asterisk:"asterisk",at:"at sign",equals:"equals sign",hash:"hash",percent:"percent",plus:"plus",minus:"minus",dash:"dash",hyphen:"hyphen",tilde:"tilde",underscore:"underscore",bar:"vertical bar"},types:{key:"key",value:"value",number:"number",string:"string",primitive:"primitive",boolean:"boolean",character:"character",integer:"integer",array:"array",float:"float"},invalidToken:{tokenSequence:{prohibited:"'{firstToken}' token cannot be followed by '{secondToken}' token(s)",permitted:"'{firstToken}' token can only be followed by '{secondToken}' token(s)"},termSequence:{prohibited:"A {firstTerm} cannot be followed by a {secondTerm}",permitted:"A {firstTerm} can only be followed by a {secondTerm}"},double:"'{token}' token cannot be followed by another '{token}' token",useInstead:"'{badToken}' token is not accepted. Use '{goodToken}' instead",unexpected:"Unexpected '{token}' token found"},brace:{curly:{missingOpen:"Missing '{' open curly brace",missingClose:"Open '{' curly brace is missing closing '}' curly brace",cannotWrap:"'{token}' token cannot be wrapped in '{}' curly braces"},square:{missingOpen:"Missing '[' open square brace",missingClose:"Open '[' square brace is missing closing ']' square brace",cannotWrap:"'{token}' token cannot be wrapped in '[]' square braces"}},string:{missingOpen:"Missing/invalid opening string '{quote}' token",missingClose:"Missing/invalid closing string '{quote}' token",mustBeWrappedByQuotes:"Strings must be wrapped by quotes",nonAlphanumeric:"Non-alphanumeric token '{token}' is not allowed outside string notation",unexpectedKey:"Unexpected key found at string position"},key:{numberAndLetterMissingQuotes:"Key beginning with number and containing letters must be wrapped by quotes",spaceMissingQuotes:"Key containing space must be wrapped by quotes",unexpectedString:"Unexpected string found at key position"},noTrailingOrLeadingComma:"Trailing or leading commas in arrays and objects are not permitted"}}}]);