lone-format 0.1.5 → 0.1.6

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.
@@ -1 +1 @@
1
- .json-node[data-v-65598de1]{position:relative}.json-node__line[data-v-65598de1],.json-node__primitive[data-v-65598de1]{display:flex;align-items:center;margin-left:calc(var(--9759b91a) * 20px);line-height:1.5;min-height:20px}.json-node__key[data-v-65598de1]{color:var(--35265df4);cursor:pointer;font-weight:500;padding:1px 3px;border-radius:3px;-webkit-user-select:text;user-select:text}.json-node__key[data-v-65598de1]:hover{background-color:var(--86a60ffc)}.json-node__colon[data-v-65598de1]{color:var(--d1dccc86);margin:0 4px}.json-node__bracket[data-v-65598de1]{color:var(--d1dccc86);font-weight:500;margin:0 2px}.json-node__bracket--clickable[data-v-65598de1]{cursor:pointer;padding:1px 3px;border-radius:3px}.json-node__bracket--clickable[data-v-65598de1]:hover{background-color:var(--86a60ffc)}.json-node__comma[data-v-65598de1]{color:var(--d1dccc86);margin-left:2px}.json-node__collapsed[data-v-65598de1]{color:var(--8f163582);font-style:italic;margin:0 4px}.json-node__value[data-v-65598de1]{cursor:pointer;padding:1px 3px;border-radius:3px;-webkit-user-select:text;user-select:text;word-break:break-all;overflow-wrap:break-word;white-space:pre-wrap;max-width:100%;display:inline-block}.json-node__value[data-v-65598de1]:hover{background-color:var(--86a60ffc)}.json-node__value--string[data-v-65598de1]{color:var(--2a47fc5c)}.json-node__value--number[data-v-65598de1]{color:var(--21cb7794)}.json-node__value--boolean[data-v-65598de1]{color:var(--da874d86);font-weight:600}.json-node__value--null[data-v-65598de1]{color:var(--6fa6f892);font-style:italic}.json-node__key-input[data-v-65598de1],.json-node__value-input[data-v-65598de1]{border:1px solid var(--21cb7794);border-radius:3px;padding:1px 3px;font-family:inherit;font-size:inherit;color:inherit;background:var(--078e91b6);outline:none}.json-node__key-input[data-v-65598de1]{color:var(--35265df4)}.json-node__children-content[data-v-65598de1]:before{content:"";position:absolute;left:calc(var(--9759b91a) * 20px);top:0;bottom:0;width:1px;background:var(--73841b48);opacity:.5;pointer-events:none}.json-node__children[data-v-65598de1],.json-node__children-content[data-v-65598de1]{position:relative}@media (max-width: 768px){.json-node__line[data-v-65598de1],.json-node__primitive[data-v-65598de1]{margin-left:calc(var(--9759b91a) * 12px)}}.json-format[data-v-38157665]{border:1px solid var(--8d5bfdae);border-radius:6px;background:var(--14a51bab);font-family:Monaco,Consolas,Lucida Console,Courier New,ui-monospace,SFMono-Regular,SF Mono,Liberation Mono,Menlo,monospace;font-size:14px;line-height:1.45;color:var(--0504ed6a)}.json-format__toolbar[data-v-38157665]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:var(--a5b566c4);border-bottom:1px solid var(--8d5bfdae);border-radius:6px 6px 0 0}.json-format__actions[data-v-38157665]{display:flex;gap:8px}.json-format__btn[data-v-38157665]{padding:4px 8px;border:1px solid var(--a172158a);border-radius:6px;background:var(--5ffdb6bd);color:var(--796bbdfc);font-size:12px;cursor:pointer;transition:all .2s ease}.json-format__btn[data-v-38157665]:hover:not(:disabled){background:var(--225a5f02);border-color:var(--a172158a)}.json-format__btn[data-v-38157665]:disabled{opacity:.5;cursor:not-allowed}.json-format__btn--primary[data-v-38157665]{background:var(--22d2aed3);color:#fff;border-color:var(--22d2aed3)}.json-format__btn--primary[data-v-38157665]:hover:not(:disabled){background:var(--27e37629)}.json-format__btn--secondary[data-v-38157665]{background:var(--14a51bab);border-color:var(--8d5bfdae)}.json-format__info[data-v-38157665]{display:flex;align-items:center}.json-format__status[data-v-38157665]{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.json-format__status--success[data-v-38157665]{background:var(--1d58ec74);color:var(--04bd5ab4)}.json-format__status--error[data-v-38157665]{background:var(--0242d8f9);color:var(--ca699d2a)}.json-format__content[data-v-38157665]{padding:8px 16px;overflow:auto}.json-format__error[data-v-38157665]{color:var(--ca699d2a);background:var(--0242d8f9);border:1px solid var(--ca699d2a) + "66";border-radius:6px;padding:8px 16px}.json-format__error h4[data-v-38157665]{margin:0 0 8px;font-size:14px;font-weight:600}.json-format__error pre[data-v-38157665]{margin:0;font-size:12px;white-space:pre-wrap;word-break:break-word}.json-format__viewer[data-v-38157665]{color:var(--0504ed6a)}.json-format__content[data-v-38157665]::-webkit-scrollbar{width:4px;height:4px}.json-format__content[data-v-38157665]::-webkit-scrollbar-track{background:var(--4d5522c2)}.json-format__content[data-v-38157665]::-webkit-scrollbar-thumb{background:var(--4d50e34d);border-radius:2px}.json-format__content[data-v-38157665]::-webkit-scrollbar-thumb:hover{background:var(--6854fdef)}
1
+ .json-node[data-v-f3f3cbc9]{position:relative}.json-node__line[data-v-f3f3cbc9],.json-node__primitive[data-v-f3f3cbc9]{display:flex;align-items:flex-start;margin-left:calc(var(--41b58a02) * 20px);line-height:1.5;min-height:20px}.json-node__key[data-v-f3f3cbc9]{color:var(--63accfe8);cursor:pointer;font-weight:500;padding:1px 3px;border-radius:3px;-webkit-user-select:text;user-select:text}.json-node__key[data-v-f3f3cbc9]:hover{background-color:var(--7a4b22f6)}.json-node__colon[data-v-f3f3cbc9]{color:var(--5865f1b1);margin:0 4px}.json-node__bracket[data-v-f3f3cbc9]{color:var(--5865f1b1);font-weight:500;margin:0 2px}.json-node__bracket--clickable[data-v-f3f3cbc9]{cursor:pointer;padding:1px 3px;border-radius:3px}.json-node__bracket--clickable[data-v-f3f3cbc9]:hover{background-color:var(--7a4b22f6)}.json-node__comma[data-v-f3f3cbc9]{color:var(--5865f1b1);margin-left:2px}.json-node__collapsed[data-v-f3f3cbc9]{color:var(--79c93d33);font-style:italic;margin:0 4px}.json-node__value[data-v-f3f3cbc9]{cursor:pointer;padding:1px 3px;border-radius:3px;-webkit-user-select:text;user-select:text;word-break:normal;overflow-wrap:break-word;white-space:pre-wrap;max-width:100%;display:inline-block;text-align:left}.json-node__value[data-v-f3f3cbc9]:hover{background-color:var(--7a4b22f6)}.json-node__value--string[data-v-f3f3cbc9]{color:var(--59ced5e8)}.json-node__value--number[data-v-f3f3cbc9]{color:var(--51525120)}.json-node__value--boolean[data-v-f3f3cbc9]{color:var(--5410b131);font-weight:600}.json-node__value--null[data-v-f3f3cbc9]{color:var(--11eec51e);font-style:italic}.json-node__key-input[data-v-f3f3cbc9],.json-node__value-input[data-v-f3f3cbc9]{border:1px solid var(--51525120);border-radius:3px;padding:1px 3px;font-family:inherit;font-size:inherit;color:inherit;background:var(--ac53437c);outline:none}.json-node__key-input[data-v-f3f3cbc9]{color:var(--63accfe8)}.json-node__children-content[data-v-f3f3cbc9]:before{content:"";position:absolute;left:calc(var(--41b58a02) * 20px);top:0;bottom:0;width:1px;background:var(--15cbe7d4);opacity:.5;pointer-events:none}.json-node__children[data-v-f3f3cbc9],.json-node__children-content[data-v-f3f3cbc9]{position:relative}@media (max-width: 768px){.json-node__line[data-v-f3f3cbc9],.json-node__primitive[data-v-f3f3cbc9]{margin-left:calc(var(--41b58a02) * 12px)}}.json-format[data-v-38157665]{border:1px solid var(--8d5bfdae);border-radius:6px;background:var(--14a51bab);font-family:Monaco,Consolas,Lucida Console,Courier New,ui-monospace,SFMono-Regular,SF Mono,Liberation Mono,Menlo,monospace;font-size:14px;line-height:1.45;color:var(--0504ed6a)}.json-format__toolbar[data-v-38157665]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:var(--a5b566c4);border-bottom:1px solid var(--8d5bfdae);border-radius:6px 6px 0 0}.json-format__actions[data-v-38157665]{display:flex;gap:8px}.json-format__btn[data-v-38157665]{padding:4px 8px;border:1px solid var(--a172158a);border-radius:6px;background:var(--5ffdb6bd);color:var(--796bbdfc);font-size:12px;cursor:pointer;transition:all .2s ease}.json-format__btn[data-v-38157665]:hover:not(:disabled){background:var(--225a5f02);border-color:var(--a172158a)}.json-format__btn[data-v-38157665]:disabled{opacity:.5;cursor:not-allowed}.json-format__btn--primary[data-v-38157665]{background:var(--22d2aed3);color:#fff;border-color:var(--22d2aed3)}.json-format__btn--primary[data-v-38157665]:hover:not(:disabled){background:var(--27e37629)}.json-format__btn--secondary[data-v-38157665]{background:var(--14a51bab);border-color:var(--8d5bfdae)}.json-format__info[data-v-38157665]{display:flex;align-items:center}.json-format__status[data-v-38157665]{padding:2px 6px;border-radius:4px;font-size:11px;font-weight:500}.json-format__status--success[data-v-38157665]{background:var(--1d58ec74);color:var(--04bd5ab4)}.json-format__status--error[data-v-38157665]{background:var(--0242d8f9);color:var(--ca699d2a)}.json-format__content[data-v-38157665]{padding:8px 16px;overflow:auto}.json-format__error[data-v-38157665]{color:var(--ca699d2a);background:var(--0242d8f9);border:1px solid var(--ca699d2a) + "66";border-radius:6px;padding:8px 16px}.json-format__error h4[data-v-38157665]{margin:0 0 8px;font-size:14px;font-weight:600}.json-format__error pre[data-v-38157665]{margin:0;font-size:12px;white-space:pre-wrap;word-break:break-word}.json-format__viewer[data-v-38157665]{color:var(--0504ed6a)}.json-format__content[data-v-38157665]::-webkit-scrollbar{width:4px;height:4px}.json-format__content[data-v-38157665]::-webkit-scrollbar-track{background:var(--4d5522c2)}.json-format__content[data-v-38157665]::-webkit-scrollbar-thumb{background:var(--4d50e34d);border-radius:2px}.json-format__content[data-v-38157665]::-webkit-scrollbar-thumb:hover{background:var(--6854fdef)}
@@ -1342,17 +1342,17 @@ const Be = { class: "json-node" }, De = {
1342
1342
  emits: ["update:value", "toggle-expand", "copy", "update:key"],
1343
1343
  setup(r, { emit: e }) {
1344
1344
  ce((u) => ({
1345
- "9759b91a": u.level,
1346
- "35265df4": u.theme.colors.syntaxKey,
1347
- "86a60ffc": u.theme.colors.hoverBackground,
1348
- d1dccc86: u.theme.colors.syntaxBracket,
1349
- "8f163582": u.theme.colors.textSecondary,
1350
- "2a47fc5c": u.theme.colors.syntaxString,
1351
- "21cb7794": u.theme.colors.syntaxNumber,
1352
- da874d86: u.theme.colors.syntaxBoolean,
1353
- "6fa6f892": u.theme.colors.syntaxNull,
1354
- "078e91b6": u.theme.colors.background,
1355
- "73841b48": u.theme.colors.indentLine
1345
+ "41b58a02": u.level,
1346
+ "63accfe8": u.theme.colors.syntaxKey,
1347
+ "7a4b22f6": u.theme.colors.hoverBackground,
1348
+ "5865f1b1": u.theme.colors.syntaxBracket,
1349
+ "79c93d33": u.theme.colors.textSecondary,
1350
+ "59ced5e8": u.theme.colors.syntaxString,
1351
+ 51525120: u.theme.colors.syntaxNumber,
1352
+ "5410b131": u.theme.colors.syntaxBoolean,
1353
+ "11eec51e": u.theme.colors.syntaxNull,
1354
+ ac53437c: u.theme.colors.background,
1355
+ "15cbe7d4": u.theme.colors.indentLine
1356
1356
  }));
1357
1357
  const t = r, o = e, n = R(!1), a = R(!1), l = R(""), f = R(""), d = (u) => {
1358
1358
  if (!/^-?\d+(\.\d+)?$/.test(u)) return !1;
@@ -1529,7 +1529,7 @@ const Be = { class: "json-node" }, De = {
1529
1529
  for (const [o, n] of e)
1530
1530
  t[o] = n;
1531
1531
  return t;
1532
- }, qe = /* @__PURE__ */ he(Ye, [["__scopeId", "data-v-65598de1"]]), fe = {
1532
+ }, qe = /* @__PURE__ */ he(Ye, [["__scopeId", "data-v-f3f3cbc9"]]), fe = {
1533
1533
  name: "github-light",
1534
1534
  colors: {
1535
1535
  // 背景色
@@ -1,5 +1,5 @@
1
1
  (function(D,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(D=typeof globalThis<"u"?globalThis:D||self,s(D.LoneFormat={},D.Vue))})(this,function(D,s){"use strict";class te{add(e,t,o){if(typeof arguments[0]!="string")for(let n in arguments[0])this.add(n,arguments[0][n],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(n){this[n]=this[n]||[],t&&this[n][o?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(o){o.call(t&&t.context?t.context:t,t)})}}class re{constructor(e){this.jsep=e,this.registered={}}register(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t.forEach(n=>{if(typeof n!="object"||!n.name||!n.init)throw new Error("Invalid JSEP plugin format");this.registered[n.name]||(n.init(this.jsep),this.registered[n.name]=n)})}}class i{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+i.version}static addUnaryOp(e){return i.max_unop_len=Math.max(e.length,i.max_unop_len),i.unary_ops[e]=1,i}static addBinaryOp(e,t,o){return i.max_binop_len=Math.max(e.length,i.max_binop_len),i.binary_ops[e]=t,o?i.right_associative.add(e):i.right_associative.delete(e),i}static addIdentifierChar(e){return i.additional_identifier_chars.add(e),i}static addLiteral(e,t){return i.literals[e]=t,i}static removeUnaryOp(e){return delete i.unary_ops[e],e.length===i.max_unop_len&&(i.max_unop_len=i.getMaxKeyLen(i.unary_ops)),i}static removeAllUnaryOps(){return i.unary_ops={},i.max_unop_len=0,i}static removeIdentifierChar(e){return i.additional_identifier_chars.delete(e),i}static removeBinaryOp(e){return delete i.binary_ops[e],e.length===i.max_binop_len&&(i.max_binop_len=i.getMaxKeyLen(i.binary_ops)),i.right_associative.delete(e),i}static removeAllBinaryOps(){return i.binary_ops={},i.max_binop_len=0,i}static removeLiteral(e){return delete i.literals[e],i}static removeAllLiterals(){return i.literals={},i}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new i(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(t=>t.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return i.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!i.binary_ops[String.fromCharCode(e)]||i.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return i.isIdentifierStart(e)||i.isDecimalDigit(e)}throwError(e){const t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(i.hooks[e]){const o={context:this,node:t};return i.hooks.run(e,o),o.node}return t}searchHook(e){if(i.hooks[e]){const t={context:this};return i.hooks[e].find(function(o){return o.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===i.SPACE_CODE||e===i.TAB_CODE||e===i.LF_CODE||e===i.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const e=this.gobbleExpressions(),t=e.length===1?e[0]:{type:i.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],o,n;for(;this.index<this.expr.length;)if(o=this.code,o===i.SEMCOL_CODE||o===i.COMMA_CODE)this.index++;else if(n=this.gobbleExpression())t.push(n);else if(this.index<this.expr.length){if(o===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){const e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,i.max_binop_len),t=e.length;for(;t>0;){if(i.binary_ops.hasOwnProperty(e)&&(!i.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!i.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,o,n,l,c,p,h,f;if(c=this.gobbleToken(),!c||(t=this.gobbleBinaryOp(),!t))return c;for(l={value:t,prec:i.binaryPrecedence(t),right_a:i.right_associative.has(t)},p=this.gobbleToken(),p||this.throwError("Expected expression after "+t),n=[c,l,p];t=this.gobbleBinaryOp();){if(o=i.binaryPrecedence(t),o===0){this.index-=t.length;break}l={value:t,prec:o,right_a:i.right_associative.has(t)},f=t;const k=y=>l.right_a&&y.right_a?o>y.prec:o<=y.prec;for(;n.length>2&&k(n[n.length-2]);)p=n.pop(),t=n.pop().value,c=n.pop(),e={type:i.BINARY_EXP,operator:t,left:c,right:p},n.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+f),n.push(l,e)}for(h=n.length-1,e=n[h];h>1;)e={type:i.BINARY_EXP,operator:n[h-1].value,left:n[h-2],right:e},h-=2;return e}gobbleToken(){let e,t,o,n;if(this.gobbleSpaces(),n=this.searchHook("gobble-token"),n)return this.runHook("after-token",n);if(e=this.code,i.isDecimalDigit(e)||e===i.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===i.SQUOTE_CODE||e===i.DQUOTE_CODE)n=this.gobbleStringLiteral();else if(e===i.OBRACK_CODE)n=this.gobbleArray();else{for(t=this.expr.substr(this.index,i.max_unop_len),o=t.length;o>0;){if(i.unary_ops.hasOwnProperty(t)&&(!i.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!i.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=o;const l=this.gobbleToken();return l||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:i.UNARY_EXP,operator:t,argument:l,prefix:!0})}t=t.substr(0,--o)}i.isIdentifierStart(e)?(n=this.gobbleIdentifier(),i.literals.hasOwnProperty(n.name)?n={type:i.LITERAL,value:i.literals[n.name],raw:n.name}:n.name===i.this_str&&(n={type:i.THIS_EXP})):e===i.OPAREN_CODE&&(n=this.gobbleGroup())}return n?(n=this.gobbleTokenProperty(n),this.runHook("after-token",n)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===i.PERIOD_CODE||t===i.OBRACK_CODE||t===i.OPAREN_CODE||t===i.QUMARK_CODE;){let o;if(t===i.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==i.PERIOD_CODE)break;o=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===i.OBRACK_CODE?(e={type:i.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()},e.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),t=this.code,t!==i.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===i.OPAREN_CODE?e={type:i.CALL_EXP,arguments:this.gobbleArguments(i.CPAREN_CODE),callee:e}:(t===i.PERIOD_CODE||o)&&(o&&this.index--,this.gobbleSpaces(),e={type:i.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),o&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,o;for(;i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===i.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(t=this.char,t==="e"||t==="E"){for(e+=this.expr.charAt(this.index++),t=this.char,(t==="+"||t==="-")&&(e+=this.expr.charAt(this.index++));i.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);i.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return o=this.code,i.isIdentifierStart(o)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(o===i.PERIOD_CODE||e.length===1&&e.charCodeAt(0)===i.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:i.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="";const t=this.index,o=this.expr.charAt(this.index++);let n=!1;for(;this.index<this.expr.length;){let l=this.expr.charAt(this.index++);if(l===o){n=!0;break}else if(l==="\\")switch(l=this.expr.charAt(this.index++),l){case"n":e+=`
2
- `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=l}else e+=l}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:i.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(i.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(e=this.code,i.isIdentifierPart(e));)this.index++;return{type:i.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){const t=[];let o=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let l=this.code;if(l===e){o=!0,this.index++,e===i.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}else if(l===i.COMMA_CODE){if(this.index++,n++,n!==t.length){if(e===i.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===i.CBRACK_CODE)for(let c=t.length;c<n;c++)t.push(null)}}else if(t.length!==n&&n!==0)this.throwError("Expected comma");else{const c=this.gobbleExpression();(!c||c.type===i.COMPOUND)&&this.throwError("Expected comma"),t.push(c)}}return o||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(i.CPAREN_CODE);if(this.code===i.CPAREN_CODE)return this.index++,e.length===1?e[0]:e.length?{type:i.SEQUENCE_EXP,expressions:e}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:i.ARRAY_EXP,elements:this.gobbleArguments(i.CBRACK_CODE)}}}const ne=new te;Object.assign(i,{hooks:ne,plugins:new re(i),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),i.max_unop_len=i.getMaxKeyLen(i.unary_ops),i.max_binop_len=i.getMaxKeyLen(i.binary_ops);const P=r=>new i(r).parse(),oe=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(i).filter(r=>!oe.includes(r)&&P[r]===void 0).forEach(r=>{P[r]=i[r]}),P.Jsep=i;const se="ConditionalExpression";var ie={name:"ternary",init(r){r.hooks.add("after-expression",function(t){if(t.node&&this.code===r.QUMARK_CODE){this.index++;const o=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===r.COLON_CODE){this.index++;const l=this.gobbleExpression();if(l||this.throwError("Expected expression"),t.node={type:se,test:o,consequent:n,alternate:l},o.operator&&r.binary_ops[o.operator]<=.9){let c=o;for(;c.right.operator&&r.binary_ops[c.right.operator]<=.9;)c=c.right;t.node.test=c.right,c.right=t.node,t.node=o}}else this.throwError("Expected :")}})}};P.plugins.register(ie);const W=47,ae=92;var le={name:"regex",init(r){r.hooks.add("gobble-token",function(t){if(this.code===W){const o=++this.index;let n=!1;for(;this.index<this.expr.length;){if(this.code===W&&!n){const l=this.expr.slice(o,this.index);let c="";for(;++this.index<this.expr.length;){const h=this.code;if(h>=97&&h<=122||h>=65&&h<=90||h>=48&&h<=57)c+=this.char;else break}let p;try{p=new RegExp(l,c)}catch(h){this.throwError(h.message)}return t.node={type:r.LITERAL,value:p,raw:this.expr.slice(o-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===r.OBRACK_CODE?n=!0:n&&this.code===r.CBRACK_CODE&&(n=!1),this.index+=this.code===ae?2:1}this.throwError("Unclosed Regex")}})}};const Y=43,R={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Y,45],assignmentPrecedence:.9,init(r){const e=[r.IDENTIFIER,r.MEMBER_EXP];R.assignmentOperators.forEach(o=>r.addBinaryOp(o,R.assignmentPrecedence,!0)),r.hooks.add("gobble-token",function(n){const l=this.code;R.updateOperators.some(c=>c===l&&c===this.expr.charCodeAt(this.index+1))&&(this.index+=2,n.node={type:"UpdateExpression",operator:l===Y?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!n.node.argument||!e.includes(n.node.argument.type))&&this.throwError(`Unexpected ${n.node.operator}`))}),r.hooks.add("after-token",function(n){if(n.node){const l=this.code;R.updateOperators.some(c=>c===l&&c===this.expr.charCodeAt(this.index+1))&&(e.includes(n.node.type)||this.throwError(`Unexpected ${n.node.operator}`),this.index+=2,n.node={type:"UpdateExpression",operator:l===Y?"++":"--",argument:n.node,prefix:!1})}}),r.hooks.add("after-expression",function(n){n.node&&t(n.node)});function t(o){R.assignmentOperators.has(o.operator)?(o.type="AssignmentExpression",t(o.left),t(o.right)):o.operator||Object.values(o).forEach(n=>{n&&typeof n=="object"&&t(n)})}}};P.plugins.register(le,R),P.addUnaryOp("typeof"),P.addLiteral("null",null),P.addLiteral("undefined",void 0);const ce=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),w={evalAst(r,e){switch(r.type){case"BinaryExpression":case"LogicalExpression":return w.evalBinaryExpression(r,e);case"Compound":return w.evalCompound(r,e);case"ConditionalExpression":return w.evalConditionalExpression(r,e);case"Identifier":return w.evalIdentifier(r,e);case"Literal":return w.evalLiteral(r,e);case"MemberExpression":return w.evalMemberExpression(r,e);case"UnaryExpression":return w.evalUnaryExpression(r,e);case"ArrayExpression":return w.evalArrayExpression(r,e);case"CallExpression":return w.evalCallExpression(r,e);case"AssignmentExpression":return w.evalAssignmentExpression(r,e);default:throw SyntaxError("Unexpected expression",r)}},evalBinaryExpression(r,e){return{"||":(o,n)=>o||n(),"&&":(o,n)=>o&&n(),"|":(o,n)=>o|n(),"^":(o,n)=>o^n(),"&":(o,n)=>o&n(),"==":(o,n)=>o==n(),"!=":(o,n)=>o!=n(),"===":(o,n)=>o===n(),"!==":(o,n)=>o!==n(),"<":(o,n)=>o<n(),">":(o,n)=>o>n(),"<=":(o,n)=>o<=n(),">=":(o,n)=>o>=n(),"<<":(o,n)=>o<<n(),">>":(o,n)=>o>>n(),">>>":(o,n)=>o>>>n(),"+":(o,n)=>o+n(),"-":(o,n)=>o-n(),"*":(o,n)=>o*n(),"/":(o,n)=>o/n(),"%":(o,n)=>o%n()}[r.operator](w.evalAst(r.left,e),()=>w.evalAst(r.right,e))},evalCompound(r,e){let t;for(let o=0;o<r.body.length;o++){r.body[o].type==="Identifier"&&["var","let","const"].includes(r.body[o].name)&&r.body[o+1]&&r.body[o+1].type==="AssignmentExpression"&&(o+=1);const n=r.body[o];t=w.evalAst(n,e)}return t},evalConditionalExpression(r,e){return w.evalAst(r.test,e)?w.evalAst(r.consequent,e):w.evalAst(r.alternate,e)},evalIdentifier(r,e){if(Object.hasOwn(e,r.name))return e[r.name];throw ReferenceError(`${r.name} is not defined`)},evalLiteral(r){return r.value},evalMemberExpression(r,e){const t=String(r.computed?w.evalAst(r.property):r.property.name),o=w.evalAst(r.object,e);if(o==null)throw TypeError(`Cannot read properties of ${o} (reading '${t}')`);if(!Object.hasOwn(o,t)&&ce.has(t))throw TypeError(`Cannot read properties of ${o} (reading '${t}')`);const n=o[t];return typeof n=="function"?n.bind(o):n},evalUnaryExpression(r,e){return{"-":o=>-w.evalAst(o,e),"!":o=>!w.evalAst(o,e),"~":o=>~w.evalAst(o,e),"+":o=>+w.evalAst(o,e),typeof:o=>typeof w.evalAst(o,e)}[r.operator](r.argument)},evalArrayExpression(r,e){return r.elements.map(t=>w.evalAst(t,e))},evalCallExpression(r,e){const t=r.arguments.map(n=>w.evalAst(n,e));return w.evalAst(r.callee,e)(...t)},evalAssignmentExpression(r,e){if(r.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const t=r.left.name,o=w.evalAst(r.right,e);return e[t]=o,e[t]}};class ue{constructor(e){this.code=e,this.ast=P(this.code)}runInNewContext(e){const t=Object.assign(Object.create(null),e);return w.evalAst(this.ast,t)}}function j(r,e){return r=r.slice(),r.push(e),r}function q(r,e){return e=e.slice(),e.unshift(r),e}class de extends Error{constructor(e){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=e,this.name="NewError"}}function O(r,e,t,o,n){if(!(this instanceof O))try{return new O(r,e,t,o,n)}catch(c){if(!c.avoidNew)throw c;return c.value}typeof r=="string"&&(n=o,o=t,t=e,e=r,r=null);const l=r&&typeof r=="object";if(r=r||{},this.json=r.json||t,this.path=r.path||e,this.resultType=r.resultType||"value",this.flatten=r.flatten||!1,this.wrap=Object.hasOwn(r,"wrap")?r.wrap:!0,this.sandbox=r.sandbox||{},this.eval=r.eval===void 0?"safe":r.eval,this.ignoreEvalErrors=typeof r.ignoreEvalErrors>"u"?!1:r.ignoreEvalErrors,this.parent=r.parent||null,this.parentProperty=r.parentProperty||null,this.callback=r.callback||o||null,this.otherTypeCallback=r.otherTypeCallback||n||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},r.autostart!==!1){const c={path:l?r.path:e};l?"json"in r&&(c.json=r.json):c.json=t;const p=this.evaluate(c);if(!p||typeof p!="object")throw new de(p);return p}}O.prototype.evaluate=function(r,e,t,o){let n=this.parent,l=this.parentProperty,{flatten:c,wrap:p}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,t=t||this.callback,this.currOtherTypeCallback=o||this.otherTypeCallback,e=e||this.json,r=r||this.path,r&&typeof r=="object"&&!Array.isArray(r)){if(!r.path&&r.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(r,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:e}=r),c=Object.hasOwn(r,"flatten")?r.flatten:c,this.currResultType=Object.hasOwn(r,"resultType")?r.resultType:this.currResultType,this.currSandbox=Object.hasOwn(r,"sandbox")?r.sandbox:this.currSandbox,p=Object.hasOwn(r,"wrap")?r.wrap:p,this.currEval=Object.hasOwn(r,"eval")?r.eval:this.currEval,t=Object.hasOwn(r,"callback")?r.callback:t,this.currOtherTypeCallback=Object.hasOwn(r,"otherTypeCallback")?r.otherTypeCallback:this.currOtherTypeCallback,n=Object.hasOwn(r,"parent")?r.parent:n,l=Object.hasOwn(r,"parentProperty")?r.parentProperty:l,r=r.path}if(n=n||null,l=l||null,Array.isArray(r)&&(r=O.toPathString(r)),!r&&r!==""||!e)return;const h=O.toPathArray(r);h[0]==="$"&&h.length>1&&h.shift(),this._hasParentSelector=null;const f=this._trace(h,e,["$"],n,l,t).filter(function(k){return k&&!k.isParentSelector});return f.length?!p&&f.length===1&&!f[0].hasArrExpr?this._getPreferredOutput(f[0]):f.reduce((k,y)=>{const C=this._getPreferredOutput(y);return c&&Array.isArray(C)?k=k.concat(C):k.push(C),k},[]):p?[]:void 0},O.prototype._getPreferredOutput=function(r){const e=this.currResultType;switch(e){case"all":{const t=Array.isArray(r.path)?r.path:O.toPathArray(r.path);return r.pointer=O.toPointer(t),r.path=typeof r.path=="string"?r.path:O.toPathString(r.path),r}case"value":case"parent":case"parentProperty":return r[e];case"path":return O.toPathString(r[e]);case"pointer":return O.toPointer(r.path);default:throw new TypeError("Unknown result type")}},O.prototype._handleCallback=function(r,e,t){if(e){const o=this._getPreferredOutput(r);r.path=typeof r.path=="string"?r.path:O.toPathString(r.path),e(o,t,r)}},O.prototype._trace=function(r,e,t,o,n,l,c,p){let h;if(!r.length)return h={path:t,value:e,parent:o,parentProperty:n,hasArrExpr:c},this._handleCallback(h,l,"value"),h;const f=r[0],k=r.slice(1),y=[];function C(m){Array.isArray(m)?m.forEach(v=>{y.push(v)}):y.push(m)}if((typeof f!="string"||p)&&e&&Object.hasOwn(e,f))C(this._trace(k,e[f],j(t,f),e,f,l,c));else if(f==="*")this._walk(e,m=>{C(this._trace(k,e[m],j(t,m),e,m,l,!0,!0))});else if(f==="..")C(this._trace(k,e,t,o,n,l,c)),this._walk(e,m=>{typeof e[m]=="object"&&C(this._trace(r.slice(),e[m],j(t,m),e,m,l,!0))});else{if(f==="^")return this._hasParentSelector=!0,{path:t.slice(0,-1),expr:k,isParentSelector:!0};if(f==="~")return h={path:j(t,f),value:n,parent:o,parentProperty:null},this._handleCallback(h,l,"property"),h;if(f==="$")C(this._trace(k,e,t,null,null,l,c));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(f))C(this._slice(f,k,e,t,o,n,l));else if(f.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const m=f.replace(/^\?\((.*?)\)$/u,"$1"),v=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(m);v?this._walk(e,A=>{const I=[v[2]],N=v[1]?e[A][v[1]]:e[A];this._trace(I,N,t,o,n,l,!0).length>0&&C(this._trace(k,e[A],j(t,A),e,A,l,!0))}):this._walk(e,A=>{this._eval(m,e[A],A,t,o,n)&&C(this._trace(k,e[A],j(t,A),e,A,l,!0))})}else if(f[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");C(this._trace(q(this._eval(f,e,t.at(-1),t.slice(0,-1),o,n),k),e,t,o,n,l,c))}else if(f[0]==="@"){let m=!1;const v=f.slice(1,-2);switch(v){case"scalar":(!e||!["object","function"].includes(typeof e))&&(m=!0);break;case"boolean":case"string":case"undefined":case"function":typeof e===v&&(m=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(m=!0);break;case"number":Number.isFinite(e)&&(m=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(m=!0);break;case"object":e&&typeof e===v&&(m=!0);break;case"array":Array.isArray(e)&&(m=!0);break;case"other":m=this.currOtherTypeCallback(e,t,o,n);break;case"null":e===null&&(m=!0);break;default:throw new TypeError("Unknown value type "+v)}if(m)return h={path:t,value:e,parent:o,parentProperty:n},this._handleCallback(h,l,"value"),h}else if(f[0]==="`"&&e&&Object.hasOwn(e,f.slice(1))){const m=f.slice(1);C(this._trace(k,e[m],j(t,m),e,m,l,c,!0))}else if(f.includes(",")){const m=f.split(",");for(const v of m)C(this._trace(q(v,k),e,t,o,n,l,!0))}else!p&&e&&Object.hasOwn(e,f)&&C(this._trace(k,e[f],j(t,f),e,f,l,c,!0))}if(this._hasParentSelector)for(let m=0;m<y.length;m++){const v=y[m];if(v&&v.isParentSelector){const A=this._trace(v.expr,e,v.path,o,n,l,c);if(Array.isArray(A)){y[m]=A[0];const I=A.length;for(let N=1;N<I;N++)m++,y.splice(m,0,A[N])}else y[m]=A}}return y},O.prototype._walk=function(r,e){if(Array.isArray(r)){const t=r.length;for(let o=0;o<t;o++)e(o)}else r&&typeof r=="object"&&Object.keys(r).forEach(t=>{e(t)})},O.prototype._slice=function(r,e,t,o,n,l,c){if(!Array.isArray(t))return;const p=t.length,h=r.split(":"),f=h[2]&&Number.parseInt(h[2])||1;let k=h[0]&&Number.parseInt(h[0])||0,y=h[1]&&Number.parseInt(h[1])||p;k=k<0?Math.max(0,k+p):Math.min(p,k),y=y<0?Math.max(0,y+p):Math.min(p,y);const C=[];for(let m=k;m<y;m+=f)this._trace(q(m,e),t,o,n,l,c,!0).forEach(A=>{C.push(A)});return C},O.prototype._eval=function(r,e,t,o,n,l){this.currSandbox._$_parentProperty=l,this.currSandbox._$_parent=n,this.currSandbox._$_property=t,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;const c=r.includes("@path");c&&(this.currSandbox._$_path=O.toPathString(o.concat([t])));const p=this.currEval+"Script:"+r;if(!O.cache[p]){let h=r.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(c&&(h=h.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)O.cache[p]=new this.safeVm.Script(h);else if(this.currEval==="native")O.cache[p]=new this.vm.Script(h);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const f=this.currEval;O.cache[p]=new f(h)}else if(typeof this.currEval=="function")O.cache[p]={runInNewContext:f=>this.currEval(h,f)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return O.cache[p].runInNewContext(this.currSandbox)}catch(h){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+h.message+": "+r)}},O.cache={},O.toPathString=function(r){const e=r,t=e.length;let o="$";for(let n=1;n<t;n++)/^(~|\^|@.*?\(\))$/u.test(e[n])||(o+=/^[0-9*]+$/u.test(e[n])?"["+e[n]+"]":"['"+e[n]+"']");return o},O.toPointer=function(r){const e=r,t=e.length;let o="";for(let n=1;n<t;n++)/^(~|\^|@.*?\(\))$/u.test(e[n])||(o+="/"+e[n].toString().replaceAll("~","~0").replaceAll("/","~1"));return o},O.toPathArray=function(r){const{cache:e}=O;if(e[r])return e[r].concat();const t=[],n=r.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(l,c){return"[#"+(t.push(c)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(l,c){return"['"+c.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(l,c){return";"+c.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(l){const c=l.match(/#(\d+)/u);return!c||!c[1]?l:t[c[1]]});return e[r]=n,e[r].concat()},O.prototype.safeVm={Script:ue};const he=function(r,e,t){const o=r.length;for(let n=0;n<o;n++){const l=r[n];t(l)&&e.push(r.splice(n--,1)[0])}};class fe{constructor(e){this.code=e}runInNewContext(e){let t=this.code;const o=Object.keys(e),n=[];he(o,n,f=>typeof e[f]=="function");const l=o.map(f=>e[f]);t=n.reduce((f,k)=>{let y=e[k].toString();return/function/u.test(y)||(y="function "+y),"var "+k+"="+y+";"+f},"")+t,!/(['"])use strict\1/u.test(t)&&!o.includes("arguments")&&(t="var arguments = undefined;"+t),t=t.replace(/;\s*$/u,"");const p=t.lastIndexOf(";"),h=p!==-1?t.slice(0,p+1)+" return "+t.slice(p+1):" return "+t;return new Function(...o,h)(...l)}}O.prototype.vm={Script:fe};const pe={class:"json-node"},ye={key:0,class:"json-node__container"},ge={class:"json-node__line"},be={key:2,class:"json-node__colon"},me=["title"],Ee={key:3,class:"json-node__collapsed"},ke={key:4,class:"json-node__comma"},_e={key:0,class:"json-node__children"},xe={class:"json-node__children-content"},Oe={class:"json-node__line json-node__closing-bracket"},Ce={class:"json-node__bracket"},we={key:0,class:"json-node__comma"},Ae={key:1,class:"json-node__primitive"},ve={key:2,class:"json-node__colon"},Se=["title"],Ne={key:0,class:"json-node__comma"},Be=s.defineComponent({name:"JsonNode",__name:"JsonNode",props:{value:{},keyName:{},level:{},path:{default:""},expanded:{},isLast:{type:Boolean,default:!1},theme:{}},emits:["update:value","toggle-expand","copy","update:key"],setup(r,{emit:e}){s.useCssVars(d=>({"9759b91a":d.level,"35265df4":d.theme.colors.syntaxKey,"86a60ffc":d.theme.colors.hoverBackground,d1dccc86:d.theme.colors.syntaxBracket,"8f163582":d.theme.colors.textSecondary,"2a47fc5c":d.theme.colors.syntaxString,"21cb7794":d.theme.colors.syntaxNumber,da874d86:d.theme.colors.syntaxBoolean,"6fa6f892":d.theme.colors.syntaxNull,"078e91b6":d.theme.colors.background,"73841b48":d.theme.colors.indentLine}));const t=r,o=e,n=s.ref(!1),l=s.ref(!1),c=s.ref(""),p=s.ref(""),h=d=>{if(!/^-?\d+(\.\d+)?$/.test(d))return!1;const _=Number(d);return!Number.isSafeInteger(_)||d.length>15},f=s.computed(()=>t.value!==null&&typeof t.value=="object"),k=s.computed(()=>Array.isArray(t.value)),y=s.computed(()=>t.path?t.path:t.keyName?t.keyName:"root"),C=s.computed(()=>t.expanded.has(y.value)),m=s.computed(()=>t.keyName),v=s.computed(()=>k.value?"[":"{"),A=s.computed(()=>k.value?"]":"}"),I=s.computed(()=>{if(!t.value)return"";const _=Object.keys(t.value).length;return k.value?_>0?` ${_} items `:" ":_>0?` ${_} keys `:" "}),N=s.computed(()=>{const d=typeof t.value;return t.value===null?"json-node__value--null":d==="boolean"?"json-node__value--boolean":d==="number"?"json-node__value--number":d==="string"?h(t.value)?"json-node__value--number":"json-node__value--string":""}),M=s.computed(()=>l.value?p.value:t.value===null?"null":typeof t.value=="boolean"||typeof t.value=="number"?String(t.value):typeof t.value=="string"?h(t.value)?t.value:`"${t.value}"`:String(t.value)),z=s.computed(()=>"Click to edit, double-click to copy"),G=d=>t.level===0?d:y.value?`${y.value}.${d}`:d,V=d=>{const _=Object.keys(t.value);return _.indexOf(d)===_.length-1},F=()=>{o("toggle-expand",y.value)},K=()=>{t.level!==0&&(n.value=!0,c.value=t.keyName,s.nextTick(()=>{const d=document.querySelectorAll(".json-node__key-input"),_=d[d.length-1];_&&(_.focus(),_.select())}))},Q=()=>{f.value||(l.value=!0,typeof t.value=="string"&&h(t.value)||typeof t.value=="string"?p.value=t.value:p.value=String(t.value),s.nextTick(()=>{const d=document.querySelectorAll(".json-node__value-input"),_=d[d.length-1];_&&(_.focus(),_.select())}))},$=()=>{if(t.level===0||!n.value)return;const d=c.value.trim();if(!d){X();return}if(d===t.keyName){n.value=!1;return}n.value=!1,o("update:key",y.value,d)},H=()=>{try{let d;const _=p.value.trim();if(_==="null")d=null;else if(_==="true"||_==="false")d=_==="true";else if(!isNaN(Number(_))&&_!==""){const U=Number(_);!Number.isSafeInteger(U)||_.length>15?d=_:d=U}else d=p.value;o("update:value",y.value,d),l.value=!1}catch(d){console.error("Failed to parse value:",d),l.value=!1}},X=()=>{n.value=!1,c.value=t.keyName},L=()=>{l.value=!1,typeof t.value=="string"&&h(t.value)||typeof t.value=="string"?p.value=t.value:p.value=String(t.value)};return(d,_)=>{const U=s.resolveComponent("JsonNode",!0);return s.openBlock(),s.createElementBlock("div",pe,[f.value?(s.openBlock(),s.createElementBlock("div",ye,[s.createElementVNode("div",ge,[d.keyName&&!n.value?(s.openBlock(),s.createElementBlock("span",{key:0,class:"json-node__key",onClick:K,title:"Click to edit key"},' "'+s.toDisplayString(m.value)+'" ',1)):s.createCommentVNode("",!0),d.keyName&&n.value?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,"onUpdate:modelValue":_[0]||(_[0]=a=>c.value=a),onKeyup:[s.withKeys($,["enter"]),s.withKeys(X,["escape"])],onBlur:$,class:"json-node__key-input"},null,544)),[[s.vModelText,c.value]]):s.createCommentVNode("",!0),d.keyName?(s.openBlock(),s.createElementBlock("span",be,": ")):s.createCommentVNode("",!0),s.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:F,title:C.value?"Click to collapse":"Click to expand"},s.toDisplayString(v.value),9,me),C.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",Ee,[s.createTextVNode(s.toDisplayString(I.value)+" ",1),s.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:F},s.toDisplayString(A.value),1)])),!C.value&&!d.isLast?(s.openBlock(),s.createElementBlock("span",ke,",")):s.createCommentVNode("",!0)]),C.value?(s.openBlock(),s.createElementBlock("div",_e,[s.createElementVNode("div",xe,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(d.value,(a,u)=>(s.openBlock(),s.createElementBlock("div",{key:u,class:"json-node__child"},[s.createVNode(U,{value:a,"key-name":k.value?"":String(u),level:d.level+1,path:G(String(u)),expanded:d.expanded,theme:d.theme,"onUpdate:value":_[1]||(_[1]=(g,b)=>d.$emit("update:value",g,b)),onToggleExpand:_[2]||(_[2]=g=>d.$emit("toggle-expand",g)),onCopy:_[3]||(_[3]=g=>d.$emit("copy",g)),"onUpdate:key":_[4]||(_[4]=(g,b)=>d.$emit("update:key",g,b)),"is-last":V(String(u))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),s.createElementVNode("div",Oe,[s.createElementVNode("span",Ce,s.toDisplayString(A.value),1),d.isLast?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",we,","))])])):s.createCommentVNode("",!0)])):(s.openBlock(),s.createElementBlock("div",Ae,[d.keyName&&!n.value?(s.openBlock(),s.createElementBlock("span",{key:0,class:"json-node__key",onClick:K,title:"Click to edit key"},' "'+s.toDisplayString(m.value)+'" ',1)):s.createCommentVNode("",!0),d.keyName&&n.value?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,"onUpdate:modelValue":_[5]||(_[5]=a=>c.value=a),onKeyup:[s.withKeys($,["enter"]),s.withKeys(X,["escape"])],onBlur:$,class:"json-node__key-input"},null,544)),[[s.vModelText,c.value]]):s.createCommentVNode("",!0),d.keyName?(s.openBlock(),s.createElementBlock("span",ve,": ")):s.createCommentVNode("",!0),l.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",{key:3,class:s.normalizeClass(["json-node__value",N.value]),onClick:Q,onDblclick:_[6]||(_[6]=a=>d.$emit("copy",d.value)),title:z.value},[s.createTextVNode(s.toDisplayString(M.value),1),d.isLast?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",Ne,","))],42,Se)),l.value?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:4,"onUpdate:modelValue":_[7]||(_[7]=a=>p.value=a),onKeyup:[s.withKeys(H,["enter"]),s.withKeys(L,["escape"])],onBlur:H,class:"json-node__value-input"},null,544)),[[s.vModelText,p.value]]):s.createCommentVNode("",!0)]))])}}}),Z=(r,e)=>{const t=r.__vccOpts||r;for(const[o,n]of e)t[o]=n;return t},Pe=Z(Be,[["__scopeId","data-v-65598de1"]]),J={name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#656d76",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#2da44e",buttonPrimaryHover:"#2c974b",success:"#1a7f37",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",syntaxString:"#0a3069",syntaxNumber:"#0969da",syntaxBoolean:"#8250df",syntaxNull:"#656d76",syntaxKey:"#0969da",syntaxBracket:"#24292f",scrollbarTrack:"#f6f8fa",scrollbarThumb:"#d0d7de",scrollbarThumbHover:"#afb8c1",hoverBackground:"#f6f8fa",indentLine:"#d0d7de"}},Te={"github-light":J,"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#e6edf3",textSecondary:"#7d8590",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#e6edf3",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2419",error:"#f85149",errorBackground:"#381921",syntaxString:"#a5d6ff",syntaxNumber:"#79c0ff",syntaxBoolean:"#d2a8ff",syntaxNull:"#7d8590",syntaxKey:"#79c0ff",syntaxBracket:"#e6edf3",scrollbarTrack:"#161b22",scrollbarThumb:"#30363d",scrollbarThumbHover:"#6e7681",hoverBackground:"#161b22",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#333333",textSecondary:"#888888",buttonBackground:"#f8f8f8",buttonBackgroundHover:"#eeeeee",buttonBorder:"#e0e0e0",buttonText:"#333333",buttonPrimary:"#007acc",buttonPrimaryHover:"#005a9e",success:"#22c55e",successBackground:"#f0fdf4",error:"#ef4444",errorBackground:"#fef2f2",syntaxString:"#22c55e",syntaxNumber:"#3b82f6",syntaxBoolean:"#8b5cf6",syntaxNull:"#6b7280",syntaxKey:"#1f2937",syntaxBracket:"#374151",scrollbarTrack:"#f5f5f5",scrollbarThumb:"#d1d5db",scrollbarThumbHover:"#9ca3af",hoverBackground:"#f9f9f9",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fefbf6",surfaceBackground:"#faf6f0",border:"#e8d5b7",text:"#4a3b2a",textSecondary:"#8b7355",buttonBackground:"#f4ede4",buttonBackgroundHover:"#efe5d8",buttonBorder:"#e8d5b7",buttonText:"#4a3b2a",buttonPrimary:"#ff6b35",buttonPrimaryHover:"#e55a2b",success:"#ff9500",successBackground:"#fff8f0",error:"#d73502",errorBackground:"#ffeee8",syntaxString:"#d73502",syntaxNumber:"#ff6b35",syntaxBoolean:"#b7472a",syntaxNull:"#8b7355",syntaxKey:"#4a3b2a",syntaxBracket:"#6b5444",scrollbarTrack:"#f4ede4",scrollbarThumb:"#e8d5b7",scrollbarThumbHover:"#d4c4a8",hoverBackground:"#f8f2eb",indentLine:"#e8d5b7"}}};function De(r="github-light"){return Te[r]||J}const je={key:0,class:"json-format__toolbar"},Ie={class:"json-format__actions"},$e=["disabled"],Re=["disabled"],Ve=["disabled"],Le=["disabled"],Ue={class:"json-format__info"},Me={key:0,class:"json-format__status json-format__status--success"},Fe={key:1,class:"json-format__status json-format__status--error"},Ke={class:"json-format__content"},He={key:0,class:"json-format__error"},Xe={key:1,class:"json-format__error"},Ge={key:2,class:"json-format__viewer"},ee=Z(s.defineComponent({name:"JsonFormat",__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress"],setup(r,{expose:e,emit:t}){s.useCssVars(a=>({"8d5bfdae":y.value.colors.border,"14a51bab":y.value.colors.background,"0504ed6a":y.value.colors.text,a5b566c4:y.value.colors.surfaceBackground,a172158a:y.value.colors.buttonBorder,"5ffdb6bd":y.value.colors.buttonBackground,"796bbdfc":y.value.colors.buttonText,"225a5f02":y.value.colors.buttonBackgroundHover,"22d2aed3":y.value.colors.buttonPrimary,"27e37629":y.value.colors.buttonPrimaryHover,"1d58ec74":y.value.colors.successBackground,"04bd5ab4":y.value.colors.success,"0242d8f9":y.value.colors.errorBackground,ca699d2a:y.value.colors.error,"4d5522c2":y.value.colors.scrollbarTrack,"4d50e34d":y.value.colors.scrollbarThumb,"6854fdef":y.value.colors.scrollbarThumbHover}));const o=r,n=t,l=s.ref(null),c=s.ref(""),p=s.ref(new Set),h=s.ref(null),f=s.ref(""),k=s.computed(()=>c.value===""),y=s.computed(()=>De(o.theme)),C=s.computed(()=>f.value?null:h.value!==null?h.value:l.value),m=a=>{if(!a.trim()){l.value=null,c.value="",h.value=null,f.value="";return}try{let u=a;u=u.replace(/:\s*(\d{16,})\s*([,}])/g,': "$1"$2'),u=u.replace(/:\s*(\d+\.\d*?0+)\s*([,}])/g,': "$1"$2'),l.value=JSON.parse(u),c.value="",h.value=null,f.value="",s.nextTick(()=>{C.value!==null&&V()})}catch(u){c.value=u instanceof Error?u.message:"Unknown parsing error",l.value=null,h.value=null,f.value=""}},v=a=>{if(!a||!a.expression.trim()){A();return}if(!l.value){f.value="No valid JSON data to filter";return}try{let u;if(a.type==="jsonpath")u=O({path:a.expression,json:l.value}),u.length===1&&a.expression.includes("$[")===!1&&!a.expression.endsWith("[*]")?h.value=u[0]:h.value=u;else if(a.type==="js")u=new Function("data",`
2
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=l}else e+=l}return n||this.throwError('Unclosed quote after "'+e+'"'),{type:i.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(i.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(e=this.code,i.isIdentifierPart(e));)this.index++;return{type:i.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){const t=[];let o=!1,n=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let l=this.code;if(l===e){o=!0,this.index++,e===i.CPAREN_CODE&&n&&n>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}else if(l===i.COMMA_CODE){if(this.index++,n++,n!==t.length){if(e===i.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===i.CBRACK_CODE)for(let c=t.length;c<n;c++)t.push(null)}}else if(t.length!==n&&n!==0)this.throwError("Expected comma");else{const c=this.gobbleExpression();(!c||c.type===i.COMPOUND)&&this.throwError("Expected comma"),t.push(c)}}return o||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(i.CPAREN_CODE);if(this.code===i.CPAREN_CODE)return this.index++,e.length===1?e[0]:e.length?{type:i.SEQUENCE_EXP,expressions:e}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:i.ARRAY_EXP,elements:this.gobbleArguments(i.CBRACK_CODE)}}}const ne=new te;Object.assign(i,{hooks:ne,plugins:new re(i),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),i.max_unop_len=i.getMaxKeyLen(i.unary_ops),i.max_binop_len=i.getMaxKeyLen(i.binary_ops);const P=r=>new i(r).parse(),oe=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(i).filter(r=>!oe.includes(r)&&P[r]===void 0).forEach(r=>{P[r]=i[r]}),P.Jsep=i;const se="ConditionalExpression";var ie={name:"ternary",init(r){r.hooks.add("after-expression",function(t){if(t.node&&this.code===r.QUMARK_CODE){this.index++;const o=t.node,n=this.gobbleExpression();if(n||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===r.COLON_CODE){this.index++;const l=this.gobbleExpression();if(l||this.throwError("Expected expression"),t.node={type:se,test:o,consequent:n,alternate:l},o.operator&&r.binary_ops[o.operator]<=.9){let c=o;for(;c.right.operator&&r.binary_ops[c.right.operator]<=.9;)c=c.right;t.node.test=c.right,c.right=t.node,t.node=o}}else this.throwError("Expected :")}})}};P.plugins.register(ie);const W=47,ae=92;var le={name:"regex",init(r){r.hooks.add("gobble-token",function(t){if(this.code===W){const o=++this.index;let n=!1;for(;this.index<this.expr.length;){if(this.code===W&&!n){const l=this.expr.slice(o,this.index);let c="";for(;++this.index<this.expr.length;){const h=this.code;if(h>=97&&h<=122||h>=65&&h<=90||h>=48&&h<=57)c+=this.char;else break}let p;try{p=new RegExp(l,c)}catch(h){this.throwError(h.message)}return t.node={type:r.LITERAL,value:p,raw:this.expr.slice(o-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===r.OBRACK_CODE?n=!0:n&&this.code===r.CBRACK_CODE&&(n=!1),this.index+=this.code===ae?2:1}this.throwError("Unclosed Regex")}})}};const Y=43,R={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Y,45],assignmentPrecedence:.9,init(r){const e=[r.IDENTIFIER,r.MEMBER_EXP];R.assignmentOperators.forEach(o=>r.addBinaryOp(o,R.assignmentPrecedence,!0)),r.hooks.add("gobble-token",function(n){const l=this.code;R.updateOperators.some(c=>c===l&&c===this.expr.charCodeAt(this.index+1))&&(this.index+=2,n.node={type:"UpdateExpression",operator:l===Y?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!n.node.argument||!e.includes(n.node.argument.type))&&this.throwError(`Unexpected ${n.node.operator}`))}),r.hooks.add("after-token",function(n){if(n.node){const l=this.code;R.updateOperators.some(c=>c===l&&c===this.expr.charCodeAt(this.index+1))&&(e.includes(n.node.type)||this.throwError(`Unexpected ${n.node.operator}`),this.index+=2,n.node={type:"UpdateExpression",operator:l===Y?"++":"--",argument:n.node,prefix:!1})}}),r.hooks.add("after-expression",function(n){n.node&&t(n.node)});function t(o){R.assignmentOperators.has(o.operator)?(o.type="AssignmentExpression",t(o.left),t(o.right)):o.operator||Object.values(o).forEach(n=>{n&&typeof n=="object"&&t(n)})}}};P.plugins.register(le,R),P.addUnaryOp("typeof"),P.addLiteral("null",null),P.addLiteral("undefined",void 0);const ce=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),w={evalAst(r,e){switch(r.type){case"BinaryExpression":case"LogicalExpression":return w.evalBinaryExpression(r,e);case"Compound":return w.evalCompound(r,e);case"ConditionalExpression":return w.evalConditionalExpression(r,e);case"Identifier":return w.evalIdentifier(r,e);case"Literal":return w.evalLiteral(r,e);case"MemberExpression":return w.evalMemberExpression(r,e);case"UnaryExpression":return w.evalUnaryExpression(r,e);case"ArrayExpression":return w.evalArrayExpression(r,e);case"CallExpression":return w.evalCallExpression(r,e);case"AssignmentExpression":return w.evalAssignmentExpression(r,e);default:throw SyntaxError("Unexpected expression",r)}},evalBinaryExpression(r,e){return{"||":(o,n)=>o||n(),"&&":(o,n)=>o&&n(),"|":(o,n)=>o|n(),"^":(o,n)=>o^n(),"&":(o,n)=>o&n(),"==":(o,n)=>o==n(),"!=":(o,n)=>o!=n(),"===":(o,n)=>o===n(),"!==":(o,n)=>o!==n(),"<":(o,n)=>o<n(),">":(o,n)=>o>n(),"<=":(o,n)=>o<=n(),">=":(o,n)=>o>=n(),"<<":(o,n)=>o<<n(),">>":(o,n)=>o>>n(),">>>":(o,n)=>o>>>n(),"+":(o,n)=>o+n(),"-":(o,n)=>o-n(),"*":(o,n)=>o*n(),"/":(o,n)=>o/n(),"%":(o,n)=>o%n()}[r.operator](w.evalAst(r.left,e),()=>w.evalAst(r.right,e))},evalCompound(r,e){let t;for(let o=0;o<r.body.length;o++){r.body[o].type==="Identifier"&&["var","let","const"].includes(r.body[o].name)&&r.body[o+1]&&r.body[o+1].type==="AssignmentExpression"&&(o+=1);const n=r.body[o];t=w.evalAst(n,e)}return t},evalConditionalExpression(r,e){return w.evalAst(r.test,e)?w.evalAst(r.consequent,e):w.evalAst(r.alternate,e)},evalIdentifier(r,e){if(Object.hasOwn(e,r.name))return e[r.name];throw ReferenceError(`${r.name} is not defined`)},evalLiteral(r){return r.value},evalMemberExpression(r,e){const t=String(r.computed?w.evalAst(r.property):r.property.name),o=w.evalAst(r.object,e);if(o==null)throw TypeError(`Cannot read properties of ${o} (reading '${t}')`);if(!Object.hasOwn(o,t)&&ce.has(t))throw TypeError(`Cannot read properties of ${o} (reading '${t}')`);const n=o[t];return typeof n=="function"?n.bind(o):n},evalUnaryExpression(r,e){return{"-":o=>-w.evalAst(o,e),"!":o=>!w.evalAst(o,e),"~":o=>~w.evalAst(o,e),"+":o=>+w.evalAst(o,e),typeof:o=>typeof w.evalAst(o,e)}[r.operator](r.argument)},evalArrayExpression(r,e){return r.elements.map(t=>w.evalAst(t,e))},evalCallExpression(r,e){const t=r.arguments.map(n=>w.evalAst(n,e));return w.evalAst(r.callee,e)(...t)},evalAssignmentExpression(r,e){if(r.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");const t=r.left.name,o=w.evalAst(r.right,e);return e[t]=o,e[t]}};class ue{constructor(e){this.code=e,this.ast=P(this.code)}runInNewContext(e){const t=Object.assign(Object.create(null),e);return w.evalAst(this.ast,t)}}function j(r,e){return r=r.slice(),r.push(e),r}function q(r,e){return e=e.slice(),e.unshift(r),e}class de extends Error{constructor(e){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=e,this.name="NewError"}}function O(r,e,t,o,n){if(!(this instanceof O))try{return new O(r,e,t,o,n)}catch(c){if(!c.avoidNew)throw c;return c.value}typeof r=="string"&&(n=o,o=t,t=e,e=r,r=null);const l=r&&typeof r=="object";if(r=r||{},this.json=r.json||t,this.path=r.path||e,this.resultType=r.resultType||"value",this.flatten=r.flatten||!1,this.wrap=Object.hasOwn(r,"wrap")?r.wrap:!0,this.sandbox=r.sandbox||{},this.eval=r.eval===void 0?"safe":r.eval,this.ignoreEvalErrors=typeof r.ignoreEvalErrors>"u"?!1:r.ignoreEvalErrors,this.parent=r.parent||null,this.parentProperty=r.parentProperty||null,this.callback=r.callback||o||null,this.otherTypeCallback=r.otherTypeCallback||n||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},r.autostart!==!1){const c={path:l?r.path:e};l?"json"in r&&(c.json=r.json):c.json=t;const p=this.evaluate(c);if(!p||typeof p!="object")throw new de(p);return p}}O.prototype.evaluate=function(r,e,t,o){let n=this.parent,l=this.parentProperty,{flatten:c,wrap:p}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,t=t||this.callback,this.currOtherTypeCallback=o||this.otherTypeCallback,e=e||this.json,r=r||this.path,r&&typeof r=="object"&&!Array.isArray(r)){if(!r.path&&r.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(r,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:e}=r),c=Object.hasOwn(r,"flatten")?r.flatten:c,this.currResultType=Object.hasOwn(r,"resultType")?r.resultType:this.currResultType,this.currSandbox=Object.hasOwn(r,"sandbox")?r.sandbox:this.currSandbox,p=Object.hasOwn(r,"wrap")?r.wrap:p,this.currEval=Object.hasOwn(r,"eval")?r.eval:this.currEval,t=Object.hasOwn(r,"callback")?r.callback:t,this.currOtherTypeCallback=Object.hasOwn(r,"otherTypeCallback")?r.otherTypeCallback:this.currOtherTypeCallback,n=Object.hasOwn(r,"parent")?r.parent:n,l=Object.hasOwn(r,"parentProperty")?r.parentProperty:l,r=r.path}if(n=n||null,l=l||null,Array.isArray(r)&&(r=O.toPathString(r)),!r&&r!==""||!e)return;const h=O.toPathArray(r);h[0]==="$"&&h.length>1&&h.shift(),this._hasParentSelector=null;const f=this._trace(h,e,["$"],n,l,t).filter(function(k){return k&&!k.isParentSelector});return f.length?!p&&f.length===1&&!f[0].hasArrExpr?this._getPreferredOutput(f[0]):f.reduce((k,y)=>{const C=this._getPreferredOutput(y);return c&&Array.isArray(C)?k=k.concat(C):k.push(C),k},[]):p?[]:void 0},O.prototype._getPreferredOutput=function(r){const e=this.currResultType;switch(e){case"all":{const t=Array.isArray(r.path)?r.path:O.toPathArray(r.path);return r.pointer=O.toPointer(t),r.path=typeof r.path=="string"?r.path:O.toPathString(r.path),r}case"value":case"parent":case"parentProperty":return r[e];case"path":return O.toPathString(r[e]);case"pointer":return O.toPointer(r.path);default:throw new TypeError("Unknown result type")}},O.prototype._handleCallback=function(r,e,t){if(e){const o=this._getPreferredOutput(r);r.path=typeof r.path=="string"?r.path:O.toPathString(r.path),e(o,t,r)}},O.prototype._trace=function(r,e,t,o,n,l,c,p){let h;if(!r.length)return h={path:t,value:e,parent:o,parentProperty:n,hasArrExpr:c},this._handleCallback(h,l,"value"),h;const f=r[0],k=r.slice(1),y=[];function C(m){Array.isArray(m)?m.forEach(v=>{y.push(v)}):y.push(m)}if((typeof f!="string"||p)&&e&&Object.hasOwn(e,f))C(this._trace(k,e[f],j(t,f),e,f,l,c));else if(f==="*")this._walk(e,m=>{C(this._trace(k,e[m],j(t,m),e,m,l,!0,!0))});else if(f==="..")C(this._trace(k,e,t,o,n,l,c)),this._walk(e,m=>{typeof e[m]=="object"&&C(this._trace(r.slice(),e[m],j(t,m),e,m,l,!0))});else{if(f==="^")return this._hasParentSelector=!0,{path:t.slice(0,-1),expr:k,isParentSelector:!0};if(f==="~")return h={path:j(t,f),value:n,parent:o,parentProperty:null},this._handleCallback(h,l,"property"),h;if(f==="$")C(this._trace(k,e,t,null,null,l,c));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(f))C(this._slice(f,k,e,t,o,n,l));else if(f.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");const m=f.replace(/^\?\((.*?)\)$/u,"$1"),v=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(m);v?this._walk(e,A=>{const I=[v[2]],N=v[1]?e[A][v[1]]:e[A];this._trace(I,N,t,o,n,l,!0).length>0&&C(this._trace(k,e[A],j(t,A),e,A,l,!0))}):this._walk(e,A=>{this._eval(m,e[A],A,t,o,n)&&C(this._trace(k,e[A],j(t,A),e,A,l,!0))})}else if(f[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");C(this._trace(q(this._eval(f,e,t.at(-1),t.slice(0,-1),o,n),k),e,t,o,n,l,c))}else if(f[0]==="@"){let m=!1;const v=f.slice(1,-2);switch(v){case"scalar":(!e||!["object","function"].includes(typeof e))&&(m=!0);break;case"boolean":case"string":case"undefined":case"function":typeof e===v&&(m=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(m=!0);break;case"number":Number.isFinite(e)&&(m=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(m=!0);break;case"object":e&&typeof e===v&&(m=!0);break;case"array":Array.isArray(e)&&(m=!0);break;case"other":m=this.currOtherTypeCallback(e,t,o,n);break;case"null":e===null&&(m=!0);break;default:throw new TypeError("Unknown value type "+v)}if(m)return h={path:t,value:e,parent:o,parentProperty:n},this._handleCallback(h,l,"value"),h}else if(f[0]==="`"&&e&&Object.hasOwn(e,f.slice(1))){const m=f.slice(1);C(this._trace(k,e[m],j(t,m),e,m,l,c,!0))}else if(f.includes(",")){const m=f.split(",");for(const v of m)C(this._trace(q(v,k),e,t,o,n,l,!0))}else!p&&e&&Object.hasOwn(e,f)&&C(this._trace(k,e[f],j(t,f),e,f,l,c,!0))}if(this._hasParentSelector)for(let m=0;m<y.length;m++){const v=y[m];if(v&&v.isParentSelector){const A=this._trace(v.expr,e,v.path,o,n,l,c);if(Array.isArray(A)){y[m]=A[0];const I=A.length;for(let N=1;N<I;N++)m++,y.splice(m,0,A[N])}else y[m]=A}}return y},O.prototype._walk=function(r,e){if(Array.isArray(r)){const t=r.length;for(let o=0;o<t;o++)e(o)}else r&&typeof r=="object"&&Object.keys(r).forEach(t=>{e(t)})},O.prototype._slice=function(r,e,t,o,n,l,c){if(!Array.isArray(t))return;const p=t.length,h=r.split(":"),f=h[2]&&Number.parseInt(h[2])||1;let k=h[0]&&Number.parseInt(h[0])||0,y=h[1]&&Number.parseInt(h[1])||p;k=k<0?Math.max(0,k+p):Math.min(p,k),y=y<0?Math.max(0,y+p):Math.min(p,y);const C=[];for(let m=k;m<y;m+=f)this._trace(q(m,e),t,o,n,l,c,!0).forEach(A=>{C.push(A)});return C},O.prototype._eval=function(r,e,t,o,n,l){this.currSandbox._$_parentProperty=l,this.currSandbox._$_parent=n,this.currSandbox._$_property=t,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;const c=r.includes("@path");c&&(this.currSandbox._$_path=O.toPathString(o.concat([t])));const p=this.currEval+"Script:"+r;if(!O.cache[p]){let h=r.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(c&&(h=h.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)O.cache[p]=new this.safeVm.Script(h);else if(this.currEval==="native")O.cache[p]=new this.vm.Script(h);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){const f=this.currEval;O.cache[p]=new f(h)}else if(typeof this.currEval=="function")O.cache[p]={runInNewContext:f=>this.currEval(h,f)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return O.cache[p].runInNewContext(this.currSandbox)}catch(h){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+h.message+": "+r)}},O.cache={},O.toPathString=function(r){const e=r,t=e.length;let o="$";for(let n=1;n<t;n++)/^(~|\^|@.*?\(\))$/u.test(e[n])||(o+=/^[0-9*]+$/u.test(e[n])?"["+e[n]+"]":"['"+e[n]+"']");return o},O.toPointer=function(r){const e=r,t=e.length;let o="";for(let n=1;n<t;n++)/^(~|\^|@.*?\(\))$/u.test(e[n])||(o+="/"+e[n].toString().replaceAll("~","~0").replaceAll("/","~1"));return o},O.toPathArray=function(r){const{cache:e}=O;if(e[r])return e[r].concat();const t=[],n=r.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(l,c){return"[#"+(t.push(c)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(l,c){return"['"+c.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(l,c){return";"+c.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(l){const c=l.match(/#(\d+)/u);return!c||!c[1]?l:t[c[1]]});return e[r]=n,e[r].concat()},O.prototype.safeVm={Script:ue};const he=function(r,e,t){const o=r.length;for(let n=0;n<o;n++){const l=r[n];t(l)&&e.push(r.splice(n--,1)[0])}};class fe{constructor(e){this.code=e}runInNewContext(e){let t=this.code;const o=Object.keys(e),n=[];he(o,n,f=>typeof e[f]=="function");const l=o.map(f=>e[f]);t=n.reduce((f,k)=>{let y=e[k].toString();return/function/u.test(y)||(y="function "+y),"var "+k+"="+y+";"+f},"")+t,!/(['"])use strict\1/u.test(t)&&!o.includes("arguments")&&(t="var arguments = undefined;"+t),t=t.replace(/;\s*$/u,"");const p=t.lastIndexOf(";"),h=p!==-1?t.slice(0,p+1)+" return "+t.slice(p+1):" return "+t;return new Function(...o,h)(...l)}}O.prototype.vm={Script:fe};const pe={class:"json-node"},ye={key:0,class:"json-node__container"},ge={class:"json-node__line"},be={key:2,class:"json-node__colon"},me=["title"],Ee={key:3,class:"json-node__collapsed"},ke={key:4,class:"json-node__comma"},_e={key:0,class:"json-node__children"},xe={class:"json-node__children-content"},Oe={class:"json-node__line json-node__closing-bracket"},Ce={class:"json-node__bracket"},we={key:0,class:"json-node__comma"},Ae={key:1,class:"json-node__primitive"},ve={key:2,class:"json-node__colon"},Se=["title"],Ne={key:0,class:"json-node__comma"},Be=s.defineComponent({name:"JsonNode",__name:"JsonNode",props:{value:{},keyName:{},level:{},path:{default:""},expanded:{},isLast:{type:Boolean,default:!1},theme:{}},emits:["update:value","toggle-expand","copy","update:key"],setup(r,{emit:e}){s.useCssVars(d=>({"41b58a02":d.level,"63accfe8":d.theme.colors.syntaxKey,"7a4b22f6":d.theme.colors.hoverBackground,"5865f1b1":d.theme.colors.syntaxBracket,"79c93d33":d.theme.colors.textSecondary,"59ced5e8":d.theme.colors.syntaxString,51525120:d.theme.colors.syntaxNumber,"5410b131":d.theme.colors.syntaxBoolean,"11eec51e":d.theme.colors.syntaxNull,ac53437c:d.theme.colors.background,"15cbe7d4":d.theme.colors.indentLine}));const t=r,o=e,n=s.ref(!1),l=s.ref(!1),c=s.ref(""),p=s.ref(""),h=d=>{if(!/^-?\d+(\.\d+)?$/.test(d))return!1;const _=Number(d);return!Number.isSafeInteger(_)||d.length>15},f=s.computed(()=>t.value!==null&&typeof t.value=="object"),k=s.computed(()=>Array.isArray(t.value)),y=s.computed(()=>t.path?t.path:t.keyName?t.keyName:"root"),C=s.computed(()=>t.expanded.has(y.value)),m=s.computed(()=>t.keyName),v=s.computed(()=>k.value?"[":"{"),A=s.computed(()=>k.value?"]":"}"),I=s.computed(()=>{if(!t.value)return"";const _=Object.keys(t.value).length;return k.value?_>0?` ${_} items `:" ":_>0?` ${_} keys `:" "}),N=s.computed(()=>{const d=typeof t.value;return t.value===null?"json-node__value--null":d==="boolean"?"json-node__value--boolean":d==="number"?"json-node__value--number":d==="string"?h(t.value)?"json-node__value--number":"json-node__value--string":""}),M=s.computed(()=>l.value?p.value:t.value===null?"null":typeof t.value=="boolean"||typeof t.value=="number"?String(t.value):typeof t.value=="string"?h(t.value)?t.value:`"${t.value}"`:String(t.value)),z=s.computed(()=>"Click to edit, double-click to copy"),G=d=>t.level===0?d:y.value?`${y.value}.${d}`:d,V=d=>{const _=Object.keys(t.value);return _.indexOf(d)===_.length-1},F=()=>{o("toggle-expand",y.value)},K=()=>{t.level!==0&&(n.value=!0,c.value=t.keyName,s.nextTick(()=>{const d=document.querySelectorAll(".json-node__key-input"),_=d[d.length-1];_&&(_.focus(),_.select())}))},Q=()=>{f.value||(l.value=!0,typeof t.value=="string"&&h(t.value)||typeof t.value=="string"?p.value=t.value:p.value=String(t.value),s.nextTick(()=>{const d=document.querySelectorAll(".json-node__value-input"),_=d[d.length-1];_&&(_.focus(),_.select())}))},$=()=>{if(t.level===0||!n.value)return;const d=c.value.trim();if(!d){X();return}if(d===t.keyName){n.value=!1;return}n.value=!1,o("update:key",y.value,d)},H=()=>{try{let d;const _=p.value.trim();if(_==="null")d=null;else if(_==="true"||_==="false")d=_==="true";else if(!isNaN(Number(_))&&_!==""){const U=Number(_);!Number.isSafeInteger(U)||_.length>15?d=_:d=U}else d=p.value;o("update:value",y.value,d),l.value=!1}catch(d){console.error("Failed to parse value:",d),l.value=!1}},X=()=>{n.value=!1,c.value=t.keyName},L=()=>{l.value=!1,typeof t.value=="string"&&h(t.value)||typeof t.value=="string"?p.value=t.value:p.value=String(t.value)};return(d,_)=>{const U=s.resolveComponent("JsonNode",!0);return s.openBlock(),s.createElementBlock("div",pe,[f.value?(s.openBlock(),s.createElementBlock("div",ye,[s.createElementVNode("div",ge,[d.keyName&&!n.value?(s.openBlock(),s.createElementBlock("span",{key:0,class:"json-node__key",onClick:K,title:"Click to edit key"},' "'+s.toDisplayString(m.value)+'" ',1)):s.createCommentVNode("",!0),d.keyName&&n.value?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,"onUpdate:modelValue":_[0]||(_[0]=a=>c.value=a),onKeyup:[s.withKeys($,["enter"]),s.withKeys(X,["escape"])],onBlur:$,class:"json-node__key-input"},null,544)),[[s.vModelText,c.value]]):s.createCommentVNode("",!0),d.keyName?(s.openBlock(),s.createElementBlock("span",be,": ")):s.createCommentVNode("",!0),s.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:F,title:C.value?"Click to collapse":"Click to expand"},s.toDisplayString(v.value),9,me),C.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",Ee,[s.createTextVNode(s.toDisplayString(I.value)+" ",1),s.createElementVNode("span",{class:"json-node__bracket json-node__bracket--clickable",onClick:F},s.toDisplayString(A.value),1)])),!C.value&&!d.isLast?(s.openBlock(),s.createElementBlock("span",ke,",")):s.createCommentVNode("",!0)]),C.value?(s.openBlock(),s.createElementBlock("div",_e,[s.createElementVNode("div",xe,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(d.value,(a,u)=>(s.openBlock(),s.createElementBlock("div",{key:u,class:"json-node__child"},[s.createVNode(U,{value:a,"key-name":k.value?"":String(u),level:d.level+1,path:G(String(u)),expanded:d.expanded,theme:d.theme,"onUpdate:value":_[1]||(_[1]=(g,b)=>d.$emit("update:value",g,b)),onToggleExpand:_[2]||(_[2]=g=>d.$emit("toggle-expand",g)),onCopy:_[3]||(_[3]=g=>d.$emit("copy",g)),"onUpdate:key":_[4]||(_[4]=(g,b)=>d.$emit("update:key",g,b)),"is-last":V(String(u))},null,8,["value","key-name","level","path","expanded","theme","is-last"])]))),128))]),s.createElementVNode("div",Oe,[s.createElementVNode("span",Ce,s.toDisplayString(A.value),1),d.isLast?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",we,","))])])):s.createCommentVNode("",!0)])):(s.openBlock(),s.createElementBlock("div",Ae,[d.keyName&&!n.value?(s.openBlock(),s.createElementBlock("span",{key:0,class:"json-node__key",onClick:K,title:"Click to edit key"},' "'+s.toDisplayString(m.value)+'" ',1)):s.createCommentVNode("",!0),d.keyName&&n.value?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:1,"onUpdate:modelValue":_[5]||(_[5]=a=>c.value=a),onKeyup:[s.withKeys($,["enter"]),s.withKeys(X,["escape"])],onBlur:$,class:"json-node__key-input"},null,544)),[[s.vModelText,c.value]]):s.createCommentVNode("",!0),d.keyName?(s.openBlock(),s.createElementBlock("span",ve,": ")):s.createCommentVNode("",!0),l.value?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",{key:3,class:s.normalizeClass(["json-node__value",N.value]),onClick:Q,onDblclick:_[6]||(_[6]=a=>d.$emit("copy",d.value)),title:z.value},[s.createTextVNode(s.toDisplayString(M.value),1),d.isLast?s.createCommentVNode("",!0):(s.openBlock(),s.createElementBlock("span",Ne,","))],42,Se)),l.value?s.withDirectives((s.openBlock(),s.createElementBlock("input",{key:4,"onUpdate:modelValue":_[7]||(_[7]=a=>p.value=a),onKeyup:[s.withKeys(H,["enter"]),s.withKeys(L,["escape"])],onBlur:H,class:"json-node__value-input"},null,544)),[[s.vModelText,p.value]]):s.createCommentVNode("",!0)]))])}}}),Z=(r,e)=>{const t=r.__vccOpts||r;for(const[o,n]of e)t[o]=n;return t},Pe=Z(Be,[["__scopeId","data-v-f3f3cbc9"]]),J={name:"github-light",colors:{background:"#ffffff",surfaceBackground:"#f6f8fa",border:"#d0d7de",text:"#24292f",textSecondary:"#656d76",buttonBackground:"#f6f8fa",buttonBackgroundHover:"#f3f4f6",buttonBorder:"#d0d7de",buttonText:"#24292f",buttonPrimary:"#2da44e",buttonPrimaryHover:"#2c974b",success:"#1a7f37",successBackground:"#dafbe1",error:"#cf222e",errorBackground:"#ffebe9",syntaxString:"#0a3069",syntaxNumber:"#0969da",syntaxBoolean:"#8250df",syntaxNull:"#656d76",syntaxKey:"#0969da",syntaxBracket:"#24292f",scrollbarTrack:"#f6f8fa",scrollbarThumb:"#d0d7de",scrollbarThumbHover:"#afb8c1",hoverBackground:"#f6f8fa",indentLine:"#d0d7de"}},Te={"github-light":J,"github-dark":{name:"github-dark",colors:{background:"#0d1117",surfaceBackground:"#161b22",border:"#30363d",text:"#e6edf3",textSecondary:"#7d8590",buttonBackground:"#21262d",buttonBackgroundHover:"#30363d",buttonBorder:"#30363d",buttonText:"#e6edf3",buttonPrimary:"#238636",buttonPrimaryHover:"#2ea043",success:"#3fb950",successBackground:"#0f2419",error:"#f85149",errorBackground:"#381921",syntaxString:"#a5d6ff",syntaxNumber:"#79c0ff",syntaxBoolean:"#d2a8ff",syntaxNull:"#7d8590",syntaxKey:"#79c0ff",syntaxBracket:"#e6edf3",scrollbarTrack:"#161b22",scrollbarThumb:"#30363d",scrollbarThumbHover:"#6e7681",hoverBackground:"#161b22",indentLine:"#30363d"}},"min-light":{name:"min-light",colors:{background:"#ffffff",surfaceBackground:"#fafafa",border:"#e5e5e5",text:"#333333",textSecondary:"#888888",buttonBackground:"#f8f8f8",buttonBackgroundHover:"#eeeeee",buttonBorder:"#e0e0e0",buttonText:"#333333",buttonPrimary:"#007acc",buttonPrimaryHover:"#005a9e",success:"#22c55e",successBackground:"#f0fdf4",error:"#ef4444",errorBackground:"#fef2f2",syntaxString:"#22c55e",syntaxNumber:"#3b82f6",syntaxBoolean:"#8b5cf6",syntaxNull:"#6b7280",syntaxKey:"#1f2937",syntaxBracket:"#374151",scrollbarTrack:"#f5f5f5",scrollbarThumb:"#d1d5db",scrollbarThumbHover:"#9ca3af",hoverBackground:"#f9f9f9",indentLine:"#e5e7eb"}},"slack-ochin":{name:"slack-ochin",colors:{background:"#fefbf6",surfaceBackground:"#faf6f0",border:"#e8d5b7",text:"#4a3b2a",textSecondary:"#8b7355",buttonBackground:"#f4ede4",buttonBackgroundHover:"#efe5d8",buttonBorder:"#e8d5b7",buttonText:"#4a3b2a",buttonPrimary:"#ff6b35",buttonPrimaryHover:"#e55a2b",success:"#ff9500",successBackground:"#fff8f0",error:"#d73502",errorBackground:"#ffeee8",syntaxString:"#d73502",syntaxNumber:"#ff6b35",syntaxBoolean:"#b7472a",syntaxNull:"#8b7355",syntaxKey:"#4a3b2a",syntaxBracket:"#6b5444",scrollbarTrack:"#f4ede4",scrollbarThumb:"#e8d5b7",scrollbarThumbHover:"#d4c4a8",hoverBackground:"#f8f2eb",indentLine:"#e8d5b7"}}};function De(r="github-light"){return Te[r]||J}const je={key:0,class:"json-format__toolbar"},Ie={class:"json-format__actions"},$e=["disabled"],Re=["disabled"],Ve=["disabled"],Le=["disabled"],Ue={class:"json-format__info"},Me={key:0,class:"json-format__status json-format__status--success"},Fe={key:1,class:"json-format__status json-format__status--error"},Ke={class:"json-format__content"},He={key:0,class:"json-format__error"},Xe={key:1,class:"json-format__error"},Ge={key:2,class:"json-format__viewer"},ee=Z(s.defineComponent({name:"JsonFormat",__name:"index",props:{modelValue:{default:""},readonly:{type:Boolean,default:!1},maxDepth:{default:10},showToolbar:{type:Boolean,default:!0},theme:{default:"github-light"}},emits:["update:modelValue","copy-success","copy-error","expand-all","collapse-all","compress"],setup(r,{expose:e,emit:t}){s.useCssVars(a=>({"8d5bfdae":y.value.colors.border,"14a51bab":y.value.colors.background,"0504ed6a":y.value.colors.text,a5b566c4:y.value.colors.surfaceBackground,a172158a:y.value.colors.buttonBorder,"5ffdb6bd":y.value.colors.buttonBackground,"796bbdfc":y.value.colors.buttonText,"225a5f02":y.value.colors.buttonBackgroundHover,"22d2aed3":y.value.colors.buttonPrimary,"27e37629":y.value.colors.buttonPrimaryHover,"1d58ec74":y.value.colors.successBackground,"04bd5ab4":y.value.colors.success,"0242d8f9":y.value.colors.errorBackground,ca699d2a:y.value.colors.error,"4d5522c2":y.value.colors.scrollbarTrack,"4d50e34d":y.value.colors.scrollbarThumb,"6854fdef":y.value.colors.scrollbarThumbHover}));const o=r,n=t,l=s.ref(null),c=s.ref(""),p=s.ref(new Set),h=s.ref(null),f=s.ref(""),k=s.computed(()=>c.value===""),y=s.computed(()=>De(o.theme)),C=s.computed(()=>f.value?null:h.value!==null?h.value:l.value),m=a=>{if(!a.trim()){l.value=null,c.value="",h.value=null,f.value="";return}try{let u=a;u=u.replace(/:\s*(\d{16,})\s*([,}])/g,': "$1"$2'),u=u.replace(/:\s*(\d+\.\d*?0+)\s*([,}])/g,': "$1"$2'),l.value=JSON.parse(u),c.value="",h.value=null,f.value="",s.nextTick(()=>{C.value!==null&&V()})}catch(u){c.value=u instanceof Error?u.message:"Unknown parsing error",l.value=null,h.value=null,f.value=""}},v=a=>{if(!a||!a.expression.trim()){A();return}if(!l.value){f.value="No valid JSON data to filter";return}try{let u;if(a.type==="jsonpath")u=O({path:a.expression,json:l.value}),u.length===1&&a.expression.includes("$[")===!1&&!a.expression.endsWith("[*]")?h.value=u[0]:h.value=u;else if(a.type==="js")u=new Function("data",`
3
3
  try {
4
4
  return ${a.expression};
5
5
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lone-format",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "A Vue 3 component library for formatting with tree-shaking support",
6
6
  "main": "./dist/lone-format.umd.cjs",